@fluidframework/tree 2.40.0 → 2.41.0-338186

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 (198) hide show
  1. package/api-report/tree.alpha.api.md +1 -1
  2. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  3. package/dist/feature-libraries/default-schema/schemaChecker.js +0 -7
  4. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  5. package/dist/feature-libraries/flex-tree/context.d.ts +16 -14
  6. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  7. package/dist/feature-libraries/flex-tree/context.js +12 -18
  8. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  9. package/dist/feature-libraries/flex-tree/index.d.ts +1 -1
  10. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  11. package/dist/feature-libraries/flex-tree/index.js +1 -2
  12. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  13. package/dist/feature-libraries/flex-tree/lazyField.d.ts +1 -5
  14. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  15. package/dist/feature-libraries/flex-tree/lazyField.js +2 -16
  16. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  17. package/dist/feature-libraries/flex-tree/utilities.d.ts +6 -6
  18. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  19. package/dist/feature-libraries/flex-tree/utilities.js +6 -7
  20. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  21. package/dist/feature-libraries/index.d.ts +1 -1
  22. package/dist/feature-libraries/index.d.ts.map +1 -1
  23. package/dist/feature-libraries/index.js +1 -2
  24. package/dist/feature-libraries/index.js.map +1 -1
  25. package/dist/packageVersion.d.ts +1 -1
  26. package/dist/packageVersion.d.ts.map +1 -1
  27. package/dist/packageVersion.js +1 -1
  28. package/dist/packageVersion.js.map +1 -1
  29. package/dist/shared-tree/checkoutFlexTreeView.d.ts +7 -3
  30. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  31. package/dist/shared-tree/checkoutFlexTreeView.js +11 -2
  32. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  33. package/dist/shared-tree/schematizeTree.d.ts +1 -1
  34. package/dist/shared-tree/schematizeTree.js +1 -1
  35. package/dist/shared-tree/schematizeTree.js.map +1 -1
  36. package/dist/shared-tree/schematizingTreeView.d.ts +3 -0
  37. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  38. package/dist/shared-tree/schematizingTreeView.js +13 -7
  39. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  40. package/dist/shared-tree/treeAlpha.d.ts +1 -4
  41. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  42. package/dist/shared-tree/treeAlpha.js +6 -1
  43. package/dist/shared-tree/treeAlpha.js.map +1 -1
  44. package/dist/simple-tree/api/create.d.ts +5 -1
  45. package/dist/simple-tree/api/create.d.ts.map +1 -1
  46. package/dist/simple-tree/api/create.js +10 -11
  47. package/dist/simple-tree/api/create.js.map +1 -1
  48. package/dist/simple-tree/api/index.d.ts +2 -2
  49. package/dist/simple-tree/api/index.d.ts.map +1 -1
  50. package/dist/simple-tree/api/index.js +2 -2
  51. package/dist/simple-tree/api/index.js.map +1 -1
  52. package/dist/simple-tree/api/storedSchema.d.ts +1 -8
  53. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  54. package/dist/simple-tree/api/storedSchema.js +3 -14
  55. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  56. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  57. package/dist/simple-tree/arrayNode.js +3 -9
  58. package/dist/simple-tree/arrayNode.js.map +1 -1
  59. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +4 -4
  60. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  61. package/dist/simple-tree/core/unhydratedFlexTree.js +9 -5
  62. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  63. package/dist/simple-tree/index.d.ts +3 -2
  64. package/dist/simple-tree/index.d.ts.map +1 -1
  65. package/dist/simple-tree/index.js +6 -4
  66. package/dist/simple-tree/index.js.map +1 -1
  67. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  68. package/dist/simple-tree/mapNode.js +17 -20
  69. package/dist/simple-tree/mapNode.js.map +1 -1
  70. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  71. package/dist/simple-tree/objectNode.js +2 -4
  72. package/dist/simple-tree/objectNode.js.map +1 -1
  73. package/dist/simple-tree/prepareForInsertion.d.ts +30 -0
  74. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -0
  75. package/dist/simple-tree/prepareForInsertion.js +137 -0
  76. package/dist/simple-tree/prepareForInsertion.js.map +1 -0
  77. package/dist/simple-tree/proxies.d.ts +1 -12
  78. package/dist/simple-tree/proxies.d.ts.map +1 -1
  79. package/dist/simple-tree/proxies.js +10 -106
  80. package/dist/simple-tree/proxies.js.map +1 -1
  81. package/dist/simple-tree/toMapTree.d.ts +1 -1
  82. package/dist/simple-tree/toMapTree.js +1 -1
  83. package/dist/simple-tree/toMapTree.js.map +1 -1
  84. package/dist/tableSchema.d.ts +108 -59
  85. package/dist/tableSchema.d.ts.map +1 -1
  86. package/dist/tableSchema.js +93 -44
  87. package/dist/tableSchema.js.map +1 -1
  88. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  89. package/lib/feature-libraries/default-schema/schemaChecker.js +0 -7
  90. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  91. package/lib/feature-libraries/flex-tree/context.d.ts +16 -14
  92. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  93. package/lib/feature-libraries/flex-tree/context.js +11 -16
  94. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  95. package/lib/feature-libraries/flex-tree/index.d.ts +1 -1
  96. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  97. package/lib/feature-libraries/flex-tree/index.js +1 -1
  98. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  99. package/lib/feature-libraries/flex-tree/lazyField.d.ts +1 -5
  100. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  101. package/lib/feature-libraries/flex-tree/lazyField.js +1 -14
  102. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  103. package/lib/feature-libraries/flex-tree/utilities.d.ts +6 -6
  104. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  105. package/lib/feature-libraries/flex-tree/utilities.js +6 -7
  106. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  107. package/lib/feature-libraries/index.d.ts +1 -1
  108. package/lib/feature-libraries/index.d.ts.map +1 -1
  109. package/lib/feature-libraries/index.js +1 -1
  110. package/lib/feature-libraries/index.js.map +1 -1
  111. package/lib/packageVersion.d.ts +1 -1
  112. package/lib/packageVersion.d.ts.map +1 -1
  113. package/lib/packageVersion.js +1 -1
  114. package/lib/packageVersion.js.map +1 -1
  115. package/lib/shared-tree/checkoutFlexTreeView.d.ts +7 -3
  116. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  117. package/lib/shared-tree/checkoutFlexTreeView.js +12 -3
  118. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  119. package/lib/shared-tree/schematizeTree.d.ts +1 -1
  120. package/lib/shared-tree/schematizeTree.js +1 -1
  121. package/lib/shared-tree/schematizeTree.js.map +1 -1
  122. package/lib/shared-tree/schematizingTreeView.d.ts +3 -0
  123. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  124. package/lib/shared-tree/schematizingTreeView.js +14 -8
  125. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  126. package/lib/shared-tree/treeAlpha.d.ts +1 -4
  127. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  128. package/lib/shared-tree/treeAlpha.js +7 -2
  129. package/lib/shared-tree/treeAlpha.js.map +1 -1
  130. package/lib/simple-tree/api/create.d.ts +5 -1
  131. package/lib/simple-tree/api/create.d.ts.map +1 -1
  132. package/lib/simple-tree/api/create.js +8 -10
  133. package/lib/simple-tree/api/create.js.map +1 -1
  134. package/lib/simple-tree/api/index.d.ts +2 -2
  135. package/lib/simple-tree/api/index.d.ts.map +1 -1
  136. package/lib/simple-tree/api/index.js +2 -2
  137. package/lib/simple-tree/api/index.js.map +1 -1
  138. package/lib/simple-tree/api/storedSchema.d.ts +1 -8
  139. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  140. package/lib/simple-tree/api/storedSchema.js +2 -12
  141. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  142. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  143. package/lib/simple-tree/arrayNode.js +4 -10
  144. package/lib/simple-tree/arrayNode.js.map +1 -1
  145. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +4 -4
  146. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  147. package/lib/simple-tree/core/unhydratedFlexTree.js +9 -5
  148. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  149. package/lib/simple-tree/index.d.ts +3 -2
  150. package/lib/simple-tree/index.d.ts.map +1 -1
  151. package/lib/simple-tree/index.js +3 -2
  152. package/lib/simple-tree/index.js.map +1 -1
  153. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  154. package/lib/simple-tree/mapNode.js +3 -6
  155. package/lib/simple-tree/mapNode.js.map +1 -1
  156. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  157. package/lib/simple-tree/objectNode.js +4 -6
  158. package/lib/simple-tree/objectNode.js.map +1 -1
  159. package/lib/simple-tree/prepareForInsertion.d.ts +30 -0
  160. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -0
  161. package/lib/simple-tree/prepareForInsertion.js +131 -0
  162. package/lib/simple-tree/prepareForInsertion.js.map +1 -0
  163. package/lib/simple-tree/proxies.d.ts +1 -12
  164. package/lib/simple-tree/proxies.d.ts.map +1 -1
  165. package/lib/simple-tree/proxies.js +1 -96
  166. package/lib/simple-tree/proxies.js.map +1 -1
  167. package/lib/simple-tree/toMapTree.d.ts +1 -1
  168. package/lib/simple-tree/toMapTree.js +1 -1
  169. package/lib/simple-tree/toMapTree.js.map +1 -1
  170. package/lib/tableSchema.d.ts +108 -59
  171. package/lib/tableSchema.d.ts.map +1 -1
  172. package/lib/tableSchema.js +94 -45
  173. package/lib/tableSchema.js.map +1 -1
  174. package/lib/tsdoc-metadata.json +1 -1
  175. package/package.json +25 -25
  176. package/src/feature-libraries/default-schema/schemaChecker.ts +0 -8
  177. package/src/feature-libraries/flex-tree/context.ts +18 -20
  178. package/src/feature-libraries/flex-tree/index.ts +0 -1
  179. package/src/feature-libraries/flex-tree/lazyField.ts +2 -14
  180. package/src/feature-libraries/flex-tree/utilities.ts +8 -8
  181. package/src/feature-libraries/index.ts +0 -1
  182. package/src/packageVersion.ts +1 -1
  183. package/src/shared-tree/checkoutFlexTreeView.ts +10 -6
  184. package/src/shared-tree/schematizeTree.ts +1 -1
  185. package/src/shared-tree/schematizingTreeView.ts +14 -14
  186. package/src/shared-tree/treeAlpha.ts +21 -5
  187. package/src/simple-tree/api/create.ts +15 -15
  188. package/src/simple-tree/api/index.ts +6 -2
  189. package/src/simple-tree/api/storedSchema.ts +2 -19
  190. package/src/simple-tree/arrayNode.ts +9 -20
  191. package/src/simple-tree/core/unhydratedFlexTree.ts +10 -5
  192. package/src/simple-tree/index.ts +6 -5
  193. package/src/simple-tree/mapNode.ts +8 -12
  194. package/src/simple-tree/objectNode.ts +3 -12
  195. package/src/simple-tree/prepareForInsertion.ts +236 -0
  196. package/src/simple-tree/proxies.ts +2 -147
  197. package/src/simple-tree/toMapTree.ts +1 -1
  198. package/src/tableSchema.ts +310 -158
