fluid-framework 2.74.0-365691 → 2.74.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # fluid-framework
2
2
 
3
+ ## 2.74.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Fixed bug in sending of revert edits after an aborted transaction ([#25978](https://github.com/microsoft/FluidFramework/pull/25978)) [93ec6c77dab](https://github.com/microsoft/FluidFramework/commit/93ec6c77dab27bd65c2b04862f578ac3876b2cbe)
8
+
9
+ Aborting a transaction used to put the tree in a state that would trigger an assert when sending some undo/redo edits to peers.
10
+ This would prevent some undo/redo edits from being sent and would put the tree in a broken state that prevented any further edits.
11
+ This issue could not have caused document corruption, so reopening the document was a possible remedy.
12
+ Aborting a transaction no longer puts the tree in such a state, so it is safe to perform undo/redo edits after that.
13
+
3
14
  ## 2.73.0
4
15
 
5
16
  ### Minor Changes
@@ -93,17 +93,17 @@ Kind
93
93
  ] extends [FieldKind.Required] ? T : [Kind] extends [FieldKind.Optional] ? T | undefined : [Kind] extends [FieldKind.Identifier] ? DefaultsAreOptional extends true ? T | undefined : T : never;
94
94
 
95
95
  // @alpha @sealed @system
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<TCustomMetadata> {
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
99
  // @alpha @sealed @system
100
100
  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
101
  [Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
102
- }, false, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<TCustomMetadata> {
102
+ }, false, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {
103
103
  }
104
104
 
105
105
  // @alpha @sealed @system
106
- 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<TCustomMetadata> {
106
+ 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
107
  }
108
108
 
109
109
  // @alpha
@@ -141,6 +141,15 @@ export interface BranchableTree extends ViewableTree {
141
141
  rebase(branch: TreeBranchFork): void;
142
142
  }
143
143
 
144
+ // @alpha @sealed
145
+ export type ChangeMetadata = CommitMetadata & ({
146
+ readonly isLocal: true;
147
+ getChange(): JsonCompatibleReadOnly;
148
+ } | {
149
+ readonly isLocal: false;
150
+ readonly getChange?: undefined;
151
+ });
152
+
144
153
  // @alpha
145
154
  export function checkCompatibility(viewWhichCreatedStoredSchema: TreeViewConfiguration, view: TreeViewConfiguration): Omit<SchemaCompatibilityStatus, "canInitialize">;
146
155
 
@@ -250,7 +259,7 @@ export function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema,
250
259
  export function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): SimpleTreeIndex<TKey, TValue>;
251
260
 
252
261
  // @alpha
253
- export function decodeSimpleSchema(encodedSchema: JsonCompatibleReadOnly, validator?: FormatValidator): SimpleTreeSchema;
262
+ export function decodeSchemaCompatibilitySnapshot(encodedSchema: JsonCompatibleReadOnly, validator?: FormatValidator): SimpleTreeSchema;
254
263
 
255
264
  // @public @sealed @system
256
265
  interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
