fluid-framework 2.81.1 → 2.83.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 +168 -0
- package/api-report/fluid-framework.alpha.api.md +79 -43
- package/api-report/fluid-framework.beta.api.md +164 -3
- package/api-report/fluid-framework.legacy.beta.api.md +164 -3
- package/api-report/fluid-framework.legacy.public.api.md +2 -1
- package/api-report/fluid-framework.public.api.md +2 -1
- package/dist/alpha.d.ts +10 -4
- package/dist/beta.d.ts +4 -0
- package/dist/legacy.d.ts +4 -0
- package/eslint.config.mts +1 -12
- package/lib/alpha.d.ts +10 -4
- package/lib/beta.d.ts +4 -0
- package/lib/legacy.d.ts +4 -0
- package/package.json +14 -14
- package/api-extractor-lint.json +0 -4
- package/biome.jsonc +0 -4
|
@@ -96,6 +96,11 @@ export enum AttachState {
|
|
|
96
96
|
Detached = "Detached"
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
// @beta @input
|
|
100
|
+
export interface CodecWriteOptionsBeta {
|
|
101
|
+
readonly minVersionForCollab: MinimumVersionForCollab;
|
|
102
|
+
}
|
|
103
|
+
|
|
99
104
|
// @public
|
|
100
105
|
export enum CommitKind {
|
|
101
106
|
Default = 0,
|
|
@@ -179,6 +184,18 @@ export abstract class ErasedType<out Name = unknown> {
|
|
|
179
184
|
protected abstract brand(dummy: never): Name;
|
|
180
185
|
}
|
|
181
186
|
|
|
187
|
+
// @beta
|
|
188
|
+
export namespace ExtensibleUnionNode {
|
|
189
|
+
export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, false, unknown, never, unknown> & (new (data: InternalTreeNode_2) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode_2 & WithType_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, unknown>);
|
|
190
|
+
export interface Members<T> {
|
|
191
|
+
isValid(): boolean;
|
|
192
|
+
readonly union: T | undefined;
|
|
193
|
+
}
|
|
194
|
+
export interface Statics<T extends readonly TreeNodeSchema[]> {
|
|
195
|
+
create<TThis extends TreeNodeSchema>(this: TThis, child: TreeNodeFromImplicitAllowedTypes<T>): TreeFieldFromImplicitField<TThis>;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
182
199
|
// @public @system
|
|
183
200
|
type ExtractItemType<Item extends LazyItem> = Item extends () => infer Result ? Result : Item;
|
|
184
201
|
|
|
@@ -934,7 +951,7 @@ export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedTyp
|
|
|
934
951
|
export const SharedTree: SharedObjectKind<ITree>;
|
|
935
952
|
|
|
936
953
|
// @beta @input
|
|
937
|
-
export type SharedTreeOptionsBeta = ForestOptions
|
|
954
|
+
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;
|
|
938
955
|
|
|
939
956
|
// @public @sealed @system
|
|
940
957
|
export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> {
|
|
@@ -947,6 +964,69 @@ export function singletonSchema<TScope extends string, TName extends string | nu
|
|
|
947
964
|
readonly value: TName;
|
|
948
965
|
}, Record<string, never>, true, Record<string, never>, undefined>;
|
|
949
966
|
|
|
967
|
+
// @beta @system
|
|
968
|
+
export namespace System_TableSchema {
|
|
969
|
+
// @sealed @system
|
|
970
|
+
export type ColumnSchemaBase<TUserScope extends string = string, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createColumnSchema<TUserScope, TCellSchema, TPropsSchema>>;
|
|
971
|
+
// @system
|
|
972
|
+
export type CreateColumnOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
|
|
973
|
+
// @system
|
|
974
|
+
export function createColumnSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Column">, NodeKind.Object, TreeNode & TableSchema.Column<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Column">, NodeKind, unknown>, object & {
|
|
975
|
+
readonly id?: string | undefined;
|
|
976
|
+
} & (FieldHasDefault<TPropsSchema> extends true ? {
|
|
977
|
+
props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
|
|
978
|
+
} : {
|
|
979
|
+
props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
980
|
+
}), true, {
|
|
981
|
+
readonly props: TPropsSchema;
|
|
982
|
+
readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
|
|
983
|
+
}>;
|
|
984
|
+
// @system
|
|
985
|
+
export type CreateRowOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
|
|
986
|
+
// @system
|
|
987
|
+
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.tableV2<${TUserScope}>`, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind, unknown>, object & {
|
|
988
|
+
readonly id?: string | undefined;
|
|
989
|
+
readonly cells: (InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>>;
|
|
990
|
+
} & (FieldHasDefault<TPropsSchema> extends true ? {
|
|
991
|
+
props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
|
|
992
|
+
} : {
|
|
993
|
+
props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
994
|
+
}), true, {
|
|
995
|
+
readonly props: TPropsSchema;
|
|
996
|
+
readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
|
|
997
|
+
readonly cells: FieldSchema_2<FieldKind_2.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
|
|
998
|
+
}>;
|
|
999
|
+
// @system
|
|
1000
|
+
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): {
|
|
1001
|
+
create<TThis extends new (data?: InternalTreeNode | undefined) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown>>(this: TThis, initialContents?: TableSchema.TableFactoryMethodParameters<TUserScope, TCellSchema, TColumnSchema, TRowSchema> | undefined): InstanceType<TThis>;
|
|
1002
|
+
} & (new (data?: InternalTreeNode | undefined) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown>) & TreeNodeSchemaCore<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot"> & string, NodeKind, false, unknown, never, unknown> & (new (data: InternalTreeNode) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot"> & string, NodeKind, unknown>);
|
|
1003
|
+
// @system
|
|
1004
|
+
export type DefaultPropsType = ReturnType<typeof SchemaFactory.optional<[]>>;
|
|
1005
|
+
// @system
|
|
1006
|
+
export interface OptionsWithCellSchema<TCellSchema extends ImplicitAllowedTypes> {
|
|
1007
|
+
readonly cell: TCellSchema;
|
|
1008
|
+
}
|
|
1009
|
+
// @system
|
|
1010
|
+
export interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryBeta> {
|
|
1011
|
+
readonly schemaFactory: TSchemaFactory;
|
|
1012
|
+
}
|
|
1013
|
+
// @system
|
|
1014
|
+
export type RearrangeableList<TItemSchema extends ImplicitAllowedTypes> = TreeNode & readonly TreeNodeFromImplicitAllowedTypes<TItemSchema>[] & {
|
|
1015
|
+
moveToEnd(sourceIndex: number): void;
|
|
1016
|
+
moveToStart(sourceIndex: number): void;
|
|
1017
|
+
moveToIndex(sourceIndex: number, destinationIndex: number): void;
|
|
1018
|
+
moveRangeToEnd(startIndex: number, endIndex: number): void;
|
|
1019
|
+
moveRangeToStart(startIndex: number, endIndex: number): void;
|
|
1020
|
+
moveRangeToIndex(startIndex: number, endIndex: number, destinationIndex: number): void;
|
|
1021
|
+
};
|
|
1022
|
+
// @sealed @system
|
|
1023
|
+
export type RowSchemaBase<TUserScope extends string = string, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createRowSchema<TUserScope, TCellSchema, TPropsSchema>>;
|
|
1024
|
+
// @system
|
|
1025
|
+
export type TableFactoryOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
|
|
1026
|
+
// @sealed @system
|
|
1027
|
+
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>>;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
950
1030
|
// @public @system
|
|
951
1031
|
export namespace System_Unsafe {
|
|
952
1032
|
// @system
|
|
@@ -1030,6 +1110,86 @@ export namespace System_Unsafe {
|
|
|
1030
1110
|
export type TreeObjectNodeUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecordUnsafe<T> & WithType<TypeName, NodeKind.Object, T>;
|
|
1031
1111
|
}
|
|
1032
1112
|
|
|
1113
|
+
// @beta
|
|
1114
|
+
export namespace TableSchema {
|
|
1115
|
+
// @input
|
|
1116
|
+
export interface CellKey<TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
1117
|
+
readonly column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>;
|
|
1118
|
+
readonly row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>;
|
|
1119
|
+
}
|
|
1120
|
+
// @sealed
|
|
1121
|
+
export interface Column<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema> {
|
|
1122
|
+
readonly id: string;
|
|
1123
|
+
get props(): TreeFieldFromImplicitField<TProps>;
|
|
1124
|
+
set props(value: InsertableTreeFieldFromImplicitField<TProps>);
|
|
1125
|
+
}
|
|
1126
|
+
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>;
|
|
1127
|
+
export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
1128
|
+
readonly props: TProps;
|
|
1129
|
+
}): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
|
|
1130
|
+
// @input
|
|
1131
|
+
export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
|
|
1132
|
+
readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1133
|
+
readonly index?: number | undefined;
|
|
1134
|
+
}
|
|
1135
|
+
// @input
|
|
1136
|
+
export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
|
|
1137
|
+
readonly index?: number | undefined;
|
|
1138
|
+
readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1139
|
+
}
|
|
1140
|
+
// @sealed
|
|
1141
|
+
export interface Row<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema> {
|
|
1142
|
+
readonly id: string;
|
|
1143
|
+
get props(): TreeFieldFromImplicitField<TProps>;
|
|
1144
|
+
set props(value: InsertableTreeFieldFromImplicitField<TProps>);
|
|
1145
|
+
}
|
|
1146
|
+
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>;
|
|
1147
|
+
export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
1148
|
+
readonly props: TProps;
|
|
1149
|
+
}): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
|
|
1150
|
+
// @input
|
|
1151
|
+
export interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
1152
|
+
readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
|
|
1153
|
+
readonly key: CellKey<TColumn, TRow>;
|
|
1154
|
+
}
|
|
1155
|
+
// @sealed
|
|
1156
|
+
export interface Table<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
|
|
1157
|
+
readonly columns: System_TableSchema.RearrangeableList<TColumn>;
|
|
1158
|
+
getCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
1159
|
+
getColumn(id: string): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
|
|
1160
|
+
getColumn(index: number): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
|
|
1161
|
+
getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
1162
|
+
getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
1163
|
+
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1164
|
+
insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1165
|
+
removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
1166
|
+
removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1167
|
+
removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1168
|
+
removeColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1169
|
+
removeRows(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1170
|
+
removeRows(rows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1171
|
+
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1172
|
+
readonly rows: System_TableSchema.RearrangeableList<TRow>;
|
|
1173
|
+
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
|
|
1174
|
+
}
|
|
1175
|
+
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>>;
|
|
1176
|
+
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> & {
|
|
1177
|
+
readonly column: TColumn;
|
|
1178
|
+
}): System_TableSchema.TableSchemaBase<TUserScope, TCell, TColumn, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
|
|
1179
|
+
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> & {
|
|
1180
|
+
readonly row: TRow;
|
|
1181
|
+
}): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, TRow>;
|
|
1182
|
+
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> & {
|
|
1183
|
+
readonly column: TColumn;
|
|
1184
|
+
readonly row: TRow;
|
|
1185
|
+
}): System_TableSchema.TableSchemaBase<TUserScope, TCell, TColumn, TRow>;
|
|
1186
|
+
// @input
|
|
1187
|
+
export interface TableFactoryMethodParameters<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
|
|
1188
|
+
readonly columns?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumn>> | undefined;
|
|
1189
|
+
readonly rows?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRow>> | undefined;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1033
1193
|
// @public
|
|
1034
1194
|
export interface Tagged<V, T extends string = string> {
|
|
1035
1195
|
// (undocumented)
|
|
@@ -1047,7 +1207,7 @@ export type TransactionConstraint = NodeInDocumentConstraint;
|
|
|
1047
1207
|
// @public
|
|
1048
1208
|
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
|
|
1049
1209
|
|
|
1050
|
-
// @public @sealed
|
|
1210
|
+
// @public @sealed
|
|
1051
1211
|
export interface Tree extends TreeNodeApi {
|
|
1052
1212
|
contains(node: TreeNode, other: TreeNode): boolean;
|
|
1053
1213
|
readonly runTransaction: RunTransaction;
|
|
@@ -1073,6 +1233,7 @@ export interface TreeArrayNode<TAllowedTypes extends System_Unsafe.ImplicitAllow
|
|
|
1073
1233
|
moveToIndex(destinationGap: number, sourceIndex: number, source: TMoveFrom): void;
|
|
1074
1234
|
moveToStart(sourceIndex: number): void;
|
|
1075
1235
|
moveToStart(sourceIndex: number, source: TMoveFrom): void;
|
|
1236
|
+
push(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
1076
1237
|
removeAt(index: number): void;
|
|
1077
1238
|
removeRange(start?: number, end?: number): void;
|
|
1078
1239
|
values(): IterableIterator<T>;
|
|
@@ -1083,7 +1244,7 @@ export const TreeArrayNode: {
|
|
|
1083
1244
|
readonly spread: <T>(content: Iterable<T>) => IterableTreeArrayContent<T>;
|
|
1084
1245
|
};
|
|
1085
1246
|
|
|
1086
|
-
// @beta @sealed
|
|
1247
|
+
// @beta @sealed
|
|
1087
1248
|
export interface TreeBeta {
|
|
1088
1249
|
clone<const TSchema extends ImplicitFieldSchema>(node: TreeFieldFromImplicitField<TSchema>): TreeFieldFromImplicitField<TSchema>;
|
|
1089
1250
|
create<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: InsertableTreeFieldFromImplicitField<TSchema>): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
@@ -96,6 +96,11 @@ export enum AttachState {
|
|
|
96
96
|
Detached = "Detached"
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
// @beta @input
|
|
100
|
+
export interface CodecWriteOptionsBeta {
|
|
101
|
+
readonly minVersionForCollab: MinimumVersionForCollab;
|
|
102
|
+
}
|
|
103
|
+
|
|
99
104
|
// @public
|
|
100
105
|
export enum CommitKind {
|
|
101
106
|
Default = 0,
|
|
@@ -182,6 +187,18 @@ export abstract class ErasedType<out Name = unknown> {
|
|
|
182
187
|
protected abstract brand(dummy: never): Name;
|
|
183
188
|
}
|
|
184
189
|
|
|
190
|
+
// @beta
|
|
191
|
+
export namespace ExtensibleUnionNode {
|
|
192
|
+
export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, false, unknown, never, unknown> & (new (data: InternalTreeNode_2) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode_2 & WithType_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, unknown>);
|
|
193
|
+
export interface Members<T> {
|
|
194
|
+
isValid(): boolean;
|
|
195
|
+
readonly union: T | undefined;
|
|
196
|
+
}
|
|
197
|
+
export interface Statics<T extends readonly TreeNodeSchema[]> {
|
|
198
|
+
create<TThis extends TreeNodeSchema>(this: TThis, child: TreeNodeFromImplicitAllowedTypes<T>): TreeFieldFromImplicitField<TThis>;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
185
202
|
// @public @system
|
|
186
203
|
type ExtractItemType<Item extends LazyItem> = Item extends () => infer Result ? Result : Item;
|
|
187
204
|
|
|
@@ -1292,7 +1309,7 @@ export type SharedStringSegment = TextSegment | Marker;
|
|
|
1292
1309
|
export const SharedTree: SharedObjectKind<ITree>;
|
|
1293
1310
|
|
|
1294
1311
|
// @beta @input
|
|
1295
|
-
export type SharedTreeOptionsBeta = ForestOptions
|
|
1312
|
+
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;
|
|
1296
1313
|
|
|
1297
1314
|
export { Side }
|
|
1298
1315
|
|
|
@@ -1307,6 +1324,69 @@ export function singletonSchema<TScope extends string, TName extends string | nu
|
|
|
1307
1324
|
readonly value: TName;
|
|
1308
1325
|
}, Record<string, never>, true, Record<string, never>, undefined>;
|
|
1309
1326
|
|
|
1327
|
+
// @beta @system
|
|
1328
|
+
export namespace System_TableSchema {
|
|
1329
|
+
// @sealed @system
|
|
1330
|
+
export type ColumnSchemaBase<TUserScope extends string = string, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createColumnSchema<TUserScope, TCellSchema, TPropsSchema>>;
|
|
1331
|
+
// @system
|
|
1332
|
+
export type CreateColumnOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
|
|
1333
|
+
// @system
|
|
1334
|
+
export function createColumnSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Column">, NodeKind.Object, TreeNode & TableSchema.Column<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Column">, NodeKind, unknown>, object & {
|
|
1335
|
+
readonly id?: string | undefined;
|
|
1336
|
+
} & (FieldHasDefault<TPropsSchema> extends true ? {
|
|
1337
|
+
props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
|
|
1338
|
+
} : {
|
|
1339
|
+
props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
1340
|
+
}), true, {
|
|
1341
|
+
readonly props: TPropsSchema;
|
|
1342
|
+
readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
|
|
1343
|
+
}>;
|
|
1344
|
+
// @system
|
|
1345
|
+
export type CreateRowOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
|
|
1346
|
+
// @system
|
|
1347
|
+
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.tableV2<${TUserScope}>`, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind, unknown>, object & {
|
|
1348
|
+
readonly id?: string | undefined;
|
|
1349
|
+
readonly cells: (InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>>;
|
|
1350
|
+
} & (FieldHasDefault<TPropsSchema> extends true ? {
|
|
1351
|
+
props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
|
|
1352
|
+
} : {
|
|
1353
|
+
props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
1354
|
+
}), true, {
|
|
1355
|
+
readonly props: TPropsSchema;
|
|
1356
|
+
readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
|
|
1357
|
+
readonly cells: FieldSchema_2<FieldKind_2.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
|
|
1358
|
+
}>;
|
|
1359
|
+
// @system
|
|
1360
|
+
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): {
|
|
1361
|
+
create<TThis extends new (data?: InternalTreeNode | undefined) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown>>(this: TThis, initialContents?: TableSchema.TableFactoryMethodParameters<TUserScope, TCellSchema, TColumnSchema, TRowSchema> | undefined): InstanceType<TThis>;
|
|
1362
|
+
} & (new (data?: InternalTreeNode | undefined) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown>) & TreeNodeSchemaCore<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot"> & string, NodeKind, false, unknown, never, unknown> & (new (data: InternalTreeNode) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot"> & string, NodeKind, unknown>);
|
|
1363
|
+
// @system
|
|
1364
|
+
export type DefaultPropsType = ReturnType<typeof SchemaFactory.optional<[]>>;
|
|
1365
|
+
// @system
|
|
1366
|
+
export interface OptionsWithCellSchema<TCellSchema extends ImplicitAllowedTypes> {
|
|
1367
|
+
readonly cell: TCellSchema;
|
|
1368
|
+
}
|
|
1369
|
+
// @system
|
|
1370
|
+
export interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryBeta> {
|
|
1371
|
+
readonly schemaFactory: TSchemaFactory;
|
|
1372
|
+
}
|
|
1373
|
+
// @system
|
|
1374
|
+
export type RearrangeableList<TItemSchema extends ImplicitAllowedTypes> = TreeNode & readonly TreeNodeFromImplicitAllowedTypes<TItemSchema>[] & {
|
|
1375
|
+
moveToEnd(sourceIndex: number): void;
|
|
1376
|
+
moveToStart(sourceIndex: number): void;
|
|
1377
|
+
moveToIndex(sourceIndex: number, destinationIndex: number): void;
|
|
1378
|
+
moveRangeToEnd(startIndex: number, endIndex: number): void;
|
|
1379
|
+
moveRangeToStart(startIndex: number, endIndex: number): void;
|
|
1380
|
+
moveRangeToIndex(startIndex: number, endIndex: number, destinationIndex: number): void;
|
|
1381
|
+
};
|
|
1382
|
+
// @sealed @system
|
|
1383
|
+
export type RowSchemaBase<TUserScope extends string = string, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createRowSchema<TUserScope, TCellSchema, TPropsSchema>>;
|
|
1384
|
+
// @system
|
|
1385
|
+
export type TableFactoryOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
|
|
1386
|
+
// @sealed @system
|
|
1387
|
+
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>>;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1310
1390
|
// @public @system
|
|
1311
1391
|
export namespace System_Unsafe {
|
|
1312
1392
|
// @system
|
|
@@ -1390,6 +1470,86 @@ export namespace System_Unsafe {
|
|
|
1390
1470
|
export type TreeObjectNodeUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecordUnsafe<T> & WithType<TypeName, NodeKind.Object, T>;
|
|
1391
1471
|
}
|
|
1392
1472
|
|
|
1473
|
+
// @beta
|
|
1474
|
+
export namespace TableSchema {
|
|
1475
|
+
// @input
|
|
1476
|
+
export interface CellKey<TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
1477
|
+
readonly column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>;
|
|
1478
|
+
readonly row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>;
|
|
1479
|
+
}
|
|
1480
|
+
// @sealed
|
|
1481
|
+
export interface Column<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema> {
|
|
1482
|
+
readonly id: string;
|
|
1483
|
+
get props(): TreeFieldFromImplicitField<TProps>;
|
|
1484
|
+
set props(value: InsertableTreeFieldFromImplicitField<TProps>);
|
|
1485
|
+
}
|
|
1486
|
+
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>;
|
|
1487
|
+
export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
1488
|
+
readonly props: TProps;
|
|
1489
|
+
}): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
|
|
1490
|
+
// @input
|
|
1491
|
+
export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
|
|
1492
|
+
readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1493
|
+
readonly index?: number | undefined;
|
|
1494
|
+
}
|
|
1495
|
+
// @input
|
|
1496
|
+
export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
|
|
1497
|
+
readonly index?: number | undefined;
|
|
1498
|
+
readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1499
|
+
}
|
|
1500
|
+
// @sealed
|
|
1501
|
+
export interface Row<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema> {
|
|
1502
|
+
readonly id: string;
|
|
1503
|
+
get props(): TreeFieldFromImplicitField<TProps>;
|
|
1504
|
+
set props(value: InsertableTreeFieldFromImplicitField<TProps>);
|
|
1505
|
+
}
|
|
1506
|
+
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>;
|
|
1507
|
+
export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
1508
|
+
readonly props: TProps;
|
|
1509
|
+
}): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
|
|
1510
|
+
// @input
|
|
1511
|
+
export interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
1512
|
+
readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
|
|
1513
|
+
readonly key: CellKey<TColumn, TRow>;
|
|
1514
|
+
}
|
|
1515
|
+
// @sealed
|
|
1516
|
+
export interface Table<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
|
|
1517
|
+
readonly columns: System_TableSchema.RearrangeableList<TColumn>;
|
|
1518
|
+
getCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
1519
|
+
getColumn(id: string): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
|
|
1520
|
+
getColumn(index: number): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
|
|
1521
|
+
getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
1522
|
+
getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
1523
|
+
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1524
|
+
insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1525
|
+
removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
1526
|
+
removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1527
|
+
removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1528
|
+
removeColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1529
|
+
removeRows(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1530
|
+
removeRows(rows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1531
|
+
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1532
|
+
readonly rows: System_TableSchema.RearrangeableList<TRow>;
|
|
1533
|
+
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
|
|
1534
|
+
}
|
|
1535
|
+
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>>;
|
|
1536
|
+
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> & {
|
|
1537
|
+
readonly column: TColumn;
|
|
1538
|
+
}): System_TableSchema.TableSchemaBase<TUserScope, TCell, TColumn, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
|
|
1539
|
+
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> & {
|
|
1540
|
+
readonly row: TRow;
|
|
1541
|
+
}): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, TRow>;
|
|
1542
|
+
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> & {
|
|
1543
|
+
readonly column: TColumn;
|
|
1544
|
+
readonly row: TRow;
|
|
1545
|
+
}): System_TableSchema.TableSchemaBase<TUserScope, TCell, TColumn, TRow>;
|
|
1546
|
+
// @input
|
|
1547
|
+
export interface TableFactoryMethodParameters<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
|
|
1548
|
+
readonly columns?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumn>> | undefined;
|
|
1549
|
+
readonly rows?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRow>> | undefined;
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1393
1553
|
// @public
|
|
1394
1554
|
export interface Tagged<V, T extends string = string> {
|
|
1395
1555
|
// (undocumented)
|
|
@@ -1407,7 +1567,7 @@ export type TransactionConstraint = NodeInDocumentConstraint;
|
|
|
1407
1567
|
// @public
|
|
1408
1568
|
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
|
|
1409
1569
|
|
|
1410
|
-
// @public @sealed
|
|
1570
|
+
// @public @sealed
|
|
1411
1571
|
export interface Tree extends TreeNodeApi {
|
|
1412
1572
|
contains(node: TreeNode, other: TreeNode): boolean;
|
|
1413
1573
|
readonly runTransaction: RunTransaction;
|
|
@@ -1433,6 +1593,7 @@ export interface TreeArrayNode<TAllowedTypes extends System_Unsafe.ImplicitAllow
|
|
|
1433
1593
|
moveToIndex(destinationGap: number, sourceIndex: number, source: TMoveFrom): void;
|
|
1434
1594
|
moveToStart(sourceIndex: number): void;
|
|
1435
1595
|
moveToStart(sourceIndex: number, source: TMoveFrom): void;
|
|
1596
|
+
push(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
1436
1597
|
removeAt(index: number): void;
|
|
1437
1598
|
removeRange(start?: number, end?: number): void;
|
|
1438
1599
|
values(): IterableIterator<T>;
|
|
@@ -1443,7 +1604,7 @@ export const TreeArrayNode: {
|
|
|
1443
1604
|
readonly spread: <T>(content: Iterable<T>) => IterableTreeArrayContent<T>;
|
|
1444
1605
|
};
|
|
1445
1606
|
|
|
1446
|
-
// @beta @sealed
|
|
1607
|
+
// @beta @sealed
|
|
1447
1608
|
export interface TreeBeta {
|
|
1448
1609
|
clone<const TSchema extends ImplicitFieldSchema>(node: TreeFieldFromImplicitField<TSchema>): TreeFieldFromImplicitField<TSchema>;
|
|
1449
1610
|
create<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: InsertableTreeFieldFromImplicitField<TSchema>): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
@@ -864,7 +864,7 @@ export type TransactionConstraint = NodeInDocumentConstraint;
|
|
|
864
864
|
// @public
|
|
865
865
|
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
|
|
866
866
|
|
|
867
|
-
// @public @sealed
|
|
867
|
+
// @public @sealed
|
|
868
868
|
export interface Tree extends TreeNodeApi {
|
|
869
869
|
contains(node: TreeNode, other: TreeNode): boolean;
|
|
870
870
|
readonly runTransaction: RunTransaction;
|
|
@@ -890,6 +890,7 @@ export interface TreeArrayNode<TAllowedTypes extends System_Unsafe.ImplicitAllow
|
|
|
890
890
|
moveToIndex(destinationGap: number, sourceIndex: number, source: TMoveFrom): void;
|
|
891
891
|
moveToStart(sourceIndex: number): void;
|
|
892
892
|
moveToStart(sourceIndex: number, source: TMoveFrom): void;
|
|
893
|
+
push(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
893
894
|
removeAt(index: number): void;
|
|
894
895
|
removeRange(start?: number, end?: number): void;
|
|
895
896
|
values(): IterableIterator<T>;
|
|
@@ -830,7 +830,7 @@ export type TransactionConstraint = NodeInDocumentConstraint;
|
|
|
830
830
|
// @public
|
|
831
831
|
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
|
|
832
832
|
|
|
833
|
-
// @public @sealed
|
|
833
|
+
// @public @sealed
|
|
834
834
|
export interface Tree extends TreeNodeApi {
|
|
835
835
|
contains(node: TreeNode, other: TreeNode): boolean;
|
|
836
836
|
readonly runTransaction: RunTransaction;
|
|
@@ -856,6 +856,7 @@ export interface TreeArrayNode<TAllowedTypes extends System_Unsafe.ImplicitAllow
|
|
|
856
856
|
moveToIndex(destinationGap: number, sourceIndex: number, source: TMoveFrom): void;
|
|
857
857
|
moveToStart(sourceIndex: number): void;
|
|
858
858
|
moveToStart(sourceIndex: number, source: TMoveFrom): void;
|
|
859
|
+
push(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
859
860
|
removeAt(index: number): void;
|
|
860
861
|
removeRange(start?: number, end?: number): void;
|
|
861
862
|
values(): IterableIterator<T>;
|
package/dist/alpha.d.ts
CHANGED
|
@@ -149,8 +149,10 @@ export {
|
|
|
149
149
|
AnnotatedAllowedTypeUnsafe,
|
|
150
150
|
AnnotatedAllowedTypes,
|
|
151
151
|
AnnotatedAllowedTypesUnsafe,
|
|
152
|
+
CodecWriteOptionsBeta,
|
|
152
153
|
ConciseTree,
|
|
153
154
|
ErasedBaseType,
|
|
155
|
+
ExtensibleUnionNode,
|
|
154
156
|
FixRecursiveArraySchema,
|
|
155
157
|
FluidSerializableAsTree,
|
|
156
158
|
ForestOptions,
|
|
@@ -169,6 +171,8 @@ export {
|
|
|
169
171
|
SchemaStaticsBeta,
|
|
170
172
|
SchemaUpgrade,
|
|
171
173
|
SharedTreeOptionsBeta,
|
|
174
|
+
System_TableSchema,
|
|
175
|
+
TableSchema,
|
|
172
176
|
TreeBeta,
|
|
173
177
|
TreeBranch,
|
|
174
178
|
TreeChangeEventsBeta,
|
|
@@ -194,10 +198,12 @@ export {
|
|
|
194
198
|
ArrayNodeCustomizableSchemaUnsafe,
|
|
195
199
|
ArrayNodePojoEmulationSchema,
|
|
196
200
|
ArrayNodeSchema,
|
|
201
|
+
ArrayPlaceAnchor,
|
|
197
202
|
BranchableTree,
|
|
198
203
|
ChangeMetadata,
|
|
199
204
|
CodecName,
|
|
200
205
|
CodecWriteOptions,
|
|
206
|
+
CreateIndependentTreeAlphaOptions,
|
|
201
207
|
DirtyTreeMap,
|
|
202
208
|
DirtyTreeStatus,
|
|
203
209
|
FactoryContent,
|
|
@@ -215,6 +221,7 @@ export {
|
|
|
215
221
|
ITreeAlpha,
|
|
216
222
|
IdentifierIndex,
|
|
217
223
|
IncrementalEncodingPolicy,
|
|
224
|
+
IndependentViewOptions,
|
|
218
225
|
Insertable,
|
|
219
226
|
InsertableContent,
|
|
220
227
|
InsertableField,
|
|
@@ -255,7 +262,6 @@ export {
|
|
|
255
262
|
RevertibleAlpha,
|
|
256
263
|
RevertibleAlphaFactory,
|
|
257
264
|
RunTransactionParams,
|
|
258
|
-
SchemaCompatibilitySnapshotsOptions,
|
|
259
265
|
SchemaFactoryAlpha,
|
|
260
266
|
SchemaType,
|
|
261
267
|
SharedTreeFormatOptions,
|
|
@@ -273,8 +279,7 @@ export {
|
|
|
273
279
|
SimpleTreeIndex,
|
|
274
280
|
SimpleTreeSchema,
|
|
275
281
|
SnapshotFileSystem,
|
|
276
|
-
|
|
277
|
-
TableSchema,
|
|
282
|
+
SnapshotSchemaCompatibilityOptions,
|
|
278
283
|
TransactionCallbackStatus,
|
|
279
284
|
TransactionConstraintAlpha,
|
|
280
285
|
TransactionResult,
|
|
@@ -305,12 +310,12 @@ export {
|
|
|
305
310
|
asAlpha,
|
|
306
311
|
asTreeViewAlpha,
|
|
307
312
|
checkCompatibility,
|
|
308
|
-
checkSchemaCompatibilitySnapshots,
|
|
309
313
|
cloneWithReplacements,
|
|
310
314
|
comparePersistedSchema,
|
|
311
315
|
configuredSharedTree,
|
|
312
316
|
configuredSharedTreeAlpha,
|
|
313
317
|
contentSchemaSymbol,
|
|
318
|
+
createArrayInsertionAnchor,
|
|
314
319
|
createIdentifierIndex,
|
|
315
320
|
createIndependentTreeAlpha,
|
|
316
321
|
createSimpleTreeIndex,
|
|
@@ -336,6 +341,7 @@ export {
|
|
|
336
341
|
replaceConciseTreeHandles,
|
|
337
342
|
replaceHandles,
|
|
338
343
|
replaceVerboseTreeHandles,
|
|
344
|
+
snapshotSchemaCompatibility,
|
|
339
345
|
trackDirtyNodes
|
|
340
346
|
// #endregion
|
|
341
347
|
} from "./index.js";
|
package/dist/beta.d.ts
CHANGED
|
@@ -149,8 +149,10 @@ export {
|
|
|
149
149
|
AnnotatedAllowedTypeUnsafe,
|
|
150
150
|
AnnotatedAllowedTypes,
|
|
151
151
|
AnnotatedAllowedTypesUnsafe,
|
|
152
|
+
CodecWriteOptionsBeta,
|
|
152
153
|
ConciseTree,
|
|
153
154
|
ErasedBaseType,
|
|
155
|
+
ExtensibleUnionNode,
|
|
154
156
|
FixRecursiveArraySchema,
|
|
155
157
|
FluidSerializableAsTree,
|
|
156
158
|
ForestOptions,
|
|
@@ -169,6 +171,8 @@ export {
|
|
|
169
171
|
SchemaStaticsBeta,
|
|
170
172
|
SchemaUpgrade,
|
|
171
173
|
SharedTreeOptionsBeta,
|
|
174
|
+
System_TableSchema,
|
|
175
|
+
TableSchema,
|
|
172
176
|
TreeBeta,
|
|
173
177
|
TreeBranch,
|
|
174
178
|
TreeChangeEventsBeta,
|
package/dist/legacy.d.ts
CHANGED
|
@@ -156,8 +156,10 @@ export {
|
|
|
156
156
|
AnnotatedAllowedTypeUnsafe,
|
|
157
157
|
AnnotatedAllowedTypes,
|
|
158
158
|
AnnotatedAllowedTypesUnsafe,
|
|
159
|
+
CodecWriteOptionsBeta,
|
|
159
160
|
ConciseTree,
|
|
160
161
|
ErasedBaseType,
|
|
162
|
+
ExtensibleUnionNode,
|
|
161
163
|
FixRecursiveArraySchema,
|
|
162
164
|
FluidSerializableAsTree,
|
|
163
165
|
ForestOptions,
|
|
@@ -176,6 +178,8 @@ export {
|
|
|
176
178
|
SchemaStaticsBeta,
|
|
177
179
|
SchemaUpgrade,
|
|
178
180
|
SharedTreeOptionsBeta,
|
|
181
|
+
System_TableSchema,
|
|
182
|
+
TableSchema,
|
|
179
183
|
TreeBeta,
|
|
180
184
|
TreeBranch,
|
|
181
185
|
TreeChangeEventsBeta,
|
package/eslint.config.mts
CHANGED
|
@@ -6,17 +6,6 @@
|
|
|
6
6
|
import type { Linter } from "eslint";
|
|
7
7
|
import { strict } from "../../../common/build/eslint-config-fluid/flat.mts";
|
|
8
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
|
-
];
|
|
9
|
+
const config: Linter.Config[] = [...strict];
|
|
21
10
|
|
|
22
11
|
export default config;
|