@@ -5,7 +5,7 @@
5
5
  import { oob } from "@fluidframework/core-utils/internal";
6
6
  import { UsageError } from "@fluidframework/telemetry-utils/internal";
7
7
  import { Tree } from "./shared-tree/index.js";
8
- import { TreeArrayNode, SchemaFactory, } from "./simple-tree/index.js";
8
+ import { TreeArrayNode, SchemaFactory, isArrayNodeSchema, } from "./simple-tree/index.js";
9
9
  // Future improvement TODOs:
10
10
  // - Omit `cells` property from Row insertion type.
11
11
  // - Record-like type parameters / input parameters?
@@ -16,6 +16,32 @@ import { TreeArrayNode, SchemaFactory, } from "./simple-tree/index.js";
16
16
  * The sub-scope applied to user-provided {@link SchemaFactory}s by table schema factories.
17
17
  */
18
18
  const tableSchemaFactorySubScope = "table";
19
+ /**
20
+ * Gets the table containing the provided row/column node, if the node is part of a table.
21
+ * @remarks Assumes that the table is the grandparent of the row/column node.
22
+ */
23
+ function getParentTable(rowOrColumnNode) {
24
+ const rowListNode = Tree.parent(rowOrColumnNode);
25
+ if (rowListNode === undefined || !isArrayNodeSchema(Tree.schema(rowListNode))) {
26
+ return undefined;
27
+ }
28
+ const tableNode = Tree.parent(rowListNode);
29
+ if (tableNode === undefined || !isTableNode(tableNode)) {
30
+ return undefined;
31
+ }
32
+ return tableNode;
33
+ }
34
+ /**
35
+ * A private symbol put on table schema to help identify them.
36
+ */
37
+ const tableSchemaSymbol = Symbol("tableNode");
38
+ /**
39
+ * Type-guard to determine if a node is a table node.
40
+ * @remarks Uses {@link tableSchemaSymbol} to identify table nodes.
41
+ */
42
+ function isTableNode(node) {
43
+ return tableSchemaSymbol in Tree.schema(node);
44
+ }
19
45
  /**
20
46
  * Not intended for use outside of this package.
21
47
  *
@@ -29,11 +55,11 @@ const tableSchemaFactorySubScope = "table";
29
55
  export var System_TableSchema;
30
56
  (function (System_TableSchema) {
31
57
  /**
32
- * Factory for creating new table column schema.
58
+ * Factory for creating column schema.
33
59
  * @system @internal
34
60
  */