@@ -268,7 +277,7 @@ export interface DirtyTreeMap {
268
277
  export type DirtyTreeStatus = "new" | "changed" | "moved";
269
278
 
270
279
  // @alpha
271
- export function encodeSimpleSchema(simpleSchema: SimpleTreeSchema): JsonCompatibleReadOnly;
280
+ export function encodeSchemaCompatibilitySnapshot(simpleSchema: SimpleTreeSchema): JsonCompatibleReadOnly;
272
281
 
273
282
  // @beta
274
283
  export function enumFromStrings<TScope extends string, const Members extends readonly string[]>(factory: SchemaFactory<TScope>, members: Members): (<TValue extends Members[number]>(value: TValue) => TValue extends unknown ? TreeNode & {
@@ -293,6 +302,12 @@ export abstract class ErasedType<out Name = unknown> {
293
302
  protected abstract brand(dummy: never): Name;
294
303
  }
295
304
 
305
+ // @alpha
306
+ export function eraseSchemaDetails<TNode, ExtraSchemaProperties = unknown>(): <T extends ExtraSchemaProperties & TreeNodeSchema<string, NodeKind, TNode & TreeNode>>(schema: T) => ExtraSchemaProperties & TreeNodeSchema<T["identifier"], NodeKind, TNode & TreeNode & WithType<T["identifier"]>, never, false>;
307
+
308
+ // @alpha
309
+ export function eraseSchemaDetailsSubclassable<TNode, ExtraSchemaProperties = unknown>(): <T extends ExtraSchemaProperties & TreeNodeSchemaClass<string, NodeKind, TNode & TreeNode>>(schema: T) => ExtraSchemaProperties & TreeNodeSchemaClass<T["identifier"], NodeKind, TNode & TreeNode & WithType<T["identifier"]>, never, false>;
310
+
296
311
  // @alpha
297
312
  export function evaluateLazySchema<T extends TreeNodeSchema>(value: LazyItem<T>): T;
298
313
 
@@ -353,7 +368,7 @@ export class FieldSchema<out Kind extends FieldKind = FieldKind, out Types exten
353
368
  }
354
369
 
355
370
  // @alpha @sealed
356
- export class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types extends ImplicitAllowedTypes = ImplicitAllowedTypes, TCustomMetadata = unknown> extends FieldSchema<Kind, Types, TCustomMetadata> implements SimpleFieldSchema {
371
+ export class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types extends ImplicitAllowedTypes = ImplicitAllowedTypes, TCustomMetadata = unknown> extends FieldSchema<Kind, Types, TCustomMetadata> implements SimpleFieldSchema<SchemaType.View> {
357
372
  protected constructor(kind: Kind, types: Types, props?: FieldPropsAlpha<TCustomMetadata>);
358
373
  readonly allowedTypesFull: AllowedTypesFull;
359
374
  // (undocumented)
@@ -361,7 +376,7 @@ export class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types extends
361
376
  // (undocumented)
362
377
  get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined;
363
378
  // (undocumented)
364
- get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypeAttributes>;
379
+ get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.View>>;
365
380
  }
366
381
 
367
382
  // @alpha @sealed @system
@@ -395,6 +410,7 @@ export const FluidClientVersion: {
395
410
  readonly v2_43: "2.43.0";
396
411
  readonly v2_52: "2.52.0";
397
412
  readonly v2_73: "2.73.0";
413
+ readonly v2_74: "2.74.0";
398
414
  };
399
415
 
400
416
  // @public
@@ -470,7 +486,7 @@ export function getBranch<T extends ImplicitFieldSchema | UnsafeUnknownSchema>(v
470
486
  export function getJsonSchema(schema: ImplicitAllowedTypes, options: Required<TreeSchemaEncodingOptions>): JsonTreeSchema;
471
487
 
472
488
  // @alpha
473
- export function getSimpleSchema(schema: ImplicitFieldSchema): SimpleTreeSchema;
489
+ export function getSimpleSchema(schema: ImplicitFieldSchema): SimpleTreeSchema<SchemaType.View>;
474
490
 
475
491
  // @alpha
476
492
  export type HandleConverter<TCustom> = (data: IFluidHandle) => TCustom;
@@ -745,7 +761,7 @@ export type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes;
745
761
  export function importCompatibilitySchemaSnapshot(config: JsonCompatibleReadOnly): TreeViewConfiguration;
746
762
 
747
763
  // @alpha
748
- export type IncrementalEncodingPolicy = (nodeIdentifier: string | undefined, fieldKey: string) => boolean;
764
+ export type IncrementalEncodingPolicy = (nodeIdentifier: string | undefined, fieldKey?: string) => boolean;
749
765
 
750
766
  // @alpha
751
767
  export function incrementalEncodingPolicyForAllowedTypes(rootSchema: TreeSchema): IncrementalEncodingPolicy;
@@ -757,7 +773,7 @@ export const incrementalSummaryHint: unique symbol;
757
773
  export function independentInitializedView<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options: ForestOptions & ICodecOptions, content: ViewContent): TreeViewAlpha<TSchema>;
758
774
 
759
775
  // @alpha
760
- export function independentView<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options: ForestOptions & {
776
+ export function independentView<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options?: ForestOptions & {
761
777
  idCompressor?: IIdCompressor_2 | undefined;
762
778
  }): TreeViewAlpha<TSchema>;
763
779
 
@@ -1024,7 +1040,6 @@ export interface LeafSchema<Name extends string, T extends TreeLeafValue> extend
1024
1040
  // @public @sealed
1025
1041
  export interface Listenable<TListeners extends object> {
1026
1042
  off<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): void;
1027
- // (undocumented)
1028
1043
  on<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): Off;
1029
1044
  }
1030
1045
 
@@ -1038,7 +1053,7 @@ export interface MakeNominal {
1038
1053
  }
1039
1054
 
1040
1055
  // @alpha @sealed @system
1041
- export interface MapNodeCustomizableSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Map, TreeMapNode<T> & WithType<TName, NodeKind.Map, T>, MapNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<TCustomMetadata> {
1056
+ export interface MapNodeCustomizableSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Map, TreeMapNode<T> & WithType<TName, NodeKind.Map, T>, MapNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {
1042
1057
  }
1043
1058
 
1044
1059
  // @alpha @sealed @system
@@ -1049,14 +1064,14 @@ export interface MapNodeCustomizableSchemaUnsafe<out TName extends string, in ou
1049
1064
  ]>;
1050
1065
  } | {
1051
1066
  readonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
1052
- }, false, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<TCustomMetadata> {
1067
+ }, false, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {
1053
1068
  }
1054
1069
 
1055
1070
  // @public @system
1056
1071
  export type MapNodeInsertableData<T extends ImplicitAllowedTypes> = Iterable<readonly [string, InsertableTreeNodeFromImplicitAllowedTypes<T>]> | RestrictiveStringRecord<InsertableTreeNodeFromImplicitAllowedTypes<T>>;
1057
1072
 
1058
1073
  // @alpha @sealed @system
1059
- export interface MapNodePojoEmulationSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaNonClass<TName, NodeKind.Map, TreeMapNode<T> & WithType<TName, NodeKind.Map, T>, MapNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<TCustomMetadata> {
1074
+ export interface MapNodePojoEmulationSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaNonClass<TName, NodeKind.Map, TreeMapNode<T> & WithType<TName, NodeKind.Map, T>, MapNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {
1060
1075
  }
1061
1076
 
1062
1077
  // @alpha
@@ -1133,7 +1148,7 @@ export type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFie
1133
1148
  };
1134
1149
 
1135
1150
  // @alpha @sealed
1136
- export interface ObjectNodeSchema<out TName extends string = string, in out T extends RestrictiveStringRecord<ImplicitFieldSchema> = RestrictiveStringRecord<ImplicitFieldSchema>, ImplicitlyConstructable extends boolean = boolean, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Object, TreeObjectNode<T, TName>, InsertableObjectFromSchemaRecord<T>, ImplicitlyConstructable, T, never, TCustomMetadata>, SimpleObjectNodeSchema<TCustomMetadata> {
1151
+ export interface ObjectNodeSchema<out TName extends string = string, in out T extends RestrictiveStringRecord<ImplicitFieldSchema> = RestrictiveStringRecord<ImplicitFieldSchema>, ImplicitlyConstructable extends boolean = boolean, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Object, TreeObjectNode<T, TName>, InsertableObjectFromSchemaRecord<T>, ImplicitlyConstructable, T, never, TCustomMetadata>, SimpleObjectNodeSchema<SchemaType.View, TCustomMetadata> {
1137
1152
  readonly fields: ReadonlyMap<string, FieldSchemaAlpha & SimpleObjectFieldSchema>;
1138
1153
  }
1139
1154
 
@@ -1182,14 +1197,14 @@ TSchema
1182
1197
  ] extends [ImplicitFieldSchema] ? TSchema : ImplicitFieldSchema;
1183
1198
 
1184
1199
  // @alpha @sealed @system
