@fluidframework/tree 2.70.0-360374 → 2.70.0-361092

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.
Files changed (200) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/api-report/tree.alpha.api.md +31 -27
  3. package/api-report/tree.beta.api.md +36 -1
  4. package/api-report/tree.legacy.beta.api.md +36 -1
  5. package/dist/alpha.d.ts +4 -4
  6. package/dist/beta.d.ts +4 -0
  7. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +2 -2
  8. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  9. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +9 -10
  10. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  11. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +5 -4
  12. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  13. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  14. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +0 -1
  15. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  16. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +3 -14
  17. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  18. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -1
  19. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  20. package/dist/feature-libraries/forest-summary/forestSummarizer.js +2 -2
  21. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  22. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +9 -7
  23. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  24. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +34 -11
  25. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  26. package/dist/legacy.d.ts +4 -0
  27. package/dist/packageVersion.d.ts +1 -1
  28. package/dist/packageVersion.js +1 -1
  29. package/dist/packageVersion.js.map +1 -1
  30. package/dist/serializableDomainSchema.d.ts +12 -10
  31. package/dist/serializableDomainSchema.d.ts.map +1 -1
  32. package/dist/serializableDomainSchema.js +7 -7
  33. package/dist/serializableDomainSchema.js.map +1 -1
  34. package/dist/shared-tree/sharedTree.d.ts +1 -1
  35. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  36. package/dist/shared-tree/sharedTree.js +2 -2
  37. package/dist/shared-tree/sharedTree.js.map +1 -1
  38. package/dist/simple-tree/api/schemaFactory.d.ts +1 -1
  39. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  40. package/dist/simple-tree/api/schemaFactory.js +17 -13
  41. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  42. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  43. package/dist/simple-tree/api/schemaFactoryAlpha.js +8 -8
  44. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  45. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +2 -1
  46. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  47. package/dist/simple-tree/api/schemaFactoryBeta.js +8 -7
  48. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  49. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
  50. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  51. package/dist/simple-tree/core/allowedTypes.d.ts +6 -2
  52. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  53. package/dist/simple-tree/core/allowedTypes.js +2 -2
  54. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  55. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +3 -4
  56. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  57. package/dist/simple-tree/node-kinds/array/arrayNode.js +3 -2
  58. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  59. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +4 -3
  60. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  61. package/dist/simple-tree/node-kinds/map/mapNode.js +3 -2
  62. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  63. package/dist/simple-tree/node-kinds/object/objectNode.d.ts +4 -3
  64. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  65. package/dist/simple-tree/node-kinds/object/objectNode.js +5 -5
  66. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  67. package/dist/simple-tree/node-kinds/record/recordNode.d.ts +3 -10
  68. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  69. package/dist/simple-tree/node-kinds/record/recordNode.js +3 -2
  70. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  71. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +2 -2
  72. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  73. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  74. package/dist/tableSchema.d.ts +37 -24
  75. package/dist/tableSchema.d.ts.map +1 -1
  76. package/dist/tableSchema.js +81 -54
  77. package/dist/tableSchema.js.map +1 -1
  78. package/dist/treeFactory.d.ts.map +1 -1
  79. package/dist/treeFactory.js +1 -1
  80. package/dist/treeFactory.js.map +1 -1
  81. package/dist/util/breakable.js +3 -3
  82. package/dist/util/breakable.js.map +1 -1
  83. package/dist/util/index.d.ts +1 -1
  84. package/dist/util/index.d.ts.map +1 -1
  85. package/dist/util/index.js +2 -2
  86. package/dist/util/index.js.map +1 -1
  87. package/dist/util/utils.d.ts +18 -6
  88. package/dist/util/utils.d.ts.map +1 -1
  89. package/dist/util/utils.js +23 -16
  90. package/dist/util/utils.js.map +1 -1
  91. package/lib/alpha.d.ts +4 -4
  92. package/lib/beta.d.ts +4 -0
  93. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +2 -2
  94. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  95. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +9 -10
  96. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  97. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +5 -4
  98. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  99. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  100. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +0 -1
  101. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  102. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -12
  103. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  104. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -1
  105. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  106. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -2
  107. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  108. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +9 -7
  109. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  110. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +34 -11
  111. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  112. package/lib/legacy.d.ts +4 -0
  113. package/lib/packageVersion.d.ts +1 -1
  114. package/lib/packageVersion.js +1 -1
  115. package/lib/packageVersion.js.map +1 -1
  116. package/lib/serializableDomainSchema.d.ts +12 -10
  117. package/lib/serializableDomainSchema.d.ts.map +1 -1
  118. package/lib/serializableDomainSchema.js +8 -8
  119. package/lib/serializableDomainSchema.js.map +1 -1
  120. package/lib/shared-tree/sharedTree.d.ts +1 -1
  121. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  122. package/lib/shared-tree/sharedTree.js +2 -2
  123. package/lib/shared-tree/sharedTree.js.map +1 -1
  124. package/lib/simple-tree/api/schemaFactory.d.ts +1 -1
  125. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  126. package/lib/simple-tree/api/schemaFactory.js +18 -14
  127. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  128. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  129. package/lib/simple-tree/api/schemaFactoryAlpha.js +8 -8
  130. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  131. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +2 -1
  132. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  133. package/lib/simple-tree/api/schemaFactoryBeta.js +8 -7
  134. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  135. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
  136. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  137. package/lib/simple-tree/core/allowedTypes.d.ts +6 -2
  138. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  139. package/lib/simple-tree/core/allowedTypes.js +2 -2
  140. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  141. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +3 -4
  142. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  143. package/lib/simple-tree/node-kinds/array/arrayNode.js +3 -2
  144. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  145. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +4 -3
  146. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  147. package/lib/simple-tree/node-kinds/map/mapNode.js +3 -2
  148. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  149. package/lib/simple-tree/node-kinds/object/objectNode.d.ts +4 -3
  150. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  151. package/lib/simple-tree/node-kinds/object/objectNode.js +5 -5
  152. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  153. package/lib/simple-tree/node-kinds/record/recordNode.d.ts +3 -10
  154. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  155. package/lib/simple-tree/node-kinds/record/recordNode.js +3 -2
  156. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  157. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +2 -2
  158. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  159. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  160. package/lib/tableSchema.d.ts +37 -24
  161. package/lib/tableSchema.d.ts.map +1 -1
  162. package/lib/tableSchema.js +81 -54
  163. package/lib/tableSchema.js.map +1 -1
  164. package/lib/treeFactory.d.ts.map +1 -1
  165. package/lib/treeFactory.js +1 -1
  166. package/lib/treeFactory.js.map +1 -1
  167. package/lib/util/breakable.js +3 -3
  168. package/lib/util/breakable.js.map +1 -1
  169. package/lib/util/index.d.ts +1 -1
  170. package/lib/util/index.d.ts.map +1 -1
  171. package/lib/util/index.js +1 -1
  172. package/lib/util/index.js.map +1 -1
  173. package/lib/util/utils.d.ts +18 -6
  174. package/lib/util/utils.d.ts.map +1 -1
  175. package/lib/util/utils.js +21 -14
  176. package/lib/util/utils.js.map +1 -1
  177. package/package.json +24 -24
  178. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +16 -14
  179. package/src/feature-libraries/chunked-forest/codec/codecs.ts +8 -4
  180. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +2 -13
  181. package/src/feature-libraries/forest-summary/forestSummarizer.ts +2 -0
  182. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +65 -13
  183. package/src/packageVersion.ts +1 -1
  184. package/src/serializableDomainSchema.ts +11 -11
  185. package/src/shared-tree/sharedTree.ts +2 -0
  186. package/src/simple-tree/api/schemaFactory.ts +38 -22
  187. package/src/simple-tree/api/schemaFactoryAlpha.ts +8 -17
  188. package/src/simple-tree/api/schemaFactoryBeta.ts +17 -23
  189. package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -1
  190. package/src/simple-tree/core/allowedTypes.ts +5 -17
  191. package/src/simple-tree/node-kinds/array/arrayNode.ts +5 -4
  192. package/src/simple-tree/node-kinds/map/mapNode.ts +5 -3
  193. package/src/simple-tree/node-kinds/object/objectNode.ts +9 -8
  194. package/src/simple-tree/node-kinds/record/recordNode.ts +6 -18
  195. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +2 -2
  196. package/src/tableSchema.ts +143 -81
  197. package/src/treeFactory.ts +1 -0
  198. package/src/util/breakable.ts +4 -4
  199. package/src/util/index.ts +1 -1
  200. package/src/util/utils.ts +33 -17