35
61
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
36
- function createColumnInternal(inputSchemaFactory, propsSchema) {
62
+ function createColumnSchema(inputSchemaFactory, cellSchema, propsSchema) {
37
63
  const schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);
38
64
  // Note: `columnFields` is broken into two parts to work around a TypeScript bug
39
65
  // that results in broken `.d.ts` output.
@@ -66,6 +92,23 @@ export var System_TableSchema;
66
92
  // Will make it easier to evolve this schema in the future.
67
93
  allowUnknownOptionalFields: true,
68
94
  }) {
95
+ getCells() {
96
+ const tableNode = getParentTable(this);
97
+ if (tableNode === undefined) {
98
+ throw new UsageError(`Column with ID "${this.id}" is not contained in a table.`);
99
+ }
100
+ const result = [];
101
+ for (const row of tableNode.rows) {
102
+ const cell = row.getCell(this.id);
103
+ if (cell !== undefined) {
104
+ if (!Tree.is(cell, cellSchema)) {
105
+ throw new UsageError("Parent table contains a cell with incompatible with this column.");
106
+ }
107
+ result.push({ rowId: row.id, cell: cell });
108
+ }
109
+ }
110
+ return result;
111
+ }
69
112
  }
70
113
  // Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly "__#124291@#brand": unknown;`