1185
- export interface RecordNodeCustomizableSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Record, TreeRecordNode<T> & WithType<TName, NodeKind.Record, T>, RecordNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleRecordNodeSchema<TCustomMetadata> {
1200
+ export interface RecordNodeCustomizableSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Record, TreeRecordNode<T> & WithType<TName, NodeKind.Record, T>, RecordNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleRecordNodeSchema<SchemaType.View, TCustomMetadata> {
1186
1201
  }
1187
1202
 
1188
1203
  // @beta @system
1189
1204
  export type RecordNodeInsertableData<T extends ImplicitAllowedTypes> = RestrictiveStringRecord<InsertableTreeNodeFromImplicitAllowedTypes<T>>;
1190
1205
 
1191
1206
  // @alpha @sealed @system
1192
- export interface RecordNodePojoEmulationSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaNonClass<TName, NodeKind.Record, TreeRecordNode<T> & WithType<TName, NodeKind.Record, T>, RecordNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleRecordNodeSchema<TCustomMetadata> {
1207
+ export interface RecordNodePojoEmulationSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaNonClass<TName, NodeKind.Record, TreeRecordNode<T> & WithType<TName, NodeKind.Record, T>, RecordNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleRecordNodeSchema<SchemaType.View, TCustomMetadata> {
1193
1208
  }
1194
1209
 
1195
1210
  // @alpha
@@ -1317,15 +1332,15 @@ export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
1317
1332
  export class SchemaFactoryAlpha<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactoryBeta<TScope, TName> {
1318
1333
  arrayAlpha<const Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
1319
1334
  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>;
1320
- static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier, LeafSchema<"string", string> & SimpleLeafNodeSchema, TCustomMetadata>;
1321
- static readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema, LeafSchema<"null", null> & SimpleLeafNodeSchema, LeafSchema<"handle", IFluidHandle_2<unknown>> & SimpleLeafNodeSchema];
1322
- readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema, LeafSchema<"null", null> & SimpleLeafNodeSchema, LeafSchema<"handle", IFluidHandle_2<unknown>> & SimpleLeafNodeSchema];
1335
+ static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier, LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, TCustomMetadata>;
1336
+ 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>];
1337
+ 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>];
1323
1338
  mapAlpha<Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
1324
1339
  mapRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
1325
1340
  objectAlpha<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchema>, const TCustomMetadata = unknown>(name: Name, fields: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): ObjectNodeSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> & {
1326
1341
  readonly createFromInsertable: unknown;
1327
1342
  };