@@ -65,6 +65,7 @@ import type {
65
65
  } from "./mapNodeTypes.js";
66
66
  import { recordLikeDataToFlexContent } from "../common.js";
67
67
  import { MapNodeStoredSchema } from "../../../core/index.js";
68
+ import type { NodeSchemaOptionsAlpha } from "../../api/index.js";
68
69
 
69
70
  /**
70
71
  * A map of string keys to tree objects.
@@ -268,8 +269,7 @@ export function mapSchema<
268
269
  info: T,
269
270
  implicitlyConstructable: ImplicitlyConstructable,
270
271
  useMapPrototype: boolean,
271
- metadata?: NodeSchemaMetadata<TCustomMetadata>,
272
- persistedMetadata?: JsonCompatibleReadOnlyObject | undefined,
272
+ nodeOptions: NodeSchemaOptionsAlpha<TCustomMetadata> = {},
273
273
  ) {
274
274
  const normalizedTypes = normalizeAllowedTypes(info);
275
275
  const lazyAllowedTypesIdentifiers = new Lazy(
@@ -277,6 +277,7 @@ export function mapSchema<
277
277
  );
278
278
 
279
279
  let privateData: TreeNodeSchemaPrivateData | undefined;
280
+ const persistedMetadata = nodeOptions.persistedMetadata;
280
281
 
281
282
  class Schema extends CustomMapNodeBase<T> implements TreeMapNode<T> {
282
283
  public static override prepareInstance<T2>(
@@ -319,7 +320,8 @@ export function mapSchema<
319
320
  public static get childTypes(): ReadonlySet<TreeNodeSchema> {
320
321
  return normalizedTypes.evaluateSet();
321
322
  }
322
- public static readonly metadata: NodeSchemaMetadata<TCustomMetadata> = metadata ?? {};
323
+ public static readonly metadata: NodeSchemaMetadata<TCustomMetadata> =
324
+ nodeOptions.metadata ?? {};
323
325
  public static readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined =
324
326
  persistedMetadata;
325
327
 
@@ -87,6 +87,7 @@ import {
87
87
  type InsertableContent,
88
88
  } from "../../unhydratedFlexTreeFromInsertable.js";
89
89
  import { convertField, convertFieldKind } from "../../toStoredSchema.js";
90
+ import type { ObjectSchemaOptionsAlpha } from "../../api/index.js";
90
91
 
91
92
  /**
92
93
  * Generates the properties for an ObjectNode from its field schema object.
@@ -98,7 +99,7 @@ import { convertField, convertFieldKind } from "../../toStoredSchema.js";
98
99
  */