71
114
  // for the private brand field of TreeNode.
@@ -75,14 +118,13 @@ export var System_TableSchema;
75
118
  const ColumnSchemaType = Column;
76
119
  return ColumnSchemaType;
77
120
  }
78
- System_TableSchema.createColumnInternal = createColumnInternal;
121
+ System_TableSchema.createColumnSchema = createColumnSchema;
79
122
  /**
80
- * Factory for creating new table row schema.
81
- *
123
+ * Factory for creating row schema.
82
124
  * @sealed @internal
83
125
  */
84
126
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
85
- function createRowInternal(inputSchemaFactory, cellSchema, propsSchema) {
127
+ function createRowSchema(inputSchemaFactory, cellSchema, propsSchema) {
86
128
  const schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);
87
129
  // Note: `rowFields` is broken into two parts to work around a TypeScript bug
88
130
  // that results in broken `.d.ts` output.
@@ -136,6 +178,18 @@ export var System_TableSchema;
136
178
  this.cells.delete(columnId);
137
179
  return cell;
138
180
  }
181
+ getCells() {
182
+ const result = [];
183
+ for (const [columnId, cell] of this.cells.entries()) {
184
+ if (cell !== undefined) {
185
+ result.push({
186
+ columnId,
187
+ cell,
188
+ });
189
+ }
190
+ }
191
+ return result;
192
+ }
139
193
  }
140
194
  // Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly "__#124291@#brand": unknown;`
141
195
  // for the private brand field of TreeNode.
@@ -145,13 +199,13 @@ export var System_TableSchema;
145
199
  const RowSchemaType = Row;
146
200
  return RowSchemaType;