1328
- objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>, const TCustomMetadata = unknown>(name: Name, t: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T, never, TCustomMetadata> & SimpleObjectNodeSchema<TCustomMetadata> & Pick<ObjectNodeSchema, "fields">;
1343
+ objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>, const TCustomMetadata = unknown>(name: Name, t: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T, never, TCustomMetadata> & SimpleObjectNodeSchema<SchemaType.View, TCustomMetadata> & Pick<ObjectNodeSchema, "fields">;
1329
1344
  static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata>;
1330
1345
  readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata>;
1331
1346
  static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
@@ -1390,6 +1405,12 @@ export interface SchemaStaticsBeta {
1390
1405
  readonly typesRecursive: <const T extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixedUnsafe<T>;
1391
1406
  }
1392
1407
 
1408
+ // @alpha
1409
+ export enum SchemaType {
1410
+ Stored = 0,
1411
+ View = 1
1412
+ }
1413
+
1393
1414
  // @beta @sealed
1394
1415
  export class SchemaUpgrade {
1395
1416
  // (undocumented)
@@ -1422,35 +1443,38 @@ export interface SharedTreeOptions extends SharedTreeOptionsBeta, Partial<CodecW
1422
1443
  export type SharedTreeOptionsBeta = ForestOptions;
1423
1444
 
1424
1445
  // @alpha @sealed
1425
- export interface SimpleAllowedTypeAttributes {
1426
- readonly isStaged: false | SchemaUpgrade | undefined;
1446
+ export interface SimpleAllowedTypeAttributes<out Type extends SchemaType = SchemaType> {
1447
+ readonly isStaged: Type extends SchemaType.Stored ? undefined : false | SchemaUpgrade;
1427
1448
  }
1428
1449
 
1429
1450
  // @alpha @sealed
1430
- export interface SimpleArrayNodeSchema<out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<NodeKind.Array, TCustomMetadata> {
1431
- readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypeAttributes>;
1451
+ export interface SimpleArrayNodeSchema<Type extends SchemaType = SchemaType, out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<Type, NodeKind.Array, TCustomMetadata> {
1452
+ readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypeAttributes<Type>>;
1432
1453
  }
1433
1454
 
1434
1455
  // @alpha @sealed
1435
- export interface SimpleFieldSchema {
1456
+ export interface SimpleFieldSchema<Type extends SchemaType = SchemaType> {
1436
1457
  readonly kind: FieldKind;
1437
- readonly metadata: FieldSchemaMetadata;
1458
+ readonly metadata: FieldSchemaMetadata & (Type extends SchemaType.View ? unknown : {
1459
+ readonly custom?: undefined;
1460
+ readonly description?: undefined;
1461
+ });
1438
1462
  readonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;
1439
- readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypeAttributes>;
1463
+ readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypeAttributes<Type>>;
1440
1464
  }
1441
1465
 
1442
1466
  // @alpha @sealed
1443
- export interface SimpleLeafNodeSchema extends SimpleNodeSchemaBaseAlpha<NodeKind.Leaf> {
1467
+ export interface SimpleLeafNodeSchema<Type extends SchemaType = SchemaType> extends SimpleNodeSchemaBaseAlpha<Type, NodeKind.Leaf> {
1444
1468
  readonly leafKind: ValueSchema;
1445
1469
  }
1446
1470
 
1447
1471
  // @alpha @sealed
1448
- export interface SimpleMapNodeSchema<out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<NodeKind.Map, TCustomMetadata> {
1449
- readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypeAttributes>;
1472
+ export interface SimpleMapNodeSchema<Type extends SchemaType = SchemaType, out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<Type, NodeKind.Map, TCustomMetadata> {
1473
+ readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypeAttributes<Type>>;
1450
1474
  }
1451
1475
 
1452
1476
  // @alpha
1453
- export type SimpleNodeSchema = SimpleLeafNodeSchema | SimpleMapNodeSchema | SimpleArrayNodeSchema | SimpleObjectNodeSchema | SimpleRecordNodeSchema;
1477
+ export type SimpleNodeSchema<Type extends SchemaType = SchemaType> = SimpleLeafNodeSchema<Type> | SimpleMapNodeSchema<Type> | SimpleArrayNodeSchema<Type> | SimpleObjectNodeSchema<Type> | SimpleRecordNodeSchema<Type>;
1454
1478
 
1455
1479
  // @public @sealed @system
1456
1480
  export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> {
@@ -1459,33 +1483,38 @@ export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCusto
1459
1483
  }
1460
1484
 
1461
1485
  // @alpha @sealed @system
1462
- export interface SimpleNodeSchemaBaseAlpha<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> extends SimpleNodeSchemaBase<TNodeKind, TCustomMetadata> {
1486
+ export interface SimpleNodeSchemaBaseAlpha<out Type extends SchemaType, out TNodeKind extends NodeKind, out TCustomMetadata = unknown> extends SimpleNodeSchemaBase<TNodeKind, TCustomMetadata> {
1487
+ // (undocumented)
1488
+ readonly metadata: SimpleNodeSchemaBase<TNodeKind, TCustomMetadata>["metadata"] & (Type extends SchemaType.View ? unknown : {
1489
+ readonly custom?: undefined;
1490
+ readonly description?: undefined;
1491
+ });
1463
1492
  readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined;
1464
1493
  }
1465
1494
 
1466
1495
  // @alpha @sealed
1467
- export interface SimpleObjectFieldSchema extends SimpleFieldSchema {
1496
+ export interface SimpleObjectFieldSchema<Type extends SchemaType = SchemaType> extends SimpleFieldSchema<Type> {
1468
1497
  readonly storedKey: string;
1469
1498
  }
1470
1499
 
1471
1500
  // @alpha @sealed
1472
- export interface SimpleObjectNodeSchema<out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<NodeKind.Object, TCustomMetadata> {
1473
- readonly allowUnknownOptionalFields: boolean | undefined;
1474
- readonly fields: ReadonlyMap<string, SimpleObjectFieldSchema>;
1501
+ export interface SimpleObjectNodeSchema<Type extends SchemaType = SchemaType, out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<Type, NodeKind.Object, TCustomMetadata> {
1502
+ readonly allowUnknownOptionalFields: Type extends SchemaType.View ? boolean : undefined;
1503
+ readonly fields: ReadonlyMap<string, SimpleObjectFieldSchema<Type>>;
1475
1504
  }
1476
1505
 
1477
1506
  // @alpha @sealed
1478
- export interface SimpleRecordNodeSchema<out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<NodeKind.Record, TCustomMetadata> {
1479
- readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypeAttributes>;
1507
+ export interface SimpleRecordNodeSchema<Type extends SchemaType = SchemaType, out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<Type, NodeKind.Record, TCustomMetadata> {
1508
+ readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypeAttributes<Type>>;
1480
1509
  }
1481
1510
 
1482
1511
  // @alpha
1483
1512
  export type SimpleTreeIndex<TKey extends TreeIndexKey, TValue> = TreeIndex<TKey, TValue>;
1484
1513
 
1485
1514
  // @alpha @sealed
1486
- export interface SimpleTreeSchema {
1487
- readonly definitions: ReadonlyMap<string, SimpleNodeSchema>;
1488
- readonly root: SimpleFieldSchema;
1515
+ export interface SimpleTreeSchema<Type extends SchemaType = SchemaType> {
1516
+ readonly definitions: ReadonlyMap<string, SimpleNodeSchema<Type>>;
1517
+ readonly root: SimpleFieldSchema<Type>;
1489
1518
  }
1490
1519
 
1491
1520
  // @beta
@@ -1496,11 +1525,11 @@ export function singletonSchema<TScope extends string, TName extends string | nu
1496
1525
  // @alpha @system
1497
1526
  export namespace System_TableSchema {
1498
1527
  // @sealed @system
1499
- export type ColumnSchemaBase<TScope extends string | undefined = string | undefined, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createColumnSchema<TScope, TCellSchema, TPropsSchema>>;
1528
+ export type ColumnSchemaBase<TUserScope extends string = string, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createColumnSchema<TUserScope, TCellSchema, TPropsSchema>>;
1500
1529
  // @system
1501
- export type CreateColumnOptionsBase<TSchemaFactory extends SchemaFactoryBeta = SchemaFactoryBeta, TCell extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;
1530
+ export type CreateColumnOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
1502
1531
  // @system
1503
- export function createColumnSchema<const TInputScope extends string | undefined, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TInputScope>, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Column">, NodeKind.Object, TreeNode & TableSchema.Column<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Column">, NodeKind, unknown>, object & {
1532
+ export function createColumnSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Column">, NodeKind.Object, TreeNode & TableSchema.Column<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Column">, NodeKind, unknown>, object & {
1504
1533
  readonly id?: string | undefined;
1505
1534
  } & (FieldHasDefault<TPropsSchema> extends true ? {
1506
1535
  props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
@@ -1511,11 +1540,11 @@ export namespace System_TableSchema {
1511
1540
  readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
1512
1541
  }>;
1513
1542
  // @system
1514
- export type CreateRowOptionsBase<TSchemaFactory extends SchemaFactoryBeta = SchemaFactoryBeta, TCell extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;
1543
+ export type CreateRowOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
1515
1544
  // @sealed
1516
- export function createRowSchema<const TInputScope extends string | undefined, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TInputScope>, cellSchema: TCellSchema, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row">, NodeKind, unknown>, object & {
1545
+ export function createRowSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, cellSchema: TCellSchema, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Row">, NodeKind, unknown>, object & {
1517
1546
  readonly id?: string | undefined;
1518
- readonly cells: (InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>>;
1547
+ readonly cells: (InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>>;
1519
1548
  } & (FieldHasDefault<TPropsSchema> extends true ? {
1520
1549
  props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
1521
1550
  } : {
@@ -1523,24 +1552,12 @@ export namespace System_TableSchema {
1523
1552
  }), true, {
1524
1553
  readonly props: TPropsSchema;
1525
1554
  readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
1526
- readonly cells: FieldSchema_2<FieldKind_2.Required, TreeNodeSchemaClass<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
1555
+ readonly cells: FieldSchema_2<FieldKind_2.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
1527
1556
  }>;
1528
1557
  // @system
1529
- export function createTableSchema<const TInputScope extends string | undefined, const TCellSchema extends ImplicitAllowedTypes, const TColumnSchema extends ColumnSchemaBase<TInputScope, TCellSchema>, const TRowSchema extends RowSchemaBase<TInputScope, TCellSchema>>(inputSchemaFactory: SchemaFactoryBeta<TInputScope>, _cellSchema: TCellSchema, columnSchema: TColumnSchema, rowSchema: TRowSchema): TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table">, NodeKind.Object, true, {
1530
- readonly rows: TreeNodeSchemaClass<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, TreeArrayNode<TRowSchema, [TRowSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TRowSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TRowSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, unknown>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>>, true, TRowSchema, undefined>;
1531
- readonly columns: TreeNodeSchemaClass<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, TreeArrayNode<TColumnSchema, [TColumnSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TColumnSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TColumnSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, unknown>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>>, true, TColumnSchema, undefined>;
1532
- }, object & {
1533
- readonly rows: (InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, true, TRowSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>> | undefined) => TreeArrayNode<TRowSchema, [TRowSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TRowSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TRowSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, unknown>)> | undefined) & InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, true, TRowSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>> | undefined) => TreeArrayNode<TRowSchema, [TRowSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TRowSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TRowSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, unknown>)>;
1534
- readonly columns: (InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, true, TColumnSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>> | undefined) => TreeArrayNode<TColumnSchema, [TColumnSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TColumnSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TColumnSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, unknown>)> | undefined) & InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, true, TColumnSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>> | undefined) => TreeArrayNode<TColumnSchema, [TColumnSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TColumnSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TColumnSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, unknown>)>;
1535
- }, unknown> & (new (data: InternalTreeNode | (object & {
1536
- readonly rows: (InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, true, TRowSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>> | undefined) => TreeArrayNode<TRowSchema, [TRowSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TRowSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TRowSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, unknown>)> | undefined) & InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, true, TRowSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>> | undefined) => TreeArrayNode<TRowSchema, [TRowSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TRowSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TRowSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, unknown>)>;
1537
- readonly columns: (InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, true, TColumnSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>> | undefined) => TreeArrayNode<TColumnSchema, [TColumnSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TColumnSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TColumnSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, unknown>)> | undefined) & InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, true, TColumnSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>> | undefined) => TreeArrayNode<TColumnSchema, [TColumnSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TColumnSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TColumnSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, unknown>)>;
1538
- })) => TreeNode & TableSchema.Table<TInputScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table">, NodeKind, unknown>) & {
1539
- empty<TThis extends new (data: {
1540
- readonly rows: (InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, true, TRowSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>> | undefined) => TreeArrayNode<TRowSchema, [TRowSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TRowSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TRowSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, unknown>)> | undefined) & InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, true, TRowSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema>> | undefined) => TreeArrayNode<TRowSchema, [TRowSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TRowSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TRowSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TRowSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.rows">, NodeKind.Array, unknown>)>;
1541
- readonly columns: (InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, true, TColumnSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>> | undefined) => TreeArrayNode<TColumnSchema, [TColumnSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TColumnSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TColumnSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, unknown>)> | undefined) & InsertableTypedNode_2<TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, true, TColumnSchema, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>>, unknown> & (new (data?: InternalTreeNode | Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema>> | undefined) => TreeArrayNode<TColumnSchema, [TColumnSchema] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TColumnSchema> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, [TColumnSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TColumnSchema> : never, ReadonlyArrayNode_2<TreeNode | TreeLeafValue_2>> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table.columns">, NodeKind.Array, unknown>)>;
1542
- }) => TreeNode & TableSchema.Table<TInputScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table">, NodeKind, unknown>>(this: TThis): InstanceType<TThis>;
1543
- };
1558
+ export function createTableSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TColumnSchema extends ColumnSchemaBase<TUserScope, TCellSchema>, const TRowSchema extends RowSchemaBase<TUserScope, TCellSchema>>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, _cellSchema: TCellSchema, columnSchema: TColumnSchema, rowSchema: TRowSchema): {
1559
+ create<TThis extends new (data?: InternalTreeNode | undefined) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "TableRoot">, NodeKind, unknown>>(this: TThis, initialContents?: TableSchema.TableFactoryMethodParameters<TUserScope, TCellSchema, TColumnSchema, TRowSchema> | undefined): InstanceType<TThis>;
1560
+ } & (new (data?: InternalTreeNode | undefined) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "TableRoot">, NodeKind, unknown>) & TreeNodeSchemaCore<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "TableRoot"> & string, NodeKind, false, unknown, never, unknown> & (new (data: InternalTreeNode) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "TableRoot">, NodeKind, unknown> & WithType<ScopedSchemaName<`com.fluidframework.table<${TUserScope}>`, "TableRoot"> & string, NodeKind, unknown>);
1544
1561
  // @system
1545
1562
  export type DefaultPropsType = ReturnType<typeof SchemaFactory.optional<[]>>;
1546
1563
  // @system
@@ -1551,12 +1568,21 @@ export namespace System_TableSchema {
1551
1568
  export interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryBeta> {
1552
1569
  readonly schemaFactory: TSchemaFactory;
1553
1570
  }
1571
+ // @system
1572
+ export type RearrangeableList<TItemSchema extends ImplicitAllowedTypes> = TreeNode & readonly TreeNodeFromImplicitAllowedTypes<TItemSchema>[] & {
1573
+ moveToEnd(sourceIndex: number): void;
1574
+ moveToStart(sourceIndex: number): void;
1575
+ moveToIndex(sourceIndex: number, destinationIndex: number): void;
1576
+ moveRangeToEnd(startIndex: number, endIndex: number): void;
1577
+ moveRangeToStart(startIndex: number, endIndex: number): void;
1578
+ moveRangeToIndex(startIndex: number, endIndex: number, destinationIndex: number): void;
1579
+ };
1554
1580
  // @sealed @system
1555
- export type RowSchemaBase<TScope extends string | undefined = string | undefined, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createRowSchema<TScope, TCellSchema, TPropsSchema>>;
1581
+ export type RowSchemaBase<TUserScope extends string = string, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createRowSchema<TUserScope, TCellSchema, TPropsSchema>>;
1556
1582
  // @system
1557
- export type TableFactoryOptionsBase<TSchemaFactory extends SchemaFactoryBeta = SchemaFactoryBeta, TCell extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;
1583
+ export type TableFactoryOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
1558
1584
  // @sealed @system
1559
- export type TableSchemaBase<TScope extends string | undefined, TCell extends ImplicitAllowedTypes, TColumn extends ColumnSchemaBase<TScope, TCell>, TRow extends RowSchemaBase<TScope, TCell>> = ReturnType<typeof createTableSchema<TScope, TCell, TColumn, TRow>>;
1585
+ export type TableSchemaBase<TUserScope extends string, TCellSchema extends ImplicitAllowedTypes, TColumnSchema extends ColumnSchemaBase<TUserScope, TCellSchema>, TRowSchema extends RowSchemaBase<TUserScope, TCellSchema>> = ReturnType<typeof createTableSchema<TUserScope, TCellSchema, TColumnSchema, TRowSchema>>;
1560
1586
  }
1561
1587
 
1562
1588
  // @public @system
@@ -1644,6 +1670,7 @@ export namespace System_Unsafe {
1644
1670
 
1645
1671
  // @alpha
1646
1672
  export namespace TableSchema {
1673
+ // @input
1647
1674
  export interface CellKey<TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
1648
1675
  readonly column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>;
1649
1676
  readonly row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>;
@@ -1654,14 +1681,16 @@ export namespace TableSchema {
1654
1681
  get props(): TreeFieldFromImplicitField<TProps>;
1655
1682
  set props(value: InsertableTreeFieldFromImplicitField<TProps>);
1656
1683
  }
1657
- export function column<const TScope extends string | undefined, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryBeta<TScope>, TCell>): System_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>;
1658
- export function column<const TScope extends string | undefined, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1684
+ export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>;
1685
+ export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
1659
1686
  readonly props: TProps;
1660
- }): System_TableSchema.ColumnSchemaBase<TScope, TCell, TProps>;
1687
+ }): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
1688
+ // @input
1661
1689
  export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
1662
1690
  readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
1663
1691
  readonly index?: number | undefined;
1664
1692
  }
1693
+ // @input
1665
1694
  export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
1666
1695
  readonly index?: number | undefined;
1667
1696
  readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
@@ -1672,17 +1701,18 @@ export namespace TableSchema {
1672
1701
  get props(): TreeFieldFromImplicitField<TProps>;
1673
1702
  set props(value: InsertableTreeFieldFromImplicitField<TProps>);
1674
1703
  }
1675
- export function row<const TScope extends string | undefined, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.CreateRowOptionsBase<SchemaFactoryBeta<TScope>, TCell>): System_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>;
1676
- export function row<const TScope extends string | undefined, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1704
+ export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>;
1705
+ export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
1677
1706
  readonly props: TProps;
1678
- }): System_TableSchema.RowSchemaBase<TScope, TCell, TProps>;
1707
+ }): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
1708
+ // @input
1679
1709
  export interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
1680
1710
  readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
1681
1711
  readonly key: CellKey<TColumn, TRow>;
1682
1712
  }
1683
1713
  // @sealed
1684
- export interface Table<TScope extends string | undefined, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>> {
1685
- readonly columns: TreeArrayNode<TColumn>;
1714
+ export interface Table<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
1715
+ readonly columns: System_TableSchema.RearrangeableList<TColumn>;
1686
1716
  getCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
1687
1717
  getColumn(id: string): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
1688
1718
  getColumn(index: number): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
@@ -1697,20 +1727,25 @@ export namespace TableSchema {
1697
1727
  removeRows(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TRow>[];
1698
1728
  removeRows(rows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
1699
1729
  removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
1700
- readonly rows: TreeArrayNode<TRow>;
1730
+ readonly rows: System_TableSchema.RearrangeableList<TRow>;
1701
1731
  setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
1702
1732
  }
1703
- export function table<const TScope extends string | undefined, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryBeta<TScope>, TCell>): System_TableSchema.TableSchemaBase<TScope, TCell, System_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>, System_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>>;
1704
- export function table<const TScope extends string | undefined, const TCell extends ImplicitAllowedTypes, const TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1733
+ export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
1734
+ export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
1705
1735
  readonly column: TColumn;
1706
- }): System_TableSchema.TableSchemaBase<TScope, TCell, TColumn, System_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>>;
1707
- export function table<const TScope extends string | undefined, const TCell extends ImplicitAllowedTypes, const TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1736
+ }): System_TableSchema.TableSchemaBase<TUserScope, TCell, TColumn, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
1737
+ export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
1708
1738
  readonly row: TRow;