99
100
  export type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> =
100
101
  RestrictiveStringRecord<ImplicitFieldSchema> extends T
101
- ? // eslint-disable-next-line @typescript-eslint/ban-types
102
+ ? // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/ban-types
102
103
  {}
103
104
  : {
104
105
  -readonly [Property in keyof T]: Property extends string
@@ -415,9 +416,7 @@ export function objectSchema<
415
416
  identifier: TName,
416
417
  info: T,
417
418
  implicitlyConstructable: ImplicitlyConstructable,
418
- allowUnknownOptionalFields: boolean,
419
- metadata?: NodeSchemaMetadata<TCustomMetadata>,
420
- persistedMetadata?: JsonCompatibleReadOnlyObject | undefined,
419
+ nodeOptions: ObjectSchemaOptionsAlpha<TCustomMetadata>,
421
420
  ): ObjectNodeSchema<TName, T, ImplicitlyConstructable, TCustomMetadata> &
422
421
  ObjectNodeSchemaInternalData &
423
422
  TreeNodeSchemaCorePrivate {
@@ -471,7 +470,8 @@ export function objectSchema<
471
470
  ]),
472
471
  );
473
472
  public static readonly identifierFieldKeys: readonly FieldKey[] = identifierFieldKeys;
474
- public static readonly allowUnknownOptionalFields: boolean = allowUnknownOptionalFields;
473
+ public static readonly allowUnknownOptionalFields: boolean =
474
+ nodeOptions.allowUnknownOptionalFields ?? false;
475
475
 
476
476
  public static override prepareInstance<T2>(
477
477
  this: typeof TreeNodeValid<T2>,
@@ -561,9 +561,10 @@ export function objectSchema<
561
561
  public static get childTypes(): ReadonlySet<TreeNodeSchema> {
562
562
  return lazyChildTypes.value;
563
563
  }
564
- public static readonly metadata: NodeSchemaMetadata<TCustomMetadata> = metadata ?? {};
564
+ public static readonly metadata: NodeSchemaMetadata<TCustomMetadata> =
565
+ nodeOptions.metadata ?? {};
565
566
  public static readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined =
566
- persistedMetadata;
567
+ nodeOptions.persistedMetadata;
567
568
 
568
569
  // eslint-disable-next-line import/no-deprecated
569
570
  public get [typeNameSymbol](): TName {
@@ -592,7 +593,7 @@ export function objectSchema<
592
593
  convertField(fieldSchema.schema, storedOptions),
593
594
  );
594
595
  }
595
- return new ObjectNodeStoredSchema(fields, persistedMetadata);
596
+ return new ObjectNodeStoredSchema(fields, nodeOptions.persistedMetadata);
596
597
  },
597
598
  ));
598
599
  }
@@ -57,6 +57,7 @@ import {
57
57
  import { prepareForInsertion } from "../../prepareForInsertion.js";
58
58
  import { recordLikeDataToFlexContent } from "../common.js";
59
59
  import { MapNodeStoredSchema } from "../../../core/index.js";
60
+ import type { NodeSchemaOptionsAlpha } from "../../api/index.js";
60
61
 
61
62
  /**
62
63
  * Create a proxy which implements the {@link TreeRecordNode} API.
@@ -227,15 +228,7 @@ export interface RecordSchemaOptions<
227
228
 
228
229
  readonly implicitlyConstructable: TImplicitlyConstructable;
229
230
 
230
- /**
231
- * Optional ephemeral metadata for the object node schema.
232
- */
233
- readonly metadata?: NodeSchemaMetadata<TCustomMetadata>;
234
-
235
- /**
236
- * Optional persisted metadata for the object node schema.
237
- */
238
- readonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;
231
+ readonly nodeOptions?: NodeSchemaOptionsAlpha<TCustomMetadata>;
239
232
  }
240
233
 