147
201
  }
148
- System_TableSchema.createRowInternal = createRowInternal;
202
+ System_TableSchema.createRowSchema = createRowSchema;
149
203
  /**
150
- * Factory for creating new table schema.
204
+ * Factory for creating table schema.
151
205
  * @system @internal
152
206
  */
153
207
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
154
- function createTableInternal(inputSchemaFactory, _cellSchema, columnSchema, rowSchema) {
208
+ function createTableSchema(inputSchemaFactory, _cellSchema, columnSchema, rowSchema) {
155
209
  const schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);
156
210
  /**
157
211
  * {@link Table} fields.
@@ -169,6 +223,9 @@ export var System_TableSchema;
169
223
  // Will make it easier to evolve this schema in the future.
170
224
  allowUnknownOptionalFields: true,
171
225
  }) {
226
+ static empty() {
227
+ return new this({ columns: [], rows: [] });
228
+ }
172
229
  getColumn(id) {
173
230
  // TypeScript is unable to narrow the types correctly here, hence the casts.
174
231
  // See: https://github.com/microsoft/TypeScript/issues/52144
@@ -199,21 +256,10 @@ export var System_TableSchema;
199
256
  return inserted[0] ?? oob();
200
257
  }
201
258
  insertColumns({ columns, index, }) {
202
- // #region Input validation
203
259
  // Ensure index is valid
204
260
  if (index !== undefined) {
205
261
  Table.validateInsertionIndex(index, this.columns);
206
262
  }
207
- // Check all of the columns being inserted an ensure the table does not already contain any with the same ID.
208
- for (const column of columns) {
209
- // TypeScript is unable to narrow the type of the column type correctly here, hence the casts below.
210
- // See: https://github.com/microsoft/TypeScript/issues/52144
211
- const maybeId = column.id;
212
- if (maybeId !== undefined && this.containsColumnWithId(maybeId)) {
213
- throw new UsageError(`A column with ID "${column.id}" already exists in the table.`);
214
- }
215
- }
216
- // #endregion
217
263
  // TypeScript is unable to narrow the column type correctly here, hence the casts below.
218
264
  // See: https://github.com/microsoft/TypeScript/issues/52144
219
265
  if (index === undefined) {
@@ -243,11 +289,6 @@ export var System_TableSchema;
243
289
  // Note: TypeScript is unable to narrow the type of the row type correctly here, hence the casts below.
244
290
  // See: https://github.com/microsoft/TypeScript/issues/52144
245
291
  for (const newRow of rows) {
246
- // Check all of the rows being inserted an ensure the table does not already contain any with the same ID.
247
- const maybeId = newRow.id;
248
- if (maybeId !== undefined && this.containsRowWithId(maybeId)) {
249
- throw new UsageError(`A row with ID "${newRow.id}" already exists in the table.`);
250
- }
251
292
  // If the row contains cells, verify that the table contains the columns for those cells.
252
293
  // Note: we intentionally hide `cells` on `IRow` to avoid leaking the internal data representation as much as possible, so we have to cast here.
253
294
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -398,13 +439,13 @@ export var System_TableSchema;
398
439
  containsColumnWithId(columnId) {
399
440
  // TypeScript is unable to narrow the types correctly here, hence the cast.
400
441
  // See: https://github.com/microsoft/TypeScript/issues/52144
401
- return (this.columns.find((column) => column.id === columnId) !==
402
- undefined);
442
+ return (this.columns.find((column) => column.id === columnId) !== undefined);
403
443
  }
404
444
  containsRowWithId(rowId) {
405
445
  // TypeScript is unable to narrow the types correctly here, hence the cast.
406
446
  // See: https://github.com/microsoft/TypeScript/issues/52144
407
- return this.rows.find((row) => row.id === rowId) !== undefined;
447
+ return (this.rows.find((row) => row.id === rowId) !==
448
+ undefined);
408
449
  }
409
450
  /**
410
451
  * Ensure that the specified index is a valid location for item insertion in the destination list.
@@ -422,6 +463,12 @@ export var System_TableSchema;
422
463
  }
423
464
  }
424
465
  }
466
+ // Set a private symbol on the schema class that marks it as having been generated by this factory.
467
+ // Column / Row functionality use this to validate that they are being used in a table.
468
+ // This is effectively a work-around that allows columns and rows to invoke table methods
469
+ // without having to pass the table as a parameter to their construction, which isn't possible.
470
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
471
+ Table[tableSchemaSymbol] = true;
425
472
  // Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly "__#124291@#brand": unknown;`
426
473
  // for the private brand field of TreeNode.
427
474
  // This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs in the API extractor reports.
@@ -431,7 +478,7 @@ export var System_TableSchema;
431
478
  // Return the table schema
432
479
  return TableSchemaType;
433
480
  }
434
- System_TableSchema.createTableInternal = createTableInternal;
481
+ System_TableSchema.createTableSchema = createTableSchema;
435
482
  // #endregion
436
483
  })(System_TableSchema || (System_TableSchema = {}));
437
484
  /**
@@ -465,7 +512,7 @@ export var System_TableSchema;
465
512
  * value: schemaFactory.string,
466
513
  * }) {}
467
514
  *
468
- * class Table extends TableSchema.createTable({
515
+ * class Table extends TableSchema.table({
469
516
  * schemaFactory,
470
517
  * cell: Cell,
471
518
  * }) {}
@@ -490,17 +537,18 @@ export var System_TableSchema;
490
537
  * dataType: schemaFactory.optional(schemaFactory.string),
491
538
  * }) {}
492
539
  *
493
- * class Column extends TableSchema.createColumn({
540
+ * class Column extends TableSchema.column({
494
541
  * schemaFactory,
542
+ * cell: Cell,
495
543
  * props: ColumnProps,
496
544
  * }) {}
497
545
  *
498
- * class Row extends TableSchema.createRow({
546
+ * class Row extends TableSchema.row({
499
547
  * schemaFactory,
500
548
  * cell: Cell,
501
549
  * }) {}
502
550
  *
503
- * class Table extends TableSchema.createTable({
551
+ * class Table extends TableSchema.table({
504
552
  * schemaFactory,
505
553
  * cell: Cell,
506
554
  * column: Column,
@@ -529,29 +577,30 @@ export var TableSchema;
529
577
  /**
530
578
  * Overload implementation
531
579
  */
532
- function createColumn({ schemaFactory, props = SchemaFactory.optional(SchemaFactory.null), }) {
533
- return System_TableSchema.createColumnInternal(schemaFactory, props);
580
+ function column({ schemaFactory, cell, props = SchemaFactory.optional(SchemaFactory.null), }) {
581
+ return System_TableSchema.createColumnSchema(schemaFactory, cell, props);
534
582
  }
535
- TableSchema.createColumn = createColumn;
583
+ TableSchema.column = column;
536
584
  /**
537
585
  * Overload implementation
538
586
  */
539
- function createRow({ schemaFactory, cell, props = SchemaFactory.optional(SchemaFactory.null), }) {
540
- return System_TableSchema.createRowInternal(schemaFactory, cell, props);
587
+ function row({ schemaFactory, cell, props = SchemaFactory.optional(SchemaFactory.null), }) {
588
+ return System_TableSchema.createRowSchema(schemaFactory, cell, props);
541
589
  }
542
- TableSchema.createRow = createRow;
590
+ TableSchema.row = row;
543
591
  /**
544
592
  * Overload implementation
545
593
  */
546
- function createTable({ schemaFactory, cell, column = createColumn({
594
+ function table({ schemaFactory, cell: cellSchema, column: columnSchema = column({
547
595
  schemaFactory,
548
- }), row = createRow({
596
+ cell: cellSchema,
597
+ }), row: rowSchema = row({
549
598
  schemaFactory,
550
- cell,
599
+ cell: cellSchema,
551
600
  }), }) {
552
- return System_TableSchema.createTableInternal(schemaFactory, cell, column, row);
601
+ return System_TableSchema.createTableSchema(schemaFactory, cellSchema, columnSchema, rowSchema);
553
602
  }
554
- TableSchema.createTable = createTable;
603
+ TableSchema.table = table;
555
604
  // #endregion
556
605
  })(TableSchema || (TableSchema = {}));
557
606
  //# sourceMappingURL=tableSchema.js.map