1709
- }): System_TableSchema.TableSchemaBase<TScope, TCell, System_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>, TRow>;
1710
- export function table<const TScope extends string | undefined, const TCell extends ImplicitAllowedTypes, const TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>, const TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1739
+ }): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, TRow>;
1740
+ export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, const TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
1711
1741
  readonly column: TColumn;
1712
1742
  readonly row: TRow;
1713
- }): System_TableSchema.TableSchemaBase<TScope, TCell, TColumn, TRow>;
1743
+ }): System_TableSchema.TableSchemaBase<TUserScope, TCell, TColumn, TRow>;
1744
+ // @input
1745
+ export interface TableFactoryMethodParameters<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
1746
+ readonly columns?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumn>> | undefined;
1747
+ readonly rows?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRow>> | undefined;
1748
+ }
1714
1749
  }
1715
1750
 
1716
1751
  // @public
@@ -1848,6 +1883,7 @@ export interface TreeBranch extends IDisposable {
1848
1883
 
1849
1884
  // @alpha @sealed
1850
1885
  export interface TreeBranchAlpha extends TreeBranch {
1886
+ applyChange(change: JsonCompatibleReadOnly): void;
1851
1887
  readonly events: Listenable<TreeBranchEvents>;
1852
1888
  // (undocumented)
1853
1889
  fork(): TreeBranchAlpha;
@@ -1858,7 +1894,7 @@ export interface TreeBranchAlpha extends TreeBranch {
1858
1894
 
1859
1895
  // @alpha @sealed
1860
1896
  export interface TreeBranchEvents extends Omit<TreeViewEvents, "commitApplied"> {
1861
- changed(data: CommitMetadata, getRevertible?: RevertibleAlphaFactory): void;
1897
+ changed(data: ChangeMetadata, getRevertible?: RevertibleAlphaFactory): void;
1862
1898
  commitApplied(data: CommitMetadata, getRevertible?: RevertibleAlphaFactory): void;
1863
1899
  }
1864
1900
 
@@ -2002,8 +2038,8 @@ export interface TreeRecordNodeUnsafe<TAllowedTypes extends System_Unsafe.Implic
2002
2038
  }
2003
2039
 
2004
2040
  // @alpha @sealed (undocumented)
2005
- export interface TreeSchema extends SimpleTreeSchema {
2006
- readonly definitions: ReadonlyMap<string, SimpleNodeSchema & TreeNodeSchema>;
2041
+ export interface TreeSchema extends SimpleTreeSchema<SchemaType.View> {
2042
+ readonly definitions: ReadonlyMap<string, SimpleNodeSchema<SchemaType.View> & TreeNodeSchema>;
2007
2043
  readonly root: FieldSchemaAlpha;
2008
2044
  }
2009
2045
 
@@ -2053,7 +2089,6 @@ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extend
2053
2089
  // @public @sealed
2054
2090
  export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> implements Required<ITreeViewConfiguration<TSchema>> {
2055
2091
  constructor(props: ITreeViewConfiguration<TSchema>);
2056
- protected readonly definitionsInternal: ReadonlyMap<string, TreeNodeSchema>;
2057
2092
  readonly enableSchemaValidation: boolean;
2058
2093
  readonly preventAmbiguity: boolean;
2059
2094
  readonly schema: TSchema;
@@ -2064,7 +2099,9 @@ export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = I
2064
2099
  // @alpha @sealed
2065
2100
  export class TreeViewConfigurationAlpha<const TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> extends TreeViewConfiguration<TSchema> implements TreeSchema {
2066
2101
  constructor(props: ITreeViewConfiguration<TSchema>);
2067
- get definitions(): ReadonlyMap<string, SimpleNodeSchema & TreeNodeSchema>;
2102
+ // (undocumented)
2103
+ readonly definitions: ReadonlyMap<string, SimpleNodeSchema<SchemaType.View> & TreeNodeSchema>;
2104
+ // (undocumented)
2068
2105
  readonly root: FieldSchemaAlpha;
2069
2106
  }
2070
2107
 
@@ -686,7 +686,6 @@ export interface LeafSchema<Name extends string, T extends TreeLeafValue> extend
686
686
  // @public @sealed
687
687
  export interface Listenable<TListeners extends object> {
688
688
  off<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): void;
689
- // (undocumented)
690
689
  on<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): Off;
691
690
  }
692
691
 
@@ -1237,7 +1236,6 @@ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extend
1237
1236
  // @public @sealed
1238
1237
  export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> implements Required<ITreeViewConfiguration<TSchema>> {
1239
1238
  constructor(props: ITreeViewConfiguration<TSchema>);
1240
- protected readonly definitionsInternal: ReadonlyMap<string, TreeNodeSchema>;
1241
1239
  readonly enableSchemaValidation: boolean;
1242
1240
  readonly preventAmbiguity: boolean;
1243
1241
  readonly schema: TSchema;
@@ -964,7 +964,6 @@ export interface LeafSchema<Name extends string, T extends TreeLeafValue> extend
964
964
  // @public @sealed
965
965
  export interface Listenable<TListeners extends object> {
966
966
  off<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): void;
967
- // (undocumented)
968
967
  on<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): Off;
969
968
  }
970
969
 
@@ -1595,7 +1594,6 @@ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extend
1595
1594
  // @public @sealed
1596
1595
  export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> implements Required<ITreeViewConfiguration<TSchema>> {
1597
1596
  constructor(props: ITreeViewConfiguration<TSchema>);
1598
- protected readonly definitionsInternal: ReadonlyMap<string, TreeNodeSchema>;
1599
1597
  readonly enableSchemaValidation: boolean;
1600
1598
  readonly preventAmbiguity: boolean;
1601
1599
  readonly schema: TSchema;
@@ -562,7 +562,6 @@ export interface LeafSchema<Name extends string, T extends TreeLeafValue> extend
562
562
  // @public @sealed
563
563
  export interface Listenable<TListeners extends object> {
564
564
  off<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): void;
565
- // (undocumented)
566
565
  on<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): Off;
567
566
  }