241
234
  /**
@@ -258,14 +251,8 @@ export function recordSchema<
258
251
  TCustomMetadata
259
252
  >,
260
253
  ) {
261
- const {
262
- identifier,
263
- info,
264
- customizable,
265
- implicitlyConstructable,
266
- metadata,
267
- persistedMetadata,
268
- } = options;
254
+ const { identifier, info, customizable, implicitlyConstructable, nodeOptions } = options;
255
+ const persistedMetadata = nodeOptions?.persistedMetadata;
269
256
 
270
257
  const normalizedTypes = normalizeAllowedTypes(info);
271
258
  const lazyAllowedTypesIdentifiers = new Lazy(
@@ -369,7 +356,8 @@ export function recordSchema<
369
356
  public static get childTypes(): ReadonlySet<TreeNodeSchema> {
370
357
  return normalizedTypes.evaluateSet();
371
358
  }
372
- public static readonly metadata: NodeSchemaMetadata<TCustomMetadata> = metadata ?? {};
359
+ public static readonly metadata: NodeSchemaMetadata<TCustomMetadata> =
360
+ nodeOptions?.metadata ?? {};
373
361
  public static readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined =
374
362
  persistedMetadata;
375
363
 
@@ -64,7 +64,7 @@ export interface RecordNodeCustomizableSchema<
64
64
  /* TInsertable */ RecordNodeInsertableData<T>,
65
65
  /* ImplicitlyConstructable */ ImplicitlyConstructable,
66
66
  /* Info */ T,
67
- /* TConstructorExtra */ never,
67
+ /* TConstructorExtra */ undefined,
68
68
  /* TCustomMetadata */ TCustomMetadata
69
69
  >,
70
70
  SimpleRecordNodeSchema<TCustomMetadata> {}
@@ -85,7 +85,7 @@ export interface RecordNodePojoEmulationSchema<
85
85
  /* TInsertable */ RecordNodeInsertableData<T>,
86
86
  /* ImplicitlyConstructable */ ImplicitlyConstructable,
87
87
  /* Info */ T,
88
- /* TConstructorExtra */ never,
88
+ /* TConstructorExtra */ undefined,
89
89
  /* TCustomMetadata */ TCustomMetadata
90
90
  >,
91
91
  SimpleRecordNodeSchema<TCustomMetadata> {}
