@fluidframework/tree 2.52.0 → 2.53.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/.eslintrc.cjs +14 -2
- package/CHANGELOG.md +125 -0
- package/api-report/tree.alpha.api.md +48 -41
- package/dist/alpha.d.ts +2 -1
- package/dist/core/tree/visitDelta.d.ts +1 -1
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -0
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js +3 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -4
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +4 -0
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +5 -5
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +4 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -0
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +1 -0
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +1 -0
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +49 -20
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +3 -0
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +1 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +4 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts +5 -3
- package/dist/jsonDomainSchema.d.ts.map +1 -1
- package/dist/jsonDomainSchema.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +1 -1
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +0 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +23 -60
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +59 -151
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +11 -11
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +9 -3
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts +2 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +3 -0
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +5 -1
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +4 -4
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +3 -6
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +5 -9
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js +11 -10
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +3 -2
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +3 -2
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +3 -4
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +9 -155
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +4 -47
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +157 -16
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +33 -11
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -3
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js +1 -7
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +158 -0
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -0
- package/dist/simple-tree/api/schemaStatics.js +59 -0
- package/dist/simple-tree/api/schemaStatics.js.map +1 -0
- package/dist/simple-tree/api/storedSchema.d.ts +5 -3
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +4 -2
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/treeBeta.js +12 -6
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +46 -30
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js +20 -12
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +5 -3
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +6 -1
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts +25 -0
- package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -0
- package/dist/simple-tree/core/simpleNodeSchemaBase.js +7 -0
- package/dist/simple-tree/core/simpleNodeSchemaBase.js.map +1 -0
- package/dist/simple-tree/core/toStored.d.ts +32 -0
- package/dist/simple-tree/core/toStored.d.ts.map +1 -0
- package/dist/simple-tree/core/toStored.js +37 -0
- package/dist/simple-tree/core/toStored.js.map +1 -0
- package/dist/simple-tree/core/treeNode.d.ts +0 -3
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +3 -3
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +7 -2
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts +6 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.js +11 -6
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/core/walkSchema.d.ts +19 -5
- package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/walkSchema.js +4 -2
- package/dist/simple-tree/core/walkSchema.js.map +1 -1
- package/dist/simple-tree/createContext.d.ts.map +1 -1
- package/dist/simple-tree/createContext.js +1 -1
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +2 -1
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +1 -1
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +4 -4
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +9 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +1 -0
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +18 -4
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +9 -2
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +37 -26
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +9 -2
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.d.ts +5 -5
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +10 -10
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +6 -21
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +35 -11
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +68 -33
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/tableSchema.d.ts +25 -32
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +10 -24
- package/dist/tableSchema.js.map +1 -1
- package/docs/.attachments/cell-ordering/C-knows-of-ABC.png +0 -0
- package/docs/.attachments/cell-ordering/C-knows-of-C.png +0 -0
- package/docs/.attachments/cell-ordering/XvsA.png +0 -0
- package/docs/.attachments/cell-ordering/compose-a-b.png +0 -0
- package/docs/.attachments/cell-ordering/compose-a-ref-p1-b-ref-p2.png +0 -0
- package/docs/.attachments/cell-ordering/compose-b-no-ref-to-ca.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-ab-over-x.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-b-over-x.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-b2-over-x.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-b2.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-to-abprime.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-to-bprime.png +0 -0
- package/docs/main/cell-ordering.md +638 -0
- package/lib/alpha.d.ts +2 -1
- package/lib/core/tree/visitDelta.d.ts +1 -1
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -0
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js +1 -0
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -4
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +4 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +4 -0
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -0
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js +1 -0
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +1 -0
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +50 -21
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +3 -0
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +1 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +4 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/types.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts +5 -3
- package/lib/jsonDomainSchema.d.ts.map +1 -1
- package/lib/jsonDomainSchema.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +2 -2
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +0 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +23 -60
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +60 -150
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +14 -14
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +10 -4
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts +2 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +3 -0
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +6 -2
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +4 -4
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +3 -6
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +5 -9
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js +11 -10
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +3 -2
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +2 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js +4 -5
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +9 -155
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +2 -45
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +157 -16
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +23 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -3
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -5
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +158 -0
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -0
- package/lib/simple-tree/api/schemaStatics.js +56 -0
- package/lib/simple-tree/api/schemaStatics.js.map +1 -0
- package/lib/simple-tree/api/storedSchema.d.ts +5 -3
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +6 -4
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/treeBeta.js +8 -2
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +46 -30
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js +23 -12
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +5 -3
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +3 -2
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts +25 -0
- package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -0
- package/lib/simple-tree/core/simpleNodeSchemaBase.js +6 -0
- package/lib/simple-tree/core/simpleNodeSchemaBase.js.map +1 -0
- package/lib/simple-tree/core/toStored.d.ts +32 -0
- package/lib/simple-tree/core/toStored.d.ts.map +1 -0
- package/lib/simple-tree/core/toStored.js +32 -0
- package/lib/simple-tree/core/toStored.js.map +1 -0
- package/lib/simple-tree/core/treeNode.d.ts +0 -3
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +3 -3
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +7 -2
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts +6 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.js +9 -5
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/core/walkSchema.d.ts +19 -5
- package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/walkSchema.js +4 -2
- package/lib/simple-tree/core/walkSchema.js.map +1 -1
- package/lib/simple-tree/createContext.d.ts.map +1 -1
- package/lib/simple-tree/createContext.js +2 -2
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +2 -1
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +1 -1
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +4 -4
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +2 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +2 -1
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +21 -7
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +12 -5
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +16 -5
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +12 -5
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/prepareForInsertion.d.ts +5 -5
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +10 -10
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +6 -21
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +35 -11
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +67 -34
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/tableSchema.d.ts +25 -32
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +11 -25
- package/lib/tableSchema.js.map +1 -1
- package/package.json +21 -21
- package/src/core/tree/visitDelta.ts +3 -1
- package/src/feature-libraries/chunked-forest/index.ts +1 -0
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +12 -5
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -0
- package/src/feature-libraries/default-schema/noChangeCodecs.ts +1 -1
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
- package/src/feature-libraries/index.ts +2 -0
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +9 -0
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +1 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +1 -0
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +61 -19
- package/src/feature-libraries/optional-field/optionalField.ts +4 -0
- package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +4 -0
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +4 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +4 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +4 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +1 -1
- package/src/feature-libraries/sequence-field/types.ts +1 -1
- package/src/index.ts +2 -1
- package/src/jsonDomainSchema.ts +4 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +6 -2
- package/src/shared-tree/index.ts +0 -2
- package/src/shared-tree/schematizeTree.ts +83 -199
- package/src/shared-tree/schematizingTreeView.ts +26 -12
- package/src/shared-tree/treeAlpha.ts +18 -4
- package/src/shared-tree-core/defaultResubmitMachine.ts +2 -1
- package/src/simple-tree/api/configuration.ts +10 -2
- package/src/simple-tree/api/create.ts +5 -10
- package/src/simple-tree/api/discrepancies.ts +18 -17
- package/src/simple-tree/api/index.ts +2 -3
- package/src/simple-tree/api/schemaCompatibilityTester.ts +5 -9
- package/src/simple-tree/api/schemaFactory.ts +6 -250
- package/src/simple-tree/api/schemaFactoryAlpha.ts +174 -1
- package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -25
- package/src/simple-tree/api/schemaStatics.ts +291 -0
- package/src/simple-tree/api/storedSchema.ts +12 -5
- package/src/simple-tree/api/treeBeta.ts +9 -2
- package/src/simple-tree/core/allowedTypes.ts +71 -42
- package/src/simple-tree/core/index.ts +9 -1
- package/src/simple-tree/core/simpleNodeSchemaBase.ts +30 -0
- package/src/simple-tree/core/toStored.ts +58 -0
- package/src/simple-tree/core/treeNode.ts +3 -3
- package/src/simple-tree/core/treeNodeSchema.ts +8 -2
- package/src/simple-tree/core/treeNodeValid.ts +14 -5
- package/src/simple-tree/core/walkSchema.ts +23 -6
- package/src/simple-tree/createContext.ts +5 -2
- package/src/simple-tree/fieldSchema.ts +4 -2
- package/src/simple-tree/index.ts +15 -6
- package/src/simple-tree/leafNodeSchema.ts +2 -1
- package/src/simple-tree/node-kinds/array/arrayNode.ts +58 -37
- package/src/simple-tree/node-kinds/map/mapNode.ts +26 -2
- package/src/simple-tree/node-kinds/object/objectNode.ts +37 -4
- package/src/simple-tree/node-kinds/record/recordNode.ts +23 -2
- package/src/simple-tree/prepareForInsertion.ts +12 -7
- package/src/simple-tree/simpleSchema.ts +6 -26
- package/src/simple-tree/toStoredSchema.ts +107 -44
- package/src/tableSchema.ts +40 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableSchema.d.ts","sourceRoot":"","sources":["../src/tableSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,oBAAoB,E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AAuB,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG;QACvF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;KACnB,GACC,kBAAkB,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;CA4BpE"}
|
package/dist/tableSchema.js
CHANGED
|
@@ -376,7 +376,16 @@ var System_TableSchema;
|
|
|
376
376
|
const columnId = this._getColumnId(columnOrId);
|
|
377
377
|
throw new internal_2.UsageError(`Specified column with ID "${columnId}" does not exist in the table.`);
|
|
378
378
|
}
|
|
379
|
-
|
|
379
|
+
(0, internal_1.assert)(column !== undefined, 0xc10 /* column should not be undefined */);
|
|
380
|
+
index_js_1.Tree.runTransaction(this, () => {
|
|
381
|
+
// Remove the corresponding cell from all rows.
|
|
382
|
+
for (const row of this.rows) {
|
|
383
|
+
// TypeScript is unable to narrow the row type correctly here, hence the cast.
|
|
384
|
+
// See: https://github.com/microsoft/TypeScript/issues/52144
|
|
385
|
+
row.removeCell(column);
|
|
386
|
+
}
|
|
387
|
+
this.columns.removeAt(index);
|
|
388
|
+
});
|
|
380
389
|
return column;
|
|
381
390
|
}
|
|
382
391
|
removeAllColumns() {
|
|
@@ -606,29 +615,6 @@ var System_TableSchema;
|
|
|
606
615
|
* });
|
|
607
616
|
* ```
|
|
608
617
|
*
|
|
609
|
-
* @example Removing column and cells in a transaction
|
|
610
|
-
*
|
|
611
|
-
* When removing a column, if you wish to ensure that all of its corresponding cells are also removed (and not
|
|
612
|
-
* orphaned), you can remove the column and all of the relevant cells in a transaction.
|
|
613
|
-
* Note that there are performance implications to this.
|
|
614
|
-
*
|
|
615
|
-
* ```typescript
|
|
616
|
-
* // Remove column1 and all of its cells.
|
|
617
|
-
* // The "transaction" method will ensure that all changes are applied atomically.
|
|
618
|
-
* Tree.runTransaction(table, () => {
|
|
619
|
-
* // Remove column1.
|
|
620
|
-
* table.removeColumn(column1);
|
|
621
|
-
*
|
|
622
|
-
* // Remove the cell at column1 for each row.
|
|
623
|
-
* for (const row of table.rows) {
|
|
624
|
-
* table.removeCell({
|
|
625
|
-
* column: column1,
|
|
626
|
-
* row,
|
|
627
|
-
* });
|
|
628
|
-
* }
|
|
629
|
-
* });
|
|
630
|
-
* ```
|
|
631
|
-
*
|
|
632
618
|
* @privateRemarks
|
|
633
619
|
* The above examples are backed by tests in `tableSchema.spec.ts`.
|
|
634
620
|
* Those tests and these examples should be kept in-sync to ensure that the examples are correct.
|
package/dist/tableSchema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableSchema.js","sourceRoot":"","sources":["../src/tableSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA0D;AAC1D,uEAAsE;AAEtE,qDAAyD;AACzD,qDAsBgC;AAEhC,4BAA4B;AAC5B,mDAAmD;AACnD,oDAAoD;AACpD,2EAA2E;AAE3E,oBAAoB;AACpB,mGAAmG;AAEnG;;GAEG;AACH,MAAM,0BAA0B,GAAG,OAAO,CAAC;AAE3C;;;GAGG;AACH,SAAS,cAAc,CACtB,eAAyB;IAUzB,MAAM,WAAW,GAAG,eAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACjD,IAAI,WAAW,KAAK,SAAS,IAAI,CAAC,IAAA,4BAAiB,EAAC,eAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;QAC/E,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,MAAM,SAAS,GAAG,eAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;QACxD,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,iBAAiB,GAAkB,MAAM,C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AAG,CAAC,EACnB,aAAa,EACb,IAAI,EACJ,KAAK,GAAG,wBAAa,CAAC,QAAQ,CAAC,wBAAa,CAAC,IAAI,CAAC,GAGlD;QACA,OAAO,kBAAkB,CAAC,eAAe,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC;IARe,eAAG,MAQlB,CAAA;IAyXD;;OAEG;IACH,SAAgB,KAAK,CAAC,EACrB,aAAa,EACb,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC;QAC7B,aAAa;QACb,IAAI,EAAE,UAAU;KAChB,CAAC,EACF,GAAG,EAAE,SAAS,GAAG,GAAG,CAAC;QACpB,aAAa;QACb,IAAI,EAAE,UAAU;KAChB,CAAC,GAIF;QACA,OAAO,kBAAkB,CAAC,iBAAiB,CAC1C,aAAa,EACb,UAAU,EACV,YAAY,EACZ,SAAS,CACT,CAAC;IACH,CAAC;IArBe,iBAAK,QAqBpB,CAAA;IAED,aAAa;AACd,CAAC,EArmBgB,WAAW,2BAAX,WAAW,QAqmB3B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { oob } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { Tree, TreeAlpha } from \"./shared-tree/index.js\";\nimport {\n\ttype FieldHasDefault,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype NodeKind,\n\ttype SchemaFactoryAlpha,\n\ttype ScopedSchemaName,\n\tTreeArrayNode,\n\ttype TreeNode,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaClass,\n\ttype WithType,\n\ttype TreeFieldFromImplicitField,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InternalTreeNode,\n\tSchemaFactory,\n\ttype ImplicitAnnotatedFieldSchema,\n\ttype UnannotateImplicitFieldSchema,\n\tisArrayNodeSchema,\n\ttype InsertableField,\n} from \"./simple-tree/index.js\";\n\n// Future improvement TODOs:\n// - Omit `cells` property from Row insertion type.\n// - Record-like type parameters / input parameters?\n// - Omit `props` properties from Row and Column schemas when not provided?\n\n// Longer-term work:\n// - Add constraint APIs to make it possible to avoid situations that could yield \"orphaned\" cells.\n\n/**\n * The sub-scope applied to user-provided {@link SchemaFactory}s by table schema factories.\n */\nconst tableSchemaFactorySubScope = \"table\";\n\n/**\n * Gets the table containing the provided row/column node, if the node is part of a table.\n * @remarks Assumes that the table is the grandparent of the row/column node.\n */\nfunction getParentTable(\n\trowOrColumnNode: TreeNode,\n):\n\t| (TreeNode &\n\t\t\tTableSchema.Table<\n\t\t\t\tstring | undefined,\n\t\t\t\tImplicitAllowedTypes,\n\t\t\t\tSystem_TableSchema.ColumnSchemaBase,\n\t\t\t\tSystem_TableSchema.RowSchemaBase\n\t\t\t>)\n\t| undefined {\n\tconst rowListNode = Tree.parent(rowOrColumnNode);\n\tif (rowListNode === undefined || !isArrayNodeSchema(Tree.schema(rowListNode))) {\n\t\treturn undefined;\n\t}\n\tconst tableNode = Tree.parent(rowListNode);\n\tif (tableNode === undefined || !isTableNode(tableNode)) {\n\t\treturn undefined;\n\t}\n\n\treturn tableNode;\n}\n\n/**\n * A private symbol put on table schema to help identify them.\n */\nconst tableSchemaSymbol: unique symbol = Symbol(\"tableNode\");\n\n/**\n * Type-guard to determine if a node is a table node.\n * @remarks Uses {@link tableSchemaSymbol} to identify table nodes.\n */\nfunction isTableNode(\n\tnode: TreeNode,\n): node is TreeNode &\n\tTableSchema.Table<\n\t\tstring | undefined,\n\t\tImplicitAllowedTypes,\n\t\tSystem_TableSchema.ColumnSchemaBase,\n\t\tSystem_TableSchema.RowSchemaBase\n\t> {\n\treturn tableSchemaSymbol in Tree.schema(node);\n}\n\n/**\n * Not intended for use outside of this package.\n *\n * @privateRemarks\n * This namespace is a collection of internal system types relate to {@link TableSchema}.\n * This namespace should be strictly type-exported by the package.\n * All members should be tagged with `@system`.\n *\n * @system @alpha\n */\nexport namespace System_TableSchema {\n\t/**\n\t * Default type used for column and row \"props\" fields.\n\t * @privateRemarks\n\t * Longer term, it would be better to simply omit \"props\" altogether by default.\n\t * For now, this ensures that the user doesn't have to specify a \"props\" entry when initializing column/row nodes\n\t * and ensures that they cannot set anything that might conflict with future evolutions of the schema.\n\t * @system @alpha\n\t */\n\texport type DefaultPropsType = ReturnType<typeof SchemaFactory.optional<[]>>;\n\n\t/**\n\t * A base interface for factory input options which include an schema factory.\n\t * @remarks This interface should not be referenced directly.\n\t * @privateRemarks This interface primarily exists to provide a single home for property documentation.\n\t * @system @alpha\n\t */\n\texport interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryAlpha> {\n\t\t/**\n\t\t * Schema factory with which the Column schema will be associated.\n\t\t * @remarks Can be used to associate the resulting schema with an existing {@link SchemaFactory.scope|scope}.\n\t\t */\n\t\treadonly schemaFactory: TSchemaFactory;\n\t}\n\n\t/**\n\t * A base interface for factory input options which include the table cell schema.\n\t * @remarks This interface should not be referenced directly.\n\t * @privateRemarks This interface primarily exists to provide a single home for property documentation.\n\t * @system @alpha\n\t */\n\texport interface OptionsWithCellSchema<TCellSchema extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * Schema for the table's cells.\n\t\t */\n\t\treadonly cell: TCellSchema;\n\t}\n\n\t// #region Column\n\n\t/**\n\t * Base options for creating table cow schema.\n\t * @remarks Includes parameters common to all column factory overloads.\n\t * @system @alpha\n\t */\n\texport type CreateColumnOptionsBase<\n\t\tTSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,\n\t\tTCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;\n\n\t/**\n\t * Factory for creating column schema.\n\t * @system @alpha\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify\n\texport function createColumnSchema<\n\t\tconst TInputScope extends string | undefined,\n\t\tconst TCellSchema extends ImplicitAllowedTypes,\n\t\tconst TPropsSchema extends ImplicitAnnotatedFieldSchema,\n\t>(\n\t\tinputSchemaFactory: SchemaFactoryAlpha<TInputScope>,\n\t\tcellSchema: TCellSchema,\n\t\tpropsSchema: TPropsSchema,\n\t) {\n\t\tconst schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);\n\t\ttype Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;\n\n\t\ttype CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;\n\n\t\t// Note: `columnFields` is broken into two parts to work around a TypeScript bug\n\t\t// that results in broken `.d.ts` output.\n\t\t// See definition of `ColumnInsertableType` below.\n\t\tconst columnFieldsBuiltInParts = {\n\t\t\tid: schemaFactory.identifier,\n\t\t} as const;\n\t\tconst columnFieldsPropsPart = {\n\t\t\tprops: propsSchema,\n\t\t} as const;\n\n\t\t/**\n\t\t * {@link Column} fields.\n\t\t *\n\t\t * @remarks\n\t\t * Extracted for re-use in returned type signature defined later in this function.\n\t\t * The implicit typing is intentional.\n\t\t *\n\t\t * Note: ideally we would add a satisfies clause here to ensure that this satisfies\n\t\t * `Record<string, ImplicitFieldSchema>`, but doing so causes TypeScript to prematurely and incorrectly evaluate the type of `propsSchema`.\n\t\t * Likely related to the following issue: https://github.com/microsoft/TypeScript/issues/52394\n\t\t */\n\t\tconst columnFields = {\n\t\t\t...columnFieldsBuiltInParts,\n\t\t\t...columnFieldsPropsPart,\n\t\t} as const; // satisfies Record<string, ImplicitFieldSchema>;\n\n\t\t/**\n\t\t * A column in a table.\n\t\t */\n\t\tclass Column\n\t\t\textends schemaFactory.objectAlpha(\"Column\", columnFields, {\n\t\t\t\t// Will make it easier to evolve this schema in the future.\n\t\t\t\tallowUnknownOptionalFields: true,\n\t\t\t})\n\t\t\timplements TableSchema.Column<TCellSchema, TPropsSchema>\n\t\t{\n\t\t\tpublic getCells(): {\n\t\t\t\trowId: string;\n\t\t\t\tcell: CellValueType;\n\t\t\t}[] {\n\t\t\t\tconst tableNode = getParentTable(this);\n\t\t\t\tif (tableNode === undefined) {\n\t\t\t\t\tthrow new UsageError(`Column with ID \"${this.id}\" is not contained in a table.`);\n\t\t\t\t}\n\n\t\t\t\tconst result = [];\n\t\t\t\tfor (const row of tableNode.rows) {\n\t\t\t\t\tconst cell = row.getCell(this.id);\n\t\t\t\t\tif (cell !== undefined) {\n\t\t\t\t\t\tif (!Tree.is(cell, cellSchema)) {\n\t\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\t\"Parent table contains a cell with incompatible with this column.\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresult.push({ rowId: row.id, cell: cell as CellValueType });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\n\t\ttype ColumnValueType = TreeNode &\n\t\t\tTableSchema.Column<TCellSchema, TPropsSchema> &\n\t\t\tWithType<ScopedSchemaName<Scope, \"Column\">>;\n\n\t\t// Note: ideally this type would just leverage `InsertableObjectFromSchemaRecord<typeof columnFields>`,\n\t\t// but that results in broken `.d.ts` output due to a TypeScript bug.\n\t\t// See: https://github.com/microsoft/TypeScript/issues/58688.\n\t\t// Instead we extract and inline the typing of the \"props\" field here, which seems to sufficiently work around the issue.\n\t\t// type ColumnInsertableType = InsertableObjectFromSchemaRecord<typeof columnFields>;\n\t\ttype ColumnInsertableType = InsertableObjectFromSchemaRecord<\n\t\t\ttypeof columnFieldsBuiltInParts\n\t\t> &\n\t\t\t(FieldHasDefault<UnannotateImplicitFieldSchema<TPropsSchema>> extends true\n\t\t\t\t? // Note: The docs on the below properties are copied from `IColumn.props`' docs to ensure that the\n\t\t\t\t\t// documentation appears in the data insertion scenario.\n\t\t\t\t\t// The contents are duplicated instead of using `@inheritdoc`, as intellisense does not correctly\n\t\t\t\t\t// support `@inheritDoc`.\n\t\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/31267\n\t\t\t\t\t{\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The column's properties.\n\t\t\t\t\t\t * @remarks This is a user-defined schema that can be used to store additional information about the column.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tprops?: InsertableTreeFieldFromImplicitField<\n\t\t\t\t\t\t\tUnannotateImplicitFieldSchema<TPropsSchema>\n\t\t\t\t\t\t>;\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The column's properties.\n\t\t\t\t\t\t * @remarks This is a user-defined schema that can be used to store additional information about the column.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tprops: InsertableTreeFieldFromImplicitField<\n\t\t\t\t\t\t\tUnannotateImplicitFieldSchema<TPropsSchema>\n\t\t\t\t\t\t>;\n\t\t\t\t\t});\n\n\t\t// Modified version of `Column` that ensures the constructor (and `createFromInsertable`) are\n\t\t// typed correctly in terms of our insertable type.\n\t\t// This lets us be selective in our type-cast for the value returned from this function,\n\t\t// preserving as much type-safety as we reasonably can.\n\t\ttype ColumnSchemaModifiedType = Omit<\n\t\t\t// Use mapped type to omit the constructor\n\t\t\t{\n\t\t\t\t[Property in keyof typeof Column]: (typeof Column)[Property];\n\t\t\t},\n\t\t\t\"createFromInsertable\"\n\t\t> &\n\t\t\t(new (\n\t\t\t\tparameters: InternalTreeNode | ColumnInsertableType,\n\t\t\t) => Column) & {\n\t\t\t\tcreateFromInsertable(parameters: ColumnInsertableType): Column;\n\t\t\t};\n\n\t\t// Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly \"__#124291@#brand\": unknown;`\n\t\t// for the private brand field of TreeNode.\n\t\t// This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs in the API extractor reports.\n\t\t// This is avoided by doing this type conversion.\n\t\t// The conversion is done via assignment instead of `as` to get stronger type safety.\n\t\tconst ColumnSchemaType: TreeNodeSchemaClass<\n\t\t\t/* Name */ ScopedSchemaName<Scope, \"Column\">,\n\t\t\t/* Kind */ NodeKind.Object,\n\t\t\t/* TNode */ ColumnValueType,\n\t\t\t/* TInsertable */ object & ColumnInsertableType,\n\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t/* Info */ typeof columnFields\n\t\t> = Column as ColumnSchemaModifiedType;\n\n\t\treturn ColumnSchemaType;\n\t}\n\n\t/**\n\t * Base column schema type.\n\t * @sealed @system @alpha\n\t */\n\texport type ColumnSchemaBase<\n\t\tTScope extends string | undefined = string | undefined,\n\t\tTCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t\tTPropsSchema extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema,\n\t> = ReturnType<typeof createColumnSchema<TScope, TCellSchema, TPropsSchema>>;\n\n\t// #endregion\n\n\t// #region Row\n\n\t/**\n\t * Base options for creating table row schema.\n\t * @remarks Includes parameters common to all row factory overloads.\n\t * @system @alpha\n\t */\n\texport type CreateRowOptionsBase<\n\t\tTSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,\n\t\tTCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;\n\n\t/**\n\t * Factory for creating row schema.\n\t * @sealed @alpha\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify\n\texport function createRowSchema<\n\t\tconst TInputScope extends string | undefined,\n\t\tconst TCellSchema extends ImplicitAllowedTypes,\n\t\tconst TPropsSchema extends ImplicitAnnotatedFieldSchema,\n\t>(\n\t\tinputSchemaFactory: SchemaFactoryAlpha<TInputScope>,\n\t\tcellSchema: TCellSchema,\n\t\tpropsSchema: TPropsSchema,\n\t) {\n\t\tconst schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);\n\t\ttype Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;\n\n\t\ttype CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;\n\t\ttype CellInsertableType = InsertableTreeNodeFromImplicitAllowedTypes<TCellSchema>;\n\n\t\t// Note: `rowFields` is broken into two parts to work around a TypeScript bug\n\t\t// that results in broken `.d.ts` output.\n\t\t// See definition of `RowInsertableType` below.\n\t\tconst rowFieldsBuiltInParts = {\n\t\t\tid: schemaFactory.identifier,\n\t\t\t/**\n\t\t\t * The cells of the table row, keyed by column ID.\n\t\t\t * @remarks\n\t\t\t * The table row models its cells as a record, where each key is the ID of the column it belongs to. The choice of record (as opposed to a map) is intended to make interop with common table rendering libraries in TypeScript/JavaScript easier.\n\t\t\t */\n\t\t\tcells: schemaFactory.required(schemaFactory.record(\"Row.cells\", cellSchema), {\n\t\t\t\tmetadata: {\n\t\t\t\t\tdescription: \"The cells of the table row, keyed by column ID.\",\n\t\t\t\t},\n\t\t\t}),\n\t\t} as const;\n\t\tconst rowFieldsPropsPart = {\n\t\t\tprops: propsSchema,\n\t\t} as const;\n\n\t\t/**\n\t\t * {@link Row} fields.\n\t\t * @remarks Extracted for re-use in returned type signature defined later in this function.\n\t\t * The implicit typing is intentional.\n\t\t * Note: ideally we would add a satisfies clause here to ensure that this satisfies\n\t\t * `Record<string, ImplicitFieldSchema>`, but doing so causes TypeScript to prematurely and incorrectly evaluate the type of `propsSchema`.\n\t\t * Likely related to the following issue: https://github.com/microsoft/TypeScript/issues/52394\n\t\t */\n\t\tconst rowFields = {\n\t\t\t...rowFieldsBuiltInParts,\n\t\t\t...rowFieldsPropsPart,\n\t\t} as const; // satisfies Record<string, ImplicitFieldSchema>;\n\n\t\t/**\n\t\t * The Row schema - this is a map of Cells where the key is the column id\n\t\t */\n\t\tclass Row\n\t\t\textends schemaFactory.objectAlpha(\"Row\", rowFields, {\n\t\t\t\t// Will make it easier to evolve this schema in the future.\n\t\t\t\tallowUnknownOptionalFields: true,\n\t\t\t})\n\t\t\timplements TableSchema.Row<TCellSchema, TPropsSchema>\n\t\t{\n\t\t\tpublic getCell(\n\t\t\t\tcolumnOrId: TableSchema.Column<TCellSchema> | string,\n\t\t\t): CellValueType | undefined {\n\t\t\t\tconst columnId = typeof columnOrId === \"string\" ? columnOrId : columnOrId.id;\n\t\t\t\t// Unlike most objects, RecordNodes don't have the default inherited object properties, so this is safe\n\t\t\t\treturn this.cells[columnId];\n\t\t\t}\n\n\t\t\tpublic setCell(\n\t\t\t\tcolumnOrId: TableSchema.Column<TCellSchema> | string,\n\t\t\t\tvalue: CellInsertableType | undefined,\n\t\t\t): void {\n\t\t\t\t// TODO: throw if column does not exist in the owning table.\n\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tthis.removeCell(columnOrId);\n\t\t\t\t} else {\n\t\t\t\t\tconst columnId = typeof columnOrId === \"string\" ? columnOrId : columnOrId.id;\n\n\t\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the casts.\n\t\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\t\tthis.cells[columnId] = TreeAlpha.create(\n\t\t\t\t\t\tcellSchema,\n\t\t\t\t\t\tvalue as InsertableField<TCellSchema>,\n\t\t\t\t\t) as CellValueType;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic removeCell(\n\t\t\t\tcolumnOrId: TableSchema.Column<TCellSchema> | string,\n\t\t\t): CellValueType | undefined {\n\t\t\t\t// TODO: throw if column does not exist in the owning table.\n\n\t\t\t\tconst columnId = typeof columnOrId === \"string\" ? columnOrId : columnOrId.id;\n\n\t\t\t\tconst cell: CellValueType | undefined = this.getCell(columnId);\n\t\t\t\tif (cell === undefined) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-dynamic-delete -- The record's values are non-optional, so setting `undefined` as a means to remove the cell is not supported.\n\t\t\t\tdelete this.cells[columnId];\n\n\t\t\t\treturn cell;\n\t\t\t}\n\n\t\t\tpublic getCells(): {\n\t\t\t\tcolumnId: string;\n\t\t\t\tcell: CellValueType;\n\t\t\t}[] {\n\t\t\t\tconst result = [];\n\t\t\t\tfor (const [columnId, cell] of Object.entries(this.cells)) {\n\t\t\t\t\tif (cell !== undefined) {\n\t\t\t\t\t\tresult.push({\n\t\t\t\t\t\t\tcolumnId,\n\t\t\t\t\t\t\tcell,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\n\t\ttype RowValueType = TreeNode &\n\t\t\tTableSchema.Row<TCellSchema, TPropsSchema> &\n\t\t\tWithType<ScopedSchemaName<Scope, \"Row\">>;\n\n\t\t// Note: ideally this type would just leverage `InsertableObjectFromSchemaRecord<typeof rowFields>`,\n\t\t// but that results in broken `.d.ts` output due to a TypeScript bug.\n\t\t// See: https://github.com/microsoft/TypeScript/issues/58688.\n\t\t// Instead we extract and inline the typing of the \"props\" field here, which seems to sufficiently work around\n\t\t// the issue.\n\t\t// type RowInsertableType = InsertableObjectFromSchemaRecord<typeof rowFields>;\n\t\ttype RowInsertableType = InsertableObjectFromSchemaRecord<typeof rowFieldsBuiltInParts> &\n\t\t\t(FieldHasDefault<UnannotateImplicitFieldSchema<TPropsSchema>> extends true\n\t\t\t\t? // Note: The docs on the below properties are copied from `IRow.props`' docs to ensure that the\n\t\t\t\t\t// documentation appears in the data insertion scenario.\n\t\t\t\t\t// The contents are duplicated instead of using `@inheritdoc`, as intellisense does not correctly\n\t\t\t\t\t// support `@inheritDoc`.\n\t\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/31267\n\t\t\t\t\t{\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The row's properties.\n\t\t\t\t\t\t * @remarks This is a user-defined schema that can be used to store additional information\n\t\t\t\t\t\t * about the row.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tprops?: InsertableTreeFieldFromImplicitField<\n\t\t\t\t\t\t\tUnannotateImplicitFieldSchema<TPropsSchema>\n\t\t\t\t\t\t>;\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The row's properties.\n\t\t\t\t\t\t * @remarks This is a user-defined schema that can be used to store additional information\n\t\t\t\t\t\t * about the row.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tprops: InsertableTreeFieldFromImplicitField<\n\t\t\t\t\t\t\tUnannotateImplicitFieldSchema<TPropsSchema>\n\t\t\t\t\t\t>;\n\t\t\t\t\t});\n\n\t\t// Modified version of `Row` that ensures the constructor (and `createFromInsertable`) are\n\t\t// typed correctly in terms of our insertable type.\n\t\t// This lets us be selective in our type-cast for the value returned from this function,\n\t\t// preserving as much type-safety as we reasonably can.\n\t\ttype RowSchemaModifiedType = Omit<\n\t\t\t// Use mapped type to omit the constructor\n\t\t\t{\n\t\t\t\t[Property in keyof typeof Row]: (typeof Row)[Property];\n\t\t\t},\n\t\t\t\"createFromInsertable\"\n\t\t> &\n\t\t\t(new (\n\t\t\t\tparameters: InternalTreeNode | RowInsertableType,\n\t\t\t) => Row) & {\n\t\t\t\tcreateFromInsertable(parameters: RowInsertableType): Row;\n\t\t\t};\n\n\t\t// Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly \"__#124291@#brand\": unknown;`\n\t\t// for the private brand field of TreeNode.\n\t\t// This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs in the API extractor reports.\n\t\t// This is avoided by doing this type conversion.\n\t\t// The conversion is done via assignment instead of `as` to get stronger type safety.\n\t\tconst RowSchemaType: TreeNodeSchemaClass<\n\t\t\t/* Name */ ScopedSchemaName<Scope, \"Row\">,\n\t\t\t/* Kind */ NodeKind.Object,\n\t\t\t/* TNode */ RowValueType,\n\t\t\t/* TInsertable */ object & RowInsertableType,\n\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t/* Info */ typeof rowFields\n\t\t> = Row as RowSchemaModifiedType;\n\n\t\treturn RowSchemaType;\n\t}\n\n\t/**\n\t * Base row schema type.\n\t * @sealed @system @alpha\n\t */\n\texport type RowSchemaBase<\n\t\tTScope extends string | undefined = string | undefined,\n\t\tTCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t\tTPropsSchema extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema,\n\t> = ReturnType<typeof createRowSchema<TScope, TCellSchema, TPropsSchema>>;\n\n\t// #endregion\n\n\t// #region Table\n\n\t/**\n\t * Base options for creating table schema.\n\t * @remarks Includes parameters common to all table factory overloads.\n\t * @system @alpha\n\t */\n\texport type TableFactoryOptionsBase<\n\t\tTSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,\n\t\tTCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;\n\n\t/**\n\t * Factory for creating table schema.\n\t * @system @alpha\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify\n\texport function createTableSchema<\n\t\tconst TInputScope extends string | undefined,\n\t\tconst TCellSchema extends ImplicitAllowedTypes,\n\t\tconst TColumnSchema extends ColumnSchemaBase<TInputScope, TCellSchema>,\n\t\tconst TRowSchema extends RowSchemaBase<TInputScope, TCellSchema>,\n\t>(\n\t\tinputSchemaFactory: SchemaFactoryAlpha<TInputScope>,\n\t\t_cellSchema: TCellSchema,\n\t\tcolumnSchema: TColumnSchema,\n\t\trowSchema: TRowSchema,\n\t) {\n\t\tconst schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);\n\t\ttype Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;\n\n\t\ttype CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;\n\t\ttype ColumnValueType = TreeNodeFromImplicitAllowedTypes<TColumnSchema>;\n\t\ttype RowValueType = TreeNodeFromImplicitAllowedTypes<TRowSchema>;\n\n\t\t/**\n\t\t * {@link Table} fields.\n\t\t * @remarks Extracted for re-use in returned type signature defined later in this function.\n\t\t * The implicit typing is intentional.\n\t\t */\n\t\tconst tableFields = {\n\t\t\trows: schemaFactory.array(\"Table.rows\", rowSchema),\n\t\t\tcolumns: schemaFactory.array(\"Table.columns\", columnSchema),\n\t\t} as const satisfies Record<string, ImplicitAnnotatedFieldSchema>;\n\n\t\t/**\n\t\t * The Table schema\n\t\t */\n\t\tclass Table\n\t\t\textends schemaFactory.objectAlpha(\"Table\", tableFields, {\n\t\t\t\t// Will make it easier to evolve this schema in the future.\n\t\t\t\tallowUnknownOptionalFields: true,\n\t\t\t})\n\t\t\timplements TableSchema.Table<TInputScope, TCellSchema, TColumnSchema, TRowSchema>\n\t\t{\n\t\t\tpublic static empty<TThis extends TableConstructorType>(\n\t\t\t\tthis: TThis,\n\t\t\t): InstanceType<TThis> {\n\t\t\t\treturn new this({ columns: [], rows: [] }) as InstanceType<TThis>;\n\t\t\t}\n\n\t\t\tpublic getColumn(id: string): ColumnValueType | undefined {\n\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the casts.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn this.columns.find((column) => (column as ColumnValueType).id === id) as\n\t\t\t\t\t| ColumnValueType\n\t\t\t\t\t| undefined;\n\t\t\t}\n\n\t\t\tpublic getRow(id: string): RowValueType | undefined {\n\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the casts.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn this.rows.find((_row) => (_row as RowValueType).id === id) as\n\t\t\t\t\t| RowValueType\n\t\t\t\t\t| undefined;\n\t\t\t}\n\n\t\t\tpublic getCell(\n\t\t\t\tkey: TableSchema.CellKey<TColumnSchema, TRowSchema>,\n\t\t\t): CellValueType | undefined {\n\t\t\t\tconst { column: columnOrId, row: rowOrId } = key;\n\t\t\t\tconst row = this._getRow(rowOrId);\n\t\t\t\tif (row === undefined) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst column = this._getColumn(columnOrId);\n\t\t\t\tif (column === undefined) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\treturn row.getCell(column);\n\t\t\t}\n\n\t\t\tpublic insertColumn({\n\t\t\t\tcolumn,\n\t\t\t\tindex,\n\t\t\t}: TableSchema.InsertColumnParameters<TColumnSchema>): ColumnValueType {\n\t\t\t\tconst inserted = this.insertColumns({\n\t\t\t\t\tcolumns: [column],\n\t\t\t\t\tindex,\n\t\t\t\t});\n\t\t\t\treturn inserted[0] ?? oob();\n\t\t\t}\n\n\t\t\tpublic insertColumns({\n\t\t\t\tcolumns,\n\t\t\t\tindex,\n\t\t\t}: TableSchema.InsertColumnsParameters<TColumnSchema>): ColumnValueType[] {\n\t\t\t\t// Ensure index is valid\n\t\t\t\tif (index !== undefined) {\n\t\t\t\t\tTable.validateInsertionIndex(index, this.columns);\n\t\t\t\t}\n\n\t\t\t\t// TypeScript is unable to narrow the column type correctly here, hence the casts below.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\tif (index === undefined) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tthis.columns.insertAtEnd(TreeArrayNode.spread(columns) as any);\n\t\t\t\t} else {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tthis.columns.insertAt(index, TreeArrayNode.spread(columns) as any);\n\t\t\t\t}\n\n\t\t\t\t// Inserting the input nodes into the tree hydrates them, making them usable as nodes.\n\t\t\t\treturn columns as unknown as ColumnValueType[];\n\t\t\t}\n\n\t\t\tpublic insertRow({\n\t\t\t\trow,\n\t\t\t\tindex,\n\t\t\t}: TableSchema.InsertRowParameters<TRowSchema>): RowValueType {\n\t\t\t\tconst inserted = this.insertRows({\n\t\t\t\t\trows: [row],\n\t\t\t\t\tindex,\n\t\t\t\t});\n\t\t\t\treturn inserted[0] ?? oob();\n\t\t\t}\n\n\t\t\tpublic insertRows({\n\t\t\t\tindex,\n\t\t\t\trows,\n\t\t\t}: TableSchema.InsertRowsParameters<TRowSchema>): RowValueType[] {\n\t\t\t\t// #region Input validation\n\n\t\t\t\t// Ensure index is valid\n\t\t\t\tif (index !== undefined) {\n\t\t\t\t\tTable.validateInsertionIndex(index, this.rows);\n\t\t\t\t}\n\n\t\t\t\t// Note: TypeScript is unable to narrow the type of the row type correctly here, hence the casts below.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\tfor (const newRow of rows) {\n\t\t\t\t\t// If the row contains cells, verify that the table contains the columns for those cells.\n\t\t\t\t\t// Note: we intentionally hide `cells` on `IRow` to avoid leaking the internal data representation as much as possible, so we have to cast here.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tif ((newRow as any).cells !== undefined) {\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t\tconst keys: string[] = Object.keys((newRow as any).cells);\n\t\t\t\t\t\tfor (const key of keys) {\n\t\t\t\t\t\t\tif (!this.containsColumnWithId(key)) {\n\t\t\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\t\t`Attempted to insert row a cell under column ID \"${key}\", but the table does not contain a column with that ID.`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// #endregion\n\n\t\t\t\t// TypeScript is unable to narrow the row type correctly here, hence the casts below.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\tif (index === undefined) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tthis.rows.insertAtEnd(TreeArrayNode.spread(rows) as any);\n\t\t\t\t} else {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tthis.rows.insertAt(index, TreeArrayNode.spread(rows) as any);\n\t\t\t\t}\n\n\t\t\t\t// Inserting the input nodes into the tree hydrates them, making them usable as nodes.\n\t\t\t\treturn rows as unknown as RowValueType[];\n\t\t\t}\n\n\t\t\tpublic setCell({\n\t\t\t\tkey,\n\t\t\t\tcell,\n\t\t\t}: TableSchema.SetCellParameters<TCellSchema, TColumnSchema, TRowSchema>): void {\n\t\t\t\tconst { column: columnOrId, row: rowOrId } = key;\n\n\t\t\t\tconst row = this._getRow(rowOrId);\n\t\t\t\tif (row === undefined) {\n\t\t\t\t\tconst rowId = this._getRowId(rowOrId);\n\t\t\t\t\tthrow new UsageError(`No row with ID \"${rowId}\" exists in the table.`);\n\t\t\t\t}\n\n\t\t\t\tconst column = this._getColumn(columnOrId);\n\t\t\t\tif (column === undefined) {\n\t\t\t\t\tconst columnId = this._getColumnId(columnOrId);\n\t\t\t\t\tthrow new UsageError(`No column with ID \"${columnId}\" exists in the table.`);\n\t\t\t\t}\n\n\t\t\t\trow.setCell(column, cell);\n\t\t\t}\n\n\t\t\tpublic removeColumns(\n\t\t\t\tcolumns: readonly string[] | readonly ColumnValueType[],\n\t\t\t): ColumnValueType[] {\n\t\t\t\t// If there are no columns to remove, do nothing\n\t\t\t\tif (columns.length === 0) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// If there is only one column to remove, remove it (and don't incur cost of transaction)\n\t\t\t\tif (columns.length === 1) {\n\t\t\t\t\tconst removedColumn = this.removeColumn(columns[0] ?? oob());\n\t\t\t\t\treturn [removedColumn];\n\t\t\t\t}\n\n\t\t\t\t// If there are multiple columns to remove, remove them in a transaction.\n\t\t\t\tconst removedColumns: ColumnValueType[] = [];\n\t\t\t\tTree.runTransaction(this, () => {\n\t\t\t\t\t// Note, throwing an error within a transaction will abort the entire transaction.\n\t\t\t\t\t// So if we throw an error here for any row, no columns will be removed.\n\t\t\t\t\tfor (const columnToRemove of columns) {\n\t\t\t\t\t\tconst removedRow = this.removeColumn(columnToRemove);\n\t\t\t\t\t\tremovedColumns.push(removedRow);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn removedColumns;\n\t\t\t}\n\n\t\t\tpublic removeColumn(columnOrId: string | ColumnValueType): ColumnValueType {\n\t\t\t\tconst column = this._getColumn(columnOrId);\n\t\t\t\tconst index = column === undefined ? -1 : this.columns.indexOf(column);\n\t\t\t\tif (index === -1) {\n\t\t\t\t\tconst columnId = this._getColumnId(columnOrId);\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Specified column with ID \"${columnId}\" does not exist in the table.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthis.columns.removeAt(index);\n\t\t\t\treturn column as ColumnValueType;\n\t\t\t}\n\n\t\t\tpublic removeAllColumns(): ColumnValueType[] {\n\t\t\t\t// TypeScript is unable to narrow the row type correctly here, hence the cast.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn this.removeColumns(this.columns as unknown as ColumnValueType[]);\n\t\t\t}\n\n\t\t\tpublic removeRows(rows: readonly string[] | readonly RowValueType[]): RowValueType[] {\n\t\t\t\t// If there are no rows to remove, do nothing\n\t\t\t\tif (rows.length === 0) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// If there is only one row to remove, remove it (and don't incur cost of transaction)\n\t\t\t\tif (rows.length === 1) {\n\t\t\t\t\tconst removedRow = this.removeRow(rows[0] ?? oob());\n\t\t\t\t\treturn [removedRow];\n\t\t\t\t}\n\n\t\t\t\t// If there are multiple rows to remove, remove them in a transaction.\n\t\t\t\tconst removedRows: RowValueType[] = [];\n\t\t\t\tTree.runTransaction(this, () => {\n\t\t\t\t\t// Note, throwing an error within a transaction will abort the entire transaction.\n\t\t\t\t\t// So if we throw an error here for any row, no rows will be removed.\n\t\t\t\t\tfor (const rowToRemove of rows) {\n\t\t\t\t\t\tconst removedRow = this.removeRow(rowToRemove);\n\t\t\t\t\t\tremovedRows.push(removedRow);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn removedRows;\n\t\t\t}\n\n\t\t\tpublic removeRow(rowOrId: string | RowValueType): RowValueType {\n\t\t\t\tconst rowToRemove = this._getRow(rowOrId);\n\t\t\t\tconst index = rowToRemove === undefined ? -1 : this.rows.indexOf(rowToRemove);\n\n\t\t\t\t// If the row does not exist in the table, throw an error.\n\t\t\t\tif (index === -1) {\n\t\t\t\t\tconst rowId = this._getRowId(rowOrId);\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Specified row with ID \"${rowId}\" does not exist in the table.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.rows.removeAt(index);\n\t\t\t\treturn rowToRemove as RowValueType;\n\t\t\t}\n\n\t\t\tpublic removeAllRows(): RowValueType[] {\n\t\t\t\t// TypeScript is unable to narrow the row type correctly here, hence the cast.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn this.removeRows(this.rows as unknown as RowValueType[]);\n\t\t\t}\n\n\t\t\tpublic removeCell(\n\t\t\t\tkey: TableSchema.CellKey<TColumnSchema, TRowSchema>,\n\t\t\t): CellValueType | undefined {\n\t\t\t\tconst { column: columnOrId, row: rowOrId } = key;\n\t\t\t\tconst row = this._getRow(rowOrId);\n\t\t\t\tif (row === undefined) {\n\t\t\t\t\tconst rowId = this._getRowId(rowOrId);\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Specified row with ID \"${rowId}\" does not exist in the table.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst column = this._getColumn(columnOrId);\n\t\t\t\tif (column === undefined) {\n\t\t\t\t\tconst columnId = this._getColumnId(columnOrId);\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Specified column with ID \"${columnId}\" does not exist in the table.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst cell: CellValueType | undefined = row.getCell(column.id);\n\t\t\t\tif (cell === undefined) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\trow.removeCell(column.id);\n\t\t\t\treturn cell;\n\t\t\t}\n\n\t\t\tprivate _getColumn(columnOrId: string | ColumnValueType): ColumnValueType | undefined {\n\t\t\t\treturn typeof columnOrId === \"string\" ? this.getColumn(columnOrId) : columnOrId;\n\t\t\t}\n\n\t\t\tprivate _getColumnId(columnOrId: string | ColumnValueType): string {\n\t\t\t\treturn typeof columnOrId === \"string\" ? columnOrId : columnOrId.id;\n\t\t\t}\n\n\t\t\tprivate _getRow(rowOrId: string | RowValueType): RowValueType | undefined {\n\t\t\t\treturn typeof rowOrId === \"string\" ? this.getRow(rowOrId) : rowOrId;\n\t\t\t}\n\n\t\t\tprivate _getRowId(rowOrId: string | RowValueType): string {\n\t\t\t\treturn typeof rowOrId === \"string\" ? rowOrId : rowOrId.id;\n\t\t\t}\n\n\t\t\tprivate containsColumnWithId(columnId: string): boolean {\n\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the cast.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn (\n\t\t\t\t\tthis.columns.find(\n\t\t\t\t\t\t(column) => (column as TableSchema.Column<TCellSchema>).id === columnId,\n\t\t\t\t\t) !== undefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tprivate containsRowWithId(rowId: string): boolean {\n\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the cast.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn (\n\t\t\t\t\tthis.rows.find((row) => (row as TableSchema.Row<TCellSchema>).id === rowId) !==\n\t\t\t\t\tundefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Ensure that the specified index is a valid location for item insertion in the destination list.\n\t\t\t * @throws Throws a usage error if the destination is invalid.\n\t\t\t */\n\t\t\tprivate static validateInsertionIndex(\n\t\t\t\tindex: number,\n\t\t\t\tdestinationList: readonly unknown[],\n\t\t\t): void {\n\t\t\t\tif (index < 0) {\n\t\t\t\t\tthrow new UsageError(\"The index must be greater than or equal to 0.\");\n\t\t\t\t}\n\n\t\t\t\tif (index > destinationList.length) {\n\t\t\t\t\tthrow new UsageError(\"The index specified for insertion is out of bounds.\");\n\t\t\t\t}\n\n\t\t\t\tif (!Number.isInteger(index)) {\n\t\t\t\t\tthrow new UsageError(\"The index must be an integer.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set a private symbol on the schema class that marks it as having been generated by this factory.\n\t\t// Column / Row functionality use this to validate that they are being used in a table.\n\t\t// This is effectively a work-around that allows columns and rows to invoke table methods\n\t\t// without having to pass the table as a parameter to their construction, which isn't possible.\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t(Table as any)[tableSchemaSymbol] = true;\n\n\t\ttype TableValueType = TreeNode &\n\t\t\tTableSchema.Table<TInputScope, TCellSchema, TColumnSchema, TRowSchema> &\n\t\t\tWithType<ScopedSchemaName<Scope, \"Table\">>;\n\t\ttype TableInsertableType = InsertableObjectFromSchemaRecord<typeof tableFields>;\n\t\ttype TableConstructorType = new (data: TableInsertableType) => TableValueType;\n\n\t\t// Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly \"__#124291@#brand\": unknown;`\n\t\t// for the private brand field of TreeNode.\n\t\t// This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs in the API extractor reports.\n\t\t// This is avoided by doing this type conversion.\n\t\t// The conversion is done via assignment instead of `as` to get stronger type safety.\n\t\tconst TableSchemaType: TreeNodeSchemaClass<\n\t\t\t/* Name */ ScopedSchemaName<Scope, \"Table\">,\n\t\t\t/* Kind */ NodeKind.Object,\n\t\t\t/* TNode */ TableValueType,\n\t\t\t/* TInsertable */ object & TableInsertableType,\n\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t/* Info */ typeof tableFields\n\t\t> & {\n\t\t\t/**\n\t\t\t * Create an empty table.\n\t\t\t */\n\t\t\tempty<TThis extends TableConstructorType>(this: TThis): InstanceType<TThis>;\n\t\t} = Table;\n\n\t\t// Return the table schema\n\t\treturn TableSchemaType;\n\t}\n\n\t/**\n\t * Base row schema type.\n\t * @sealed @system @alpha\n\t */\n\texport type TableSchemaBase<\n\t\tTScope extends string | undefined,\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTColumn extends ColumnSchemaBase<TScope, TCell>,\n\t\tTRow extends RowSchemaBase<TScope, TCell>,\n\t> = ReturnType<typeof createTableSchema<TScope, TCell, TColumn, TRow>>;\n\n\t// #endregion\n}\n\n/**\n * Contains types and factories for creating schema to represent dynamic tabular data.\n *\n * @remarks\n *\n * WARNING: These APIs are in preview and are subject to change.\n * Until these APIs have stabilized, it is not recommended to use them in production code.\n * There may be breaking changes to these APIs and their underlying data format.\n * Using these APIs in production code may result in data loss or corruption.\n *\n * The primary APIs for create tabular data schema are:\n *\n * - {@link TableSchema.(table:1)}\n *\n * - {@link TableSchema.(column:1)}\n *\n * - {@link TableSchema.(row:1)}\n *\n * Tables created using these APIs are...\n *\n * - sparse, meaning that cells may be omitted, and new rows are empty by default.\n *\n * - dynamic, meaning that their structure can be modified at runtime.\n * Columns and rows can be inserted, removed, modified, and reordered.\n * Cells can be inserted, removed, and modified.\n *\n * - row-major, meaning that operating on rows (including inserts, removal, moves, and traversal) is more efficient than operating on columns.\n *\n * Column and Row schema created using these APIs are extensible via the `props` field.\n * This allows association of additional properties with column and row nodes.\n *\n * Cells in the table may become \"orphaned.\"\n * That is, it is possible to enter a state where one or more rows contain cells with no corresponding column.\n * To reduce the likelihood of this, you can manually remove corresponding cells when removing columns.\n * Either way, it is possible to enter such a state via the merging of edits.\n * For example: one client might add a row while another concurrently removes a column, orphaning the cell where the column and row intersected.\n *\n * @example Defining a Table schema\n *\n * ```typescript\n * class MyTable extends TableSchema.table({\n * \tschemaFactory,\n * \tcell: schemaFactory.string,\n * }) {}\n *\n * const table = new MyTable({\n * \tcolumns: [{ id: \"column-0\" }],\n * \trows: [{ id: \"row-0\", cells: { \"column-0\": \"Hello world!\" } }],\n * });\n * ```\n *\n * @example Customizing Column and Row schema\n *\n * ```typescript\n * const Cell = schemaFactory.string;\n *\n * class MyColumn extends TableSchema.column({\n * \tschemaFactory,\n * \tcell: Cell,\n * \tprops: schemaFactory.object(\"TableColumnProps\", {\n * \t\tlabel: schemaFactory.string,\n * \t}),\n * }) {}\n *\n * class MyRow extends TableSchema.row({\n * \tschemaFactory,\n * \tcell: Cell,\n * }) {}\n *\n * class MyTable extends TableSchema.table({\n * \tschemaFactory,\n * \tcell: Cell,\n * \tcolumn: MyColumn,\n * \trow: MyRow,\n * }) {}\n *\n * const table = new MyTable({\n * \tcolumns: [\n * \t\tnew MyColumn({ props: { label: \"Entry\" } }),\n * \t\tnew MyColumn({ props: { label: \"Date\" } }),\n * \t\tnew MyColumn({ props: { label: \"Amount\" } }),\n * \t],\n * \trows: [],\n * });\n * ```\n *\n * @example Listening for changes in the table\n *\n * ```typescript\n * // Listen for any changes to the table and its children.\n * // The \"treeChanged\" event will fire when the associated node or any of its descendants change.\n * Tree.on(table, \"treeChanged\", () => {\n * \t// Respond to the change.\n * });\n * ```\n *\n * @example Listening for changes to the rows list only\n *\n * ```typescript\n * // Listen for any changes to the list of rows.\n * // The \"nodeChanged\" event will fire only when the specified node itself changes (i.e., its own properties change).\n * // In this case, the event will fire when a row is added or removed, or the order of the list is changed.\n * // But it won't fire when a row's properties change, or when the row's cells change, etc.\n * Tree.on(table.rows, \"nodeChanged\", () => {\n * \t// Respond to the change.\n * });\n * ```\n *\n * @example Removing column and cells in a transaction\n *\n * When removing a column, if you wish to ensure that all of its corresponding cells are also removed (and not\n * orphaned), you can remove the column and all of the relevant cells in a transaction.\n * Note that there are performance implications to this.\n *\n * ```typescript\n * // Remove column1 and all of its cells.\n * // The \"transaction\" method will ensure that all changes are applied atomically.\n * Tree.runTransaction(table, () => {\n * \t// Remove column1.\n * \ttable.removeColumn(column1);\n *\n * \t// Remove the cell at column1 for each row.\n * \tfor (const row of table.rows) {\n * \t\ttable.removeCell({\n * \t\t\tcolumn: column1,\n * \t\t\trow,\n * \t\t});\n * \t}\n * });\n * ```\n *\n * @privateRemarks\n * The above examples are backed by tests in `tableSchema.spec.ts`.\n * Those tests and these examples should be kept in-sync to ensure that the examples are correct.\n *\n * @alpha\n */\nexport namespace TableSchema {\n\t// #region Column\n\n\t/**\n\t * A column in a table.\n\t * @remarks Implemented by the schema class returned from {@link TableSchema.(column:2)}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @typeParam TProps - Additional properties to associate with the column.\n\t * @sealed @alpha\n\t */\n\texport interface Column<\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTProps extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema,\n\t> {\n\t\t/**\n\t\t * The unique identifier of the column.\n\t\t * @remarks Uniquely identifies the node within the entire tree, not just the table.\n\t\t */\n\t\treadonly id: string;\n\n\t\t/**\n\t\t * The column's properties.\n\t\t * @remarks This is a user-defined schema that can be used to store additional information about the column.\n\t\t * @privateRemarks\n\t\t * Note: these docs are duplicated on the inline type definitions in {@link System_TableSchema.createColumnSchema}.\n\t\t * If you update the docs here, please also update the inline type definitions.\n\t\t */\n\t\tget props(): TreeFieldFromImplicitField<UnannotateImplicitFieldSchema<TProps>>;\n\t\tset props(value: InsertableTreeFieldFromImplicitField<\n\t\t\tUnannotateImplicitFieldSchema<TProps>\n\t\t>);\n\n\t\t/**\n\t\t * Gets all of the populated cells in the column, keyed by their associated row IDs.\n\t\t * @throws Throws an error if the column is not in a table.\n\t\t */\n\t\tgetCells(): readonly {\n\t\t\trowId: string;\n\t\t\tcell: TreeNodeFromImplicitAllowedTypes<TCell>;\n\t\t}[];\n\t}\n\n\t/**\n\t * Factory for creating new table column schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @alpha\n\t */\n\texport function column<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t>(\n\t\tparams: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,\n\t): System_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>;\n\t/**\n\t * Factory for creating new table column schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @typeParam TProps - Additional properties to associate with the column.\n\t * @alpha\n\t */\n\texport function column<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TProps extends ImplicitAnnotatedFieldSchema,\n\t>(\n\t\tparams: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\t/**\n\t\t\t * Optional column properties.\n\t\t\t */\n\t\t\treadonly props: TProps;\n\t\t},\n\t): System_TableSchema.ColumnSchemaBase<TScope, TCell, TProps>;\n\t/**\n\t * Overload implementation\n\t */\n\texport function column({\n\t\tschemaFactory,\n\t\tcell,\n\t\tprops = SchemaFactory.optional(SchemaFactory.null),\n\t}: System_TableSchema.CreateColumnOptionsBase & {\n\t\treadonly props?: ImplicitAnnotatedFieldSchema;\n\t}): TreeNodeSchema {\n\t\treturn System_TableSchema.createColumnSchema(schemaFactory, cell, props);\n\t}\n\n\t// #endregion\n\n\t// #region Row\n\n\t/**\n\t * A row in a table.\n\t * @remarks Implemented by the schema class returned from {@link TableSchema.(row:2)}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @typeParam TProps - Additional properties to associate with the row.\n\t * @sealed @alpha\n\t */\n\texport interface Row<\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTProps extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema,\n\t> {\n\t\t/**\n\t\t * The unique identifier of the row.\n\t\t * @remarks Uniquely identifies the node within the entire tree, not just the table.\n\t\t */\n\t\treadonly id: string;\n\n\t\t/**\n\t\t * Gets the cell in the specified column.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t * @privateRemarks TODO: throw if the column does not belong to the same table as the row.\n\t\t */\n\t\tgetCell(column: Column<TCell>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\t\t/**\n\t\t * Gets the cell in the specified column, denoted by column ID.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t */\n\t\tgetCell(columnId: string): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\n\t\t/**\n\t\t * Gets all of the populated cells in the row, keyed by their associated column IDs.\n\t\t */\n\t\tgetCells(): readonly {\n\t\t\tcolumnId: string;\n\t\t\tcell: TreeNodeFromImplicitAllowedTypes<TCell>;\n\t\t}[];\n\n\t\t/**\n\t\t * Sets the cell in the specified column.\n\t\t * @remarks To remove a cell, call {@link TableSchema.Row.(removeCell:1)} instead.\n\t\t * @privateRemarks TODO: Throw an error if the column does not exist in the table.\n\t\t */\n\t\tsetCell(\n\t\t\tcolumn: Column<TCell>,\n\t\t\tvalue: InsertableTreeNodeFromImplicitAllowedTypes<TCell>,\n\t\t): void;\n\t\t/**\n\t\t * Sets the cell in the specified column, denoted by column ID.\n\t\t * @remarks To remove a cell, call {@link TableSchema.Row.(removeCell:2)} instead.\n\t\t */\n\t\tsetCell(columnId: string, value: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;\n\n\t\t/**\n\t\t * Removes the cell in the specified column.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t * @privateRemarks TODO: Throw if the column does not belong to the same table as the row.\n\t\t */\n\t\tremoveCell(column: Column<TCell>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\t\t/**\n\t\t * Removes the cell in the specified column, denoted by column ID.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t */\n\t\tremoveCell(columnId: string): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\n\t\t/**\n\t\t * The row's properties.\n\t\t * @remarks This is a user-defined schema that can be used to store additional information about the row.\n\t\t * @privateRemarks\n\t\t * Note: these docs are duplicated on the inline type definitions in {@link System_TableSchema.createRowSchema}.\n\t\t * If you update the docs here, please also update the inline type definitions.\n\t\t */\n\t\tget props(): TreeFieldFromImplicitField<UnannotateImplicitFieldSchema<TProps>>;\n\t\tset props(value: InsertableTreeFieldFromImplicitField<\n\t\t\tUnannotateImplicitFieldSchema<TProps>\n\t\t>);\n\t}\n\n\t/**\n\t * Factory for creating new table column schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @alpha\n\t */\n\texport function row<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t>(\n\t\tparams: System_TableSchema.CreateRowOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,\n\t): System_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>;\n\t/**\n\t * Factory for creating new table row schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @typeParam TProps - Additional properties to associate with the row.\n\t * @alpha\n\t */\n\texport function row<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TProps extends ImplicitAnnotatedFieldSchema,\n\t>(\n\t\tparams: System_TableSchema.CreateRowOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\t/**\n\t\t\t * Optional row properties.\n\t\t\t */\n\t\t\treadonly props: TProps;\n\t\t},\n\t): System_TableSchema.RowSchemaBase<TScope, TCell, TProps>;\n\t/**\n\t * Overload implementation\n\t */\n\texport function row({\n\t\tschemaFactory,\n\t\tcell,\n\t\tprops = SchemaFactory.optional(SchemaFactory.null),\n\t}: System_TableSchema.CreateRowOptionsBase & {\n\t\treadonly props?: ImplicitAnnotatedFieldSchema;\n\t}): TreeNodeSchema {\n\t\treturn System_TableSchema.createRowSchema(schemaFactory, cell, props);\n\t}\n\n\t// #endregion\n\n\t// #region Table\n\n\t/**\n\t * A key to uniquely identify a cell within a table.\n\t * @alpha\n\t */\n\texport interface CellKey<\n\t\tTColumn extends ImplicitAllowedTypes,\n\t\tTRow extends ImplicitAllowedTypes,\n\t> {\n\t\t/**\n\t\t * {@link TableSchema.Column} or {@link TableSchema.Column.id} at which the cell is located.\n\t\t */\n\t\treadonly column: string | TreeNodeFromImplicitAllowedTypes<TColumn>;\n\n\t\t/**\n\t\t * {@link TableSchema.Row} or {@link TableSchema.Row.id} at which the cell is located.\n\t\t */\n\t\treadonly row: string | TreeNodeFromImplicitAllowedTypes<TRow>;\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.insertColumn} parameters.\n\t * @alpha\n\t */\n\texport interface InsertColumnParameters<TColumn extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * The index at which to insert the new column.\n\t\t * @remarks If not provided, the column will be appended to the end of the table.\n\t\t */\n\t\treadonly index?: number | undefined;\n\n\t\t/**\n\t\t * The column to insert.\n\t\t */\n\t\treadonly column: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>;\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.insertColumns} parameters.\n\t * @alpha\n\t */\n\texport interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * The index at which to insert the new columns.\n\t\t * @remarks If not provided, the columns will be appended to the end of the table.\n\t\t */\n\t\treadonly index?: number | undefined;\n\n\t\t/**\n\t\t * The columns to insert.\n\t\t */\n\t\treadonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.insertRow} parameters.\n\t * @alpha\n\t */\n\texport interface InsertRowParameters<TRow extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * The index at which to insert the new row.\n\t\t * @remarks If not provided, the row will be appended to the end of the table.\n\t\t */\n\t\treadonly index?: number | undefined;\n\n\t\t/**\n\t\t * The row to insert.\n\t\t */\n\t\treadonly row: InsertableTreeNodeFromImplicitAllowedTypes<TRow>;\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.insertRows} parameters.\n\t * @alpha\n\t */\n\texport interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * The index at which to insert the new rows.\n\t\t * @remarks If not provided, the rows will be appended to the end of the table.\n\t\t */\n\t\treadonly index?: number | undefined;\n\n\t\t/**\n\t\t * The rows to insert.\n\t\t */\n\t\treadonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.setCell} parameters.\n\t * @alpha\n\t */\n\texport interface SetCellParameters<\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTColumn extends ImplicitAllowedTypes,\n\t\tTRow extends ImplicitAllowedTypes,\n\t> {\n\t\t/**\n\t\t * The key to uniquely identify a cell in a table.\n\t\t */\n\t\treadonly key: CellKey<TColumn, TRow>;\n\n\t\t/**\n\t\t * The cell to set.\n\t\t */\n\t\treadonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;\n\t}\n\n\t/**\n\t * A table.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @typeParam TColumn - The type of the columns in the table.\n\t * @typeParam TRow - The type of the rows in the table.\n\t * @sealed @alpha\n\t */\n\texport interface Table<\n\t\tTScope extends string | undefined,\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>,\n\t\tTRow extends System_TableSchema.RowSchemaBase<TScope, TCell>,\n\t> {\n\t\t/**\n\t\t * The table's columns.\n\t\t */\n\t\treadonly columns: TreeArrayNode<TColumn>;\n\n\t\t/**\n\t\t * The table's rows.\n\t\t */\n\t\treadonly rows: TreeArrayNode<TRow>;\n\n\t\t/**\n\t\t * Gets a table column by its {@link TableSchema.Column.id}.\n\t\t */\n\t\tgetColumn(id: string): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;\n\n\t\t/**\n\t\t * Gets a table row by its {@link TableSchema.Row.id}.\n\t\t */\n\t\tgetRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;\n\n\t\t/**\n\t\t * Gets a cell in the table by column and row IDs.\n\t\t * @param key - A key that uniquely distinguishes a cell in the table, represented as a combination of the column ID and row ID.\n\t\t */\n\t\tgetCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\n\t\t/**\n\t\t * Inserts a column into the table.\n\t\t *\n\t\t * @throws Throws an error if the specified index is out of range.\n\t\t *\n\t\t * No column is inserted in this case.\n\t\t */\n\t\tinsertColumn(\n\t\t\tparams: InsertColumnParameters<TColumn>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TColumn>;\n\n\t\t/**\n\t\t * Inserts 0 or more columns into the table.\n\t\t *\n\t\t * @throws Throws an error if the specified index is out of range.\n\t\t *\n\t\t * No columns are inserted in this case.\n\t\t */\n\t\tinsertColumns(\n\t\t\tparams: InsertColumnsParameters<TColumn>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TColumn>[];\n\n\t\t/**\n\t\t * Inserts a row into the table.\n\t\t *\n\t\t * @throws\n\t\t * Throws an error in the following cases:\n\t\t *\n\t\t * - The row contains cells, but the table does not contain matching columns for one or more of those cells.\n\t\t *\n\t\t * - The specified index is out of range.\n\t\t *\n\t\t * No row is inserted in these cases.\n\t\t */\n\t\tinsertRow(params: InsertRowParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>;\n\n\t\t/**\n\t\t * Inserts 0 or more rows into the table.\n\t\t *\n\t\t * @throws\n\t\t * Throws an error in the following cases:\n\t\t *\n\t\t * - The row contains cells, but the table does not contain matching columns for one or more of those cells.\n\t\t *\n\t\t * - The specified index is out of range.\n\t\t *\n\t\t * No rows are inserted in these cases.\n\t\t */\n\t\tinsertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];\n\n\t\t/**\n\t\t * Sets the cell at the specified location in the table.\n\t\t * @remarks To remove a cell, call {@link TableSchema.Table.removeCell} instead.\n\t\t */\n\t\tsetCell(params: SetCellParameters<TCell, TColumn, TRow>): void;\n\n\t\t/**\n\t\t * Removes the specified column from the table.\n\t\t *\n\t\t * @remarks\n\t\t * Note: this does not remove any cells from the table's rows.\n\t\t * To remove the corresponding cells, use {@link TableSchema.Table.removeCell}.\n\t\t *\n\t\t * @param column - The {@link TableSchema.Column | column} or {@link TableSchema.Column.id | column ID} to remove.\n\t\t * @throws Throws an error if the column is not in the table.\n\t\t * @privateRemarks TODO (future): Actually remove corresponding cells from table rows.\n\t\t */\n\t\tremoveColumn(\n\t\t\tcolumn: string | TreeNodeFromImplicitAllowedTypes<TColumn>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TColumn>;\n\n\t\t/**\n\t\t * Removes 0 or more columns from the table.\n\t\t *\n\t\t * @remarks\n\t\t * Note: this does not remove any cells from the table's rows.\n\t\t * To remove the corresponding cells, use {@link TableSchema.Table.removeCell}.\n\t\t *\n\t\t * @param columns - The columns to remove.\n\t\t * @throws Throws an error if any of the columns are not in the table.\n\t\t * In this case, no columns are removed.\n\t\t */\n\t\tremoveColumns(\n\t\t\tcolumns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[],\n\t\t): TreeNodeFromImplicitAllowedTypes<TColumn>[];\n\t\t/**\n\t\t * Removes 0 or more columns from the table.\n\t\t *\n\t\t * @remarks\n\t\t * Note: this does not remove any cells from the table's rows.\n\t\t * To remove the corresponding cells, use {@link TableSchema.Table.removeCell}.\n\t\t *\n\t\t * @param columns - The columns to remove, specified by their {@link TableSchema.Column.id}.\n\t\t * @throws Throws an error if any of the columns are not in the table.\n\t\t * In this case, no columns are removed.\n\t\t */\n\t\tremoveColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];\n\n\t\t/**\n\t\t * Removes all columns from the table.\n\t\t * @returns The removed columns.\n\t\t */\n\t\tremoveAllColumns(): TreeNodeFromImplicitAllowedTypes<TColumn>[];\n\n\t\t/**\n\t\t * Removes the specified row from the table.\n\t\t * @param row - The {@link TableSchema.Row | row} or {@link TableSchema.Row.id | row ID} to remove.\n\t\t * @throws Throws an error if the row is not in the table.\n\t\t */\n\t\tremoveRow(\n\t\t\trow: string | TreeNodeFromImplicitAllowedTypes<TRow>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TRow>;\n\n\t\t/**\n\t\t * Removes 0 or more rows from the table.\n\t\t * @param rows - The rows to remove.\n\t\t * @throws Throws an error if any of the rows are not in the table.\n\t\t * In this case, no rows are removed.\n\t\t */\n\t\tremoveRows(\n\t\t\trows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[],\n\t\t): TreeNodeFromImplicitAllowedTypes<TRow>[];\n\t\t/**\n\t\t * Removes 0 or more rows from the table.\n\t\t * @param rows - The rows to remove, specified by their {@link TableSchema.Row.id}.\n\t\t * @throws Throws an error if any of the rows are not in the table.\n\t\t * In this case, no rows are removed.\n\t\t */\n\t\tremoveRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];\n\n\t\t/**\n\t\t * Removes all rows from the table.\n\t\t * @returns The removed rows.\n\t\t */\n\t\tremoveAllRows(): TreeNodeFromImplicitAllowedTypes<TRow>[];\n\n\t\t/**\n\t\t * Removes the cell at the specified location in the table.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t * @throws Throws an error if the location does not exist in the table.\n\t\t */\n\t\tremoveCell(\n\t\t\tkey: CellKey<TColumn, TRow>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\t}\n\n\t/**\n\t * Factory for creating new table schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @alpha\n\t */\n\texport function table<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t>(\n\t\tparams: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,\n\t): System_TableSchema.TableSchemaBase<\n\t\tTScope,\n\t\tTCell,\n\t\tSystem_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>,\n\t\tSystem_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>\n\t>;\n\t/**\n\t * Factory for creating new table schema with custom column schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @typeParam TColumn - The type of the columns in the table.\n\t * @alpha\n\t */\n\texport function table<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>,\n\t>(\n\t\tparams: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\treadonly column: TColumn;\n\t\t},\n\t): System_TableSchema.TableSchemaBase<\n\t\tTScope,\n\t\tTCell,\n\t\tTColumn,\n\t\tSystem_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>\n\t>;\n\t/**\n\t * Factory for creating new table schema with custom row schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @typeParam TRow - The type of the rows in the table.\n\t * @alpha\n\t */\n\texport function table<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>,\n\t>(\n\t\tparams: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\treadonly row: TRow;\n\t\t},\n\t): System_TableSchema.TableSchemaBase<\n\t\tTScope,\n\t\tTCell,\n\t\tSystem_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>,\n\t\tTRow\n\t>;\n\t/**\n\t * Factory for creating new table schema with custom column and row schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @typeParam TColumn - The type of the columns in the table.\n\t * @typeParam TRow - The type of the rows in the table.\n\t * @alpha\n\t */\n\texport function table<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>,\n\t\tconst TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>,\n\t>(\n\t\tparams: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\treadonly column: TColumn;\n\t\t\treadonly row: TRow;\n\t\t},\n\t): System_TableSchema.TableSchemaBase<TScope, TCell, TColumn, TRow>;\n\t/**\n\t * Overload implementation\n\t */\n\texport function table({\n\t\tschemaFactory,\n\t\tcell: cellSchema,\n\t\tcolumn: columnSchema = column({\n\t\t\tschemaFactory,\n\t\t\tcell: cellSchema,\n\t\t}),\n\t\trow: rowSchema = row({\n\t\t\tschemaFactory,\n\t\t\tcell: cellSchema,\n\t\t}),\n\t}: System_TableSchema.TableFactoryOptionsBase & {\n\t\treadonly column?: System_TableSchema.ColumnSchemaBase;\n\t\treadonly row?: System_TableSchema.RowSchemaBase;\n\t}): TreeNodeSchema {\n\t\treturn System_TableSchema.createTableSchema(\n\t\t\tschemaFactory,\n\t\t\tcellSchema,\n\t\t\tcolumnSchema,\n\t\t\trowSchema,\n\t\t);\n\t}\n\n\t// #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tableSchema.js","sourceRoot":"","sources":["../src/tableSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAkE;AAClE,uEAAsE;AAEtE,qDAAyD;AACzD,qDAsBgC;AAEhC,4BAA4B;AAC5B,mDAAmD;AACnD,oDAAoD;AACpD,2EAA2E;AAE3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EAAE,YAAY,GAAG,MAAM,CAAC;QAC7B,aAAa;QACb,IAAI,EAAE,UAAU;KAChB,CAAC,EACF,GAAG,EAAE,SAAS,GAAG,GAAG,CAAC;QACpB,aAAa;QACb,IAAI,EAAE,UAAU;KAChB,CAAC,GAIF;QACA,OAAO,kBAAkB,CAAC,iBAAiB,CAC1C,aAAa,EACb,UAAU,EACV,YAAY,EACZ,SAAS,CACT,CAAC;IACH,CAAC;IArBe,iBAAK,QAqBpB,CAAA;IAED,aAAa;AACd,CAAC,EArnBgB,WAAW,2BAAX,WAAW,QAqnB3B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, oob } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { Tree, TreeAlpha } from \"./shared-tree/index.js\";\nimport {\n\ttype FieldHasDefault,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype NodeKind,\n\ttype SchemaFactoryAlpha,\n\ttype ScopedSchemaName,\n\tTreeArrayNode,\n\ttype TreeNode,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaClass,\n\ttype WithType,\n\ttype TreeFieldFromImplicitField,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InternalTreeNode,\n\tSchemaFactory,\n\ttype ImplicitAnnotatedFieldSchema,\n\ttype UnannotateImplicitFieldSchema,\n\tisArrayNodeSchema,\n\ttype InsertableField,\n} from \"./simple-tree/index.js\";\n\n// Future improvement TODOs:\n// - Omit `cells` property from Row insertion type.\n// - Record-like type parameters / input parameters?\n// - Omit `props` properties from Row and Column schemas when not provided?\n\n// Longer-term work:\n// - Add constraint APIs to make it possible to avoid situations that could yield \"orphaned\" cells.\n\n/**\n * The sub-scope applied to user-provided {@link SchemaFactory}s by table schema factories.\n */\nconst tableSchemaFactorySubScope = \"table\";\n\n/**\n * Gets the table containing the provided row/column node, if the node is part of a table.\n * @remarks Assumes that the table is the grandparent of the row/column node.\n */\nfunction getParentTable(\n\trowOrColumnNode: TreeNode,\n):\n\t| (TreeNode &\n\t\t\tTableSchema.Table<\n\t\t\t\tstring | undefined,\n\t\t\t\tImplicitAllowedTypes,\n\t\t\t\tSystem_TableSchema.ColumnSchemaBase,\n\t\t\t\tSystem_TableSchema.RowSchemaBase\n\t\t\t>)\n\t| undefined {\n\tconst rowListNode = Tree.parent(rowOrColumnNode);\n\tif (rowListNode === undefined || !isArrayNodeSchema(Tree.schema(rowListNode))) {\n\t\treturn undefined;\n\t}\n\tconst tableNode = Tree.parent(rowListNode);\n\tif (tableNode === undefined || !isTableNode(tableNode)) {\n\t\treturn undefined;\n\t}\n\n\treturn tableNode;\n}\n\n/**\n * A private symbol put on table schema to help identify them.\n */\nconst tableSchemaSymbol: unique symbol = Symbol(\"tableNode\");\n\n/**\n * Type-guard to determine if a node is a table node.\n * @remarks Uses {@link tableSchemaSymbol} to identify table nodes.\n */\nfunction isTableNode(\n\tnode: TreeNode,\n): node is TreeNode &\n\tTableSchema.Table<\n\t\tstring | undefined,\n\t\tImplicitAllowedTypes,\n\t\tSystem_TableSchema.ColumnSchemaBase,\n\t\tSystem_TableSchema.RowSchemaBase\n\t> {\n\treturn tableSchemaSymbol in Tree.schema(node);\n}\n\n/**\n * Not intended for use outside of this package.\n *\n * @privateRemarks\n * This namespace is a collection of internal system types relate to {@link TableSchema}.\n * This namespace should be strictly type-exported by the package.\n * All members should be tagged with `@system`.\n *\n * @system @alpha\n */\nexport namespace System_TableSchema {\n\t/**\n\t * Default type used for column and row \"props\" fields.\n\t * @privateRemarks\n\t * Longer term, it would be better to simply omit \"props\" altogether by default.\n\t * For now, this ensures that the user doesn't have to specify a \"props\" entry when initializing column/row nodes\n\t * and ensures that they cannot set anything that might conflict with future evolutions of the schema.\n\t * @system @alpha\n\t */\n\texport type DefaultPropsType = ReturnType<typeof SchemaFactory.optional<[]>>;\n\n\t/**\n\t * A base interface for factory input options which include an schema factory.\n\t * @remarks This interface should not be referenced directly.\n\t * @privateRemarks This interface primarily exists to provide a single home for property documentation.\n\t * @system @alpha\n\t */\n\texport interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryAlpha> {\n\t\t/**\n\t\t * Schema factory with which the Column schema will be associated.\n\t\t * @remarks Can be used to associate the resulting schema with an existing {@link SchemaFactory.scope|scope}.\n\t\t */\n\t\treadonly schemaFactory: TSchemaFactory;\n\t}\n\n\t/**\n\t * A base interface for factory input options which include the table cell schema.\n\t * @remarks This interface should not be referenced directly.\n\t * @privateRemarks This interface primarily exists to provide a single home for property documentation.\n\t * @system @alpha\n\t */\n\texport interface OptionsWithCellSchema<TCellSchema extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * Schema for the table's cells.\n\t\t */\n\t\treadonly cell: TCellSchema;\n\t}\n\n\t// #region Column\n\n\t/**\n\t * Base options for creating table cow schema.\n\t * @remarks Includes parameters common to all column factory overloads.\n\t * @system @alpha\n\t */\n\texport type CreateColumnOptionsBase<\n\t\tTSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,\n\t\tTCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;\n\n\t/**\n\t * Factory for creating column schema.\n\t * @system @alpha\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify\n\texport function createColumnSchema<\n\t\tconst TInputScope extends string | undefined,\n\t\tconst TCellSchema extends ImplicitAllowedTypes,\n\t\tconst TPropsSchema extends ImplicitAnnotatedFieldSchema,\n\t>(\n\t\tinputSchemaFactory: SchemaFactoryAlpha<TInputScope>,\n\t\tcellSchema: TCellSchema,\n\t\tpropsSchema: TPropsSchema,\n\t) {\n\t\tconst schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);\n\t\ttype Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;\n\n\t\ttype CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;\n\n\t\t// Note: `columnFields` is broken into two parts to work around a TypeScript bug\n\t\t// that results in broken `.d.ts` output.\n\t\t// See definition of `ColumnInsertableType` below.\n\t\tconst columnFieldsBuiltInParts = {\n\t\t\tid: schemaFactory.identifier,\n\t\t} as const;\n\t\tconst columnFieldsPropsPart = {\n\t\t\tprops: propsSchema,\n\t\t} as const;\n\n\t\t/**\n\t\t * {@link Column} fields.\n\t\t *\n\t\t * @remarks\n\t\t * Extracted for re-use in returned type signature defined later in this function.\n\t\t * The implicit typing is intentional.\n\t\t *\n\t\t * Note: ideally we would add a satisfies clause here to ensure that this satisfies\n\t\t * `Record<string, ImplicitFieldSchema>`, but doing so causes TypeScript to prematurely and incorrectly evaluate the type of `propsSchema`.\n\t\t * Likely related to the following issue: https://github.com/microsoft/TypeScript/issues/52394\n\t\t */\n\t\tconst columnFields = {\n\t\t\t...columnFieldsBuiltInParts,\n\t\t\t...columnFieldsPropsPart,\n\t\t} as const; // satisfies Record<string, ImplicitFieldSchema>;\n\n\t\t/**\n\t\t * A column in a table.\n\t\t */\n\t\tclass Column\n\t\t\textends schemaFactory.objectAlpha(\"Column\", columnFields, {\n\t\t\t\t// Will make it easier to evolve this schema in the future.\n\t\t\t\tallowUnknownOptionalFields: true,\n\t\t\t})\n\t\t\timplements TableSchema.Column<TCellSchema, TPropsSchema>\n\t\t{\n\t\t\tpublic getCells(): {\n\t\t\t\trowId: string;\n\t\t\t\tcell: CellValueType;\n\t\t\t}[] {\n\t\t\t\tconst tableNode = getParentTable(this);\n\t\t\t\tif (tableNode === undefined) {\n\t\t\t\t\tthrow new UsageError(`Column with ID \"${this.id}\" is not contained in a table.`);\n\t\t\t\t}\n\n\t\t\t\tconst result = [];\n\t\t\t\tfor (const row of tableNode.rows) {\n\t\t\t\t\tconst cell = row.getCell(this.id);\n\t\t\t\t\tif (cell !== undefined) {\n\t\t\t\t\t\tif (!Tree.is(cell, cellSchema)) {\n\t\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\t\"Parent table contains a cell with incompatible with this column.\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresult.push({ rowId: row.id, cell: cell as CellValueType });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\n\t\ttype ColumnValueType = TreeNode &\n\t\t\tTableSchema.Column<TCellSchema, TPropsSchema> &\n\t\t\tWithType<ScopedSchemaName<Scope, \"Column\">>;\n\n\t\t// Note: ideally this type would just leverage `InsertableObjectFromSchemaRecord<typeof columnFields>`,\n\t\t// but that results in broken `.d.ts` output due to a TypeScript bug.\n\t\t// See: https://github.com/microsoft/TypeScript/issues/58688.\n\t\t// Instead we extract and inline the typing of the \"props\" field here, which seems to sufficiently work around the issue.\n\t\t// type ColumnInsertableType = InsertableObjectFromSchemaRecord<typeof columnFields>;\n\t\ttype ColumnInsertableType = InsertableObjectFromSchemaRecord<\n\t\t\ttypeof columnFieldsBuiltInParts\n\t\t> &\n\t\t\t(FieldHasDefault<UnannotateImplicitFieldSchema<TPropsSchema>> extends true\n\t\t\t\t? // Note: The docs on the below properties are copied from `IColumn.props`' docs to ensure that the\n\t\t\t\t\t// documentation appears in the data insertion scenario.\n\t\t\t\t\t// The contents are duplicated instead of using `@inheritdoc`, as intellisense does not correctly\n\t\t\t\t\t// support `@inheritDoc`.\n\t\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/31267\n\t\t\t\t\t{\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The column's properties.\n\t\t\t\t\t\t * @remarks This is a user-defined schema that can be used to store additional information about the column.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tprops?: InsertableTreeFieldFromImplicitField<\n\t\t\t\t\t\t\tUnannotateImplicitFieldSchema<TPropsSchema>\n\t\t\t\t\t\t>;\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The column's properties.\n\t\t\t\t\t\t * @remarks This is a user-defined schema that can be used to store additional information about the column.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tprops: InsertableTreeFieldFromImplicitField<\n\t\t\t\t\t\t\tUnannotateImplicitFieldSchema<TPropsSchema>\n\t\t\t\t\t\t>;\n\t\t\t\t\t});\n\n\t\t// Modified version of `Column` that ensures the constructor (and `createFromInsertable`) are\n\t\t// typed correctly in terms of our insertable type.\n\t\t// This lets us be selective in our type-cast for the value returned from this function,\n\t\t// preserving as much type-safety as we reasonably can.\n\t\ttype ColumnSchemaModifiedType = Omit<\n\t\t\t// Use mapped type to omit the constructor\n\t\t\t{\n\t\t\t\t[Property in keyof typeof Column]: (typeof Column)[Property];\n\t\t\t},\n\t\t\t\"createFromInsertable\"\n\t\t> &\n\t\t\t(new (\n\t\t\t\tparameters: InternalTreeNode | ColumnInsertableType,\n\t\t\t) => Column) & {\n\t\t\t\tcreateFromInsertable(parameters: ColumnInsertableType): Column;\n\t\t\t};\n\n\t\t// Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly \"__#124291@#brand\": unknown;`\n\t\t// for the private brand field of TreeNode.\n\t\t// This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs in the API extractor reports.\n\t\t// This is avoided by doing this type conversion.\n\t\t// The conversion is done via assignment instead of `as` to get stronger type safety.\n\t\tconst ColumnSchemaType: TreeNodeSchemaClass<\n\t\t\t/* Name */ ScopedSchemaName<Scope, \"Column\">,\n\t\t\t/* Kind */ NodeKind.Object,\n\t\t\t/* TNode */ ColumnValueType,\n\t\t\t/* TInsertable */ object & ColumnInsertableType,\n\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t/* Info */ typeof columnFields\n\t\t> = Column as ColumnSchemaModifiedType;\n\n\t\treturn ColumnSchemaType;\n\t}\n\n\t/**\n\t * Base column schema type.\n\t * @sealed @system @alpha\n\t */\n\texport type ColumnSchemaBase<\n\t\tTScope extends string | undefined = string | undefined,\n\t\tTCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t\tTPropsSchema extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema,\n\t> = ReturnType<typeof createColumnSchema<TScope, TCellSchema, TPropsSchema>>;\n\n\t// #endregion\n\n\t// #region Row\n\n\t/**\n\t * Base options for creating table row schema.\n\t * @remarks Includes parameters common to all row factory overloads.\n\t * @system @alpha\n\t */\n\texport type CreateRowOptionsBase<\n\t\tTSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,\n\t\tTCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;\n\n\t/**\n\t * Factory for creating row schema.\n\t * @sealed @alpha\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify\n\texport function createRowSchema<\n\t\tconst TInputScope extends string | undefined,\n\t\tconst TCellSchema extends ImplicitAllowedTypes,\n\t\tconst TPropsSchema extends ImplicitAnnotatedFieldSchema,\n\t>(\n\t\tinputSchemaFactory: SchemaFactoryAlpha<TInputScope>,\n\t\tcellSchema: TCellSchema,\n\t\tpropsSchema: TPropsSchema,\n\t) {\n\t\tconst schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);\n\t\ttype Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;\n\n\t\ttype CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;\n\t\ttype CellInsertableType = InsertableTreeNodeFromImplicitAllowedTypes<TCellSchema>;\n\n\t\t// Note: `rowFields` is broken into two parts to work around a TypeScript bug\n\t\t// that results in broken `.d.ts` output.\n\t\t// See definition of `RowInsertableType` below.\n\t\tconst rowFieldsBuiltInParts = {\n\t\t\tid: schemaFactory.identifier,\n\t\t\t/**\n\t\t\t * The cells of the table row, keyed by column ID.\n\t\t\t * @remarks\n\t\t\t * The table row models its cells as a record, where each key is the ID of the column it belongs to. The choice of record (as opposed to a map) is intended to make interop with common table rendering libraries in TypeScript/JavaScript easier.\n\t\t\t */\n\t\t\tcells: schemaFactory.required(schemaFactory.record(\"Row.cells\", cellSchema), {\n\t\t\t\tmetadata: {\n\t\t\t\t\tdescription: \"The cells of the table row, keyed by column ID.\",\n\t\t\t\t},\n\t\t\t}),\n\t\t} as const;\n\t\tconst rowFieldsPropsPart = {\n\t\t\tprops: propsSchema,\n\t\t} as const;\n\n\t\t/**\n\t\t * {@link Row} fields.\n\t\t * @remarks Extracted for re-use in returned type signature defined later in this function.\n\t\t * The implicit typing is intentional.\n\t\t * Note: ideally we would add a satisfies clause here to ensure that this satisfies\n\t\t * `Record<string, ImplicitFieldSchema>`, but doing so causes TypeScript to prematurely and incorrectly evaluate the type of `propsSchema`.\n\t\t * Likely related to the following issue: https://github.com/microsoft/TypeScript/issues/52394\n\t\t */\n\t\tconst rowFields = {\n\t\t\t...rowFieldsBuiltInParts,\n\t\t\t...rowFieldsPropsPart,\n\t\t} as const; // satisfies Record<string, ImplicitFieldSchema>;\n\n\t\t/**\n\t\t * The Row schema - this is a map of Cells where the key is the column id\n\t\t */\n\t\tclass Row\n\t\t\textends schemaFactory.objectAlpha(\"Row\", rowFields, {\n\t\t\t\t// Will make it easier to evolve this schema in the future.\n\t\t\t\tallowUnknownOptionalFields: true,\n\t\t\t})\n\t\t\timplements TableSchema.Row<TCellSchema, TPropsSchema>\n\t\t{\n\t\t\tpublic getCell(\n\t\t\t\tcolumnOrId: TableSchema.Column<TCellSchema> | string,\n\t\t\t): CellValueType | undefined {\n\t\t\t\tconst columnId = typeof columnOrId === \"string\" ? columnOrId : columnOrId.id;\n\t\t\t\t// Unlike most objects, RecordNodes don't have the default inherited object properties, so this is safe\n\t\t\t\treturn this.cells[columnId];\n\t\t\t}\n\n\t\t\tpublic setCell(\n\t\t\t\tcolumnOrId: TableSchema.Column<TCellSchema> | string,\n\t\t\t\tvalue: CellInsertableType | undefined,\n\t\t\t): void {\n\t\t\t\t// TODO: throw if column does not exist in the owning table.\n\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tthis.removeCell(columnOrId);\n\t\t\t\t} else {\n\t\t\t\t\tconst columnId = typeof columnOrId === \"string\" ? columnOrId : columnOrId.id;\n\n\t\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the casts.\n\t\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\t\tthis.cells[columnId] = TreeAlpha.create(\n\t\t\t\t\t\tcellSchema,\n\t\t\t\t\t\tvalue as InsertableField<TCellSchema>,\n\t\t\t\t\t) as CellValueType;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic removeCell(\n\t\t\t\tcolumnOrId: TableSchema.Column<TCellSchema> | string,\n\t\t\t): CellValueType | undefined {\n\t\t\t\t// TODO: throw if column does not exist in the owning table.\n\n\t\t\t\tconst columnId = typeof columnOrId === \"string\" ? columnOrId : columnOrId.id;\n\n\t\t\t\tconst cell: CellValueType | undefined = this.getCell(columnId);\n\t\t\t\tif (cell === undefined) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-dynamic-delete -- The record's values are non-optional, so setting `undefined` as a means to remove the cell is not supported.\n\t\t\t\tdelete this.cells[columnId];\n\n\t\t\t\treturn cell;\n\t\t\t}\n\n\t\t\tpublic getCells(): {\n\t\t\t\tcolumnId: string;\n\t\t\t\tcell: CellValueType;\n\t\t\t}[] {\n\t\t\t\tconst result = [];\n\t\t\t\tfor (const [columnId, cell] of Object.entries(this.cells)) {\n\t\t\t\t\tif (cell !== undefined) {\n\t\t\t\t\t\tresult.push({\n\t\t\t\t\t\t\tcolumnId,\n\t\t\t\t\t\t\tcell,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\n\t\ttype RowValueType = TreeNode &\n\t\t\tTableSchema.Row<TCellSchema, TPropsSchema> &\n\t\t\tWithType<ScopedSchemaName<Scope, \"Row\">>;\n\n\t\t// Note: ideally this type would just leverage `InsertableObjectFromSchemaRecord<typeof rowFields>`,\n\t\t// but that results in broken `.d.ts` output due to a TypeScript bug.\n\t\t// See: https://github.com/microsoft/TypeScript/issues/58688.\n\t\t// Instead we extract and inline the typing of the \"props\" field here, which seems to sufficiently work around\n\t\t// the issue.\n\t\t// type RowInsertableType = InsertableObjectFromSchemaRecord<typeof rowFields>;\n\t\ttype RowInsertableType = InsertableObjectFromSchemaRecord<typeof rowFieldsBuiltInParts> &\n\t\t\t(FieldHasDefault<UnannotateImplicitFieldSchema<TPropsSchema>> extends true\n\t\t\t\t? // Note: The docs on the below properties are copied from `IRow.props`' docs to ensure that the\n\t\t\t\t\t// documentation appears in the data insertion scenario.\n\t\t\t\t\t// The contents are duplicated instead of using `@inheritdoc`, as intellisense does not correctly\n\t\t\t\t\t// support `@inheritDoc`.\n\t\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/31267\n\t\t\t\t\t{\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The row's properties.\n\t\t\t\t\t\t * @remarks This is a user-defined schema that can be used to store additional information\n\t\t\t\t\t\t * about the row.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tprops?: InsertableTreeFieldFromImplicitField<\n\t\t\t\t\t\t\tUnannotateImplicitFieldSchema<TPropsSchema>\n\t\t\t\t\t\t>;\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The row's properties.\n\t\t\t\t\t\t * @remarks This is a user-defined schema that can be used to store additional information\n\t\t\t\t\t\t * about the row.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tprops: InsertableTreeFieldFromImplicitField<\n\t\t\t\t\t\t\tUnannotateImplicitFieldSchema<TPropsSchema>\n\t\t\t\t\t\t>;\n\t\t\t\t\t});\n\n\t\t// Modified version of `Row` that ensures the constructor (and `createFromInsertable`) are\n\t\t// typed correctly in terms of our insertable type.\n\t\t// This lets us be selective in our type-cast for the value returned from this function,\n\t\t// preserving as much type-safety as we reasonably can.\n\t\ttype RowSchemaModifiedType = Omit<\n\t\t\t// Use mapped type to omit the constructor\n\t\t\t{\n\t\t\t\t[Property in keyof typeof Row]: (typeof Row)[Property];\n\t\t\t},\n\t\t\t\"createFromInsertable\"\n\t\t> &\n\t\t\t(new (\n\t\t\t\tparameters: InternalTreeNode | RowInsertableType,\n\t\t\t) => Row) & {\n\t\t\t\tcreateFromInsertable(parameters: RowInsertableType): Row;\n\t\t\t};\n\n\t\t// Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly \"__#124291@#brand\": unknown;`\n\t\t// for the private brand field of TreeNode.\n\t\t// This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs in the API extractor reports.\n\t\t// This is avoided by doing this type conversion.\n\t\t// The conversion is done via assignment instead of `as` to get stronger type safety.\n\t\tconst RowSchemaType: TreeNodeSchemaClass<\n\t\t\t/* Name */ ScopedSchemaName<Scope, \"Row\">,\n\t\t\t/* Kind */ NodeKind.Object,\n\t\t\t/* TNode */ RowValueType,\n\t\t\t/* TInsertable */ object & RowInsertableType,\n\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t/* Info */ typeof rowFields\n\t\t> = Row as RowSchemaModifiedType;\n\n\t\treturn RowSchemaType;\n\t}\n\n\t/**\n\t * Base row schema type.\n\t * @sealed @system @alpha\n\t */\n\texport type RowSchemaBase<\n\t\tTScope extends string | undefined = string | undefined,\n\t\tTCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t\tTPropsSchema extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema,\n\t> = ReturnType<typeof createRowSchema<TScope, TCellSchema, TPropsSchema>>;\n\n\t// #endregion\n\n\t// #region Table\n\n\t/**\n\t * Base options for creating table schema.\n\t * @remarks Includes parameters common to all table factory overloads.\n\t * @system @alpha\n\t */\n\texport type TableFactoryOptionsBase<\n\t\tTSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,\n\t\tTCell extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCell>;\n\n\t/**\n\t * Factory for creating table schema.\n\t * @system @alpha\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify\n\texport function createTableSchema<\n\t\tconst TInputScope extends string | undefined,\n\t\tconst TCellSchema extends ImplicitAllowedTypes,\n\t\tconst TColumnSchema extends ColumnSchemaBase<TInputScope, TCellSchema>,\n\t\tconst TRowSchema extends RowSchemaBase<TInputScope, TCellSchema>,\n\t>(\n\t\tinputSchemaFactory: SchemaFactoryAlpha<TInputScope>,\n\t\t_cellSchema: TCellSchema,\n\t\tcolumnSchema: TColumnSchema,\n\t\trowSchema: TRowSchema,\n\t) {\n\t\tconst schemaFactory = inputSchemaFactory.scopedFactory(tableSchemaFactorySubScope);\n\t\ttype Scope = ScopedSchemaName<TInputScope, typeof tableSchemaFactorySubScope>;\n\n\t\ttype CellValueType = TreeNodeFromImplicitAllowedTypes<TCellSchema>;\n\t\ttype ColumnValueType = TreeNodeFromImplicitAllowedTypes<TColumnSchema>;\n\t\ttype RowValueType = TreeNodeFromImplicitAllowedTypes<TRowSchema>;\n\n\t\t/**\n\t\t * {@link Table} fields.\n\t\t * @remarks Extracted for re-use in returned type signature defined later in this function.\n\t\t * The implicit typing is intentional.\n\t\t */\n\t\tconst tableFields = {\n\t\t\trows: schemaFactory.array(\"Table.rows\", rowSchema),\n\t\t\tcolumns: schemaFactory.array(\"Table.columns\", columnSchema),\n\t\t} as const satisfies Record<string, ImplicitAnnotatedFieldSchema>;\n\n\t\t/**\n\t\t * The Table schema\n\t\t */\n\t\tclass Table\n\t\t\textends schemaFactory.objectAlpha(\"Table\", tableFields, {\n\t\t\t\t// Will make it easier to evolve this schema in the future.\n\t\t\t\tallowUnknownOptionalFields: true,\n\t\t\t})\n\t\t\timplements TableSchema.Table<TInputScope, TCellSchema, TColumnSchema, TRowSchema>\n\t\t{\n\t\t\tpublic static empty<TThis extends TableConstructorType>(\n\t\t\t\tthis: TThis,\n\t\t\t): InstanceType<TThis> {\n\t\t\t\treturn new this({ columns: [], rows: [] }) as InstanceType<TThis>;\n\t\t\t}\n\n\t\t\tpublic getColumn(id: string): ColumnValueType | undefined {\n\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the casts.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn this.columns.find((column) => (column as ColumnValueType).id === id) as\n\t\t\t\t\t| ColumnValueType\n\t\t\t\t\t| undefined;\n\t\t\t}\n\n\t\t\tpublic getRow(id: string): RowValueType | undefined {\n\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the casts.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn this.rows.find((_row) => (_row as RowValueType).id === id) as\n\t\t\t\t\t| RowValueType\n\t\t\t\t\t| undefined;\n\t\t\t}\n\n\t\t\tpublic getCell(\n\t\t\t\tkey: TableSchema.CellKey<TColumnSchema, TRowSchema>,\n\t\t\t): CellValueType | undefined {\n\t\t\t\tconst { column: columnOrId, row: rowOrId } = key;\n\t\t\t\tconst row = this._getRow(rowOrId);\n\t\t\t\tif (row === undefined) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst column = this._getColumn(columnOrId);\n\t\t\t\tif (column === undefined) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\treturn row.getCell(column);\n\t\t\t}\n\n\t\t\tpublic insertColumn({\n\t\t\t\tcolumn,\n\t\t\t\tindex,\n\t\t\t}: TableSchema.InsertColumnParameters<TColumnSchema>): ColumnValueType {\n\t\t\t\tconst inserted = this.insertColumns({\n\t\t\t\t\tcolumns: [column],\n\t\t\t\t\tindex,\n\t\t\t\t});\n\t\t\t\treturn inserted[0] ?? oob();\n\t\t\t}\n\n\t\t\tpublic insertColumns({\n\t\t\t\tcolumns,\n\t\t\t\tindex,\n\t\t\t}: TableSchema.InsertColumnsParameters<TColumnSchema>): ColumnValueType[] {\n\t\t\t\t// Ensure index is valid\n\t\t\t\tif (index !== undefined) {\n\t\t\t\t\tTable.validateInsertionIndex(index, this.columns);\n\t\t\t\t}\n\n\t\t\t\t// TypeScript is unable to narrow the column type correctly here, hence the casts below.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\tif (index === undefined) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tthis.columns.insertAtEnd(TreeArrayNode.spread(columns) as any);\n\t\t\t\t} else {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tthis.columns.insertAt(index, TreeArrayNode.spread(columns) as any);\n\t\t\t\t}\n\n\t\t\t\t// Inserting the input nodes into the tree hydrates them, making them usable as nodes.\n\t\t\t\treturn columns as unknown as ColumnValueType[];\n\t\t\t}\n\n\t\t\tpublic insertRow({\n\t\t\t\trow,\n\t\t\t\tindex,\n\t\t\t}: TableSchema.InsertRowParameters<TRowSchema>): RowValueType {\n\t\t\t\tconst inserted = this.insertRows({\n\t\t\t\t\trows: [row],\n\t\t\t\t\tindex,\n\t\t\t\t});\n\t\t\t\treturn inserted[0] ?? oob();\n\t\t\t}\n\n\t\t\tpublic insertRows({\n\t\t\t\tindex,\n\t\t\t\trows,\n\t\t\t}: TableSchema.InsertRowsParameters<TRowSchema>): RowValueType[] {\n\t\t\t\t// #region Input validation\n\n\t\t\t\t// Ensure index is valid\n\t\t\t\tif (index !== undefined) {\n\t\t\t\t\tTable.validateInsertionIndex(index, this.rows);\n\t\t\t\t}\n\n\t\t\t\t// Note: TypeScript is unable to narrow the type of the row type correctly here, hence the casts below.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\tfor (const newRow of rows) {\n\t\t\t\t\t// If the row contains cells, verify that the table contains the columns for those cells.\n\t\t\t\t\t// Note: we intentionally hide `cells` on `IRow` to avoid leaking the internal data representation as much as possible, so we have to cast here.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tif ((newRow as any).cells !== undefined) {\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t\tconst keys: string[] = Object.keys((newRow as any).cells);\n\t\t\t\t\t\tfor (const key of keys) {\n\t\t\t\t\t\t\tif (!this.containsColumnWithId(key)) {\n\t\t\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\t\t`Attempted to insert row a cell under column ID \"${key}\", but the table does not contain a column with that ID.`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// #endregion\n\n\t\t\t\t// TypeScript is unable to narrow the row type correctly here, hence the casts below.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\tif (index === undefined) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tthis.rows.insertAtEnd(TreeArrayNode.spread(rows) as any);\n\t\t\t\t} else {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tthis.rows.insertAt(index, TreeArrayNode.spread(rows) as any);\n\t\t\t\t}\n\n\t\t\t\t// Inserting the input nodes into the tree hydrates them, making them usable as nodes.\n\t\t\t\treturn rows as unknown as RowValueType[];\n\t\t\t}\n\n\t\t\tpublic setCell({\n\t\t\t\tkey,\n\t\t\t\tcell,\n\t\t\t}: TableSchema.SetCellParameters<TCellSchema, TColumnSchema, TRowSchema>): void {\n\t\t\t\tconst { column: columnOrId, row: rowOrId } = key;\n\n\t\t\t\tconst row = this._getRow(rowOrId);\n\t\t\t\tif (row === undefined) {\n\t\t\t\t\tconst rowId = this._getRowId(rowOrId);\n\t\t\t\t\tthrow new UsageError(`No row with ID \"${rowId}\" exists in the table.`);\n\t\t\t\t}\n\n\t\t\t\tconst column = this._getColumn(columnOrId);\n\t\t\t\tif (column === undefined) {\n\t\t\t\t\tconst columnId = this._getColumnId(columnOrId);\n\t\t\t\t\tthrow new UsageError(`No column with ID \"${columnId}\" exists in the table.`);\n\t\t\t\t}\n\n\t\t\t\trow.setCell(column, cell);\n\t\t\t}\n\n\t\t\tpublic removeColumns(\n\t\t\t\tcolumns: readonly string[] | readonly ColumnValueType[],\n\t\t\t): ColumnValueType[] {\n\t\t\t\t// If there are no columns to remove, do nothing\n\t\t\t\tif (columns.length === 0) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// If there is only one column to remove, remove it (and don't incur cost of transaction)\n\t\t\t\tif (columns.length === 1) {\n\t\t\t\t\tconst removedColumn = this.removeColumn(columns[0] ?? oob());\n\t\t\t\t\treturn [removedColumn];\n\t\t\t\t}\n\n\t\t\t\t// If there are multiple columns to remove, remove them in a transaction.\n\t\t\t\tconst removedColumns: ColumnValueType[] = [];\n\t\t\t\tTree.runTransaction(this, () => {\n\t\t\t\t\t// Note, throwing an error within a transaction will abort the entire transaction.\n\t\t\t\t\t// So if we throw an error here for any row, no columns will be removed.\n\t\t\t\t\tfor (const columnToRemove of columns) {\n\t\t\t\t\t\tconst removedRow = this.removeColumn(columnToRemove);\n\t\t\t\t\t\tremovedColumns.push(removedRow);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn removedColumns;\n\t\t\t}\n\n\t\t\tpublic removeColumn(columnOrId: string | ColumnValueType): ColumnValueType {\n\t\t\t\tconst column = this._getColumn(columnOrId);\n\t\t\t\tconst index = column === undefined ? -1 : this.columns.indexOf(column);\n\t\t\t\tif (index === -1) {\n\t\t\t\t\tconst columnId = this._getColumnId(columnOrId);\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Specified column with ID \"${columnId}\" does not exist in the table.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tassert(column !== undefined, 0xc10 /* column should not be undefined */);\n\n\t\t\t\tTree.runTransaction(this, () => {\n\t\t\t\t\t// Remove the corresponding cell from all rows.\n\t\t\t\t\tfor (const row of this.rows) {\n\t\t\t\t\t\t// TypeScript is unable to narrow the row type correctly here, hence the cast.\n\t\t\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\t\t\t(row as RowValueType).removeCell(column);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.columns.removeAt(index);\n\t\t\t\t});\n\n\t\t\t\treturn column;\n\t\t\t}\n\n\t\t\tpublic removeAllColumns(): ColumnValueType[] {\n\t\t\t\t// TypeScript is unable to narrow the row type correctly here, hence the cast.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn this.removeColumns(this.columns as unknown as ColumnValueType[]);\n\t\t\t}\n\n\t\t\tpublic removeRows(rows: readonly string[] | readonly RowValueType[]): RowValueType[] {\n\t\t\t\t// If there are no rows to remove, do nothing\n\t\t\t\tif (rows.length === 0) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// If there is only one row to remove, remove it (and don't incur cost of transaction)\n\t\t\t\tif (rows.length === 1) {\n\t\t\t\t\tconst removedRow = this.removeRow(rows[0] ?? oob());\n\t\t\t\t\treturn [removedRow];\n\t\t\t\t}\n\n\t\t\t\t// If there are multiple rows to remove, remove them in a transaction.\n\t\t\t\tconst removedRows: RowValueType[] = [];\n\t\t\t\tTree.runTransaction(this, () => {\n\t\t\t\t\t// Note, throwing an error within a transaction will abort the entire transaction.\n\t\t\t\t\t// So if we throw an error here for any row, no rows will be removed.\n\t\t\t\t\tfor (const rowToRemove of rows) {\n\t\t\t\t\t\tconst removedRow = this.removeRow(rowToRemove);\n\t\t\t\t\t\tremovedRows.push(removedRow);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn removedRows;\n\t\t\t}\n\n\t\t\tpublic removeRow(rowOrId: string | RowValueType): RowValueType {\n\t\t\t\tconst rowToRemove = this._getRow(rowOrId);\n\t\t\t\tconst index = rowToRemove === undefined ? -1 : this.rows.indexOf(rowToRemove);\n\n\t\t\t\t// If the row does not exist in the table, throw an error.\n\t\t\t\tif (index === -1) {\n\t\t\t\t\tconst rowId = this._getRowId(rowOrId);\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Specified row with ID \"${rowId}\" does not exist in the table.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.rows.removeAt(index);\n\t\t\t\treturn rowToRemove as RowValueType;\n\t\t\t}\n\n\t\t\tpublic removeAllRows(): RowValueType[] {\n\t\t\t\t// TypeScript is unable to narrow the row type correctly here, hence the cast.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn this.removeRows(this.rows as unknown as RowValueType[]);\n\t\t\t}\n\n\t\t\tpublic removeCell(\n\t\t\t\tkey: TableSchema.CellKey<TColumnSchema, TRowSchema>,\n\t\t\t): CellValueType | undefined {\n\t\t\t\tconst { column: columnOrId, row: rowOrId } = key;\n\t\t\t\tconst row = this._getRow(rowOrId);\n\t\t\t\tif (row === undefined) {\n\t\t\t\t\tconst rowId = this._getRowId(rowOrId);\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Specified row with ID \"${rowId}\" does not exist in the table.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst column = this._getColumn(columnOrId);\n\t\t\t\tif (column === undefined) {\n\t\t\t\t\tconst columnId = this._getColumnId(columnOrId);\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Specified column with ID \"${columnId}\" does not exist in the table.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst cell: CellValueType | undefined = row.getCell(column.id);\n\t\t\t\tif (cell === undefined) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\trow.removeCell(column.id);\n\t\t\t\treturn cell;\n\t\t\t}\n\n\t\t\tprivate _getColumn(columnOrId: string | ColumnValueType): ColumnValueType | undefined {\n\t\t\t\treturn typeof columnOrId === \"string\" ? this.getColumn(columnOrId) : columnOrId;\n\t\t\t}\n\n\t\t\tprivate _getColumnId(columnOrId: string | ColumnValueType): string {\n\t\t\t\treturn typeof columnOrId === \"string\" ? columnOrId : columnOrId.id;\n\t\t\t}\n\n\t\t\tprivate _getRow(rowOrId: string | RowValueType): RowValueType | undefined {\n\t\t\t\treturn typeof rowOrId === \"string\" ? this.getRow(rowOrId) : rowOrId;\n\t\t\t}\n\n\t\t\tprivate _getRowId(rowOrId: string | RowValueType): string {\n\t\t\t\treturn typeof rowOrId === \"string\" ? rowOrId : rowOrId.id;\n\t\t\t}\n\n\t\t\tprivate containsColumnWithId(columnId: string): boolean {\n\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the cast.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn (\n\t\t\t\t\tthis.columns.find(\n\t\t\t\t\t\t(column) => (column as TableSchema.Column<TCellSchema>).id === columnId,\n\t\t\t\t\t) !== undefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tprivate containsRowWithId(rowId: string): boolean {\n\t\t\t\t// TypeScript is unable to narrow the types correctly here, hence the cast.\n\t\t\t\t// See: https://github.com/microsoft/TypeScript/issues/52144\n\t\t\t\treturn (\n\t\t\t\t\tthis.rows.find((row) => (row as TableSchema.Row<TCellSchema>).id === rowId) !==\n\t\t\t\t\tundefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Ensure that the specified index is a valid location for item insertion in the destination list.\n\t\t\t * @throws Throws a usage error if the destination is invalid.\n\t\t\t */\n\t\t\tprivate static validateInsertionIndex(\n\t\t\t\tindex: number,\n\t\t\t\tdestinationList: readonly unknown[],\n\t\t\t): void {\n\t\t\t\tif (index < 0) {\n\t\t\t\t\tthrow new UsageError(\"The index must be greater than or equal to 0.\");\n\t\t\t\t}\n\n\t\t\t\tif (index > destinationList.length) {\n\t\t\t\t\tthrow new UsageError(\"The index specified for insertion is out of bounds.\");\n\t\t\t\t}\n\n\t\t\t\tif (!Number.isInteger(index)) {\n\t\t\t\t\tthrow new UsageError(\"The index must be an integer.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set a private symbol on the schema class that marks it as having been generated by this factory.\n\t\t// Column / Row functionality use this to validate that they are being used in a table.\n\t\t// This is effectively a work-around that allows columns and rows to invoke table methods\n\t\t// without having to pass the table as a parameter to their construction, which isn't possible.\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t(Table as any)[tableSchemaSymbol] = true;\n\n\t\ttype TableValueType = TreeNode &\n\t\t\tTableSchema.Table<TInputScope, TCellSchema, TColumnSchema, TRowSchema> &\n\t\t\tWithType<ScopedSchemaName<Scope, \"Table\">>;\n\t\ttype TableInsertableType = InsertableObjectFromSchemaRecord<typeof tableFields>;\n\t\ttype TableConstructorType = new (data: TableInsertableType) => TableValueType;\n\n\t\t// Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly \"__#124291@#brand\": unknown;`\n\t\t// for the private brand field of TreeNode.\n\t\t// This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs in the API extractor reports.\n\t\t// This is avoided by doing this type conversion.\n\t\t// The conversion is done via assignment instead of `as` to get stronger type safety.\n\t\tconst TableSchemaType: TreeNodeSchemaClass<\n\t\t\t/* Name */ ScopedSchemaName<Scope, \"Table\">,\n\t\t\t/* Kind */ NodeKind.Object,\n\t\t\t/* TNode */ TableValueType,\n\t\t\t/* TInsertable */ object & TableInsertableType,\n\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t/* Info */ typeof tableFields\n\t\t> & {\n\t\t\t/**\n\t\t\t * Create an empty table.\n\t\t\t */\n\t\t\tempty<TThis extends TableConstructorType>(this: TThis): InstanceType<TThis>;\n\t\t} = Table;\n\n\t\t// Return the table schema\n\t\treturn TableSchemaType;\n\t}\n\n\t/**\n\t * Base row schema type.\n\t * @sealed @system @alpha\n\t */\n\texport type TableSchemaBase<\n\t\tTScope extends string | undefined,\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTColumn extends ColumnSchemaBase<TScope, TCell>,\n\t\tTRow extends RowSchemaBase<TScope, TCell>,\n\t> = ReturnType<typeof createTableSchema<TScope, TCell, TColumn, TRow>>;\n\n\t// #endregion\n}\n\n/**\n * Contains types and factories for creating schema to represent dynamic tabular data.\n *\n * @remarks\n *\n * WARNING: These APIs are in preview and are subject to change.\n * Until these APIs have stabilized, it is not recommended to use them in production code.\n * There may be breaking changes to these APIs and their underlying data format.\n * Using these APIs in production code may result in data loss or corruption.\n *\n * The primary APIs for create tabular data schema are:\n *\n * - {@link TableSchema.(table:1)}\n *\n * - {@link TableSchema.(column:1)}\n *\n * - {@link TableSchema.(row:1)}\n *\n * Tables created using these APIs are...\n *\n * - sparse, meaning that cells may be omitted, and new rows are empty by default.\n *\n * - dynamic, meaning that their structure can be modified at runtime.\n * Columns and rows can be inserted, removed, modified, and reordered.\n * Cells can be inserted, removed, and modified.\n *\n * - row-major, meaning that operating on rows (including inserts, removal, moves, and traversal) is more efficient than operating on columns.\n *\n * Column and Row schema created using these APIs are extensible via the `props` field.\n * This allows association of additional properties with column and row nodes.\n *\n * Cells in the table may become \"orphaned.\"\n * That is, it is possible to enter a state where one or more rows contain cells with no corresponding column.\n * To reduce the likelihood of this, you can manually remove corresponding cells when removing columns.\n * Either way, it is possible to enter such a state via the merging of edits.\n * For example: one client might add a row while another concurrently removes a column, orphaning the cell where the column and row intersected.\n *\n * @example Defining a Table schema\n *\n * ```typescript\n * class MyTable extends TableSchema.table({\n * \tschemaFactory,\n * \tcell: schemaFactory.string,\n * }) {}\n *\n * const table = new MyTable({\n * \tcolumns: [{ id: \"column-0\" }],\n * \trows: [{ id: \"row-0\", cells: { \"column-0\": \"Hello world!\" } }],\n * });\n * ```\n *\n * @example Customizing Column and Row schema\n *\n * ```typescript\n * const Cell = schemaFactory.string;\n *\n * class MyColumn extends TableSchema.column({\n * \tschemaFactory,\n * \tcell: Cell,\n * \tprops: schemaFactory.object(\"TableColumnProps\", {\n * \t\tlabel: schemaFactory.string,\n * \t}),\n * }) {}\n *\n * class MyRow extends TableSchema.row({\n * \tschemaFactory,\n * \tcell: Cell,\n * }) {}\n *\n * class MyTable extends TableSchema.table({\n * \tschemaFactory,\n * \tcell: Cell,\n * \tcolumn: MyColumn,\n * \trow: MyRow,\n * }) {}\n *\n * const table = new MyTable({\n * \tcolumns: [\n * \t\tnew MyColumn({ props: { label: \"Entry\" } }),\n * \t\tnew MyColumn({ props: { label: \"Date\" } }),\n * \t\tnew MyColumn({ props: { label: \"Amount\" } }),\n * \t],\n * \trows: [],\n * });\n * ```\n *\n * @example Listening for changes in the table\n *\n * ```typescript\n * // Listen for any changes to the table and its children.\n * // The \"treeChanged\" event will fire when the associated node or any of its descendants change.\n * Tree.on(table, \"treeChanged\", () => {\n * \t// Respond to the change.\n * });\n * ```\n *\n * @example Listening for changes to the rows list only\n *\n * ```typescript\n * // Listen for any changes to the list of rows.\n * // The \"nodeChanged\" event will fire only when the specified node itself changes (i.e., its own properties change).\n * // In this case, the event will fire when a row is added or removed, or the order of the list is changed.\n * // But it won't fire when a row's properties change, or when the row's cells change, etc.\n * Tree.on(table.rows, \"nodeChanged\", () => {\n * \t// Respond to the change.\n * });\n * ```\n *\n * @privateRemarks\n * The above examples are backed by tests in `tableSchema.spec.ts`.\n * Those tests and these examples should be kept in-sync to ensure that the examples are correct.\n *\n * @alpha\n */\nexport namespace TableSchema {\n\t// #region Column\n\n\t/**\n\t * A column in a table.\n\t * @remarks Implemented by the schema class returned from {@link TableSchema.(column:2)}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @typeParam TProps - Additional properties to associate with the column.\n\t * @sealed @alpha\n\t */\n\texport interface Column<\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTProps extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema,\n\t> {\n\t\t/**\n\t\t * The unique identifier of the column.\n\t\t * @remarks Uniquely identifies the node within the entire tree, not just the table.\n\t\t */\n\t\treadonly id: string;\n\n\t\t/**\n\t\t * The column's properties.\n\t\t * @remarks This is a user-defined schema that can be used to store additional information about the column.\n\t\t * @privateRemarks\n\t\t * Note: these docs are duplicated on the inline type definitions in {@link System_TableSchema.createColumnSchema}.\n\t\t * If you update the docs here, please also update the inline type definitions.\n\t\t */\n\t\tget props(): TreeFieldFromImplicitField<UnannotateImplicitFieldSchema<TProps>>;\n\t\tset props(value: InsertableTreeFieldFromImplicitField<\n\t\t\tUnannotateImplicitFieldSchema<TProps>\n\t\t>);\n\n\t\t/**\n\t\t * Gets all of the populated cells in the column, keyed by their associated row IDs.\n\t\t * @throws Throws an error if the column is not in a table.\n\t\t */\n\t\tgetCells(): readonly {\n\t\t\trowId: string;\n\t\t\tcell: TreeNodeFromImplicitAllowedTypes<TCell>;\n\t\t}[];\n\t}\n\n\t/**\n\t * Factory for creating new table column schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @alpha\n\t */\n\texport function column<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t>(\n\t\tparams: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,\n\t): System_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>;\n\t/**\n\t * Factory for creating new table column schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @typeParam TProps - Additional properties to associate with the column.\n\t * @alpha\n\t */\n\texport function column<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TProps extends ImplicitAnnotatedFieldSchema,\n\t>(\n\t\tparams: System_TableSchema.CreateColumnOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\t/**\n\t\t\t * Optional column properties.\n\t\t\t */\n\t\t\treadonly props: TProps;\n\t\t},\n\t): System_TableSchema.ColumnSchemaBase<TScope, TCell, TProps>;\n\t/**\n\t * Overload implementation\n\t */\n\texport function column({\n\t\tschemaFactory,\n\t\tcell,\n\t\tprops = SchemaFactory.optional(SchemaFactory.null),\n\t}: System_TableSchema.CreateColumnOptionsBase & {\n\t\treadonly props?: ImplicitAnnotatedFieldSchema;\n\t}): TreeNodeSchema {\n\t\treturn System_TableSchema.createColumnSchema(schemaFactory, cell, props);\n\t}\n\n\t// #endregion\n\n\t// #region Row\n\n\t/**\n\t * A row in a table.\n\t * @remarks Implemented by the schema class returned from {@link TableSchema.(row:2)}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @typeParam TProps - Additional properties to associate with the row.\n\t * @sealed @alpha\n\t */\n\texport interface Row<\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTProps extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema,\n\t> {\n\t\t/**\n\t\t * The unique identifier of the row.\n\t\t * @remarks Uniquely identifies the node within the entire tree, not just the table.\n\t\t */\n\t\treadonly id: string;\n\n\t\t/**\n\t\t * Gets the cell in the specified column.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t * @privateRemarks TODO: throw if the column does not belong to the same table as the row.\n\t\t */\n\t\tgetCell(column: Column<TCell>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\t\t/**\n\t\t * Gets the cell in the specified column, denoted by column ID.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t */\n\t\tgetCell(columnId: string): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\n\t\t/**\n\t\t * Gets all of the populated cells in the row, keyed by their associated column IDs.\n\t\t */\n\t\tgetCells(): readonly {\n\t\t\tcolumnId: string;\n\t\t\tcell: TreeNodeFromImplicitAllowedTypes<TCell>;\n\t\t}[];\n\n\t\t/**\n\t\t * Sets the cell in the specified column.\n\t\t * @remarks To remove a cell, call {@link TableSchema.Row.(removeCell:1)} instead.\n\t\t * @privateRemarks TODO: Throw an error if the column does not exist in the table.\n\t\t */\n\t\tsetCell(\n\t\t\tcolumn: Column<TCell>,\n\t\t\tvalue: InsertableTreeNodeFromImplicitAllowedTypes<TCell>,\n\t\t): void;\n\t\t/**\n\t\t * Sets the cell in the specified column, denoted by column ID.\n\t\t * @remarks To remove a cell, call {@link TableSchema.Row.(removeCell:2)} instead.\n\t\t */\n\t\tsetCell(columnId: string, value: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;\n\n\t\t/**\n\t\t * Removes the cell in the specified column.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t * @privateRemarks TODO: Throw if the column does not belong to the same table as the row.\n\t\t */\n\t\tremoveCell(column: Column<TCell>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\t\t/**\n\t\t * Removes the cell in the specified column, denoted by column ID.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t */\n\t\tremoveCell(columnId: string): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\n\t\t/**\n\t\t * The row's properties.\n\t\t * @remarks This is a user-defined schema that can be used to store additional information about the row.\n\t\t * @privateRemarks\n\t\t * Note: these docs are duplicated on the inline type definitions in {@link System_TableSchema.createRowSchema}.\n\t\t * If you update the docs here, please also update the inline type definitions.\n\t\t */\n\t\tget props(): TreeFieldFromImplicitField<UnannotateImplicitFieldSchema<TProps>>;\n\t\tset props(value: InsertableTreeFieldFromImplicitField<\n\t\t\tUnannotateImplicitFieldSchema<TProps>\n\t\t>);\n\t}\n\n\t/**\n\t * Factory for creating new table column schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @alpha\n\t */\n\texport function row<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t>(\n\t\tparams: System_TableSchema.CreateRowOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,\n\t): System_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>;\n\t/**\n\t * Factory for creating new table row schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.\n\t * @typeParam TProps - Additional properties to associate with the row.\n\t * @alpha\n\t */\n\texport function row<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TProps extends ImplicitAnnotatedFieldSchema,\n\t>(\n\t\tparams: System_TableSchema.CreateRowOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\t/**\n\t\t\t * Optional row properties.\n\t\t\t */\n\t\t\treadonly props: TProps;\n\t\t},\n\t): System_TableSchema.RowSchemaBase<TScope, TCell, TProps>;\n\t/**\n\t * Overload implementation\n\t */\n\texport function row({\n\t\tschemaFactory,\n\t\tcell,\n\t\tprops = SchemaFactory.optional(SchemaFactory.null),\n\t}: System_TableSchema.CreateRowOptionsBase & {\n\t\treadonly props?: ImplicitAnnotatedFieldSchema;\n\t}): TreeNodeSchema {\n\t\treturn System_TableSchema.createRowSchema(schemaFactory, cell, props);\n\t}\n\n\t// #endregion\n\n\t// #region Table\n\n\t/**\n\t * A key to uniquely identify a cell within a table.\n\t * @alpha\n\t */\n\texport interface CellKey<\n\t\tTColumn extends ImplicitAllowedTypes,\n\t\tTRow extends ImplicitAllowedTypes,\n\t> {\n\t\t/**\n\t\t * {@link TableSchema.Column} or {@link TableSchema.Column.id} at which the cell is located.\n\t\t */\n\t\treadonly column: string | TreeNodeFromImplicitAllowedTypes<TColumn>;\n\n\t\t/**\n\t\t * {@link TableSchema.Row} or {@link TableSchema.Row.id} at which the cell is located.\n\t\t */\n\t\treadonly row: string | TreeNodeFromImplicitAllowedTypes<TRow>;\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.insertColumn} parameters.\n\t * @alpha\n\t */\n\texport interface InsertColumnParameters<TColumn extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * The index at which to insert the new column.\n\t\t * @remarks If not provided, the column will be appended to the end of the table.\n\t\t */\n\t\treadonly index?: number | undefined;\n\n\t\t/**\n\t\t * The column to insert.\n\t\t */\n\t\treadonly column: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>;\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.insertColumns} parameters.\n\t * @alpha\n\t */\n\texport interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * The index at which to insert the new columns.\n\t\t * @remarks If not provided, the columns will be appended to the end of the table.\n\t\t */\n\t\treadonly index?: number | undefined;\n\n\t\t/**\n\t\t * The columns to insert.\n\t\t */\n\t\treadonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.insertRow} parameters.\n\t * @alpha\n\t */\n\texport interface InsertRowParameters<TRow extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * The index at which to insert the new row.\n\t\t * @remarks If not provided, the row will be appended to the end of the table.\n\t\t */\n\t\treadonly index?: number | undefined;\n\n\t\t/**\n\t\t * The row to insert.\n\t\t */\n\t\treadonly row: InsertableTreeNodeFromImplicitAllowedTypes<TRow>;\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.insertRows} parameters.\n\t * @alpha\n\t */\n\texport interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {\n\t\t/**\n\t\t * The index at which to insert the new rows.\n\t\t * @remarks If not provided, the rows will be appended to the end of the table.\n\t\t */\n\t\treadonly index?: number | undefined;\n\n\t\t/**\n\t\t * The rows to insert.\n\t\t */\n\t\treadonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];\n\t}\n\n\t/**\n\t * {@link TableSchema.Table.setCell} parameters.\n\t * @alpha\n\t */\n\texport interface SetCellParameters<\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTColumn extends ImplicitAllowedTypes,\n\t\tTRow extends ImplicitAllowedTypes,\n\t> {\n\t\t/**\n\t\t * The key to uniquely identify a cell in a table.\n\t\t */\n\t\treadonly key: CellKey<TColumn, TRow>;\n\n\t\t/**\n\t\t * The cell to set.\n\t\t */\n\t\treadonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;\n\t}\n\n\t/**\n\t * A table.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @typeParam TColumn - The type of the columns in the table.\n\t * @typeParam TRow - The type of the rows in the table.\n\t * @sealed @alpha\n\t */\n\texport interface Table<\n\t\tTScope extends string | undefined,\n\t\tTCell extends ImplicitAllowedTypes,\n\t\tTColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>,\n\t\tTRow extends System_TableSchema.RowSchemaBase<TScope, TCell>,\n\t> {\n\t\t/**\n\t\t * The table's columns.\n\t\t */\n\t\treadonly columns: TreeArrayNode<TColumn>;\n\n\t\t/**\n\t\t * The table's rows.\n\t\t */\n\t\treadonly rows: TreeArrayNode<TRow>;\n\n\t\t/**\n\t\t * Gets a table column by its {@link TableSchema.Column.id}.\n\t\t */\n\t\tgetColumn(id: string): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;\n\n\t\t/**\n\t\t * Gets a table row by its {@link TableSchema.Row.id}.\n\t\t */\n\t\tgetRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;\n\n\t\t/**\n\t\t * Gets a cell in the table by column and row IDs.\n\t\t * @param key - A key that uniquely distinguishes a cell in the table, represented as a combination of the column ID and row ID.\n\t\t */\n\t\tgetCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\n\t\t/**\n\t\t * Inserts a column into the table.\n\t\t *\n\t\t * @throws Throws an error if the specified index is out of range.\n\t\t *\n\t\t * No column is inserted in this case.\n\t\t */\n\t\tinsertColumn(\n\t\t\tparams: InsertColumnParameters<TColumn>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TColumn>;\n\n\t\t/**\n\t\t * Inserts 0 or more columns into the table.\n\t\t *\n\t\t * @throws Throws an error if the specified index is out of range.\n\t\t *\n\t\t * No columns are inserted in this case.\n\t\t */\n\t\tinsertColumns(\n\t\t\tparams: InsertColumnsParameters<TColumn>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TColumn>[];\n\n\t\t/**\n\t\t * Inserts a row into the table.\n\t\t *\n\t\t * @throws\n\t\t * Throws an error in the following cases:\n\t\t *\n\t\t * - The row contains cells, but the table does not contain matching columns for one or more of those cells.\n\t\t *\n\t\t * - The specified index is out of range.\n\t\t *\n\t\t * No row is inserted in these cases.\n\t\t */\n\t\tinsertRow(params: InsertRowParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>;\n\n\t\t/**\n\t\t * Inserts 0 or more rows into the table.\n\t\t *\n\t\t * @throws\n\t\t * Throws an error in the following cases:\n\t\t *\n\t\t * - The row contains cells, but the table does not contain matching columns for one or more of those cells.\n\t\t *\n\t\t * - The specified index is out of range.\n\t\t *\n\t\t * No rows are inserted in these cases.\n\t\t */\n\t\tinsertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];\n\n\t\t/**\n\t\t * Sets the cell at the specified location in the table.\n\t\t * @remarks To remove a cell, call {@link TableSchema.Table.removeCell} instead.\n\t\t */\n\t\tsetCell(params: SetCellParameters<TCell, TColumn, TRow>): void;\n\n\t\t/**\n\t\t * Removes the specified column from the table.\n\t\t * @remarks\n\t\t * Also removes any corresponding cells from the table's rows.\n\t\t *\n\t\t * Note: this operation can be slow for tables with many rows.\n\t\t * We are actively working on improving the performance of this operation, but for now it may have a negative\n\t\t * impact on performance.\n\t\t *\n\t\t * @param column - The {@link TableSchema.Column | column} or {@link TableSchema.Column.id | column ID} to remove.\n\t\t * @throws Throws an error if the column is not in the table.\n\t\t * In this case, no columns are removed.\n\t\t */\n\t\tremoveColumn(\n\t\t\tcolumn: string | TreeNodeFromImplicitAllowedTypes<TColumn>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TColumn>;\n\n\t\t/**\n\t\t * Removes 0 or more columns from the table.\n\t\t * @remarks\n\t\t * Also removes any corresponding cells from the table's rows.\n\t\t *\n\t\t * Note: this operation can be slow for tables with many rows.\n\t\t * We are actively working on improving the performance of this operation, but for now it may have a negative\n\t\t * impact on performance.\n\t\t *\n\t\t * @param columns - The columns to remove.\n\t\t * @throws Throws an error if any of the columns are not in the table.\n\t\t * In this case, no columns are removed.\n\t\t */\n\t\tremoveColumns(\n\t\t\tcolumns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[],\n\t\t): TreeNodeFromImplicitAllowedTypes<TColumn>[];\n\t\t/**\n\t\t * Removes 0 or more columns from the table.\n\t\t *\n\t\t * @remarks\n\t\t * Also removes any corresponding cells from the table's rows.\n\t\t *\n\t\t * Note: this operation can be slow for tables with many rows.\n\t\t * We are actively working on improving the performance of this operation, but for now it may have a negative\n\t\t * impact on performance.\n\t\t *\n\t\t * @param columns - The columns to remove, specified by their {@link TableSchema.Column.id}.\n\t\t * @throws Throws an error if any of the columns are not in the table.\n\t\t * In this case, no columns are removed.\n\t\t */\n\t\tremoveColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];\n\n\t\t/**\n\t\t * Removes all columns from the table.\n\t\t *\n\t\t * @remarks\n\t\t * Also removes any corresponding cells from the table's rows.\n\t\t *\n\t\t * Note: this operation can be slow for tables with many rows.\n\t\t * We are actively working on improving the performance of this operation, but for now it may have a negative\n\t\t * impact on performance.\n\t\t *\n\t\t * @returns The removed columns.\n\t\t */\n\t\tremoveAllColumns(): TreeNodeFromImplicitAllowedTypes<TColumn>[];\n\n\t\t/**\n\t\t * Removes the specified row from the table.\n\t\t * @param row - The {@link TableSchema.Row | row} or {@link TableSchema.Row.id | row ID} to remove.\n\t\t * @throws Throws an error if the row is not in the table.\n\t\t * In this case, no rows are removed.\n\t\t */\n\t\tremoveRow(\n\t\t\trow: string | TreeNodeFromImplicitAllowedTypes<TRow>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TRow>;\n\n\t\t/**\n\t\t * Removes 0 or more rows from the table.\n\t\t * @param rows - The rows to remove.\n\t\t * @throws Throws an error if any of the rows are not in the table.\n\t\t * In this case, no rows are removed.\n\t\t */\n\t\tremoveRows(\n\t\t\trows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[],\n\t\t): TreeNodeFromImplicitAllowedTypes<TRow>[];\n\t\t/**\n\t\t * Removes 0 or more rows from the table.\n\t\t * @param rows - The rows to remove, specified by their {@link TableSchema.Row.id}.\n\t\t * @throws Throws an error if any of the rows are not in the table.\n\t\t * In this case, no rows are removed.\n\t\t */\n\t\tremoveRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];\n\n\t\t/**\n\t\t * Removes all rows from the table.\n\t\t * @returns The removed rows.\n\t\t */\n\t\tremoveAllRows(): TreeNodeFromImplicitAllowedTypes<TRow>[];\n\n\t\t/**\n\t\t * Removes the cell at the specified location in the table.\n\t\t * @returns The cell if it exists, otherwise undefined.\n\t\t * @throws Throws an error if the location does not exist in the table.\n\t\t */\n\t\tremoveCell(\n\t\t\tkey: CellKey<TColumn, TRow>,\n\t\t): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;\n\t}\n\n\t/**\n\t * Factory for creating new table schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @alpha\n\t */\n\texport function table<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t>(\n\t\tparams: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell>,\n\t): System_TableSchema.TableSchemaBase<\n\t\tTScope,\n\t\tTCell,\n\t\tSystem_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>,\n\t\tSystem_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>\n\t>;\n\t/**\n\t * Factory for creating new table schema with custom column schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @typeParam TColumn - The type of the columns in the table.\n\t * @alpha\n\t */\n\texport function table<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>,\n\t>(\n\t\tparams: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\treadonly column: TColumn;\n\t\t},\n\t): System_TableSchema.TableSchemaBase<\n\t\tTScope,\n\t\tTCell,\n\t\tTColumn,\n\t\tSystem_TableSchema.RowSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>\n\t>;\n\t/**\n\t * Factory for creating new table schema with custom row schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @typeParam TRow - The type of the rows in the table.\n\t * @alpha\n\t */\n\texport function table<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>,\n\t>(\n\t\tparams: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\treadonly row: TRow;\n\t\t},\n\t): System_TableSchema.TableSchemaBase<\n\t\tTScope,\n\t\tTCell,\n\t\tSystem_TableSchema.ColumnSchemaBase<TScope, TCell, System_TableSchema.DefaultPropsType>,\n\t\tTRow\n\t>;\n\t/**\n\t * Factory for creating new table schema with custom column and row schema.\n\t * @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.\n\t * @typeParam TCell - The type of the cells in the table.\n\t * @typeParam TColumn - The type of the columns in the table.\n\t * @typeParam TRow - The type of the rows in the table.\n\t * @alpha\n\t */\n\texport function table<\n\t\tconst TScope extends string | undefined,\n\t\tconst TCell extends ImplicitAllowedTypes,\n\t\tconst TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>,\n\t\tconst TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>,\n\t>(\n\t\tparams: System_TableSchema.TableFactoryOptionsBase<SchemaFactoryAlpha<TScope>, TCell> & {\n\t\t\treadonly column: TColumn;\n\t\t\treadonly row: TRow;\n\t\t},\n\t): System_TableSchema.TableSchemaBase<TScope, TCell, TColumn, TRow>;\n\t/**\n\t * Overload implementation\n\t */\n\texport function table({\n\t\tschemaFactory,\n\t\tcell: cellSchema,\n\t\tcolumn: columnSchema = column({\n\t\t\tschemaFactory,\n\t\t\tcell: cellSchema,\n\t\t}),\n\t\trow: rowSchema = row({\n\t\t\tschemaFactory,\n\t\t\tcell: cellSchema,\n\t\t}),\n\t}: System_TableSchema.TableFactoryOptionsBase & {\n\t\treadonly column?: System_TableSchema.ColumnSchemaBase;\n\t\treadonly row?: System_TableSchema.RowSchemaBase;\n\t}): TreeNodeSchema {\n\t\treturn System_TableSchema.createTableSchema(\n\t\t\tschemaFactory,\n\t\t\tcellSchema,\n\t\t\tcolumnSchema,\n\t\t\trowSchema,\n\t\t);\n\t}\n\n\t// #endregion\n}\n"]}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|