568
567
 
@@ -1000,7 +999,6 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
1000
999
  // @public @sealed
1001
1000
  export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> implements Required<ITreeViewConfiguration<TSchema>> {
1002
1001
  constructor(props: ITreeViewConfiguration<TSchema>);
1003
- protected readonly definitionsInternal: ReadonlyMap<string, TreeNodeSchema>;
1004
1002
  readonly enableSchemaValidation: boolean;
1005
1003
  readonly preventAmbiguity: boolean;
1006
1004
  readonly schema: TSchema;
@@ -528,7 +528,6 @@ export interface LeafSchema<Name extends string, T extends TreeLeafValue> extend
528
528
  // @public @sealed
529
529
  export interface Listenable<TListeners extends object> {
530
530
  off<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): void;
531
- // (undocumented)
532
531
  on<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): Off;
533
532
  }
534
533
 
@@ -966,7 +965,6 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
966
965
  // @public @sealed
967
966
  export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> implements Required<ITreeViewConfiguration<TSchema>> {
968
967
  constructor(props: ITreeViewConfiguration<TSchema>);
969
- protected readonly definitionsInternal: ReadonlyMap<string, TreeNodeSchema>;
970
968
  readonly enableSchemaValidation: boolean;
971
969
  readonly preventAmbiguity: boolean;
972
970
  readonly schema: TSchema;
package/dist/alpha.d.ts CHANGED
@@ -195,6 +195,7 @@ export {
195
195
  ArrayNodePojoEmulationSchema,
196
196
  ArrayNodeSchema,
197
197
  BranchableTree,
198
+ ChangeMetadata,
198
199
  CodecWriteOptions,
199
200
  DirtyTreeMap,
200
201
  DirtyTreeStatus,
@@ -250,6 +251,7 @@ export {
250
251
  RevertibleAlphaFactory,
251
252
  RunTransactionParams,
252
253
  SchemaFactoryAlpha,
254
+ SchemaType,
253
255
  SharedTreeFormatOptions,
254
256
  SharedTreeOptions,
255
257
  SimpleAllowedTypeAttributes,
@@ -303,8 +305,10 @@ export {
303
305
  createIdentifierIndex,
304
306
  createIndependentTreeAlpha,
305
307
  createSimpleTreeIndex,
306
- decodeSimpleSchema,
307
- encodeSimpleSchema,
308
+ decodeSchemaCompatibilitySnapshot,
309
+ encodeSchemaCompatibilitySnapshot,
310
+ eraseSchemaDetails,
311
+ eraseSchemaDetailsSubclassable,
308
312
  evaluateLazySchema,
309
313
  exportCompatibilitySchemaSnapshot,
310
314
  extractPersistedSchema,
@@ -0,0 +1,22 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * GENERATED FILE - DO NOT EDIT DIRECTLY.
4
+ * To regenerate: pnpm tsx scripts/generate-flat-eslint-configs.ts --typescript
5
+ */
6
+ import type { Linter } from "eslint";
7
+ import { strict } from "../../../common/build/eslint-config-fluid/flat.mts";
8
+
9
+ const config: Linter.Config[] = [
10
+ ...strict,
11
+ {
12
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
13
+ languageOptions: {
14
+ parserOptions: {
15
+ projectService: false,
16
+ project: ["./tsconfig.json"],
17
+ },
18
+ },
19
+ },
20
+ ];
21
+
22
+ export default config;
package/lib/alpha.d.ts CHANGED
@@ -195,6 +195,7 @@ export {
195
195
  ArrayNodePojoEmulationSchema,
196
196
  ArrayNodeSchema,
197
197
  BranchableTree,
198
+ ChangeMetadata,
198
199
  CodecWriteOptions,
199
200
  DirtyTreeMap,
200
201
  DirtyTreeStatus,
@@ -250,6 +251,7 @@ export {
250
251
  RevertibleAlphaFactory,
251
252
  RunTransactionParams,
252
253
  SchemaFactoryAlpha,
254
+ SchemaType,
253
255
  SharedTreeFormatOptions,
254
256
  SharedTreeOptions,
255
257
  SimpleAllowedTypeAttributes,
@@ -303,8 +305,10 @@ export {
303
305
  createIdentifierIndex,
304
306
  createIndependentTreeAlpha,
305
307
  createSimpleTreeIndex,
306
- decodeSimpleSchema,
307
- encodeSimpleSchema,
308
+ decodeSchemaCompatibilitySnapshot,
309
+ encodeSchemaCompatibilitySnapshot,
310
+ eraseSchemaDetails,
311
+ eraseSchemaDetailsSubclassable,
308
312
  evaluateLazySchema,
309
313
  exportCompatibilitySchemaSnapshot,
310
314
  extractPersistedSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluid-framework",
3
- "version": "2.74.0-365691",
3
+ "version": "2.74.0",
4
4
  "description": "The main entry point into Fluid Framework public packages",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -57,30 +57,31 @@
57
57
  "main": "lib/index.js",
58
58
  "types": "lib/public.d.ts",
59
59
  "dependencies": {
60
- "@fluidframework/container-definitions": "2.74.0-365691",
61
- "@fluidframework/container-loader": "2.74.0-365691",
62
- "@fluidframework/core-interfaces": "2.74.0-365691",
63
- "@fluidframework/core-utils": "2.74.0-365691",
64
- "@fluidframework/driver-definitions": "2.74.0-365691",
65
- "@fluidframework/fluid-static": "2.74.0-365691",
66
- "@fluidframework/map": "2.74.0-365691",
67
- "@fluidframework/runtime-utils": "2.74.0-365691",
68
- "@fluidframework/sequence": "2.74.0-365691",
69
- "@fluidframework/shared-object-base": "2.74.0-365691",
70
- "@fluidframework/tree": "2.74.0-365691"
60
+ "@fluidframework/container-definitions": "~2.74.0",
61
+ "@fluidframework/container-loader": "~2.74.0",
62
+ "@fluidframework/core-interfaces": "~2.74.0",
63
+ "@fluidframework/core-utils": "~2.74.0",
64
+ "@fluidframework/driver-definitions": "~2.74.0",
65
+ "@fluidframework/fluid-static": "~2.74.0",
66
+ "@fluidframework/map": "~2.74.0",
67
+ "@fluidframework/runtime-utils": "~2.74.0",
68
+ "@fluidframework/sequence": "~2.74.0",
69
+ "@fluidframework/shared-object-base": "~2.74.0",
70
+ "@fluidframework/tree": "~2.74.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@arethetypeswrong/cli": "^0.17.1",
74
74
  "@biomejs/biome": "~1.9.3",
75
- "@fluid-tools/build-cli": "^0.60.0",
75
+ "@fluid-tools/build-cli": "^0.61.0",
76
76
  "@fluidframework/build-common": "^2.0.3",
77
- "@fluidframework/build-tools": "^0.60.0",
78
- "@fluidframework/eslint-config-fluid": "2.74.0-365691",
77
+ "@fluidframework/build-tools": "^0.61.0",
78
+ "@fluidframework/eslint-config-fluid": "~2.74.0",
79
79
  "@microsoft/api-extractor": "7.52.11",
80
80
  "@types/node": "^18.19.0",
81
81
  "concurrently": "^8.2.1",
82
82
  "copyfiles": "^2.4.1",
83
83
  "eslint": "~8.57.1",
84
+ "jiti": "^2.6.1",
84
85
  "rimraf": "^4.4.0",
85
86
  "typescript": "~5.4.5"
86
87
  },