@@ -13,7 +13,7 @@ import {
13
13
  type InsertableObjectFromSchemaRecord,
14
14
  type InsertableTreeNodeFromImplicitAllowedTypes,
15
15
  type NodeKind,
16
- type SchemaFactoryAlpha,
16
+ type SchemaFactoryBeta,
17
17
  type ScopedSchemaName,
18
18
  TreeArrayNode,
19
19
  type TreeNode,
@@ -119,7 +119,7 @@ export namespace System_TableSchema {
119
119
  * @privateRemarks This interface primarily exists to provide a single home for property documentation.
120
120
  * @system @alpha
121
121
  */
122
- export interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryAlpha> {
122
+ export interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryBeta> {
123
123
  /**
124
124
  * Schema factory with which the Column schema will be associated.
125
125
  * @remarks Can be used to associate the resulting schema with an existing {@link SchemaFactory.scope|scope}.
@@ -148,7 +148,7 @@ export namespace System_TableSchema {
148
148
  * @system @alpha
149
149
  */
150
150
  export type CreateColumnOptionsBase<
151
- TSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,
151
+ TSchemaFactory extends SchemaFactoryBeta = SchemaFactoryBeta,
152
152
  TCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,
153
153
  > = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;
154
154
 
@@ -162,11 +162,11 @@ export namespace System_TableSchema {
162
162
  const TCellSchema extends ImplicitAllowedTypes,
163
163
  const TPropsSchema extends ImplicitFieldSchema,
164
164
  >(
165
- inputSchemaFactory: SchemaFactoryAlpha<TInputScope>,
165
+ inputSchemaFactory: SchemaFactoryBeta<TInputScope>,
166
166
  cellSchema: TCellSchema,
167
167
  propsSchema: TPropsSchema,
168
168
  ) {
169
- const schemaFactory = inputSchemaFactory.scopedFactoryAlpha(tableSchemaFactorySubScope);
169
+ const schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);
170
170
  type Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;
171
171
 
172
172
  type CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;
@@ -320,7 +320,7 @@ export namespace System_TableSchema {
320
320
  * @system @alpha
321
321
  */
322
322
  export type CreateRowOptionsBase<
323
- TSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,
323
+ TSchemaFactory extends SchemaFactoryBeta = SchemaFactoryBeta,
324
324
  TCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,
325
325
  > = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;
326
326
 
@@ -334,11 +334,11 @@ export namespace System_TableSchema {
334
334
  const TCellSchema extends ImplicitAllowedTypes,
335
335
  const TPropsSchema extends ImplicitFieldSchema,
336
336
  >(
337
- inputSchemaFactory: SchemaFactoryAlpha<TInputScope>,
337
+ inputSchemaFactory: SchemaFactoryBeta<TInputScope>,
338
338
  cellSchema: TCellSchema,
339
339
  propsSchema: TPropsSchema,
340
340
  ) {
341
- const schemaFactory = inputSchemaFactory.scopedFactoryAlpha(tableSchemaFactorySubScope);
341
+ const schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);
342
342
  type Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;
343
343
 
344
344
  type CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;
@@ -538,7 +538,7 @@ export namespace System_TableSchema {
538
538
  * @system @alpha
539
539
  */
540
540
  export type TableFactoryOptionsBase<
541
- TSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,
541
+ TSchemaFactory extends SchemaFactoryBeta = SchemaFactoryBeta,
542
542
  TCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,
543
543
  > = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;
544
544
 
@@ -553,12 +553,12 @@ export namespace System_TableSchema {
553
553
  const TColumnSchema extends ColumnSchemaBase<TInputScope, TCellSchema>,
554
554
  const TRowSchema extends RowSchemaBase<TInputScope, TCellSchema>,
555
555
  >(
556
- inputSchemaFactory: SchemaFactoryAlpha<TInputScope>,
556
+ inputSchemaFactory: SchemaFactoryBeta<TInputScope>,
557
557
  _cellSchema: TCellSchema,
558
558
  columnSchema: TColumnSchema,
559
559
  rowSchema: TRowSchema,
560
560
  ) {
561
- const schemaFactory = inputSchemaFactory.scopedFactoryAlpha(tableSchemaFactorySubScope);
561
+ const schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);
562
562
  type Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;
563
563
 
564
564
  type CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;
@@ -579,7 +579,7 @@ export namespace System_TableSchema {
579
579
  * The Table schema
580
580
  */
581
581
  class Table
582
- extends schemaFactory.objectAlpha("Table", tableFields, {
582
+ extends schemaFactory.object("Table", tableFields, {
583
583
  // Will make it easier to evolve this schema in the future.
584
584
  allowUnknownOptionalFields: true,
585
585
  })
@@ -591,32 +591,24 @@ export namespace System_TableSchema {
591
591
  return new this({ columns: [], rows: [] }) as InstanceType<TThis>;
592
592
  }
593
593
 
594
- public getColumn(id: string): ColumnValueType | undefined {
595
- // TypeScript is unable to narrow the types correctly here, hence the casts.
596
- // See: https://github.com/microsoft/TypeScript/issues/52144
597
- return this.columns.find((column) => (column as ColumnValueType).id === id) as
598
- | ColumnValueType
599
- | undefined;
594
+ public getColumn(indexOrId: number | string): ColumnValueType | undefined {
595
+ return this._tryGetColumn(indexOrId);
600
596
  }
601
597
 
602
- public getRow(id: string): RowValueType | undefined {
603
- // TypeScript is unable to narrow the types correctly here, hence the casts.
604
- // See: https://github.com/microsoft/TypeScript/issues/52144
605
- return this.rows.find((_row) => (_row as RowValueType).id === id) as
606
- | RowValueType
607
- | undefined;
598
+ public getRow(indexOrId: number | string): RowValueType | undefined {
599
+ return this._tryGetRow(indexOrId);
608
600
  }
609
601
 
610
602
  public getCell(
611
603
  key: TableSchema.CellKey<TColumnSchema, TRowSchema>,
612
604
  ): CellValueType | undefined {
613
- const { column: columnOrId, row: rowOrId } = key;
614
- const row = this._tryGetRow(rowOrId);
605
+ const { column: columnOrIdOrIndex, row: rowOrIdOrIndex } = key;
606
+ const row = this._tryGetRow(rowOrIdOrIndex);
615
607
  if (row === undefined) {
616
608
  return undefined;
617
609
  }
618
610
 
619
- const column = this._tryGetColumn(columnOrId);
611
+ const column = this._tryGetColumn(columnOrIdOrIndex);
620
612
  if (column === undefined) {
621
613
  return undefined;
622
614
  }
@@ -816,7 +808,8 @@ export namespace System_TableSchema {
816
808
  // So if we throw an error here for any row, no rows will be removed.
817
809
  for (const rowToRemove of rowsToRemove) {
818
810
  // We have already validated that all of the rows exist above, so this is safe.
819
- this.rows.removeAt(this.rows.indexOf(rowToRemove));
811
+ const index = this.rows.indexOf(rowToRemove);
812
+ this.rows.removeAt(index);
820
813
  }
821
814
  });
822
815
  return rowsToRemove;
@@ -825,9 +818,9 @@ export namespace System_TableSchema {
825
818
  public removeCell(
826
819
  key: TableSchema.CellKey<TColumnSchema, TRowSchema>,
827
820
  ): CellValueType | undefined {
828
- const { column: columnOrId, row: rowOrId } = key;
829
- const row = this._getRow(rowOrId);
830
- const column = this._getColumn(columnOrId);
821
+ const { column: columnOrIdOrIndex, row: rowOrIdOrIndex } = key;
822
+ const row = this._getRow(rowOrIdOrIndex);
823
+ const column = this._getColumn(columnOrIdOrIndex);
831
824
 
832
825
  const cell: CellValueType | undefined = row.getCell(column.id);
833
826
  if (cell === undefined) {
@@ -906,10 +899,32 @@ export namespace System_TableSchema {
906
899
  * @remarks Searches for a match based strictly on the ID and returns that result.
907
900
  */
908
901
  private _tryGetColumn(
909
- columnOrId: string | ColumnValueType,
902
+ columnOrIdOrIndex: ColumnValueType | string | number,
910
903
  ): ColumnValueType | undefined {
911
- const columnId = this._getColumnId(columnOrId);
912
- return this.getColumn(columnId);
904
+ if (typeof columnOrIdOrIndex === "number") {
905
+ if (columnOrIdOrIndex < 0 || columnOrIdOrIndex >= this.columns.length) {
906
+ return undefined;
907
+ }
908
+ // TypeScript is unable to narrow the types correctly here, hence the cast.
909
+ // See: https://github.com/microsoft/TypeScript/issues/52144
910
+ return this.columns[columnOrIdOrIndex] as ColumnValueType;
911
+ }
912
+
913
+ if (typeof columnOrIdOrIndex === "string") {
914
+ const columnId = columnOrIdOrIndex;
915
+ // TypeScript is unable to narrow the types correctly here, hence the casts.
916
+ // See: https://github.com/microsoft/TypeScript/issues/52144
917
+ return this.columns.find((col) => (col as ColumnValueType).id === columnId) as
918
+ | ColumnValueType
919
+ | undefined;
920
+ }
921
+
922
+ // If the user provided a node, ensure it actually exists in this table.
923
+ if (!this.columns.includes(columnOrIdOrIndex)) {
924
+ return undefined;
925
+ }
926
+
927
+ return columnOrIdOrIndex;
913
928
  }
914
929
 
915
930
  /**
@@ -917,23 +932,16 @@ export namespace System_TableSchema {
917
932
  * @throws Throws a `UsageError` if there is no match.
918
933
  * @remarks Searches for a match based strictly on the ID and returns that result.
919
934
  */
920
- private _getColumn(columnOrId: string | ColumnValueType): ColumnValueType {
921
- const column = this._tryGetColumn(columnOrId);
935
+ private _getColumn(
936
+ columnOrIdOrIndex: ColumnValueType | string | number,
937
+ ): ColumnValueType {
938
+ const column = this._tryGetColumn(columnOrIdOrIndex);
922
939
  if (column === undefined) {
923
- this._throwMissingColumnError(this._getColumnId(columnOrId));
940
+ Table._throwMissingColumnError(columnOrIdOrIndex);
924
941
  }
925
942
  return column;
926
943
  }
927
944
 
928
- /**
929
- * Resolves a Column node or ID to its ID.
930
- * If an ID is provided, it is returned as-is.
931
- * If a node is provided, its ID is returned.
932
- */
933
- private _getColumnId(columnOrId: string | ColumnValueType): string {
934
- return typeof columnOrId === "string" ? columnOrId : columnOrId.id;
935
- }
936
-
937
945
  /**
938
946
  * Checks if a Column with the specified ID exists in the table.
939
947
  */
@@ -942,10 +950,24 @@ export namespace System_TableSchema {
942
950
  }
943
951
 
944
952
  /**
945
- * Throw a `UsageError` for a missing Column by its ID.
953
+ * Throw a `UsageError` for a missing Column by its ID or index.
946
954
  */
947
- private _throwMissingColumnError(columnId: string): never {
948
- throw new UsageError(`No column with ID "${columnId}" exists in the table.`);
955
+ private static _throwMissingColumnError(
956
+ columnOrIdOrIndex: ColumnValueType | string | number,
957
+ ): never {
958
+ if (typeof columnOrIdOrIndex === "number") {
959
+ throw new UsageError(`No column exists at index ${columnOrIdOrIndex}.`);
960
+ }
961
+
962
+ if (typeof columnOrIdOrIndex === "string") {
963
+ throw new UsageError(
964
+ `No column with ID "${columnOrIdOrIndex}" exists in the table.`,
965
+ );
966
+ }
967
+
968
+ throw new UsageError(
969
+ `The specified column node with ID "${columnOrIdOrIndex.id}" does not exist in the table.`,
970
+ );
949
971
  }
950
972
 
951
973
  /**
@@ -953,38 +975,65 @@ export namespace System_TableSchema {
953
975
  * Returns `undefined` if there is no match.
954
976
  * @remarks Searches for a match based strictly on the ID and returns that result.
955
977
  */
956
- private _tryGetRow(rowOrId: string | RowValueType): RowValueType | undefined {
957
- const rowId = this._getRowId(rowOrId);
958
- return this.getRow(rowId);
978
+ private _tryGetRow(
979
+ rowOrIdOrIndex: RowValueType | string | number,
980
+ ): RowValueType | undefined {
981
+ if (typeof rowOrIdOrIndex === "number") {
982
+ if (rowOrIdOrIndex < 0 || rowOrIdOrIndex >= this.rows.length) {
983
+ return undefined;
984
+ }
985
+ // TypeScript is unable to narrow the types correctly here, hence the cast.
986
+ // See: https://github.com/microsoft/TypeScript/issues/52144
987
+ return this.rows[rowOrIdOrIndex] as RowValueType;
988
+ }
989
+
990
+ if (typeof rowOrIdOrIndex === "string") {
991
+ const rowId = rowOrIdOrIndex;
992
+ // TypeScript is unable to narrow the types correctly here, hence the casts.
993
+ // See: https://github.com/microsoft/TypeScript/issues/52144
994
+ return this.rows.find((row) => (row as RowValueType).id === rowId) as
995
+ | RowValueType
996
+ | undefined;
997
+ }
998
+
999
+ // If the user provided a node, ensure it actually exists in this table.
1000
+ if (!this.rows.includes(rowOrIdOrIndex)) {
1001
+ return undefined;
1002
+ }
1003
+
1004
+ return rowOrIdOrIndex;
959
1005
  }
960
1006
 
961
1007
  /**
962
- * Attempts to resolve the provided Row node or ID to a Row node in the table.
1008
+ * Attempts to resolve the provided Row node, ID, or index to a Row node in the table.
963
1009
  * @throws Throws a `UsageError` if there is no match.
964
1010
  * @remarks Searches for a match based strictly on the ID and returns that result.
965
1011
  */
966
- private _getRow(rowOrId: string | RowValueType): RowValueType {
967
- const row = this._tryGetRow(rowOrId);
1012
+ private _getRow(rowOrIdOrIndex: RowValueType | string | number): RowValueType {
1013
+ const row = this._tryGetRow(rowOrIdOrIndex);
968
1014
  if (row === undefined) {
969
- this._throwMissingRowError(this._getRowId(rowOrId));
1015
+ Table._throwMissingRowError(rowOrIdOrIndex);
970
1016
  }
971
1017
  return row;
972
1018
  }
973
1019
 
974
1020
  /**
975
- * Resolves a Row node or ID to its ID.
976
- * If an ID is provided, it is returned as-is.
977
- * If a node is provided, its ID is returned.
1021
+ * Throw a `UsageError` for a missing Row by its ID or index.
978
1022
  */
979
- private _getRowId(rowOrId: string | RowValueType): string {
980
- return typeof rowOrId === "string" ? rowOrId : rowOrId.id;
981
- }
1023
+ private static _throwMissingRowError(
1024
+ rowOrIdOrIndex: RowValueType | string | number,
1025
+ ): never {
1026
+ if (typeof rowOrIdOrIndex === "number") {
1027
+ throw new UsageError(`No row exists at index ${rowOrIdOrIndex}.`);
1028
+ }
982
1029
 
983
- /**
984
- * Throw a `UsageError` for a missing Row by its ID.
985
- */
986
- private _throwMissingRowError(rowId: string): never {
987
- throw new UsageError(`No row with ID "${rowId}" exists in the table.`);
1030
+ if (typeof rowOrIdOrIndex === "string") {
1031
+ throw new UsageError(`No row with ID "${rowOrIdOrIndex}" exists in the table.`);
1032
+ }
1033
+
1034
+ throw new UsageError(
1035
+ `The specified row node with ID "${rowOrIdOrIndex.id}" does not exist in the table.`,
1036
+ );
988
1037
  }
989
1038
 
990
1039
  private static _removeRange<TNodeSchema extends ImplicitAllowedTypes>(
@@ -1225,7 +1274,7 @@ export namespace TableSchema {
1225
1274
 
1226
1275
  /**
1227
1276
  * Gets all of the populated cells in the column, keyed by their associated row IDs.
1228
- * @throws Throws an error if the column is not in a table.
1277
+ * @throws Throws an error if the column is not in a table.
1229
1278
  */
1230
1279
  getCells(): readonly {
1231
1280
  rowId: string;
@@ -1243,7 +1292,7 @@ export namespace TableSchema {
1243
1292
  const TScope extends string | undefined,
1244
1293
  const TCell extends ImplicitAllowedTypes,
1245
1294
  >(
1246
- params: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,
1295
+ params: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryBeta<TScope>, TCell>,
1247
1296
  ): System_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>;
1248
1297
  /**
1249
1298
  * Factory for creating new table column schema.
@@ -1257,7 +1306,7 @@ export namespace TableSchema {
1257
1306
  const TCell extends ImplicitAllowedTypes,
1258
1307
  const TProps extends ImplicitFieldSchema,
1259
1308
  >(
1260
- params: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {
1309
+ params: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1261
1310
  /**
1262
1311
  * Optional column properties.
1263
1312
  */
@@ -1366,7 +1415,7 @@ export namespace TableSchema {
1366
1415
  const TScope extends string | undefined,
1367
1416
  const TCell extends ImplicitAllowedTypes,
1368
1417
  >(
1369
- params: System_TableSchema.CreateRowOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,
1418
+ params: System_TableSchema.CreateRowOptionsBase<SchemaFactoryBeta<TScope>, TCell>,
1370
1419
  ): System_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>;
1371
1420
  /**
1372
1421
  * Factory for creating new table row schema.
@@ -1380,7 +1429,7 @@ export namespace TableSchema {
1380
1429
  const TCell extends ImplicitAllowedTypes,
1381
1430
  const TProps extends ImplicitFieldSchema,
1382
1431
  >(
1383
- params: System_TableSchema.CreateRowOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {
1432
+ params: System_TableSchema.CreateRowOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1384
1433
  /**
1385
1434
  * Optional row properties.
1386
1435
  */
@@ -1413,14 +1462,14 @@ export namespace TableSchema {
1413
1462
  TRow extends ImplicitAllowedTypes,
1414
1463
  > {
1415
1464
  /**
1416
- * {@link TableSchema.Column} or {@link TableSchema.Column.id} at which the cell is located.
1465
+ * {@link TableSchema.Column}, {@link TableSchema.Column.id}, or column index at which the cell is located.
1417
1466
  */
1418
- readonly column: string | TreeNodeFromImplicitAllowedTypes<TColumn>;
1467
+ readonly column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>;
1419
1468
 
1420
1469
  /**
1421
- * {@link TableSchema.Row} or {@link TableSchema.Row.id} at which the cell is located.
1470
+ * {@link TableSchema.Row}, {@link TableSchema.Row.id}, or row index at which the cell is located.
1422
1471
  */
1423
- readonly row: string | TreeNodeFromImplicitAllowedTypes<TRow>;
1472
+ readonly row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>;
1424
1473
  }
1425
1474
 
1426
1475
  /**
@@ -1503,17 +1552,30 @@ export namespace TableSchema {
1503
1552
 
1504
1553
  /**
1505
1554
  * Gets a table column by its {@link TableSchema.Column.id}.
1555
+ * @returns The column, if it exists. Otherwise, `undefined`.
1506
1556
  */
1507
1557
  getColumn(id: string): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
1558
+ /**
1559
+ * Gets a table column by its index in the table.
1560
+ * @returns The column, if it exists. Otherwise, `undefined`.
1561
+ */
1562
+ getColumn(index: number): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
1508
1563
 
1509
1564
  /**
1510
1565
  * Gets a table row by its {@link TableSchema.Row.id}.
1566
+ * @returns The row, if it exists. Otherwise, `undefined`.
1511
1567
  */
1512
1568
  getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
1569
+ /**
1570
+ * Gets a table row by its index in the table.
1571
+ * @returns The row, if it exists. Otherwise, `undefined`.
1572
+ */
1573
+ getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
1513
1574
 
1514
1575
  /**
1515
- * Gets a cell in the table by column and row IDs.
1576
+ * Gets a cell in the table by corresponding column and row.
1516
1577
  * @param key - A key that uniquely distinguishes a cell in the table, represented as a combination of the column ID and row ID.
1578
+ * @returns The cell, if it exists. Otherwise, `undefined`.
1517
1579
  */
1518
1580
  getCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
1519
1581
 
@@ -1644,7 +1706,7 @@ export namespace TableSchema {
1644
1706
  const TScope extends string | undefined,
1645
1707
  const TCell extends ImplicitAllowedTypes,
1646
1708
  >(
1647
- params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,
1709
+ params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryBeta<TScope>, TCell>,
1648
1710
  ): System_TableSchema.TableSchemaBase<
1649
1711
  TScope,
1650
1712
  TCell,
@@ -1663,7 +1725,7 @@ export namespace TableSchema {
1663
1725
  const TCell extends ImplicitAllowedTypes,
1664
1726
  const TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>,
1665
1727
  >(
1666
- params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {
1728
+ params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1667
1729
  readonly column: TColumn;
1668
1730
  },
1669
1731
  ): System_TableSchema.TableSchemaBase<
@@ -1684,7 +1746,7 @@ export namespace TableSchema {
1684
1746
  const TCell extends ImplicitAllowedTypes,
1685
1747
  const TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>,
1686
1748
  >(
1687
- params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {
1749
+ params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1688
1750
  readonly row: TRow;
1689
1751
  },
1690
1752
  ): System_TableSchema.TableSchemaBase<
@@ -1707,7 +1769,7 @@ export namespace TableSchema {
1707
1769
  const TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>,
1708
1770
  const TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>,
1709
1771
  >(
1710
- params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {
1772
+ params: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryBeta<TScope>, TCell> & {
1711
1773
  readonly column: TColumn;
1712
1774
  readonly row: TRow;
1713
1775
  },
@@ -72,6 +72,7 @@ function treeKernelFactory(
72
72
  args.serializer,
73
73
  args.submitLocalMessage,
74
74
  args.lastSequenceNumber,
75
+ args.initialSequenceNumber,
75
76
  args.logger,
76
77
  args.idCompressor,
77
78
  adjustedOptions,
@@ -171,10 +171,10 @@ export function throwIfBroken<
171
171
  return replacementMethod as Target;
172
172
  }
173
173
 
174
- // eslint-disable-next-line @typescript-eslint/ban-types
174
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
175
175
  type PossiblyNamedFunction = Function & { displayName?: undefined | string };
176
176
 
177
- // eslint-disable-next-line @typescript-eslint/ban-types
177
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
178
178
  function nameFunctionFrom(toName: Function, nameFrom: Function): void {
179
179
  (toName as PossiblyNamedFunction).displayName =
180
180
  (nameFrom as PossiblyNamedFunction).displayName ?? nameFrom.name;
@@ -183,13 +183,13 @@ function nameFunctionFrom(toName: Function, nameFrom: Function): void {
183
183
  const isBreakerSymbol: unique symbol = Symbol("isBreaker");
184
184
 
185
185
  // Accepting any function like value is desired and safe here as this does not call the provided function.
186
- // eslint-disable-next-line @typescript-eslint/ban-types
186
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
187
187
  function markBreaker(f: Function): void {
188
188
  (f as unknown as Record<typeof isBreakerSymbol, true>)[isBreakerSymbol] = true;
189
189
  }
190
190
 
191
191
  // Accepting any function like value is desired and safe here as this does not call the provided function.
192
- // eslint-disable-next-line @typescript-eslint/ban-types
192
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
193
193
  function isBreaker(f: Function): boolean {
194
194
  return isBreakerSymbol in (f as unknown as Record<typeof isBreakerSymbol, true>);
195
195
  }