@fluidframework/tree 2.74.0-365691 → 2.74.0-368706
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/.vscode/settings.json +2 -2
- package/api-report/tree.alpha.api.md +119 -85
- package/api-report/tree.beta.api.md +0 -1
- package/api-report/tree.legacy.beta.api.md +0 -1
- package/api-report/tree.legacy.public.api.md +0 -1
- package/api-report/tree.public.api.md +0 -1
- package/dist/alpha.d.ts +3 -2
- package/dist/codec/codec.d.ts +14 -1
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +11 -0
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +1 -1
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/format.d.ts +4 -1
- package/dist/codec/versioned/format.d.ts.map +1 -1
- package/dist/codec/versioned/format.js +4 -1
- package/dist/codec/versioned/format.js.map +1 -1
- package/dist/core/change-family/changeFamily.d.ts +4 -1
- package/dist/core/change-family/changeFamily.d.ts.map +1 -1
- package/dist/core/change-family/changeFamily.js.map +1 -1
- package/dist/core/change-family/index.d.ts +1 -1
- package/dist/core/change-family/index.d.ts.map +1 -1
- package/dist/core/change-family/index.js.map +1 -1
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +7 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +6 -1
- package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
- package/dist/core/rebase/changeRebaser.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +2 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +2 -1
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +5 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +25 -7
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +40 -13
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +21 -12
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/index.d.ts +4 -3
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +6 -2
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts +11 -3
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js +14 -2
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +7 -0
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +4 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +14 -6
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +90 -42
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +234 -69
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -4
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +33 -28
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +2 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +4 -2
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +36 -0
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +1 -0
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +126 -0
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +1 -0
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +7 -6
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js +15 -0
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/dist/feature-libraries/deltaUtils.d.ts +1 -0
- package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/dist/feature-libraries/deltaUtils.js +6 -1
- package/dist/feature-libraries/deltaUtils.js.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +41 -11
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +9 -0
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +6 -0
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +8 -7
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +37 -8
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts +2 -2
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +4 -4
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +9 -13
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +21 -26
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/format.d.ts +41 -5
- package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/format.js +7 -7
- package/dist/feature-libraries/forest-summary/format.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +11 -9
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +16 -29
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts +2 -1
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +3 -2
- package/dist/feature-libraries/forest-summary/index.js.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts +47 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.js +57 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
- package/dist/feature-libraries/index.d.ts +4 -4
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +7 -3
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +1 -0
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
- package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts +18 -2
- package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +54 -3
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +97 -21
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +4 -7
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +20 -52
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.js +0 -21
- package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +7 -10
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +2 -2
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +5 -5
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +12 -8
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +17 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +388 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +17 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +413 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +8 -284
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +48 -15
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1298 -465
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/{modularChangeFormat.d.ts → modularChangeFormatV1.d.ts} +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/{modularChangeFormat.js → modularChangeFormatV1.js} +5 -5
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +146 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +32 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +50 -10
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js +24 -3
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts +2 -2
- package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/index.js +1 -2
- package/dist/feature-libraries/optional-field/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts +5 -26
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +217 -451
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +24 -33
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +57 -28
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +42 -16
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts +6 -7
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +80 -256
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts +14 -10
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
- package/dist/feature-libraries/sequence-field/index.d.ts +2 -3
- package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/index.js +1 -3
- package/dist/feature-libraries/sequence-field/index.js.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +65 -167
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +4 -56
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js +7 -86
- package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.js +106 -112
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -33
- package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +0 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +22 -4
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +358 -179
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +20 -60
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +14 -109
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +30 -59
- 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/feature-libraries/sequence-field/utils.d.ts +15 -24
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +111 -299
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.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 +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +1 -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 +4 -4
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +2 -1
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +1 -5
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +32 -33
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +11 -5
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +14 -4
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +1 -0
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +25 -11
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +16 -6
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +13 -6
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +1 -1
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +12 -10
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +66 -17
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +3 -2
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +4 -3
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +2 -2
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +9 -9
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +4 -0
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +16 -6
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/{lib/shared-tree-core/editManagerCodecsV5.d.ts → dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +7 -7
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +20 -6
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +22 -7
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +1 -0
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +29 -9
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +41 -13
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +5 -3
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +8 -1
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/{lib/shared-tree-core/messageCodecV5.d.ts → dist/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +6 -6
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/messageCodecs.d.ts +4 -0
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +16 -6
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +20 -6
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +22 -7
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +8 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/{messageFormatV5.d.ts → messageFormatVSharedBranches.d.ts} +5 -7
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/sharedTreeCore.d.ts +14 -47
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +30 -18
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/summaryTypes.d.ts +94 -0
- package/dist/shared-tree-core/summaryTypes.d.ts.map +1 -0
- package/dist/shared-tree-core/summaryTypes.js +47 -0
- package/dist/shared-tree-core/summaryTypes.js.map +1 -0
- package/dist/shared-tree-core/versionedSummarizer.d.ts +67 -0
- package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
- package/dist/shared-tree-core/versionedSummarizer.js +63 -0
- package/dist/shared-tree-core/versionedSummarizer.js.map +1 -0
- package/dist/simple-tree/api/configuration.d.ts +3 -26
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +10 -21
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts +11 -0
- package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.js +7 -0
- package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.d.ts +3 -3
- package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.js +9 -3
- package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +7 -0
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +3 -4
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +4 -5
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js +0 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts +6 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +5 -0
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +12 -12
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +18 -6
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +13 -8
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +3 -3
- package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +2 -2
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +1 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +2 -3
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/toStored.d.ts +17 -15
- package/dist/simple-tree/core/toStored.d.ts.map +1 -1
- package/dist/simple-tree/core/toStored.js +5 -40
- package/dist/simple-tree/core/toStored.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +59 -8
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/walkSchema.js +4 -0
- 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 +20 -5
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +7 -7
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +8 -7
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +15 -12
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +5 -5
- package/dist/simple-tree/leafNodeSchema.d.ts.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 +5 -3
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/common.js +1 -1
- package/dist/simple-tree/node-kinds/common.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 +2 -2
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +18 -18
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.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 +4 -2
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.d.ts +54 -47
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +183 -125
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +55 -23
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js +17 -0
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js +8 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +58 -11
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +205 -30
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/treeSchema.d.ts +23 -0
- package/dist/simple-tree/treeSchema.d.ts.map +1 -0
- package/dist/simple-tree/treeSchema.js +25 -0
- package/dist/simple-tree/treeSchema.js.map +1 -0
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +13 -4
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +29 -11
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/tableSchema.d.ts +117 -63
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +159 -58
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +17 -3
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +4 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/rangeMap.d.ts +24 -12
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +46 -6
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/readSnapshotBlob.d.ts +13 -0
- package/dist/util/readSnapshotBlob.d.ts.map +1 -0
- package/dist/util/readSnapshotBlob.js +18 -0
- package/dist/util/readSnapshotBlob.js.map +1 -0
- package/lib/alpha.d.ts +3 -2
- package/lib/codec/codec.d.ts +14 -1
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +11 -0
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +1 -1
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/format.d.ts +4 -1
- package/lib/codec/versioned/format.d.ts.map +1 -1
- package/lib/codec/versioned/format.js +4 -1
- package/lib/codec/versioned/format.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +4 -1
- package/lib/core/change-family/changeFamily.d.ts.map +1 -1
- package/lib/core/change-family/changeFamily.js.map +1 -1
- package/lib/core/change-family/index.d.ts +1 -1
- package/lib/core/change-family/index.d.ts.map +1 -1
- package/lib/core/change-family/index.js.map +1 -1
- package/lib/core/index.d.ts +3 -3
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -2
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/changeRebaser.d.ts +6 -1
- package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
- package/lib/core/rebase/changeRebaser.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +2 -1
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +3 -0
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +25 -7
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +40 -13
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +22 -13
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/index.d.ts +4 -3
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +3 -2
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts +11 -3
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js +12 -1
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +8 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +4 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +14 -6
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +90 -42
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +232 -69
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -4
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +34 -29
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +2 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +2 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +36 -0
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +1 -0
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +122 -0
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +1 -0
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +7 -6
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js +15 -0
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/lib/feature-libraries/deltaUtils.d.ts +1 -0
- package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/lib/feature-libraries/deltaUtils.js +5 -1
- package/lib/feature-libraries/deltaUtils.js.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +38 -8
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +9 -0
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +6 -0
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +8 -7
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +38 -9
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts +2 -2
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +5 -5
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +9 -13
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +17 -22
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/format.d.ts +41 -5
- package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/format.js +3 -3
- package/lib/feature-libraries/forest-summary/format.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +11 -9
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +13 -26
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts +2 -1
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +2 -1
- package/lib/feature-libraries/forest-summary/index.js.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts +47 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.js +53 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
- package/lib/feature-libraries/index.d.ts +4 -4
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +3 -3
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js +2 -1
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
- package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts +18 -2
- package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.js +55 -5
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +97 -21
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js +3 -5
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +20 -52
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.js +0 -21
- package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +7 -10
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +5 -5
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +4 -3
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +17 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +384 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +17 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +409 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +9 -285
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +48 -15
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1284 -458
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/{modularChangeFormat.d.ts → modularChangeFormatV1.d.ts} +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/{modularChangeFormat.js → modularChangeFormatV1.js} +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +146 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +29 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +50 -10
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js +20 -2
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts +2 -2
- package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/index.js +1 -1
- package/lib/feature-libraries/optional-field/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts +5 -26
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +217 -449
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +24 -33
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +55 -26
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +38 -12
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts +6 -7
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +82 -258
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts +14 -10
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
- package/lib/feature-libraries/sequence-field/index.d.ts +2 -3
- package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/index.js +0 -1
- package/lib/feature-libraries/sequence-field/index.js.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +67 -169
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +4 -56
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.js +6 -80
- package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.js +108 -114
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -33
- package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +0 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +22 -4
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +350 -175
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +21 -61
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +14 -109
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +30 -59
- 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/feature-libraries/sequence-field/utils.d.ts +15 -24
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +107 -292
- package/lib/feature-libraries/sequence-field/utils.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/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 +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +1 -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 +4 -4
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +3 -2
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +1 -5
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +35 -36
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +11 -5
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +14 -4
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +1 -0
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +25 -11
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +16 -6
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +11 -5
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +2 -2
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +12 -10
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +69 -20
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +3 -2
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +4 -3
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +2 -2
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +9 -9
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +4 -0
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +14 -5
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/{dist/shared-tree-core/editManagerCodecsV5.d.ts → lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +4 -4
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +20 -6
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +22 -7
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -0
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +29 -9
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +39 -11
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +5 -3
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +4 -2
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/{dist/shared-tree-core/messageCodecV5.d.ts → lib/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +3 -3
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/messageCodecs.d.ts +4 -0
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +14 -5
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +20 -6
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +22 -7
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js +8 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/{messageFormatV5.d.ts → messageFormatVSharedBranches.d.ts} +5 -7
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/sharedTreeCore.d.ts +14 -47
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +28 -16
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/summaryTypes.d.ts +94 -0
- package/lib/shared-tree-core/summaryTypes.d.ts.map +1 -0
- package/lib/shared-tree-core/summaryTypes.js +43 -0
- package/lib/shared-tree-core/summaryTypes.js.map +1 -0
- package/lib/shared-tree-core/versionedSummarizer.d.ts +67 -0
- package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
- package/lib/shared-tree-core/versionedSummarizer.js +59 -0
- package/lib/shared-tree-core/versionedSummarizer.js.map +1 -0
- package/lib/simple-tree/api/configuration.d.ts +3 -26
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +14 -25
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts +11 -0
- package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.js +7 -0
- package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/getSimpleSchema.d.ts +3 -3
- package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getSimpleSchema.js +9 -3
- package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js +8 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +3 -4
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +2 -3
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts +6 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js +5 -0
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +12 -12
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.js +15 -3
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +15 -10
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +3 -3
- package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +2 -2
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +1 -1
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -1
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/toStored.d.ts +17 -15
- package/lib/simple-tree/core/toStored.d.ts.map +1 -1
- package/lib/simple-tree/core/toStored.js +4 -37
- package/lib/simple-tree/core/toStored.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +58 -8
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/walkSchema.js +5 -1
- 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 +20 -5
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +7 -7
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +8 -7
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +6 -5
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +5 -5
- package/lib/simple-tree/leafNodeSchema.d.ts.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 +6 -4
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/common.js +2 -2
- package/lib/simple-tree/node-kinds/common.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 +2 -2
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +19 -19
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.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 +4 -2
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/lib/simple-tree/prepareForInsertion.d.ts +54 -47
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +183 -124
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +55 -23
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js +16 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js +8 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +58 -11
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +204 -31
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/simple-tree/treeSchema.d.ts +23 -0
- package/lib/simple-tree/treeSchema.d.ts.map +1 -0
- package/lib/simple-tree/treeSchema.js +21 -0
- package/lib/simple-tree/treeSchema.js.map +1 -0
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +13 -4
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +26 -9
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/lib/tableSchema.d.ts +117 -63
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +160 -59
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +18 -4
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/index.d.ts +2 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/rangeMap.d.ts +24 -12
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +44 -5
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/readSnapshotBlob.d.ts +13 -0
- package/lib/util/readSnapshotBlob.d.ts.map +1 -0
- package/lib/util/readSnapshotBlob.js +14 -0
- package/lib/util/readSnapshotBlob.js.map +1 -0
- package/package.json +21 -21
- package/src/codec/codec.ts +15 -1
- package/src/codec/versioned/codec.ts +1 -1
- package/src/codec/versioned/format.ts +4 -1
- package/src/core/change-family/changeFamily.ts +5 -0
- package/src/core/change-family/index.ts +1 -0
- package/src/core/index.ts +7 -2
- package/src/core/rebase/changeRebaser.ts +6 -1
- package/src/core/rebase/index.ts +1 -0
- package/src/core/rebase/types.ts +8 -1
- package/src/core/rebase/utils.ts +31 -7
- package/src/core/tree/detachedFieldIndex.ts +71 -14
- package/src/core/tree/index.ts +9 -3
- package/src/core/tree/pathTree.ts +16 -4
- package/src/feature-libraries/chunked-forest/basicChunk.ts +7 -1
- package/src/feature-libraries/chunked-forest/chunkTree.ts +6 -1
- package/src/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.ts +15 -7
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +9 -9
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +393 -127
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +35 -38
- package/src/feature-libraries/default-schema/index.ts +16 -5
- package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +180 -0
- package/src/feature-libraries/default-schema/mappedEditBuilder.ts +35 -9
- package/src/feature-libraries/deltaUtils.ts +6 -1
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +62 -15
- package/src/feature-libraries/flex-tree/context.ts +17 -0
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +7 -8
- package/src/feature-libraries/flex-tree/lazyField.ts +66 -24
- package/src/feature-libraries/forest-summary/codec.ts +8 -8
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +45 -37
- package/src/feature-libraries/forest-summary/format.ts +4 -4
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +23 -39
- package/src/feature-libraries/forest-summary/index.ts +2 -1
- package/src/feature-libraries/forest-summary/summaryTypes.ts +61 -0
- package/src/feature-libraries/index.ts +22 -9
- package/src/feature-libraries/mapTreeCursor.ts +2 -1
- package/src/feature-libraries/mitigatedChangeFamily.ts +3 -1
- package/src/feature-libraries/modular-schema/comparison.ts +63 -5
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +142 -44
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +36 -57
- package/src/feature-libraries/modular-schema/fieldKind.ts +24 -40
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +10 -19
- package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -1
- package/src/feature-libraries/modular-schema/index.ts +21 -15
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +732 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +790 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +29 -499
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2542 -742
- package/src/feature-libraries/modular-schema/{modularChangeFormat.ts → modularChangeFormatV1.ts} +2 -1
- package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +62 -0
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +98 -10
- package/src/feature-libraries/optional-field/index.ts +1 -3
- package/src/feature-libraries/optional-field/optionalField.ts +317 -574
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +24 -38
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +89 -35
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +59 -18
- package/src/feature-libraries/sequence-field/compose.ts +134 -519
- package/src/feature-libraries/sequence-field/helperTypes.ts +34 -19
- package/src/feature-libraries/sequence-field/index.ts +0 -9
- package/src/feature-libraries/sequence-field/invert.ts +103 -228
- package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
- package/src/feature-libraries/sequence-field/moveEffectTable.ts +8 -191
- package/src/feature-libraries/sequence-field/rebase.ts +168 -203
- package/src/feature-libraries/sequence-field/replaceRevisions.ts +31 -52
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +0 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +643 -220
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +56 -68
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +25 -27
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +19 -129
- package/src/feature-libraries/sequence-field/types.ts +34 -64
- package/src/feature-libraries/sequence-field/utils.ts +133 -346
- package/src/index.ts +3 -2
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +1 -1
- package/src/shared-tree/index.ts +3 -2
- package/src/shared-tree/schematizeTree.ts +21 -8
- package/src/shared-tree/schematizingTreeView.ts +50 -68
- package/src/shared-tree/sharedTree.ts +39 -12
- package/src/shared-tree/sharedTreeChangeCodecs.ts +5 -1
- package/src/shared-tree/sharedTreeChangeEnricher.ts +31 -11
- package/src/shared-tree/sharedTreeChangeFamily.ts +7 -4
- package/src/shared-tree/sharedTreeEditBuilder.ts +46 -12
- package/src/shared-tree/treeAlpha.ts +2 -3
- package/src/shared-tree/treeCheckout.ts +104 -31
- package/src/shared-tree-core/branch.ts +8 -2
- package/src/shared-tree-core/editManager.ts +16 -2
- package/src/shared-tree-core/editManagerCodecs.ts +17 -5
- package/src/shared-tree-core/{editManagerCodecsV5.ts → editManagerCodecsVSharedBranches.ts} +3 -3
- package/src/shared-tree-core/editManagerFormatCommons.ts +22 -7
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +3 -1
- package/src/shared-tree-core/{editManagerFormatV5.ts → editManagerFormatVSharedBranches.ts} +2 -2
- package/src/shared-tree-core/editManagerSummarizer.ts +58 -16
- package/src/shared-tree-core/index.ts +11 -3
- package/src/shared-tree-core/messageCodecV1ToV4.ts +2 -1
- package/src/shared-tree-core/{messageCodecV5.ts → messageCodecVSharedBranches.ts} +3 -3
- package/src/shared-tree-core/messageCodecs.ts +17 -5
- package/src/shared-tree-core/messageFormat.ts +22 -7
- package/src/shared-tree-core/messageFormatV1ToV4.ts +16 -2
- package/src/shared-tree-core/{messageFormatV5.ts → messageFormatVSharedBranches.ts} +4 -6
- package/src/shared-tree-core/sharedTreeCore.ts +67 -76
- package/src/shared-tree-core/summaryTypes.ts +122 -0
- package/src/shared-tree-core/versionedSummarizer.ts +107 -0
- package/src/simple-tree/api/configuration.ts +21 -68
- package/src/simple-tree/api/dirtyIndex.ts +11 -0
- package/src/simple-tree/api/discrepancies.ts +1 -1
- package/src/simple-tree/api/getSimpleSchema.ts +13 -6
- package/src/simple-tree/api/incrementalAllowedTypes.ts +15 -3
- package/src/simple-tree/api/index.ts +3 -4
- package/src/simple-tree/api/schemaCompatibilityTester.ts +1 -1
- package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
- package/src/simple-tree/api/schemaFactoryRecursive.ts +0 -2
- package/src/simple-tree/api/schemaFromSimple.ts +11 -5
- package/src/simple-tree/api/simpleSchemaCodec.ts +17 -3
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +18 -10
- package/src/simple-tree/api/typesUnsafe.ts +7 -3
- package/src/simple-tree/core/allowedTypes.ts +3 -3
- package/src/simple-tree/core/index.ts +2 -2
- package/src/simple-tree/core/toStored.ts +22 -55
- package/src/simple-tree/core/unhydratedFlexTree.ts +87 -36
- package/src/simple-tree/core/walkSchema.ts +6 -0
- package/src/simple-tree/createContext.ts +26 -11
- package/src/simple-tree/fieldSchema.ts +16 -7
- package/src/simple-tree/index.ts +12 -11
- package/src/simple-tree/node-kinds/array/arrayNode.ts +12 -7
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +3 -3
- package/src/simple-tree/node-kinds/common.ts +2 -5
- package/src/simple-tree/node-kinds/map/mapNode.ts +9 -6
- package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +3 -3
- package/src/simple-tree/node-kinds/object/objectNode.ts +26 -26
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +6 -2
- package/src/simple-tree/node-kinds/record/recordNode.ts +15 -11
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +3 -3
- package/src/simple-tree/prepareForInsertion.ts +343 -200
- package/src/simple-tree/simpleSchema.ts +79 -32
- package/src/simple-tree/simpleSchemaFormatV1.ts +9 -1
- package/src/simple-tree/toStoredSchema.ts +319 -61
- package/src/simple-tree/treeSchema.ts +54 -0
- package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +42 -14
- package/src/tableSchema.ts +485 -166
- package/src/treeFactory.ts +19 -5
- package/src/util/index.ts +5 -0
- package/src/util/rangeMap.ts +72 -18
- package/src/util/readSnapshotBlob.ts +23 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +0 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +0 -9
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +0 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +0 -50
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +0 -1
- package/dist/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
- package/dist/shared-tree-core/editManagerCodecsV5.js.map +0 -1
- package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
- package/dist/shared-tree-core/editManagerFormatV5.js.map +0 -1
- package/dist/shared-tree-core/messageCodecV5.d.ts.map +0 -1
- package/dist/shared-tree-core/messageCodecV5.js.map +0 -1
- package/dist/shared-tree-core/messageFormatV5.d.ts.map +0 -1
- package/dist/shared-tree-core/messageFormatV5.js.map +0 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +0 -177
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
- package/docs/main/sequence-field/move-composition.md +0 -46
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +0 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +0 -9
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +0 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +0 -46
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +0 -1
- package/lib/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
- package/lib/shared-tree-core/editManagerCodecsV5.js.map +0 -1
- package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
- package/lib/shared-tree-core/editManagerFormatV5.js.map +0 -1
- package/lib/shared-tree-core/messageCodecV5.d.ts.map +0 -1
- package/lib/shared-tree-core/messageCodecV5.js.map +0 -1
- package/lib/shared-tree-core/messageFormatV5.d.ts.map +0 -1
- package/lib/shared-tree-core/messageFormatV5.js.map +0 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +0 -171
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
- package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +0 -57
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +0 -209
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshotCompatibilityChecker.js","sourceRoot":"","sources":["../../../src/simple-tree/api/snapshotCompatibilityChecker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"snapshotCompatibilityChecker.js","sourceRoot":"","sources":["../../../src/simple-tree/api/snapshotCompatibilityChecker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACN,iCAAiC,EACjC,iCAAiC,GACjC,MAAM,wBAAwB,CAAC;AAGhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,UAAU,kBAAkB,CACjC,4BAAmD,EACnD,IAA2B;IAE3B,MAAM,WAAW,GAAG,IAAI,0BAA0B,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5E,MAAM,MAAM,GAAG,eAAe,CAAC,4BAA4B,CAAC,MAAM,CAAC,CAAC;IACpE,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,WAAW,CAAC,CAAC;IAC1D,OAAO,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,iCAAiC,CAChD,MAA6C;IAE7C,MAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,iCAAiC,CAAC,UAAU,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,iCAAiC,CAChD,MAA8B;IAE9B,MAAM,YAAY,GAAG,iCAAiC,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,UAAU,GAAG,8BAA8B,CAAC,YAAY,CAAC,CAAC;IAEhE,+HAA+H;IAC/H,yDAAyD;IACzD,OAAO,IAAI,qBAAqB,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport { toInitialSchema } from \"../toStoredSchema.js\";\nimport { TreeViewConfigurationAlpha, TreeViewConfiguration } from \"./configuration.js\";\nimport { createTreeSchema } from \"../treeSchema.js\";\nimport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nimport { generateSchemaFromSimpleSchema } from \"./schemaFromSimple.js\";\nimport {\n\tdecodeSchemaCompatibilitySnapshot,\n\tencodeSchemaCompatibilitySnapshot,\n} from \"./simpleSchemaCodec.js\";\nimport type { SchemaCompatibilityStatus } from \"./tree.js\";\n\n/**\n * Compute the compatibility of using `view` to {@link ViewableTree.viewWith | view a tree} who's {@link ITreeAlpha.exportSimpleSchema | stored schema} could be derived from `viewWhichCreatedStoredSchema` via either {@link TreeView.initialize} or {@link TreeView.upgradeSchema}.\n *\n * @remarks See {@link SchemaCompatibilityStatus} for details on the compatibility results.\n *\n * @example This example demonstrates checking the compatibility of a historical schema against a current schema.\n * In this case, the historical schema is a Point2D object with x and y fields, while the current schema is a Point3D object\n * that adds an optional z field.\n *\n * ```ts\n * // This snapshot is assumed to be the same as Point3D, except missing `z`.\n * const encodedSchema = JSON.parse(fs.readFileSync(\"PointSchema.json\", \"utf8\"));\n * const oldViewSchema = importCompatibilitySchemaSnapshot(encodedSchema);\n *\n * // Build the current view schema\n * class Point3D extends factory.object(\"Point\", {\n * \tx: factory.number,\n * \ty: factory.number,\n *\n * \t// The current schema has a new optional field that was not present on Point2D\n * \tz: factory.optional(factory.number),\n * }) {}\n * const currentViewSchema = new TreeViewConfiguration({ schema: Point3D });\n *\n * // Check to see if the document created by the historical view schema can be opened with the current view schema\n * const backwardsCompatibilityStatus = checkCompatibility(oldViewSchema, currentViewSchema);\n *\n * // z is not present in Point2D, so the schema must be upgraded\n * assert.equal(backwardsCompatibilityStatus.canView, false);\n *\n * // The schema can be upgraded to add the new optional field\n * assert.equal(backwardsCompatibilityStatus.canUpgrade, true);\n *\n * // Test what the old version of the application would do with a tree using the new schema:\n * const forwardsCompatibilityStatus = checkCompatibility(currentViewSchema, oldViewSchema);\n *\n * // If the old schema set allowUnknownOptionalFields, this would be true, but since it did not,\n * // this assert will fail, detecting the forwards compatibility break:\n * // this means these two versions of the application cannot collaborate on content using these schema.\n * assert.equal(forwardsCompatibilityStatus.canView, true);\n * ```\n *\n * @param viewWhichCreatedStoredSchema - From which to derive the stored schema, as if it initialized or upgraded a tree via {@link TreeView}.\n * @param view - The view being tested to see if it could view tree created or initialized using `viewWhichCreatedStoredSchema`.\n * @returns The compatibility status.\n *\n * @privateRemarks\n * TODO: a simple high level API for snapshot based schema compatibility checking should replace the need to export this.\n *\n * @alpha\n */\nexport function checkCompatibility(\n\tviewWhichCreatedStoredSchema: TreeViewConfiguration,\n\tview: TreeViewConfiguration,\n): Omit<SchemaCompatibilityStatus, \"canInitialize\"> {\n\tconst viewAsAlpha = new TreeViewConfigurationAlpha({ schema: view.schema });\n\tconst stored = toInitialSchema(viewWhichCreatedStoredSchema.schema);\n\tconst tester = new SchemaCompatibilityTester(viewAsAlpha);\n\treturn tester.checkCompatibility(stored);\n}\n\n/**\n * Returns a JSON compatible representation of the tree schema for snapshot compatibility checking.\n *\n * Snapshots can be loaded by the same or newer package versions, but not necessarily older versions.\n *\n * @see {@link importCompatibilitySchemaSnapshot} which loads these snapshots.\n *\n * @param config - The schema to snapshot. Only the schema field of the `TreeViewConfiguration` is used.\n * @returns The JSON representation of the schema.\n *\n * @example This example creates and persists a snapshot of a Point2D schema.\n *\n * ```ts\n * const schemaFactory = new SchemaFactory(\"test\");\n * class Point2D extends schemaFactory.object(\"Point\", {\n * \tx: factory.number,\n * \ty: factory.number,\n * }) {}\n * const viewSchema = new TreeViewConfiguration({ schema: Point2D });\n * const encodedSchema = JSON.stringify(exportCompatibilitySchemaSnapshot(viewSchema));\n * fs.writeFileSync(\"PointSchema.json\", encodedSchema);\n * ```\n *\n * @privateRemarks\n * TODO: a simple high level API for snapshot based schema compatibility checking should replace the need to export this.\n *\n * @alpha\n */\nexport function exportCompatibilitySchemaSnapshot(\n\tconfig: Pick<TreeViewConfiguration, \"schema\">,\n): JsonCompatibleReadOnly {\n\tconst treeSchema = createTreeSchema(config.schema);\n\treturn encodeSchemaCompatibilitySnapshot(treeSchema);\n}\n\n/**\n * Parse the format exported by {@link exportCompatibilitySchemaSnapshot} into a schema.\n *\n * Can load snapshots created by the same or older package versions, but not necessarily newer versions.\n *\n * @see {@link exportCompatibilitySchemaSnapshot} which creates these snapshots.\n *\n * @param config - The JSON representation of the schema.\n * @returns The schema. Only the schema field of the {@link TreeViewConfiguration} is populated.\n * @throws Will throw a usage error if the encoded schema is not in the expected format.\n *\n * @example This example loads and parses a snapshot of a Point2D schema.\n *\n * ```ts;\n * const oldViewSchema = importCompatibilitySchemaSnapshot(fs.readFileSync(\"PointSchema.json\", \"utf8\"));\n * ```\n * @privateRemarks\n * TODO: a simple high level API for snapshot based schema compatibility checking should replace the need to export this.\n * @alpha\n */\nexport function importCompatibilitySchemaSnapshot(\n\tconfig: JsonCompatibleReadOnly,\n): TreeViewConfiguration {\n\tconst simpleSchema = decodeSchemaCompatibilitySnapshot(config);\n\tconst viewSchema = generateSchemaFromSimpleSchema(simpleSchema);\n\n\t// We construct a TreeViewConfiguration here with the default parameters. The default set of validation parameters are fine for\n\t// a schema produced by `generateSchemaFromSimpleSchema`.\n\treturn new TreeViewConfiguration({ schema: viewSchema.root });\n}\n"]}
|
|
@@ -6,7 +6,7 @@ import type { IsUnion, RestrictiveStringRecord, UnionToIntersection } from "../.
|
|
|
6
6
|
import type { ApplyKind, ApplyKindInput, FieldKind, FieldSchema, FieldSchemaAlpha } from "../fieldSchema.js";
|
|
7
7
|
import type { NodeKind, WithType, TreeNode, Unhydrated, InternalTreeNode, TreeNodeSchema, TreeNodeSchemaCore, TreeNodeSchemaClass, ImplicitAllowedTypes, TreeLeafValue, FlexListToUnion, LazyItem, AnnotatedAllowedType, AnnotatedAllowedTypes } from "../core/index.js";
|
|
8
8
|
import type { TreeArrayNode } from "../node-kinds/index.js";
|
|
9
|
-
import type { SimpleArrayNodeSchema, SimpleMapNodeSchema } from "../simpleSchema.js";
|
|
9
|
+
import type { SchemaType, SimpleArrayNodeSchema, SimpleMapNodeSchema } from "../simpleSchema.js";
|
|
10
10
|
/**
|
|
11
11
|
* A placeholder to use in {@link https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-constraints | extends constraints} when using the real type breaks compilation of some recursive types due to {@link https://github.com/microsoft/TypeScript/issues/55758 | a design limitation of TypeScript}.
|
|
12
12
|
*
|
|
@@ -288,7 +288,7 @@ export interface FieldSchemaAlphaUnsafe<out Kind extends FieldKind, out Types ex
|
|
|
288
288
|
*/
|
|
289
289
|
export interface ArrayNodeCustomizableSchemaUnsafe<out TName extends string, in out T extends System_Unsafe.ImplicitAllowedTypesUnsafe, out TCustomMetadata> extends TreeNodeSchemaClass<TName, NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<T> & WithType<TName, NodeKind.Array, T>, {
|
|
290
290
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
291
|
-
}, false, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<TCustomMetadata> {
|
|
291
|
+
}, false, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {
|
|
292
292
|
}
|
|
293
293
|
/**
|
|
294
294
|
* {@link Unenforced} version of {@link MapNodeCustomizableSchema}s.
|
|
@@ -305,7 +305,7 @@ export interface MapNodeCustomizableSchemaUnsafe<out TName extends string, in ou
|
|
|
305
305
|
]>;
|
|
306
306
|
} | {
|
|
307
307
|
readonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
308
|
-
}, false, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<TCustomMetadata> {
|
|
308
|
+
}, false, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
311
311
|
* {@link Unenforced} version of {@link TreeRecordNode}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typesUnsafe.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/typesUnsafe.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,OAAO,EACP,uBAAuB,EACvB,mBAAmB,EACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACX,SAAS,EACT,cAAc,EACd,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,oBAAoB,EACpB,qBAAqB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"typesUnsafe.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/typesUnsafe.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,OAAO,EACP,uBAAuB,EACvB,mBAAmB,EACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACX,SAAS,EACT,cAAc,EACd,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,oBAAoB,EACpB,qBAAqB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EACX,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB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1D;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC,CAC3C,CAAC,SAAS,SAAS,UAAU,CAAC,oBAAoB,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC,EAAE,IAC7E;IACH,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,CACzC,CAAC,SAAS,SAAS,UAAU,CAAC,oBAAoB,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC,EAAE,IAC7E;KACF,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,0BAA0B,GACpD,CAAC,CAAC,CAAC,CAAC,GACJ,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typesUnsafe.js","sourceRoot":"","sources":["../../../src/simple-tree/api/typesUnsafe.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIsUnion,\n\tRestrictiveStringRecord,\n\tUnionToIntersection,\n} from \"../../util/index.js\";\n\nimport type {\n\tApplyKind,\n\tApplyKindInput,\n\tFieldKind,\n\tFieldSchema,\n\tFieldSchemaAlpha,\n} from \"../fieldSchema.js\";\nimport type {\n\tNodeKind,\n\tWithType,\n\tTreeNode,\n\tUnhydrated,\n\tInternalTreeNode,\n\tTreeNodeSchema,\n\tTreeNodeSchemaCore,\n\tTreeNodeSchemaClass,\n\tImplicitAllowedTypes,\n\tTreeLeafValue,\n\tFlexListToUnion,\n\tLazyItem,\n\tAnnotatedAllowedType,\n\tAnnotatedAllowedTypes,\n} from \"../core/index.js\";\nimport type { TreeArrayNode } from \"../node-kinds/index.js\";\nimport type { SimpleArrayNodeSchema, SimpleMapNodeSchema } from \"../simpleSchema.js\";\n\n/*\n * TODO:\n * Below are a bunch of \"unsafe\" versions of types from \"schemaTypes.ts\".\n * These types duplicate the ones in \"schemaTypes.ts\", except with some of the extends clauses unenforced.\n * This is not great for type safety or maintainability.\n * Eventually it would be great to do at least one of the following:\n * 1. Find a way to avoid needing these entirely, possibly by improving TSC's recursive type support.\n * 2. Deduplicate the safe and unsafe types (possibly by having the safe one call the unsafe ones, or some other trick).\n * 3. Add type tests that check that the two copies of these types produce identical results.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A placeholder to use in {@link https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-constraints | extends constraints} when using the real type breaks compilation of some recursive types due to {@link https://github.com/microsoft/TypeScript/issues/55758 | a design limitation of TypeScript}.\n *\n * These extends constraints only serve as documentation:\n * to avoid breaking compilation, this type has to not actually enforce anything, and thus is just `unknown`.\n * Therefore the type safety is the responsibility of the user of the API.\n * @public\n */\nexport type Unenforced<_DesiredExtendsConstraint> = unknown;\n\n/**\n * A collection of {@link Unenforced} types that are used in the implementation of recursive schema.\n * These are all `@system` types, and thus should not be used directly.\n * @privateRemarks\n * Due to limitations of API-Extractor, all types in this namespace are treated as `@public`:\n * therefore, non-public types should not be included in this namespace.\n * @system @public\n */\nexport namespace System_Unsafe {\n\t/**\n\t * {@link Unenforced} version of `ObjectFromSchemaRecord`.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * This does not bother special casing `{}` since no one should make empty objects using the *Recursive APIs.\n\t * @system @public\n\t */\n\texport type ObjectFromSchemaRecordUnsafe<\n\t\tT extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>,\n\t> = {\n\t\t-readonly [Property in keyof T]: Property extends string\n\t\t\t? TreeFieldFromImplicitFieldUnsafe<T[Property]>\n\t\t\t: unknown;\n\t};\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeNodeSchema}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type TreeNodeSchemaUnsafe<\n\t\tName extends string = string,\n\t\tKind extends NodeKind = NodeKind,\n\t\tTNode extends Unenforced<TreeNode | TreeLeafValue> = unknown,\n\t\tTBuild = never,\n\t\tImplicitlyConstructable extends boolean = boolean,\n\t\tInfo = unknown,\n\t> =\n\t\t| TreeNodeSchemaClassUnsafe<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info>\n\t\t| TreeNodeSchemaNonClassUnsafe<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info>;\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeNodeSchemaClass}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport interface TreeNodeSchemaClassUnsafe<\n\t\tout Name extends string,\n\t\tout Kind extends NodeKind,\n\t\tout TNode extends Unenforced<TreeNode>,\n\t\tin TInsertable,\n\t\tout ImplicitlyConstructable extends boolean,\n\t\tout Info,\n\t\tout TCustomMetadata = unknown,\n\t> extends TreeNodeSchemaCore<\n\t\t\tName,\n\t\t\tKind,\n\t\t\tImplicitlyConstructable,\n\t\t\tInfo,\n\t\t\tnever,\n\t\t\tTCustomMetadata\n\t\t> {\n\t\t/**\n\t\t * Constructs an {@link Unhydrated} node with this schema.\n\t\t * @remarks\n\t\t * This constructor is also used internally to construct hydrated nodes with a different parameter type.\n\t\t * Therefore, overriding this constructor with different argument types is not type-safe and is not supported.\n\t\t * @sealed\n\t\t */\n\t\tnew (data: TInsertable | InternalTreeNode): Unhydrated<TNode>;\n\t}\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeNodeSchemaNonClass}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport interface TreeNodeSchemaNonClassUnsafe<\n\t\tout Name extends string,\n\t\tout Kind extends NodeKind,\n\t\tout TNode extends Unenforced<TreeNode | TreeLeafValue>,\n\t\tin TInsertable,\n\t\tout ImplicitlyConstructable extends boolean,\n\t\tout Info = unknown,\n\t> extends TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info> {\n\t\tcreate(data: TInsertable): TNode;\n\t}\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeObjectNode}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type TreeObjectNodeUnsafe<\n\t\tT extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>,\n\t\tTypeName extends string = string,\n\t> = TreeNode & ObjectFromSchemaRecordUnsafe<T> & WithType<TypeName, NodeKind.Object, T>;\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeFieldFromImplicitField}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type TreeFieldFromImplicitFieldUnsafe<TSchema extends ImplicitFieldSchemaUnsafe> =\n\t\tTSchema extends FieldSchemaUnsafe<infer Kind, infer Types>\n\t\t\t? ApplyKind<TreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind>\n\t\t\t: TSchema extends ImplicitAllowedTypesUnsafe\n\t\t\t\t? TreeNodeFromImplicitAllowedTypesUnsafe<TSchema>\n\t\t\t\t: unknown;\n\n\t/**\n\t * {@link Unenforced} version of {@link AllowedTypes}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type AllowedTypesUnsafe = readonly LazyItem<TreeNodeSchemaUnsafe>[];\n\n\t/**\n\t * {@link Unenforced} version of {@link ImplicitAllowedTypes}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * This is similar to `Unenforced<ImplicitAllowedTypes>` in that it avoids constraining the schema\n\t * (which is necessary to avoid breaking recursive types),\n\t * but is superior from a safety perspective because it constrains the structure containing the schema.\n\t * @system @public\n\t */\n\texport type ImplicitAllowedTypesUnsafe =\n\t\t| TreeNodeSchemaUnsafe\n\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-arguments\n\t\t| readonly LazyItem<Unenforced<TreeNodeSchema>>[];\n\n\t/**\n\t * {@link Unenforced} version of {@link ImplicitFieldSchema}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * This is similar to `Unenforced<ImplicitFieldSchema>` in that it avoids constraining the schema\n\t * (which is necessary to avoid breaking recursive types),\n\t * but is superior from a safety perspective because it constrains the structure containing the schema.\n\t * @system @public\n\t */\n\texport type ImplicitFieldSchemaUnsafe =\n\t\t| FieldSchemaUnsafe<FieldKind, ImplicitAllowedTypesUnsafe>\n\t\t| ImplicitAllowedTypesUnsafe;\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeNodeFromImplicitAllowedTypes}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type TreeNodeFromImplicitAllowedTypesUnsafe<\n\t\tTSchema extends ImplicitAllowedTypesUnsafe,\n\t> = TSchema extends TreeNodeSchemaUnsafe\n\t\t? NodeFromSchemaUnsafe<TSchema>\n\t\t: TSchema extends AllowedTypesUnsafe\n\t\t\t? NodeFromSchemaUnsafe<FlexListToUnion<TSchema>>\n\t\t\t: unknown;\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTreeNodeFromImplicitAllowedTypes}.\n\t * @see {@link Input}\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type InsertableTreeNodeFromImplicitAllowedTypesUnsafe<\n\t\tTSchema extends ImplicitAllowedTypesUnsafe,\n\t> = [TSchema] extends [TreeNodeSchemaUnsafe]\n\t\t? InsertableTypedNodeUnsafe<TSchema>\n\t\t: [TSchema] extends [AllowedTypesUnsafe]\n\t\t\t? InsertableTreeNodeFromAllowedTypesUnsafe<TSchema>\n\t\t\t: never;\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTreeNodeFromAllowedTypes}.\n\t * @see {@link Input}\n\t * @privateRemarks\n\t * TODO: AB#36348: it seems like the order of the union this produces is what is non-deterministic in incremental builds\n\t * of the JsonAsTree schema.\n\t * @system @public\n\t */\n\texport type InsertableTreeNodeFromAllowedTypesUnsafe<TList extends AllowedTypesUnsafe> =\n\t\tIsUnion<TList> extends true\n\t\t\t? never\n\t\t\t: {\n\t\t\t\t\treadonly [Property in keyof TList]: TList[Property] extends LazyItem<\n\t\t\t\t\t\tinfer TSchema extends TreeNodeSchemaUnsafe\n\t\t\t\t\t>\n\t\t\t\t\t\t? InsertableTypedNodeUnsafe<TSchema>\n\t\t\t\t\t\t: never;\n\t\t\t\t}[number];\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTypedNode}.\n\t * @see {@link Input}\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * TODO:\n\t * This is less strict than InsertableTypedNode when given non-exact schema to avoid compilation issues.\n\t * This should probably be fixed or documented somehow.\n\t * @system @public\n\t */\n\texport type InsertableTypedNodeUnsafe<\n\t\tTSchema extends TreeNodeSchemaUnsafe,\n\t\tT = UnionToIntersection<TSchema>,\n\t> =\n\t\t| (T extends TreeNodeSchemaUnsafe<string, NodeKind, TreeNode | TreeLeafValue, never, true>\n\t\t\t\t? NodeBuilderDataUnsafe<T>\n\t\t\t\t: never)\n\t\t| (T extends TreeNodeSchemaUnsafe ? NodeFromSchemaUnsafe<T> : never);\n\n\t/**\n\t * {@link Unenforced} version of {@link NodeFromSchema}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type NodeFromSchemaUnsafe<T extends Unenforced<TreeNodeSchema>> =\n\t\tT extends TreeNodeSchemaUnsafe<string, NodeKind, infer TNode> ? TNode : never;\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTreeNodeFromImplicitAllowedTypes}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type NodeBuilderDataUnsafe<T extends Unenforced<TreeNodeSchema>> =\n\t\tT extends TreeNodeSchemaUnsafe<string, NodeKind, unknown, infer TBuild> ? TBuild : never;\n\n\t/**\n\t * {@link Unenforced} version of {@link (TreeArrayNode:interface)}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @sealed @public\n\t */\n\texport interface TreeArrayNodeUnsafe<TAllowedTypes extends ImplicitAllowedTypesUnsafe>\n\t\textends TreeArrayNode<\n\t\t\tTAllowedTypes,\n\t\t\tTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>,\n\t\t\tInsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>\n\t\t> {}\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeMapNode}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @sealed @public\n\t */\n\texport interface TreeMapNodeUnsafe<T extends ImplicitAllowedTypesUnsafe>\n\t\textends ReadonlyMapInlined<string, T>,\n\t\t\tTreeNode {\n\t\t/**\n\t\t * {@inheritdoc TreeMapNode.set}\n\t\t */\n\t\tset(\n\t\t\tkey: string,\n\t\t\tvalue: InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined,\n\t\t): void;\n\n\t\t/**\n\t\t * {@inheritdoc TreeMapNode.delete}\n\t\t */\n\t\tdelete(key: string): void;\n\t}\n\n\t/**\n\t * Copy of TypeScript's ReadonlyMap, but with `TreeNodeFromImplicitAllowedTypesUnsafe<T>` inlined into it.\n\t * Using this instead of ReadonlyMap in TreeMapNodeUnsafe is necessary to make recursive map schema not generate compile errors in the d.ts files when exported.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * This is the same as `ReadonlyMap<K, TreeNodeFromImplicitAllowedTypesUnsafe<T>>` (Checked in test),\n\t * except that it avoids the above mentioned compile error.\n\t * Authored by manually inlining ReadonlyMap from from the TypeScript lib which can be found by navigating to the definition of `ReadonlyMap`.\n\t * @system @sealed @public\n\t */\n\texport interface ReadonlyMapInlined<K, T extends ImplicitAllowedTypesUnsafe> {\n\t\t/** Returns an iterable of entries in the map. */\n\t\t[Symbol.iterator](): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;\n\n\t\t/**\n\t\t * Returns an iterable of key, value pairs for every entry in the map.\n\t\t */\n\t\tentries(): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;\n\n\t\t/**\n\t\t * Returns an iterable of keys in the map\n\t\t */\n\t\tkeys(): IterableIterator<K>;\n\n\t\t/**\n\t\t * Returns an iterable of values in the map\n\t\t */\n\t\tvalues(): IterableIterator<TreeNodeFromImplicitAllowedTypesUnsafe<T>>;\n\n\t\tforEach(\n\t\t\tcallbackfn: (\n\t\t\t\tvalue: TreeNodeFromImplicitAllowedTypesUnsafe<T>,\n\t\t\t\tkey: K,\n\t\t\t\tmap: ReadonlyMap<K, TreeNodeFromImplicitAllowedTypesUnsafe<T>>,\n\t\t\t) => void,\n\t\t\tthisArg?: any,\n\t\t): void;\n\t\tget(key: K): TreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined;\n\t\thas(key: K): boolean;\n\t\treadonly size: number;\n\t}\n\n\t/**\n\t * {@link Unenforced} version of `FieldHasDefault`.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @sealed @public\n\t */\n\texport type FieldHasDefaultUnsafe<T extends ImplicitFieldSchemaUnsafe> =\n\t\tT extends FieldSchemaUnsafe<\n\t\t\tFieldKind.Optional | FieldKind.Identifier,\n\t\t\tImplicitAllowedTypesUnsafe\n\t\t>\n\t\t\t? true\n\t\t\t: false;\n\n\t/**\n\t * {@link Unenforced} version of `InsertableObjectFromSchemaRecord`.\n\t * @see {@link Input}\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type InsertableObjectFromSchemaRecordUnsafe<\n\t\tT extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>,\n\t> = {\n\t\t// Field might not have a default, so make it required:\n\t\treadonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends false\n\t\t\t? Property\n\t\t\t: never]: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;\n\t} & {\n\t\t// Field might have a default, so allow optional.\n\t\t// Note that if the field could be either, this returns boolean, causing both fields to exist, resulting in required.\n\t\treadonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends true\n\t\t\t? Property\n\t\t\t: never]?: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;\n\t};\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTreeFieldFromImplicitField}.\n\t * @see {@link Input}\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type InsertableTreeFieldFromImplicitFieldUnsafe<\n\t\tTSchemaInput extends ImplicitFieldSchemaUnsafe,\n\t\tTSchema = UnionToIntersection<TSchemaInput>,\n\t> = [TSchema] extends [FieldSchemaUnsafe<infer Kind, infer Types>]\n\t\t? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind, true>\n\t\t: [TSchema] extends [ImplicitAllowedTypes]\n\t\t\t? InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema>\n\t\t\t: never;\n\n\t/**\n\t * {@link Unenforced} version of {@link FieldSchema}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @sealed @public\n\t */\n\texport interface FieldSchemaUnsafe<\n\t\tout Kind extends FieldKind,\n\t\tout Types extends ImplicitAllowedTypesUnsafe,\n\t\tout TCustomMetadata = unknown,\n\t> extends FieldSchema<Kind, any, TCustomMetadata> {\n\t\t/**\n\t\t * {@inheritDoc FieldSchema.kind}\n\t\t */\n\t\treadonly kind: Kind;\n\t\t/**\n\t\t * {@inheritDoc FieldSchema.allowedTypes}\n\t\t */\n\t\treadonly allowedTypes: Types;\n\t\t/**\n\t\t * {@inheritDoc FieldSchema.allowedTypeSet}\n\t\t */\n\t\treadonly allowedTypeSet: ReadonlySet<TreeNodeSchema>;\n\t}\n}\n\n/**\n * {@link Unenforced} version of {@link FieldSchemaAlpha}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @alpha\n */\nexport interface FieldSchemaAlphaUnsafe<\n\tout Kind extends FieldKind,\n\tout Types extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\tout TCustomMetadata = unknown,\n> extends FieldSchemaAlpha<Kind, any, TCustomMetadata>,\n\t\tSystem_Unsafe.FieldSchemaUnsafe<Kind, Types, TCustomMetadata> {\n\t/**\n\t * {@inheritDoc FieldSchema.allowedTypes}\n\t */\n\treadonly allowedTypes: Types;\n}\n\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/**\n * {@link Unenforced} version of {@link ArrayNodeCustomizableSchema}s.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @sealed\n * @alpha\n * @system\n */\nexport interface ArrayNodeCustomizableSchemaUnsafe<\n\tout TName extends string,\n\tin out T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\tout TCustomMetadata,\n> extends TreeNodeSchemaClass<\n\t\t\tTName,\n\t\t\tNodeKind.Array,\n\t\t\tSystem_Unsafe.TreeArrayNodeUnsafe<T> & WithType<TName, NodeKind.Array, T>,\n\t\t\t{\n\t\t\t\t[Symbol.iterator](): Iterator<\n\t\t\t\t\tSystem_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>\n\t\t\t\t>;\n\t\t\t},\n\t\t\tfalse,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleArrayNodeSchema<TCustomMetadata> {}\n\n/**\n * {@link Unenforced} version of {@link MapNodeCustomizableSchema}s.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @sealed\n * @alpha\n * @system\n */\nexport interface MapNodeCustomizableSchemaUnsafe<\n\tout TName extends string,\n\tin out T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\tout TCustomMetadata,\n> extends TreeNodeSchemaClass<\n\t\t\tTName,\n\t\t\tNodeKind.Map,\n\t\t\tSystem_Unsafe.TreeMapNodeUnsafe<T> & WithType<TName, NodeKind.Map, T>,\n\t\t\t| {\n\t\t\t\t\t[Symbol.iterator](): Iterator<\n\t\t\t\t\t\t[string, System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>]\n\t\t\t\t\t>;\n\t\t\t }\n\t\t\t| {\n\t\t\t\t\treadonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;\n\t\t\t },\n\t\t\tfalse,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleMapNodeSchema<TCustomMetadata> {}\n\n/**\n * {@link Unenforced} version of {@link TreeRecordNode}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport interface TreeRecordNodeUnsafe<\n\tTAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n> extends Record<string, System_Unsafe.TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>>,\n\t\tTreeNode {\n\t[Symbol.iterator](): IterableIterator<\n\t\t[string, System_Unsafe.TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>]\n\t>;\n}\n\n/**\n * {@link Unenforced} utility to remove {@link AnnotatedAllowedTypeUnsafe} wrappers.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @sealed\n * @beta\n * @system\n */\nexport type UnannotateAllowedTypeUnsafe<\n\tT extends Unenforced<\n\t\tAnnotatedAllowedTypeUnsafe | LazyItem<System_Unsafe.TreeNodeSchemaUnsafe>\n\t>,\n> = T extends AnnotatedAllowedTypeUnsafe<infer X> ? X : T;\n\n/**\n * {@link Unenforced} version of {@link AnnotatedAllowedType}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport interface AnnotatedAllowedTypeUnsafe<T = Unenforced<LazyItem<TreeNodeSchema>>>\n\textends AnnotatedAllowedType<T> {}\n\n/**\n * {@link Unenforced} version of {@link AnnotatedAllowedTypes}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport interface AnnotatedAllowedTypesUnsafe\n\textends AnnotatedAllowedTypes<LazyItem<System_Unsafe.TreeNodeSchemaUnsafe>> {}\n\n/**\n * {@link Unenforced} version of {@link AllowedTypesFull}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @alpha\n */\nexport type AllowedTypesFullUnsafe<\n\tT extends readonly AnnotatedAllowedTypeUnsafe[] = readonly AnnotatedAllowedTypeUnsafe[],\n> = AnnotatedAllowedTypes<T> & UnannotateAllowedTypesListUnsafe<T>;\n\n/**\n * {@link Unenforced} version of {@link AllowedTypesFullFromMixed}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport type AllowedTypesFullFromMixedUnsafe<\n\tT extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[],\n> = UnannotateAllowedTypesListUnsafe<T> &\n\tAnnotatedAllowedTypes<AnnotateAllowedTypesListUnsafe<T>>;\n\n/**\n * {@link Unenforced} version of {@link UnannotateAllowedTypesList}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport type UnannotateAllowedTypesListUnsafe<\n\tT extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[],\n> = {\n\treadonly [I in keyof T]: T[I] extends { type: infer X } ? X : T[I];\n};\n\n/**\n * {@link Unenforced} version of {@link AnnotateAllowedTypesList}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport type AnnotateAllowedTypesListUnsafe<\n\tT extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[],\n> = {\n\t[I in keyof T]: T[I] extends AnnotatedAllowedTypeUnsafe\n\t\t? T[I]\n\t\t: AnnotatedAllowedTypeUnsafe<T[I]>;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"typesUnsafe.js","sourceRoot":"","sources":["../../../src/simple-tree/api/typesUnsafe.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIsUnion,\n\tRestrictiveStringRecord,\n\tUnionToIntersection,\n} from \"../../util/index.js\";\n\nimport type {\n\tApplyKind,\n\tApplyKindInput,\n\tFieldKind,\n\tFieldSchema,\n\tFieldSchemaAlpha,\n} from \"../fieldSchema.js\";\nimport type {\n\tNodeKind,\n\tWithType,\n\tTreeNode,\n\tUnhydrated,\n\tInternalTreeNode,\n\tTreeNodeSchema,\n\tTreeNodeSchemaCore,\n\tTreeNodeSchemaClass,\n\tImplicitAllowedTypes,\n\tTreeLeafValue,\n\tFlexListToUnion,\n\tLazyItem,\n\tAnnotatedAllowedType,\n\tAnnotatedAllowedTypes,\n} from \"../core/index.js\";\nimport type { TreeArrayNode } from \"../node-kinds/index.js\";\nimport type {\n\tSchemaType,\n\tSimpleArrayNodeSchema,\n\tSimpleMapNodeSchema,\n} from \"../simpleSchema.js\";\n\n/*\n * TODO:\n * Below are a bunch of \"unsafe\" versions of types from \"schemaTypes.ts\".\n * These types duplicate the ones in \"schemaTypes.ts\", except with some of the extends clauses unenforced.\n * This is not great for type safety or maintainability.\n * Eventually it would be great to do at least one of the following:\n * 1. Find a way to avoid needing these entirely, possibly by improving TSC's recursive type support.\n * 2. Deduplicate the safe and unsafe types (possibly by having the safe one call the unsafe ones, or some other trick).\n * 3. Add type tests that check that the two copies of these types produce identical results.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A placeholder to use in {@link https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-constraints | extends constraints} when using the real type breaks compilation of some recursive types due to {@link https://github.com/microsoft/TypeScript/issues/55758 | a design limitation of TypeScript}.\n *\n * These extends constraints only serve as documentation:\n * to avoid breaking compilation, this type has to not actually enforce anything, and thus is just `unknown`.\n * Therefore the type safety is the responsibility of the user of the API.\n * @public\n */\nexport type Unenforced<_DesiredExtendsConstraint> = unknown;\n\n/**\n * A collection of {@link Unenforced} types that are used in the implementation of recursive schema.\n * These are all `@system` types, and thus should not be used directly.\n * @privateRemarks\n * Due to limitations of API-Extractor, all types in this namespace are treated as `@public`:\n * therefore, non-public types should not be included in this namespace.\n * @system @public\n */\nexport namespace System_Unsafe {\n\t/**\n\t * {@link Unenforced} version of `ObjectFromSchemaRecord`.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * This does not bother special casing `{}` since no one should make empty objects using the *Recursive APIs.\n\t * @system @public\n\t */\n\texport type ObjectFromSchemaRecordUnsafe<\n\t\tT extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>,\n\t> = {\n\t\t-readonly [Property in keyof T]: Property extends string\n\t\t\t? TreeFieldFromImplicitFieldUnsafe<T[Property]>\n\t\t\t: unknown;\n\t};\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeNodeSchema}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type TreeNodeSchemaUnsafe<\n\t\tName extends string = string,\n\t\tKind extends NodeKind = NodeKind,\n\t\tTNode extends Unenforced<TreeNode | TreeLeafValue> = unknown,\n\t\tTBuild = never,\n\t\tImplicitlyConstructable extends boolean = boolean,\n\t\tInfo = unknown,\n\t> =\n\t\t| TreeNodeSchemaClassUnsafe<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info>\n\t\t| TreeNodeSchemaNonClassUnsafe<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info>;\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeNodeSchemaClass}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport interface TreeNodeSchemaClassUnsafe<\n\t\tout Name extends string,\n\t\tout Kind extends NodeKind,\n\t\tout TNode extends Unenforced<TreeNode>,\n\t\tin TInsertable,\n\t\tout ImplicitlyConstructable extends boolean,\n\t\tout Info,\n\t\tout TCustomMetadata = unknown,\n\t> extends TreeNodeSchemaCore<\n\t\t\tName,\n\t\t\tKind,\n\t\t\tImplicitlyConstructable,\n\t\t\tInfo,\n\t\t\tnever,\n\t\t\tTCustomMetadata\n\t\t> {\n\t\t/**\n\t\t * Constructs an {@link Unhydrated} node with this schema.\n\t\t * @remarks\n\t\t * This constructor is also used internally to construct hydrated nodes with a different parameter type.\n\t\t * Therefore, overriding this constructor with different argument types is not type-safe and is not supported.\n\t\t * @sealed\n\t\t */\n\t\tnew (data: TInsertable | InternalTreeNode): Unhydrated<TNode>;\n\t}\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeNodeSchemaNonClass}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport interface TreeNodeSchemaNonClassUnsafe<\n\t\tout Name extends string,\n\t\tout Kind extends NodeKind,\n\t\tout TNode extends Unenforced<TreeNode | TreeLeafValue>,\n\t\tin TInsertable,\n\t\tout ImplicitlyConstructable extends boolean,\n\t\tout Info = unknown,\n\t> extends TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info> {\n\t\tcreate(data: TInsertable): TNode;\n\t}\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeObjectNode}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type TreeObjectNodeUnsafe<\n\t\tT extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>,\n\t\tTypeName extends string = string,\n\t> = TreeNode & ObjectFromSchemaRecordUnsafe<T> & WithType<TypeName, NodeKind.Object, T>;\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeFieldFromImplicitField}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type TreeFieldFromImplicitFieldUnsafe<TSchema extends ImplicitFieldSchemaUnsafe> =\n\t\tTSchema extends FieldSchemaUnsafe<infer Kind, infer Types>\n\t\t\t? ApplyKind<TreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind>\n\t\t\t: TSchema extends ImplicitAllowedTypesUnsafe\n\t\t\t\t? TreeNodeFromImplicitAllowedTypesUnsafe<TSchema>\n\t\t\t\t: unknown;\n\n\t/**\n\t * {@link Unenforced} version of {@link AllowedTypes}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type AllowedTypesUnsafe = readonly LazyItem<TreeNodeSchemaUnsafe>[];\n\n\t/**\n\t * {@link Unenforced} version of {@link ImplicitAllowedTypes}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * This is similar to `Unenforced<ImplicitAllowedTypes>` in that it avoids constraining the schema\n\t * (which is necessary to avoid breaking recursive types),\n\t * but is superior from a safety perspective because it constrains the structure containing the schema.\n\t * @system @public\n\t */\n\texport type ImplicitAllowedTypesUnsafe =\n\t\t| TreeNodeSchemaUnsafe\n\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-arguments\n\t\t| readonly LazyItem<Unenforced<TreeNodeSchema>>[];\n\n\t/**\n\t * {@link Unenforced} version of {@link ImplicitFieldSchema}.\n\t * @remarks\n\t * Do not use this type directly: it is only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * This is similar to `Unenforced<ImplicitFieldSchema>` in that it avoids constraining the schema\n\t * (which is necessary to avoid breaking recursive types),\n\t * but is superior from a safety perspective because it constrains the structure containing the schema.\n\t * @system @public\n\t */\n\texport type ImplicitFieldSchemaUnsafe =\n\t\t| FieldSchemaUnsafe<FieldKind, ImplicitAllowedTypesUnsafe>\n\t\t| ImplicitAllowedTypesUnsafe;\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeNodeFromImplicitAllowedTypes}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type TreeNodeFromImplicitAllowedTypesUnsafe<\n\t\tTSchema extends ImplicitAllowedTypesUnsafe,\n\t> = TSchema extends TreeNodeSchemaUnsafe\n\t\t? NodeFromSchemaUnsafe<TSchema>\n\t\t: TSchema extends AllowedTypesUnsafe\n\t\t\t? NodeFromSchemaUnsafe<FlexListToUnion<TSchema>>\n\t\t\t: unknown;\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTreeNodeFromImplicitAllowedTypes}.\n\t * @see {@link Input}\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type InsertableTreeNodeFromImplicitAllowedTypesUnsafe<\n\t\tTSchema extends ImplicitAllowedTypesUnsafe,\n\t> = [TSchema] extends [TreeNodeSchemaUnsafe]\n\t\t? InsertableTypedNodeUnsafe<TSchema>\n\t\t: [TSchema] extends [AllowedTypesUnsafe]\n\t\t\t? InsertableTreeNodeFromAllowedTypesUnsafe<TSchema>\n\t\t\t: never;\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTreeNodeFromAllowedTypes}.\n\t * @see {@link Input}\n\t * @privateRemarks\n\t * TODO: AB#36348: it seems like the order of the union this produces is what is non-deterministic in incremental builds\n\t * of the JsonAsTree schema.\n\t * @system @public\n\t */\n\texport type InsertableTreeNodeFromAllowedTypesUnsafe<TList extends AllowedTypesUnsafe> =\n\t\tIsUnion<TList> extends true\n\t\t\t? never\n\t\t\t: {\n\t\t\t\t\treadonly [Property in keyof TList]: TList[Property] extends LazyItem<\n\t\t\t\t\t\tinfer TSchema extends TreeNodeSchemaUnsafe\n\t\t\t\t\t>\n\t\t\t\t\t\t? InsertableTypedNodeUnsafe<TSchema>\n\t\t\t\t\t\t: never;\n\t\t\t\t}[number];\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTypedNode}.\n\t * @see {@link Input}\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * TODO:\n\t * This is less strict than InsertableTypedNode when given non-exact schema to avoid compilation issues.\n\t * This should probably be fixed or documented somehow.\n\t * @system @public\n\t */\n\texport type InsertableTypedNodeUnsafe<\n\t\tTSchema extends TreeNodeSchemaUnsafe,\n\t\tT = UnionToIntersection<TSchema>,\n\t> =\n\t\t| (T extends TreeNodeSchemaUnsafe<string, NodeKind, TreeNode | TreeLeafValue, never, true>\n\t\t\t\t? NodeBuilderDataUnsafe<T>\n\t\t\t\t: never)\n\t\t| (T extends TreeNodeSchemaUnsafe ? NodeFromSchemaUnsafe<T> : never);\n\n\t/**\n\t * {@link Unenforced} version of {@link NodeFromSchema}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type NodeFromSchemaUnsafe<T extends Unenforced<TreeNodeSchema>> =\n\t\tT extends TreeNodeSchemaUnsafe<string, NodeKind, infer TNode> ? TNode : never;\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTreeNodeFromImplicitAllowedTypes}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type NodeBuilderDataUnsafe<T extends Unenforced<TreeNodeSchema>> =\n\t\tT extends TreeNodeSchemaUnsafe<string, NodeKind, unknown, infer TBuild> ? TBuild : never;\n\n\t/**\n\t * {@link Unenforced} version of {@link (TreeArrayNode:interface)}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @sealed @public\n\t */\n\texport interface TreeArrayNodeUnsafe<TAllowedTypes extends ImplicitAllowedTypesUnsafe>\n\t\textends TreeArrayNode<\n\t\t\tTAllowedTypes,\n\t\t\tTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>,\n\t\t\tInsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>\n\t\t> {}\n\n\t/**\n\t * {@link Unenforced} version of {@link TreeMapNode}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @sealed @public\n\t */\n\texport interface TreeMapNodeUnsafe<T extends ImplicitAllowedTypesUnsafe>\n\t\textends ReadonlyMapInlined<string, T>,\n\t\t\tTreeNode {\n\t\t/**\n\t\t * {@inheritdoc TreeMapNode.set}\n\t\t */\n\t\tset(\n\t\t\tkey: string,\n\t\t\tvalue: InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined,\n\t\t): void;\n\n\t\t/**\n\t\t * {@inheritdoc TreeMapNode.delete}\n\t\t */\n\t\tdelete(key: string): void;\n\t}\n\n\t/**\n\t * Copy of TypeScript's ReadonlyMap, but with `TreeNodeFromImplicitAllowedTypesUnsafe<T>` inlined into it.\n\t * Using this instead of ReadonlyMap in TreeMapNodeUnsafe is necessary to make recursive map schema not generate compile errors in the d.ts files when exported.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @privateRemarks\n\t * This is the same as `ReadonlyMap<K, TreeNodeFromImplicitAllowedTypesUnsafe<T>>` (Checked in test),\n\t * except that it avoids the above mentioned compile error.\n\t * Authored by manually inlining ReadonlyMap from from the TypeScript lib which can be found by navigating to the definition of `ReadonlyMap`.\n\t * @system @sealed @public\n\t */\n\texport interface ReadonlyMapInlined<K, T extends ImplicitAllowedTypesUnsafe> {\n\t\t/** Returns an iterable of entries in the map. */\n\t\t[Symbol.iterator](): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;\n\n\t\t/**\n\t\t * Returns an iterable of key, value pairs for every entry in the map.\n\t\t */\n\t\tentries(): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;\n\n\t\t/**\n\t\t * Returns an iterable of keys in the map\n\t\t */\n\t\tkeys(): IterableIterator<K>;\n\n\t\t/**\n\t\t * Returns an iterable of values in the map\n\t\t */\n\t\tvalues(): IterableIterator<TreeNodeFromImplicitAllowedTypesUnsafe<T>>;\n\n\t\tforEach(\n\t\t\tcallbackfn: (\n\t\t\t\tvalue: TreeNodeFromImplicitAllowedTypesUnsafe<T>,\n\t\t\t\tkey: K,\n\t\t\t\tmap: ReadonlyMap<K, TreeNodeFromImplicitAllowedTypesUnsafe<T>>,\n\t\t\t) => void,\n\t\t\tthisArg?: any,\n\t\t): void;\n\t\tget(key: K): TreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined;\n\t\thas(key: K): boolean;\n\t\treadonly size: number;\n\t}\n\n\t/**\n\t * {@link Unenforced} version of `FieldHasDefault`.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @sealed @public\n\t */\n\texport type FieldHasDefaultUnsafe<T extends ImplicitFieldSchemaUnsafe> =\n\t\tT extends FieldSchemaUnsafe<\n\t\t\tFieldKind.Optional | FieldKind.Identifier,\n\t\t\tImplicitAllowedTypesUnsafe\n\t\t>\n\t\t\t? true\n\t\t\t: false;\n\n\t/**\n\t * {@link Unenforced} version of `InsertableObjectFromSchemaRecord`.\n\t * @see {@link Input}\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type InsertableObjectFromSchemaRecordUnsafe<\n\t\tT extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>,\n\t> = {\n\t\t// Field might not have a default, so make it required:\n\t\treadonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends false\n\t\t\t? Property\n\t\t\t: never]: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;\n\t} & {\n\t\t// Field might have a default, so allow optional.\n\t\t// Note that if the field could be either, this returns boolean, causing both fields to exist, resulting in required.\n\t\treadonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends true\n\t\t\t? Property\n\t\t\t: never]?: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;\n\t};\n\n\t/**\n\t * {@link Unenforced} version of {@link InsertableTreeFieldFromImplicitField}.\n\t * @see {@link Input}\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @public\n\t */\n\texport type InsertableTreeFieldFromImplicitFieldUnsafe<\n\t\tTSchemaInput extends ImplicitFieldSchemaUnsafe,\n\t\tTSchema = UnionToIntersection<TSchemaInput>,\n\t> = [TSchema] extends [FieldSchemaUnsafe<infer Kind, infer Types>]\n\t\t? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind, true>\n\t\t: [TSchema] extends [ImplicitAllowedTypes]\n\t\t\t? InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema>\n\t\t\t: never;\n\n\t/**\n\t * {@link Unenforced} version of {@link FieldSchema}.\n\t * @remarks\n\t * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n\t * @system @sealed @public\n\t */\n\texport interface FieldSchemaUnsafe<\n\t\tout Kind extends FieldKind,\n\t\tout Types extends ImplicitAllowedTypesUnsafe,\n\t\tout TCustomMetadata = unknown,\n\t> extends FieldSchema<Kind, any, TCustomMetadata> {\n\t\t/**\n\t\t * {@inheritDoc FieldSchema.kind}\n\t\t */\n\t\treadonly kind: Kind;\n\t\t/**\n\t\t * {@inheritDoc FieldSchema.allowedTypes}\n\t\t */\n\t\treadonly allowedTypes: Types;\n\t\t/**\n\t\t * {@inheritDoc FieldSchema.allowedTypeSet}\n\t\t */\n\t\treadonly allowedTypeSet: ReadonlySet<TreeNodeSchema>;\n\t}\n}\n\n/**\n * {@link Unenforced} version of {@link FieldSchemaAlpha}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @alpha\n */\nexport interface FieldSchemaAlphaUnsafe<\n\tout Kind extends FieldKind,\n\tout Types extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\tout TCustomMetadata = unknown,\n> extends FieldSchemaAlpha<Kind, any, TCustomMetadata>,\n\t\tSystem_Unsafe.FieldSchemaUnsafe<Kind, Types, TCustomMetadata> {\n\t/**\n\t * {@inheritDoc FieldSchema.allowedTypes}\n\t */\n\treadonly allowedTypes: Types;\n}\n\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/**\n * {@link Unenforced} version of {@link ArrayNodeCustomizableSchema}s.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @sealed\n * @alpha\n * @system\n */\nexport interface ArrayNodeCustomizableSchemaUnsafe<\n\tout TName extends string,\n\tin out T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\tout TCustomMetadata,\n> extends TreeNodeSchemaClass<\n\t\t\tTName,\n\t\t\tNodeKind.Array,\n\t\t\tSystem_Unsafe.TreeArrayNodeUnsafe<T> & WithType<TName, NodeKind.Array, T>,\n\t\t\t{\n\t\t\t\t[Symbol.iterator](): Iterator<\n\t\t\t\t\tSystem_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>\n\t\t\t\t>;\n\t\t\t},\n\t\t\tfalse,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {}\n\n/**\n * {@link Unenforced} version of {@link MapNodeCustomizableSchema}s.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @sealed\n * @alpha\n * @system\n */\nexport interface MapNodeCustomizableSchemaUnsafe<\n\tout TName extends string,\n\tin out T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\tout TCustomMetadata,\n> extends TreeNodeSchemaClass<\n\t\t\tTName,\n\t\t\tNodeKind.Map,\n\t\t\tSystem_Unsafe.TreeMapNodeUnsafe<T> & WithType<TName, NodeKind.Map, T>,\n\t\t\t| {\n\t\t\t\t\t[Symbol.iterator](): Iterator<\n\t\t\t\t\t\t[string, System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>]\n\t\t\t\t\t>;\n\t\t\t }\n\t\t\t| {\n\t\t\t\t\treadonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;\n\t\t\t },\n\t\t\tfalse,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {}\n\n/**\n * {@link Unenforced} version of {@link TreeRecordNode}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport interface TreeRecordNodeUnsafe<\n\tTAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n> extends Record<string, System_Unsafe.TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>>,\n\t\tTreeNode {\n\t[Symbol.iterator](): IterableIterator<\n\t\t[string, System_Unsafe.TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>]\n\t>;\n}\n\n/**\n * {@link Unenforced} utility to remove {@link AnnotatedAllowedTypeUnsafe} wrappers.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @sealed\n * @beta\n * @system\n */\nexport type UnannotateAllowedTypeUnsafe<\n\tT extends Unenforced<\n\t\tAnnotatedAllowedTypeUnsafe | LazyItem<System_Unsafe.TreeNodeSchemaUnsafe>\n\t>,\n> = T extends AnnotatedAllowedTypeUnsafe<infer X> ? X : T;\n\n/**\n * {@link Unenforced} version of {@link AnnotatedAllowedType}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport interface AnnotatedAllowedTypeUnsafe<T = Unenforced<LazyItem<TreeNodeSchema>>>\n\textends AnnotatedAllowedType<T> {}\n\n/**\n * {@link Unenforced} version of {@link AnnotatedAllowedTypes}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport interface AnnotatedAllowedTypesUnsafe\n\textends AnnotatedAllowedTypes<LazyItem<System_Unsafe.TreeNodeSchemaUnsafe>> {}\n\n/**\n * {@link Unenforced} version of {@link AllowedTypesFull}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @alpha\n */\nexport type AllowedTypesFullUnsafe<\n\tT extends readonly AnnotatedAllowedTypeUnsafe[] = readonly AnnotatedAllowedTypeUnsafe[],\n> = AnnotatedAllowedTypes<T> & UnannotateAllowedTypesListUnsafe<T>;\n\n/**\n * {@link Unenforced} version of {@link AllowedTypesFullFromMixed}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport type AllowedTypesFullFromMixedUnsafe<\n\tT extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[],\n> = UnannotateAllowedTypesListUnsafe<T> &\n\tAnnotatedAllowedTypes<AnnotateAllowedTypesListUnsafe<T>>;\n\n/**\n * {@link Unenforced} version of {@link UnannotateAllowedTypesList}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport type UnannotateAllowedTypesListUnsafe<\n\tT extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[],\n> = {\n\treadonly [I in keyof T]: T[I] extends { type: infer X } ? X : T[I];\n};\n\n/**\n * {@link Unenforced} version of {@link AnnotateAllowedTypesList}.\n * @remarks\n * Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.\n * @system @sealed @beta\n */\nexport type AnnotateAllowedTypesListUnsafe<\n\tT extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[],\n> = {\n\t[I in keyof T]: T[I] extends AnnotatedAllowedTypeUnsafe\n\t\t? T[I]\n\t\t: AnnotatedAllowedTypeUnsafe<T[I]>;\n};\n"]}
|
|
@@ -6,7 +6,7 @@ import { type ErasedBaseType, ErasedTypeImplementation } from "@fluidframework/c
|
|
|
6
6
|
import { type IsUnion, type MakeNominal } from "../../util/index.js";
|
|
7
7
|
import { type FlexListToUnion, type LazyItem } from "./flexList.js";
|
|
8
8
|
import { type InsertableTypedNode, type NodeFromSchema, type TreeNodeSchema } from "./treeNodeSchema.js";
|
|
9
|
-
import type { SimpleAllowedTypeAttributes } from "../simpleSchema.js";
|
|
9
|
+
import type { SchemaType, SimpleAllowedTypeAttributes } from "../simpleSchema.js";
|
|
10
10
|
/**
|
|
11
11
|
* Schema for types allowed in some location in a tree (like a field, map entry or array).
|
|
12
12
|
* @remarks
|
|
@@ -145,7 +145,7 @@ export declare class AnnotatedAllowedTypesInternal<T extends readonly AnnotatedA
|
|
|
145
145
|
/**
|
|
146
146
|
* Get the {@link SimpleAllowedTypeAttributes} version of the allowed types set.
|
|
147
147
|
*/
|
|
148
|
-
static evaluateSimpleAllowedTypes(annotatedAllowedTypes: AnnotatedAllowedTypes): ReadonlyMap<string, SimpleAllowedTypeAttributes
|
|
148
|
+
static evaluateSimpleAllowedTypes(annotatedAllowedTypes: AnnotatedAllowedTypes): ReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.View>>;
|
|
149
149
|
static [Symbol.hasInstance]<TThis extends {
|
|
150
150
|
prototype: object;
|
|
151
151
|
}>(this: TThis, value: unknown): value is InstanceTypeRelaxed<TThis> & AnnotatedAllowedTypesInternal & AllowedTypesFull;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowedTypes.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/core/allowedTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,KAAK,cAAc,EACnB,wBAAwB,EACxB,MAAM,0CAA0C,CAAC;AAElD,OAAO,E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,yCAAyC,CACxD,KAA2B;IAE3B,OAAO,6BAA6B,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,cAAc,GAAG,IAAI,OAAO,EAA0B,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAA2B,KAAkB;IAC9E,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC;QACpC,CAAC,CAAE,WAAW,CAAC,cAAc,EAAE,KAAK,EAAE,KAAK,CAAO;QAClD,CAAC,CAAC,KAAK,CAAC;IAET,2BAA2B,CAAC,eAAe,CAAC,CAAC;IAC7C,qBAAqB,CAAC,eAAe,CAAC,CAAC;IACvC,OAAO,eAAe,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAC1C,MAA8E;IAE9E,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,UAAU,CACnB,6PAA6P,CAC7P,CAAC;IACH,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,qBAAqB,CACpC,MAAsB,EACtB,iBAAiB,GAAG,KAAK;IAEzB,kFAAkF;IAClF,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO;IACR,CAAC;IAED,MAAM,WAAW,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAElD,IAAI,iBAAiB,EAAE,CAAC;QACvB,WAAW,CAAC,iBAAiB,EAAE,CAAC;IACjC,CAAC;SAAM,CAAC;QACP,WAAW,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { Lazy } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ErasedBaseType,\n\tErasedTypeImplementation,\n} from \"@fluidframework/core-interfaces/internal\";\n\nimport {\n\tgetOrCreate,\n\tisReadonlyArray,\n\ttype IsUnion,\n\ttype MakeNominal,\n} from \"../../util/index.js\";\nimport { isLazy, type FlexListToUnion, type LazyItem } from \"./flexList.js\";\nimport {\n\tNodeKind,\n\ttype InsertableTypedNode,\n\ttype NodeFromSchema,\n\ttype TreeNodeSchema,\n} from \"./treeNodeSchema.js\";\nimport { schemaAsTreeNodeValid } from \"./treeNodeValid.js\";\nimport type { SimpleAllowedTypeAttributes } from \"../simpleSchema.js\";\n\n/**\n * Schema for types allowed in some location in a tree (like a field, map entry or array).\n * @remarks\n * Type constraint used in schema declaration APIs.\n *\n * The order of types in the array is not significant.\n * Additionally, it is legal for users of this type to have the runtime and compile time order of items within this array not match.\n * Therefor to ensure type safety, these arrays should not be indexed, and instead just be iterated.\n *\n * Ideally this restriction would be modeled in the type itself, but it is not ergonomic to do so as there is no easy (when compared to arrays)\n * way to declare and manipulate unordered sets of types in TypeScript.\n *\n * Duplicate entries in this array are not allowed and will produce runtime errors.\n * Duplicate types are allowed,\n * but this must only be reflected in the type and not the runtime values.\n * This duplication can be used to encode the typing when the number of items in the array is not known at compile time\n * but some of the items are known to be present unconditionally.\n * For example, typing `[typeof A] | [typeof A, typeof B]` as `[typeof A, typeof B | typeof A]` is allowed,\n * and can produce more useful {@link Input} types.\n *\n * Due to one implementation of this being {@link AllowedTypesFull}, it is not safe to assume this is an array (as determined by `Array.isArray`).\n *\n * Code reading data from this should use {@link normalizeAllowedTypes} to ensure consistent handling, caching, nice errors etc.\n * @system @public\n */\nexport type AllowedTypes = readonly LazyItem<TreeNodeSchema>[];\n\n/**\n * Stores annotations for an individual allowed type.\n * @remarks\n * Create using APIs on {@link SchemaStaticsBeta}, like {@link SchemaStaticsBeta.staged}.\n * @privateRemarks\n * Since this is sealed, users are not supposed to create instances of it directly.\n * Making it extend ErasedType could enforce that.\n * @beta\n * @sealed\n */\nexport interface AnnotatedAllowedType<T = LazyItem<TreeNodeSchema>> {\n\t/**\n\t * Annotations for the allowed type.\n\t */\n\treadonly metadata: AllowedTypeMetadata;\n\t/**\n\t * The allowed type the annotations apply to in a particular schema.\n\t */\n\treadonly type: T;\n}\n\n/**\n * {@link AllowedTypesFull} but with the lazy schema references eagerly evaluated.\n * @sealed\n * @beta\n */\nexport type AllowedTypesFullEvaluated = AllowedTypesFull<\n\treadonly AnnotatedAllowedType<TreeNodeSchema>[]\n>;\n\n/**\n * Checks if the input is an {@link AnnotatedAllowedTypes}.\n */\nexport function isAnnotatedAllowedTypes(\n\tallowedTypes: ImplicitAllowedTypes,\n): allowedTypes is AllowedTypesFullInternal {\n\tcheckForUninitializedSchema(allowedTypes);\n\treturn allowedTypes instanceof AnnotatedAllowedTypesInternal;\n}\n\n/**\n * Stores annotations for a set of allowed types.\n * @beta\n * @sealed\n */\nexport interface AnnotatedAllowedTypes<T = readonly AnnotatedAllowedType[]>\n\textends ErasedBaseType<\"tree.AnnotatedAllowedTypes\"> {\n\t/**\n\t * Annotations that apply to a set of allowed types.\n\t */\n\treadonly metadata: AllowedTypesMetadata;\n\n\t/**\n\t * All the allowed types that the annotations apply to. The types themselves may also have individual annotations.\n\t */\n\treadonly types: T;\n\n\t/**\n\t * Get this {@link AnnotatedAllowedTypes} but with any lazy schema references eagerly evaluated.\n\t * @remarks\n\t * See {@link evaluateLazySchema} the implications of evaluating lazy schema references.\n\t */\n\tevaluate(): AllowedTypesFullEvaluated;\n\n\t/**\n\t * Get the allowed types as a set with any lazy schema references eagerly evaluated.\n\t * @remarks\n\t * See {@link evaluateLazySchema} the implications of evaluating lazy schema references.\n\t */\n\tevaluateSet(): ReadonlySet<TreeNodeSchema>;\n\n\t/**\n\t * Get the allowed types as a set of identifiers with any lazy schema references eagerly evaluated.\n\t * @remarks\n\t * See {@link evaluateLazySchema} the implications of evaluating lazy schema references.\n\t *\n\t * It is recommend to work in terms of {@link TreeNodeSchema}\n\t * rather than identifiers where possible since its more type safe and it is possible that two schema with the same identifier exist.\n\t */\n\tevaluateIdentifiers(): ReadonlySet<string>;\n}\n\n/**\n * Stores annotations for a set of allowed types.\n * @remarks\n * Most expressive form of AllowedTypes which any of the implicit types can be normalized to.\n * @beta\n * @sealed\n */\nexport type AllowedTypesFull<\n\tT extends readonly AnnotatedAllowedType[] = readonly AnnotatedAllowedType[],\n> = AnnotatedAllowedTypes<T> & UnannotateAllowedTypesList<T>;\n\n/**\n * Creates an {@link AllowedTypesFull} type from a mixed array of annotated and unannotated allowed types.\n * @system @sealed @beta\n */\nexport type AllowedTypesFullFromMixed<\n\tT extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n> = UnannotateAllowedTypesList<T> & AnnotatedAllowedTypes<AnnotateAllowedTypesList<T>>;\n\n/**\n * The same as the built-in InstanceType, but works on classes with private constructors.\n * @privateRemarks\n * This is based on the trick in {@link https://stackoverflow.com/a/74657881}.\n */\ntype InstanceTypeRelaxed<TClass> = InstanceType<(new () => never) & TClass>;\n\n/**\n * {@link AllowedTypesFull} but with internal types.\n */\nexport type AllowedTypesFullInternal<\n\tT extends readonly AnnotatedAllowedType[] = readonly AnnotatedAllowedType[],\n> = AnnotatedAllowedTypesInternal<T> & UnannotateAllowedTypesList<T>;\n\ntype AllowedTypesFullInternalEvaluated = AllowedTypesFullInternal<\n\treadonly AnnotatedAllowedType<TreeNodeSchema>[]\n>;\n\n/**\n * The implementation of {@link AnnotatedAllowedTypes}. Also implements {@link AllowedTypesFull}.\n * @remarks\n * Due to TypeScript limitations, this class cannot directly state it implements {@link AllowedTypesFull}.\n * As a workaround for that, the static `create` method returns the intersection type.\n */\nexport class AnnotatedAllowedTypesInternal<\n\t\tT extends readonly AnnotatedAllowedType[] = readonly AnnotatedAllowedType[],\n\t>\n\textends ErasedTypeImplementation<AnnotatedAllowedTypes<T>>\n\timplements AnnotatedAllowedTypes<T>\n{\n\tpublic readonly unannotatedTypes: UnannotateAllowedTypesList<T>;\n\n\t/**\n\t * True if and only if there is at least one lazy schema reference in the types arrays.\n\t */\n\tprivate readonly isLazy: boolean;\n\n\tprivate readonly lazyEvaluate: Lazy<{\n\t\treadonly annotated: AllowedTypesFullInternalEvaluated;\n\t\treadonly set: ReadonlySet<TreeNodeSchema>;\n\t\treadonly identifiers: ReadonlySet<string>;\n\t}>;\n\n\tprivate constructor(\n\t\tpublic readonly types: T,\n\t\tpublic readonly metadata: AllowedTypesMetadata = {},\n\t) {\n\t\tsuper();\n\t\tthis.unannotatedTypes = types.map((type) => type.type) as typeof this.unannotatedTypes;\n\n\t\t// Since the array has been copied, mutations to it will not be handled correctly so freeze it.\n\t\t// Support for such mutations could be added at a later date by making more things lazy.\n\t\tObject.freeze(this.types);\n\t\tObject.freeze(this.unannotatedTypes);\n\n\t\tthis.isLazy = false;\n\t\tfor (const type of this.unannotatedTypes) {\n\t\t\tif (isLazy(type)) {\n\t\t\t\tthis.isLazy = true;\n\t\t\t} else {\n\t\t\t\tmarkSchemaMostDerived(type);\n\t\t\t}\n\t\t}\n\n\t\tconst proxy = AnnotatedAllowedTypesInternal.proxy(this);\n\n\t\tthis.lazyEvaluate = new Lazy(() => {\n\t\t\tconst annotated = this.isLazy\n\t\t\t\t? AnnotatedAllowedTypesInternal.create(\n\t\t\t\t\t\tthis.types.map((type) => ({\n\t\t\t\t\t\t\t...type,\n\t\t\t\t\t\t\ttype: evaluateLazySchema(type.type),\n\t\t\t\t\t\t})),\n\t\t\t\t\t\tthis.metadata,\n\t\t\t\t\t)\n\t\t\t\t: (proxy as AllowedTypesFullInternalEvaluated);\n\t\t\treturn {\n\t\t\t\tannotated,\n\t\t\t\tset: new Set(annotated.unannotatedTypes),\n\t\t\t\tidentifiers: new Set(annotated.unannotatedTypes.map((t) => t.identifier)),\n\t\t\t};\n\t\t});\n\n\t\treturn proxy;\n\t}\n\n\tpublic evaluate(): AllowedTypesFullInternalEvaluated {\n\t\treturn this.lazyEvaluate.value.annotated;\n\t}\n\n\tpublic evaluateSet(): ReadonlySet<TreeNodeSchema> {\n\t\treturn this.lazyEvaluate.value.set;\n\t}\n\n\tpublic evaluateIdentifiers(): ReadonlySet<string> {\n\t\treturn this.lazyEvaluate.value.identifiers;\n\t}\n\n\t/**\n\t * Get the {@link SimpleAllowedTypeAttributes} version of the allowed types set.\n\t */\n\tpublic static evaluateSimpleAllowedTypes(\n\t\tannotatedAllowedTypes: AnnotatedAllowedTypes,\n\t): ReadonlyMap<string, SimpleAllowedTypeAttributes> {\n\t\tconst simpleAllowedTypes = new Map<string, SimpleAllowedTypeAttributes>();\n\t\tfor (const type of annotatedAllowedTypes.evaluate().types) {\n\t\t\tsimpleAllowedTypes.set(type.type.identifier, {\n\t\t\t\tisStaged: type.metadata.stagedSchemaUpgrade ?? false,\n\t\t\t});\n\t\t}\n\t\treturn simpleAllowedTypes;\n\t}\n\n\tpublic static override [Symbol.hasInstance]<TThis extends { prototype: object }>(\n\t\tthis: TThis,\n\t\tvalue: unknown,\n\t): value is InstanceTypeRelaxed<TThis> & AnnotatedAllowedTypesInternal & AllowedTypesFull {\n\t\treturn ErasedTypeImplementation[Symbol.hasInstance].call(this, value);\n\t}\n\n\tpublic static override narrow<TThis extends { prototype: object }>(\n\t\tthis: TThis,\n\t\tvalue: ErasedBaseType | InstanceTypeRelaxed<TThis> | ImplicitAllowedTypes,\n\t): asserts value is InstanceTypeRelaxed<TThis> &\n\t\tAnnotatedAllowedTypesInternal &\n\t\tAllowedTypesFull {\n\t\tif (!ErasedTypeImplementation[Symbol.hasInstance].call(this, value)) {\n\t\t\tthrow new TypeError(\"Invalid AnnotatedAllowedTypes instance\");\n\t\t}\n\t}\n\n\tprivate static proxy<const T extends readonly AnnotatedAllowedType[]>(\n\t\tresult: AnnotatedAllowedTypesInternal<T>,\n\t): AnnotatedAllowedTypesInternal<T> & AllowedTypesFull<T> {\n\t\tconst proxy = new Proxy(result, {\n\t\t\tset: () => {\n\t\t\t\tthrow new UsageError(\"AnnotatedAllowedTypes is immutable\");\n\t\t\t},\n\n\t\t\tget: (target, property, receiver) => {\n\t\t\t\t// Hide common array editing methods.\n\t\t\t\tif (property === \"push\" || property === \"pop\") {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// Forward array lookup and array methods to the unannotated types array.\n\t\t\t\tif (property in target.unannotatedTypes) {\n\t\t\t\t\treturn Reflect.get(target.unannotatedTypes, property);\n\t\t\t\t}\n\t\t\t\t// Forward anything else to target.\n\t\t\t\treturn Reflect.get(target, property) as unknown;\n\t\t\t},\n\n\t\t\thas: (target, property) => {\n\t\t\t\tif (property in target.unannotatedTypes) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Forward anything else to target.\n\t\t\t\treturn property in target;\n\t\t\t},\n\n\t\t\townKeys: (target) => {\n\t\t\t\tconst targetKeys = Reflect.ownKeys(target);\n\t\t\t\tconst unannotatedTypesKeys = Reflect.ownKeys(target.unannotatedTypes);\n\t\t\t\treturn [...unannotatedTypesKeys, ...targetKeys];\n\t\t\t},\n\n\t\t\tgetOwnPropertyDescriptor: (target, property) => {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(target.unannotatedTypes, property)) {\n\t\t\t\t\tconst inner = Object.getOwnPropertyDescriptor(target.unannotatedTypes, property);\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...inner,\n\t\t\t\t\t\t// Since these properties are not on the target, make them non-configurable to confirm with proxy invariants.\n\t\t\t\t\t\tconfigurable: true,\n\t\t\t\t\t\twritable: false,\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tconst inner = Object.getOwnPropertyDescriptor(target, property);\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...inner,\n\t\t\t\t\t\twritable: false,\n\t\t\t\t\t\t// Allow only array entries to be enumerable.\n\t\t\t\t\t\tenumerable: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t\treturn proxy as typeof result & UnannotateAllowedTypesList<T>;\n\t}\n\n\tpublic static create<const T extends readonly AnnotatedAllowedType[]>(\n\t\ttypes: T,\n\t\tmetadata: AllowedTypesMetadata = {},\n\t): AnnotatedAllowedTypesInternal<Readonly<T>> & AllowedTypesFull<Readonly<T>> {\n\t\tconst result = new AnnotatedAllowedTypesInternal(types, metadata);\n\t\treturn result as typeof result & UnannotateAllowedTypesList<T>;\n\t}\n\n\tpublic static createUnannotated<const T extends AllowedTypes>(\n\t\ttypes: T,\n\t\tmetadata: AllowedTypesMetadata = {},\n\t): AnnotatedAllowedTypesInternal & Readonly<T> {\n\t\tObject.freeze(types);\n\t\tconst annotatedTypes: AnnotatedAllowedType[] = types.map(normalizeToAnnotatedAllowedType);\n\t\tconst result = AnnotatedAllowedTypesInternal.create(annotatedTypes, metadata);\n\t\treturn result as typeof result & T;\n\t}\n\n\tpublic static createMixed<\n\t\tconst T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n\t>(types: T, metadata: AllowedTypesMetadata = {}): AllowedTypesFullFromMixed<T> {\n\t\tObject.freeze(types);\n\t\tconst annotatedTypes: AnnotatedAllowedType[] = types.map(normalizeToAnnotatedAllowedType);\n\t\tconst result = AnnotatedAllowedTypesInternal.create(annotatedTypes, metadata);\n\t\treturn result as AllowedTypesFullFromMixed<T>;\n\t}\n}\n\n/**\n * Annotations that apply to a set of allowed types.\n * @remarks\n * Additional optionals may be added to this as non-breaking changes, so implementations of it should be simple object literals with no unlisted members.\n * @beta\n * @input\n */\nexport interface AllowedTypesMetadata {\n\t/**\n\t * User defined metadata\n\t */\n\treadonly custom?: unknown;\n}\n\n/**\n * Checks if the given allowed type is annotated with {@link AllowedTypeMetadata}.\n */\nexport function isAnnotatedAllowedType(\n\tallowedType: AnnotatedAllowedType | LazyItem<TreeNodeSchema>,\n): allowedType is AnnotatedAllowedType {\n\tcheckForUninitializedSchema(allowedType);\n\t// Class based schema, and lazy schema references report type \"function\": filtering them out with typeof makes narrowing based on members mostly safe\n\treturn typeof allowedType === \"object\" && \"metadata\" in allowedType && \"type\" in allowedType;\n}\n\n/**\n * Annotations that apply to an individual allowed type.\n * @remarks\n * Additional optionals may be added to this as non-breaking changes, so implementations of it should be simple object literals with no unlisted members.\n * @beta\n * @input\n */\nexport interface AllowedTypeMetadata {\n\t/**\n\t * User defined metadata\n\t */\n\treadonly custom?: unknown;\n\n\t/**\n\t * If defined, indicates that an allowed type is {@link SchemaStaticsBeta.staged | staged}.\n\t */\n\treadonly stagedSchemaUpgrade?: SchemaUpgrade;\n}\n\n/**\n * Package internal {@link SchemaUpgrade} construction API.\n */\nexport let createSchemaUpgrade: () => SchemaUpgrade;\n\n/**\n * Unique token used to upgrade schemas and determine if a particular upgrade has been completed.\n * @remarks\n * Create using {@link SchemaStaticsBeta.staged}.\n * @privateRemarks\n * TODO:#38722 implement runtime schema upgrades.\n * Until then, the class purely behaves mostly as a placeholder.\n * TODO: Consider allowing users to store a name for the upgrade to use in error messages.\n * @sealed @beta\n */\nexport class SchemaUpgrade {\n\tprotected _typeCheck!: MakeNominal;\n\tstatic {\n\t\tcreateSchemaUpgrade = () => new SchemaUpgrade();\n\t}\n\n\tprivate constructor() {}\n}\n\n/**\n * Types of {@link TreeNode|TreeNodes} or {@link TreeLeafValue|TreeLeafValues} allowed at a location in a tree.\n * @remarks\n * Used by {@link TreeViewConfiguration} for the root and various kinds of {@link TreeNodeSchema} to specify their allowed child types.\n *\n * Use {@link SchemaFactory} to access leaf schema or declare new composite schema.\n *\n * Implicitly treats a single type as an array of one type.\n *\n * Arrays of schema can be used to specify multiple types are allowed, which result in unions of those types in the Tree APIs.\n *\n * When saved into variables, avoid type-erasing the details, as doing so loses the compile time schema awareness of APIs derived from the types.\n *\n * When referring to types that are declared after the definition of the `ImplicitAllowedTypes`, the schema can be wrapped in a lambda to allow the forward reference.\n * See {@link ValidateRecursiveSchema} for details on how to structure the `ImplicitAllowedTypes` instances when constructing recursive schema.\n *\n * Code reading data from this should use {@link normalizeAllowedTypes} to ensure consistent handling, caching, nice errors etc.\n *\n * @example Explicit use with strong typing\n * ```typescript\n * const sf = new SchemaFactory(\"myScope\");\n * const childTypes = [sf.number, sf.string] as const satisfies ImplicitAllowedTypes;\n * const config = new TreeViewConfiguration({ schema: childTypes });\n * ```\n *\n * @example Forward reference\n * ```typescript\n * const sf = new SchemaFactory(\"myScope\");\n * class A extends sf.array(\"example\", [() => B]) {}\n * class B extends sf.array(\"Inner\", sf.number) {}\n * ```\n * @public\n */\nexport type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema;\n\n/**\n * Removes annotations from a list of allowed types that may contain annotations.\n * @system @beta\n */\nexport type UnannotateAllowedTypesList<\n\tT extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n> = {\n\t[I in keyof T]: T[I] extends AnnotatedAllowedType<infer X> ? X : T[I];\n};\n\n/**\n * Add annotations to a list of allowed types that may or may not contain annotations.\n * @system @beta\n */\nexport type AnnotateAllowedTypesList<\n\tT extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n> = {\n\t[I in keyof T]: T[I] extends AnnotatedAllowedType<unknown>\n\t\t? T[I]\n\t\t: AnnotatedAllowedType<T[I]>;\n};\n\n/**\n * Normalizes an {@link ImplicitAllowedTypes} to an {@link AllowedTypesFull}.\n * @alpha\n */\nexport function normalizeAllowedTypes(types: ImplicitAllowedTypes): AllowedTypesFull {\n\treturn normalizeAllowedTypesInternal(types);\n}\n\n/**\n * Normalizes an allowed type to an {@link AnnotatedAllowedType}, by adding empty annotations if they don't already exist.\n */\nexport function normalizeToAnnotatedAllowedType<T extends LazyItem<TreeNodeSchema>>(\n\ttype: T | AnnotatedAllowedType<T>,\n): AnnotatedAllowedType<T> {\n\treturn isAnnotatedAllowedType(type)\n\t\t? type\n\t\t: {\n\t\t\t\tmetadata: {},\n\t\t\t\ttype,\n\t\t\t};\n}\n\n/**\n * See note inside {@link normalizeAllowedTypesInternal}.\n */\nconst cachedNormalize = new WeakMap<ImplicitAllowedTypes, AllowedTypesFullInternal>();\n\n/**\n * Normalizes allowed types to an {@link AllowedTypesFullInternal}.\n */\nexport function normalizeAllowedTypesInternal(\n\ttype: ImplicitAllowedTypes,\n): AllowedTypesFullInternal {\n\tif (isAnnotatedAllowedTypes(type)) {\n\t\treturn type;\n\t}\n\n\t// This caching accomplishes two things:\n\t// 1. It avoids redundant computations for the same input.\n\t// 2. It provides a stable object identity for the output in case the input is normalized twice and other systems (such as unhydrated contexts) are cached based on the object identity of the output.\n\t// It is this second case which is the more important since creating the AnnotatedAllowedTypesInternal is rather cheap.\n\t// Adding this cache improved the performance of the \"large recursive union\" test (which mostly just constructs a TreeConfiguration) by ~5 times.\n\t// This cache is strictly a performance optimization: it is not required for correctness.\n\treturn getOrCreate(cachedNormalize, type, () => {\n\t\tconst inputArray = isReadonlyArray(type) ? type : [type];\n\t\tObject.freeze(inputArray);\n\t\tconst annotatedTypes: AnnotatedAllowedType[] = inputArray.map(\n\t\t\tnormalizeToAnnotatedAllowedType,\n\t\t);\n\n\t\treturn AnnotatedAllowedTypesInternal.create(annotatedTypes);\n\t});\n}\n\n/**\n * Normalizes an {@link ImplicitAllowedTypes} to an {@link AllowedTypesFullInternalEvaluated} by eagerly evaluating any\n * lazy schema declarations and adding empty metadata if it doesn't already exist.\n *\n * @remarks Note: this must only be called after all required schemas have been declared, otherwise evaluation of\n * recursive schemas may fail.\n */\nexport function normalizeAndEvaluateAnnotatedAllowedTypes(\n\ttypes: ImplicitAllowedTypes,\n): AllowedTypesFullInternalEvaluated {\n\treturn normalizeAllowedTypesInternal(types).evaluate();\n}\n\nconst cachedLazyItem = new WeakMap<() => unknown, unknown>();\n\n/**\n * Returns the schema referenced by the {@link LazyItem}.\n * @remarks\n * Caches results to handle {@link LazyItem}s which compute their resulting schema.\n * @alpha\n */\nexport function evaluateLazySchema<T extends TreeNodeSchema>(value: LazyItem<T>): T {\n\tconst evaluatedSchema = isLazy(value)\n\t\t? (getOrCreate(cachedLazyItem, value, value) as T)\n\t\t: value;\n\n\tcheckForUninitializedSchema(evaluatedSchema);\n\tmarkSchemaMostDerived(evaluatedSchema);\n\treturn evaluatedSchema;\n}\n\n/**\n * Throws a UsageError if the provided schema is undefined, most likely due to being used before it was initialized.\n */\nexport function checkForUninitializedSchema(\n\tschema: ImplicitAllowedTypes | LazyItem<TreeNodeSchema> | AnnotatedAllowedType,\n): void {\n\tif (schema === undefined) {\n\t\tthrow new UsageError(\n\t\t\t`Encountered an undefined schema. This could indicate that some referenced schema has not yet been instantiated. Consider using a lazy schema reference (like \"() => schema\") or delaying the evaluation of the lazy reference if one is already being used.`,\n\t\t);\n\t}\n}\n\n/**\n * Indicates that the provided schema is the \"most derived\" version in its class hierarchy.\n *\n * @param oneTimeInitialize - If true this runs {@link TreeNodeValid.oneTimeInitialize} which does even more initialization and validation.\n * `oneTimeInitialize` can't safely be run until all transitively referenced schema are defined, so which cases can safely use it are more limited.\n * When legal for the caller to set this to true, it is preferred, but it is often not safe due to possible forward references.\n * @remarks\n * See {@link MostDerivedData} and {@link SchemaFactory} for details on what a \"most derived\" schema is and why it matters.\n *\n * This is a helper for invoking {@link TreeNodeValid.markMostDerived} for {@link TreeNodeSchema}.\n *\n * Calling this helps with error messages about invalid schema usage (See {@link SchemaFactory} for the rules, some of which this helps validate).\n * Typically this should be called for each schema as early as practical to improve error reporting for invalid usages of schema\n * (using two different schema derived from the same {@link SchemaFactory} produced base class).\n *\n * Note that construction of actual {@link TreeNode} instances or use of a schema transitively in a {@link TreeViewConfiguration} already do this,\n * so any calls to this that is unconditionally after that point for the given schema is not needed.\n * Instead most usages of this should be from those cases, and from miscellaneous cases where a schema is passed into an public API where theoretically someone could accidentally\n * pass in a base class of a schema instead of the most derived one.\n */\nexport function markSchemaMostDerived(\n\tschema: TreeNodeSchema,\n\toneTimeInitialize = false,\n): void {\n\t// Leaf schema are not classes, and thus do not need to be marked as most derived.\n\tif (schema.kind === NodeKind.Leaf) {\n\t\treturn;\n\t}\n\n\tconst schemaValid = schemaAsTreeNodeValid(schema);\n\n\tif (oneTimeInitialize) {\n\t\tschemaValid.oneTimeInitialize();\n\t} else {\n\t\tschemaValid.markMostDerived();\n\t}\n}\n\n/**\n * Type of tree node for a field of the given schema.\n * @public\n */\nexport type TreeNodeFromImplicitAllowedTypes<\n\tTSchema extends ImplicitAllowedTypes = TreeNodeSchema,\n> = TSchema extends TreeNodeSchema\n\t? NodeFromSchema<TSchema>\n\t: TSchema extends AllowedTypes\n\t\t? NodeFromSchema<FlexListToUnion<TSchema>>\n\t\t: unknown;\n\n/**\n * This type exists only to be linked from documentation to provide a single linkable place to document some details of\n * \"Input\" types and how they handle schema.\n *\n * When a schema is used to describe data which is an input into an API, the API is {@link https://en.wikipedia.org/wiki/Type_variance | contravariant}) over the schema.\n * (See also {@link https://www.typescriptlang.org/docs/handbook/2/generics.html#variance-annotations | TypeScript Variance Annotations}).\n *\n * Since these schema are expressed using TypeScript types, it is possible for the user of the API to provide non-exact values of these types which has implications that depended on the variance.\n *\n * Consider a field with schema type of `A | B` (where A and B are types of schema).\n *\n * - Reading the field behaves covariantly so {@link NodeFromSchema} of `<A | B>` is the same as `NodeFromSchema<A> | NodeFromSchema<B>`, indicating that either type of node can be read from the field.\n *\n * - Writing to the field behaves contravariantly. Since it is unknown if the node actually has a schema `A` or a schema `B`, the only legal values (known to be in schema regardless of which schema the underlying node has) are values which are legal for both `A & B`.\n *\n * Note that this is distinct from the case where the schema is `[A, B]`.\n * In this case it is known that the field allows both A and B (the field can be set to an A or a B value).\n * When `A | B` is used, the field might allow\n * A but not B (so assigning a B value would be out of schema),\n * B but not A (so assigning an A value would be out of schema)\n * or both A and B.\n *\n * This gets more extreme when given completely unspecified schema.\n * For example if a field is just provided {@link ImplicitFieldSchema}, nothing is known about the content of the field.\n * This means that reading the field (via {@link TreeFieldFromImplicitField}) can give any valid tree field content,\n * but there are no safe values which could be written to the field (since it is unknown what values would be out of schema) so {@link InsertableTreeFieldFromImplicitField} gives `never`.\n *\n * To implement this variance correctly, the computation of types for input and output have to use separate utilities\n * which take very different approaches when encountering non-exact schema like unions or `ImplicitFieldSchema`.\n * The utilities which behave contravariantly (as required to handle input correctly) link this documentation to indicate that this is how they behave.\n *\n * In addition to behaving contravariantly, these input type computation utilities often have further limitations.\n * This is due to TypeScript making it difficult to implement this contravariance exactly.\n * When faced with these implementation limitations these contravariant type computation utilities error on the side of producing overly strict requirements.\n * For example in the above case of `A | B`, the utilities might compute an allowed insertable type as `never` even if there happens to be a common value accepted by both `A` and `B`.\n * Future versions of the API can relax these requirements as the type computations are made more accurate.\n *\n * For a more concrete example: if {@link InsertableTreeFieldFromImplicitField} produced `never` for a schema `A | OptionalField<A>`,\n * a future version could instead return a more flexible but still safe type, like `A`.\n *\n * More generally: try to avoid providing non-exact schema, especially for the fields of other schema.\n * While these APIs attempt to handle such cases correctly, there are limitations and known bugs in this handling.\n * Code using non-exact schema is much more likely to have its compilation break due to updates of this package or even TypeScript,\n * and thus compilation breaks due to edge cases of non-exact schema handling, especially with recursive schema, are not considered breaking changes.\n * This may change as the API become more stable.\n *\n * @privateRemarks\n * There likely is a better way to share this documentation, but none was found at the time of writing.\n *\n * TODO: Once {@link InsertableField} is public, consider using it in the examples above.\n * @system @public\n */\nexport type Input<T extends never> = T;\n\n/**\n * Type of content that can be inserted into the tree for a node of the given schema.\n *\n * @see {@link Input}\n *\n * @typeparam TSchema - Schema to process.\n *\n * @privateRemarks\n * This is a bit overly conservative, since cases like `A | [A]` give never and could give `A`.\n * @public\n */\nexport type InsertableTreeNodeFromImplicitAllowedTypes<TSchema extends ImplicitAllowedTypes> =\n\t[TSchema] extends [TreeNodeSchema]\n\t\t? InsertableTypedNode<TSchema>\n\t\t: [TSchema] extends [AllowedTypes]\n\t\t\t? InsertableTreeNodeFromAllowedTypes<TSchema>\n\t\t\t: never;\n\n/**\n * Type of content that can be inserted into the tree for a node of the given schema.\n *\n * @see {@link Input}\n *\n * @typeparam TList - AllowedTypes to process\n *\n * @privateRemarks\n * This loop is non-recursive to allow larger unions before hitting the recursion limit in TypeScript.\n * @system @public\n */\nexport type InsertableTreeNodeFromAllowedTypes<TList extends AllowedTypes> =\n\tIsUnion<TList> extends true\n\t\t? never\n\t\t: {\n\t\t\t\treadonly [Property in keyof TList]: [TList[Property]] extends [\n\t\t\t\t\tLazyItem<infer TSchema extends TreeNodeSchema>,\n\t\t\t\t]\n\t\t\t\t\t? InsertableTypedNode<TSchema>\n\t\t\t\t\t: never;\n\t\t\t}[NumberKeys<TList>];\n\n/**\n * Extracts the keys of `T` which are numbers.\n * @remarks\n * The keys are extracted as strings which can be used to index `T`.\n *\n * This handles cases like `{ x: 4 } & [5, 6]` returning `\"0\"` and `\"1\"`.\n * Such cases are difficult to handle since `keyof` includes `number` in such cases, but the type can not be indexed by `number`.\n * @system @public\n */\nexport type NumberKeys<\n\tT,\n\tTransformed = {\n\t\treadonly [Property in keyof T as number extends Property ? never : Property]: Property;\n\t},\n> = Transformed[`${number}` & keyof Transformed];\n"]}
|
|
1
|
+
{"version":3,"file":"allowedTypes.js","sourceRoot":"","sources":["../../../src/simple-tree/core/allowedTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE3D,OAAO,EAEN,wBAAwB,GACxB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACN,WAAW,EACX,eAAe,GAGf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAuC,MAAM,eAAe,CAAC;AAC5E,OAAO,EACN,QAAQ,GAIR,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AA4D3D;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACtC,YAAkC;IAElC,2BAA2B,CAAC,YAAY,CAAC,CAAC;IAC1C,OAAO,YAAY,YAAY,6BAA6B,CAAC;AAC9D,CAAC;AAiFD;;;;;GAKG;AACH,MAAM,OAAO,6BAG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AAM,CAAC,CAAC;IAElD,IAAI,iBAAiB,EAAE,CAAC;QACvB,WAAW,CAAC,iBAAiB,EAAE,CAAC;IACjC,CAAC;SAAM,CAAC;QACP,WAAW,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { Lazy } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ErasedBaseType,\n\tErasedTypeImplementation,\n} from \"@fluidframework/core-interfaces/internal\";\n\nimport {\n\tgetOrCreate,\n\tisReadonlyArray,\n\ttype IsUnion,\n\ttype MakeNominal,\n} from \"../../util/index.js\";\nimport { isLazy, type FlexListToUnion, type LazyItem } from \"./flexList.js\";\nimport {\n\tNodeKind,\n\ttype InsertableTypedNode,\n\ttype NodeFromSchema,\n\ttype TreeNodeSchema,\n} from \"./treeNodeSchema.js\";\nimport { schemaAsTreeNodeValid } from \"./treeNodeValid.js\";\nimport type { SchemaType, SimpleAllowedTypeAttributes } from \"../simpleSchema.js\";\n\n/**\n * Schema for types allowed in some location in a tree (like a field, map entry or array).\n * @remarks\n * Type constraint used in schema declaration APIs.\n *\n * The order of types in the array is not significant.\n * Additionally, it is legal for users of this type to have the runtime and compile time order of items within this array not match.\n * Therefor to ensure type safety, these arrays should not be indexed, and instead just be iterated.\n *\n * Ideally this restriction would be modeled in the type itself, but it is not ergonomic to do so as there is no easy (when compared to arrays)\n * way to declare and manipulate unordered sets of types in TypeScript.\n *\n * Duplicate entries in this array are not allowed and will produce runtime errors.\n * Duplicate types are allowed,\n * but this must only be reflected in the type and not the runtime values.\n * This duplication can be used to encode the typing when the number of items in the array is not known at compile time\n * but some of the items are known to be present unconditionally.\n * For example, typing `[typeof A] | [typeof A, typeof B]` as `[typeof A, typeof B | typeof A]` is allowed,\n * and can produce more useful {@link Input} types.\n *\n * Due to one implementation of this being {@link AllowedTypesFull}, it is not safe to assume this is an array (as determined by `Array.isArray`).\n *\n * Code reading data from this should use {@link normalizeAllowedTypes} to ensure consistent handling, caching, nice errors etc.\n * @system @public\n */\nexport type AllowedTypes = readonly LazyItem<TreeNodeSchema>[];\n\n/**\n * Stores annotations for an individual allowed type.\n * @remarks\n * Create using APIs on {@link SchemaStaticsBeta}, like {@link SchemaStaticsBeta.staged}.\n * @privateRemarks\n * Since this is sealed, users are not supposed to create instances of it directly.\n * Making it extend ErasedType could enforce that.\n * @beta\n * @sealed\n */\nexport interface AnnotatedAllowedType<T = LazyItem<TreeNodeSchema>> {\n\t/**\n\t * Annotations for the allowed type.\n\t */\n\treadonly metadata: AllowedTypeMetadata;\n\t/**\n\t * The allowed type the annotations apply to in a particular schema.\n\t */\n\treadonly type: T;\n}\n\n/**\n * {@link AllowedTypesFull} but with the lazy schema references eagerly evaluated.\n * @sealed\n * @beta\n */\nexport type AllowedTypesFullEvaluated = AllowedTypesFull<\n\treadonly AnnotatedAllowedType<TreeNodeSchema>[]\n>;\n\n/**\n * Checks if the input is an {@link AnnotatedAllowedTypes}.\n */\nexport function isAnnotatedAllowedTypes(\n\tallowedTypes: ImplicitAllowedTypes,\n): allowedTypes is AllowedTypesFullInternal {\n\tcheckForUninitializedSchema(allowedTypes);\n\treturn allowedTypes instanceof AnnotatedAllowedTypesInternal;\n}\n\n/**\n * Stores annotations for a set of allowed types.\n * @beta\n * @sealed\n */\nexport interface AnnotatedAllowedTypes<T = readonly AnnotatedAllowedType[]>\n\textends ErasedBaseType<\"tree.AnnotatedAllowedTypes\"> {\n\t/**\n\t * Annotations that apply to a set of allowed types.\n\t */\n\treadonly metadata: AllowedTypesMetadata;\n\n\t/**\n\t * All the allowed types that the annotations apply to. The types themselves may also have individual annotations.\n\t */\n\treadonly types: T;\n\n\t/**\n\t * Get this {@link AnnotatedAllowedTypes} but with any lazy schema references eagerly evaluated.\n\t * @remarks\n\t * See {@link evaluateLazySchema} the implications of evaluating lazy schema references.\n\t */\n\tevaluate(): AllowedTypesFullEvaluated;\n\n\t/**\n\t * Get the allowed types as a set with any lazy schema references eagerly evaluated.\n\t * @remarks\n\t * See {@link evaluateLazySchema} the implications of evaluating lazy schema references.\n\t */\n\tevaluateSet(): ReadonlySet<TreeNodeSchema>;\n\n\t/**\n\t * Get the allowed types as a set of identifiers with any lazy schema references eagerly evaluated.\n\t * @remarks\n\t * See {@link evaluateLazySchema} the implications of evaluating lazy schema references.\n\t *\n\t * It is recommend to work in terms of {@link TreeNodeSchema}\n\t * rather than identifiers where possible since its more type safe and it is possible that two schema with the same identifier exist.\n\t */\n\tevaluateIdentifiers(): ReadonlySet<string>;\n}\n\n/**\n * Stores annotations for a set of allowed types.\n * @remarks\n * Most expressive form of AllowedTypes which any of the implicit types can be normalized to.\n * @beta\n * @sealed\n */\nexport type AllowedTypesFull<\n\tT extends readonly AnnotatedAllowedType[] = readonly AnnotatedAllowedType[],\n> = AnnotatedAllowedTypes<T> & UnannotateAllowedTypesList<T>;\n\n/**\n * Creates an {@link AllowedTypesFull} type from a mixed array of annotated and unannotated allowed types.\n * @system @sealed @beta\n */\nexport type AllowedTypesFullFromMixed<\n\tT extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n> = UnannotateAllowedTypesList<T> & AnnotatedAllowedTypes<AnnotateAllowedTypesList<T>>;\n\n/**\n * The same as the built-in InstanceType, but works on classes with private constructors.\n * @privateRemarks\n * This is based on the trick in {@link https://stackoverflow.com/a/74657881}.\n */\ntype InstanceTypeRelaxed<TClass> = InstanceType<(new () => never) & TClass>;\n\n/**\n * {@link AllowedTypesFull} but with internal types.\n */\nexport type AllowedTypesFullInternal<\n\tT extends readonly AnnotatedAllowedType[] = readonly AnnotatedAllowedType[],\n> = AnnotatedAllowedTypesInternal<T> & UnannotateAllowedTypesList<T>;\n\ntype AllowedTypesFullInternalEvaluated = AllowedTypesFullInternal<\n\treadonly AnnotatedAllowedType<TreeNodeSchema>[]\n>;\n\n/**\n * The implementation of {@link AnnotatedAllowedTypes}. Also implements {@link AllowedTypesFull}.\n * @remarks\n * Due to TypeScript limitations, this class cannot directly state it implements {@link AllowedTypesFull}.\n * As a workaround for that, the static `create` method returns the intersection type.\n */\nexport class AnnotatedAllowedTypesInternal<\n\t\tT extends readonly AnnotatedAllowedType[] = readonly AnnotatedAllowedType[],\n\t>\n\textends ErasedTypeImplementation<AnnotatedAllowedTypes<T>>\n\timplements AnnotatedAllowedTypes<T>\n{\n\tpublic readonly unannotatedTypes: UnannotateAllowedTypesList<T>;\n\n\t/**\n\t * True if and only if there is at least one lazy schema reference in the types arrays.\n\t */\n\tprivate readonly isLazy: boolean;\n\n\tprivate readonly lazyEvaluate: Lazy<{\n\t\treadonly annotated: AllowedTypesFullInternalEvaluated;\n\t\treadonly set: ReadonlySet<TreeNodeSchema>;\n\t\treadonly identifiers: ReadonlySet<string>;\n\t}>;\n\n\tprivate constructor(\n\t\tpublic readonly types: T,\n\t\tpublic readonly metadata: AllowedTypesMetadata = {},\n\t) {\n\t\tsuper();\n\t\tthis.unannotatedTypes = types.map((type) => type.type) as typeof this.unannotatedTypes;\n\n\t\t// Since the array has been copied, mutations to it will not be handled correctly so freeze it.\n\t\t// Support for such mutations could be added at a later date by making more things lazy.\n\t\tObject.freeze(this.types);\n\t\tObject.freeze(this.unannotatedTypes);\n\n\t\tthis.isLazy = false;\n\t\tfor (const type of this.unannotatedTypes) {\n\t\t\tif (isLazy(type)) {\n\t\t\t\tthis.isLazy = true;\n\t\t\t} else {\n\t\t\t\tmarkSchemaMostDerived(type);\n\t\t\t}\n\t\t}\n\n\t\tconst proxy = AnnotatedAllowedTypesInternal.proxy(this);\n\n\t\tthis.lazyEvaluate = new Lazy(() => {\n\t\t\tconst annotated = this.isLazy\n\t\t\t\t? AnnotatedAllowedTypesInternal.create(\n\t\t\t\t\t\tthis.types.map((type) => ({\n\t\t\t\t\t\t\t...type,\n\t\t\t\t\t\t\ttype: evaluateLazySchema(type.type),\n\t\t\t\t\t\t})),\n\t\t\t\t\t\tthis.metadata,\n\t\t\t\t\t)\n\t\t\t\t: (proxy as AllowedTypesFullInternalEvaluated);\n\t\t\treturn {\n\t\t\t\tannotated,\n\t\t\t\tset: new Set(annotated.unannotatedTypes),\n\t\t\t\tidentifiers: new Set(annotated.unannotatedTypes.map((t) => t.identifier)),\n\t\t\t};\n\t\t});\n\n\t\treturn proxy;\n\t}\n\n\tpublic evaluate(): AllowedTypesFullInternalEvaluated {\n\t\treturn this.lazyEvaluate.value.annotated;\n\t}\n\n\tpublic evaluateSet(): ReadonlySet<TreeNodeSchema> {\n\t\treturn this.lazyEvaluate.value.set;\n\t}\n\n\tpublic evaluateIdentifiers(): ReadonlySet<string> {\n\t\treturn this.lazyEvaluate.value.identifiers;\n\t}\n\n\t/**\n\t * Get the {@link SimpleAllowedTypeAttributes} version of the allowed types set.\n\t */\n\tpublic static evaluateSimpleAllowedTypes(\n\t\tannotatedAllowedTypes: AnnotatedAllowedTypes,\n\t): ReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.View>> {\n\t\tconst simpleAllowedTypes = new Map<string, SimpleAllowedTypeAttributes<SchemaType.View>>();\n\t\tfor (const type of annotatedAllowedTypes.evaluate().types) {\n\t\t\tsimpleAllowedTypes.set(type.type.identifier, {\n\t\t\t\tisStaged: type.metadata.stagedSchemaUpgrade ?? false,\n\t\t\t});\n\t\t}\n\t\treturn simpleAllowedTypes;\n\t}\n\n\tpublic static override [Symbol.hasInstance]<TThis extends { prototype: object }>(\n\t\tthis: TThis,\n\t\tvalue: unknown,\n\t): value is InstanceTypeRelaxed<TThis> & AnnotatedAllowedTypesInternal & AllowedTypesFull {\n\t\treturn ErasedTypeImplementation[Symbol.hasInstance].call(this, value);\n\t}\n\n\tpublic static override narrow<TThis extends { prototype: object }>(\n\t\tthis: TThis,\n\t\tvalue: ErasedBaseType | InstanceTypeRelaxed<TThis> | ImplicitAllowedTypes,\n\t): asserts value is InstanceTypeRelaxed<TThis> &\n\t\tAnnotatedAllowedTypesInternal &\n\t\tAllowedTypesFull {\n\t\tif (!ErasedTypeImplementation[Symbol.hasInstance].call(this, value)) {\n\t\t\tthrow new TypeError(\"Invalid AnnotatedAllowedTypes instance\");\n\t\t}\n\t}\n\n\tprivate static proxy<const T extends readonly AnnotatedAllowedType[]>(\n\t\tresult: AnnotatedAllowedTypesInternal<T>,\n\t): AnnotatedAllowedTypesInternal<T> & AllowedTypesFull<T> {\n\t\tconst proxy = new Proxy(result, {\n\t\t\tset: () => {\n\t\t\t\tthrow new UsageError(\"AnnotatedAllowedTypes is immutable\");\n\t\t\t},\n\n\t\t\tget: (target, property, receiver) => {\n\t\t\t\t// Hide common array editing methods.\n\t\t\t\tif (property === \"push\" || property === \"pop\") {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// Forward array lookup and array methods to the unannotated types array.\n\t\t\t\tif (property in target.unannotatedTypes) {\n\t\t\t\t\treturn Reflect.get(target.unannotatedTypes, property);\n\t\t\t\t}\n\t\t\t\t// Forward anything else to target.\n\t\t\t\treturn Reflect.get(target, property) as unknown;\n\t\t\t},\n\n\t\t\thas: (target, property) => {\n\t\t\t\tif (property in target.unannotatedTypes) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Forward anything else to target.\n\t\t\t\treturn property in target;\n\t\t\t},\n\n\t\t\townKeys: (target) => {\n\t\t\t\tconst targetKeys = Reflect.ownKeys(target);\n\t\t\t\tconst unannotatedTypesKeys = Reflect.ownKeys(target.unannotatedTypes);\n\t\t\t\treturn [...unannotatedTypesKeys, ...targetKeys];\n\t\t\t},\n\n\t\t\tgetOwnPropertyDescriptor: (target, property) => {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(target.unannotatedTypes, property)) {\n\t\t\t\t\tconst inner = Object.getOwnPropertyDescriptor(target.unannotatedTypes, property);\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...inner,\n\t\t\t\t\t\t// Since these properties are not on the target, make them non-configurable to confirm with proxy invariants.\n\t\t\t\t\t\tconfigurable: true,\n\t\t\t\t\t\twritable: false,\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tconst inner = Object.getOwnPropertyDescriptor(target, property);\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...inner,\n\t\t\t\t\t\twritable: false,\n\t\t\t\t\t\t// Allow only array entries to be enumerable.\n\t\t\t\t\t\tenumerable: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t\treturn proxy as typeof result & UnannotateAllowedTypesList<T>;\n\t}\n\n\tpublic static create<const T extends readonly AnnotatedAllowedType[]>(\n\t\ttypes: T,\n\t\tmetadata: AllowedTypesMetadata = {},\n\t): AnnotatedAllowedTypesInternal<Readonly<T>> & AllowedTypesFull<Readonly<T>> {\n\t\tconst result = new AnnotatedAllowedTypesInternal(types, metadata);\n\t\treturn result as typeof result & UnannotateAllowedTypesList<T>;\n\t}\n\n\tpublic static createUnannotated<const T extends AllowedTypes>(\n\t\ttypes: T,\n\t\tmetadata: AllowedTypesMetadata = {},\n\t): AnnotatedAllowedTypesInternal & Readonly<T> {\n\t\tObject.freeze(types);\n\t\tconst annotatedTypes: AnnotatedAllowedType[] = types.map(normalizeToAnnotatedAllowedType);\n\t\tconst result = AnnotatedAllowedTypesInternal.create(annotatedTypes, metadata);\n\t\treturn result as typeof result & T;\n\t}\n\n\tpublic static createMixed<\n\t\tconst T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n\t>(types: T, metadata: AllowedTypesMetadata = {}): AllowedTypesFullFromMixed<T> {\n\t\tObject.freeze(types);\n\t\tconst annotatedTypes: AnnotatedAllowedType[] = types.map(normalizeToAnnotatedAllowedType);\n\t\tconst result = AnnotatedAllowedTypesInternal.create(annotatedTypes, metadata);\n\t\treturn result as AllowedTypesFullFromMixed<T>;\n\t}\n}\n\n/**\n * Annotations that apply to a set of allowed types.\n * @remarks\n * Additional optionals may be added to this as non-breaking changes, so implementations of it should be simple object literals with no unlisted members.\n * @beta\n * @input\n */\nexport interface AllowedTypesMetadata {\n\t/**\n\t * User defined metadata\n\t */\n\treadonly custom?: unknown;\n}\n\n/**\n * Checks if the given allowed type is annotated with {@link AllowedTypeMetadata}.\n */\nexport function isAnnotatedAllowedType(\n\tallowedType: AnnotatedAllowedType | LazyItem<TreeNodeSchema>,\n): allowedType is AnnotatedAllowedType {\n\tcheckForUninitializedSchema(allowedType);\n\t// Class based schema, and lazy schema references report type \"function\": filtering them out with typeof makes narrowing based on members mostly safe\n\treturn typeof allowedType === \"object\" && \"metadata\" in allowedType && \"type\" in allowedType;\n}\n\n/**\n * Annotations that apply to an individual allowed type.\n * @remarks\n * Additional optionals may be added to this as non-breaking changes, so implementations of it should be simple object literals with no unlisted members.\n * @beta\n * @input\n */\nexport interface AllowedTypeMetadata {\n\t/**\n\t * User defined metadata\n\t */\n\treadonly custom?: unknown;\n\n\t/**\n\t * If defined, indicates that an allowed type is {@link SchemaStaticsBeta.staged | staged}.\n\t */\n\treadonly stagedSchemaUpgrade?: SchemaUpgrade;\n}\n\n/**\n * Package internal {@link SchemaUpgrade} construction API.\n */\nexport let createSchemaUpgrade: () => SchemaUpgrade;\n\n/**\n * Unique token used to upgrade schemas and determine if a particular upgrade has been completed.\n * @remarks\n * Create using {@link SchemaStaticsBeta.staged}.\n * @privateRemarks\n * TODO:#38722 implement runtime schema upgrades.\n * Until then, the class purely behaves mostly as a placeholder.\n * TODO: Consider allowing users to store a name for the upgrade to use in error messages.\n * @sealed @beta\n */\nexport class SchemaUpgrade {\n\tprotected _typeCheck!: MakeNominal;\n\tstatic {\n\t\tcreateSchemaUpgrade = () => new SchemaUpgrade();\n\t}\n\n\tprivate constructor() {}\n}\n\n/**\n * Types of {@link TreeNode|TreeNodes} or {@link TreeLeafValue|TreeLeafValues} allowed at a location in a tree.\n * @remarks\n * Used by {@link TreeViewConfiguration} for the root and various kinds of {@link TreeNodeSchema} to specify their allowed child types.\n *\n * Use {@link SchemaFactory} to access leaf schema or declare new composite schema.\n *\n * Implicitly treats a single type as an array of one type.\n *\n * Arrays of schema can be used to specify multiple types are allowed, which result in unions of those types in the Tree APIs.\n *\n * When saved into variables, avoid type-erasing the details, as doing so loses the compile time schema awareness of APIs derived from the types.\n *\n * When referring to types that are declared after the definition of the `ImplicitAllowedTypes`, the schema can be wrapped in a lambda to allow the forward reference.\n * See {@link ValidateRecursiveSchema} for details on how to structure the `ImplicitAllowedTypes` instances when constructing recursive schema.\n *\n * Code reading data from this should use {@link normalizeAllowedTypes} to ensure consistent handling, caching, nice errors etc.\n *\n * @example Explicit use with strong typing\n * ```typescript\n * const sf = new SchemaFactory(\"myScope\");\n * const childTypes = [sf.number, sf.string] as const satisfies ImplicitAllowedTypes;\n * const config = new TreeViewConfiguration({ schema: childTypes });\n * ```\n *\n * @example Forward reference\n * ```typescript\n * const sf = new SchemaFactory(\"myScope\");\n * class A extends sf.array(\"example\", [() => B]) {}\n * class B extends sf.array(\"Inner\", sf.number) {}\n * ```\n * @public\n */\nexport type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema;\n\n/**\n * Removes annotations from a list of allowed types that may contain annotations.\n * @system @beta\n */\nexport type UnannotateAllowedTypesList<\n\tT extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n> = {\n\t[I in keyof T]: T[I] extends AnnotatedAllowedType<infer X> ? X : T[I];\n};\n\n/**\n * Add annotations to a list of allowed types that may or may not contain annotations.\n * @system @beta\n */\nexport type AnnotateAllowedTypesList<\n\tT extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n> = {\n\t[I in keyof T]: T[I] extends AnnotatedAllowedType<unknown>\n\t\t? T[I]\n\t\t: AnnotatedAllowedType<T[I]>;\n};\n\n/**\n * Normalizes an {@link ImplicitAllowedTypes} to an {@link AllowedTypesFull}.\n * @alpha\n */\nexport function normalizeAllowedTypes(types: ImplicitAllowedTypes): AllowedTypesFull {\n\treturn normalizeAllowedTypesInternal(types);\n}\n\n/**\n * Normalizes an allowed type to an {@link AnnotatedAllowedType}, by adding empty annotations if they don't already exist.\n */\nexport function normalizeToAnnotatedAllowedType<T extends LazyItem<TreeNodeSchema>>(\n\ttype: T | AnnotatedAllowedType<T>,\n): AnnotatedAllowedType<T> {\n\treturn isAnnotatedAllowedType(type)\n\t\t? type\n\t\t: {\n\t\t\t\tmetadata: {},\n\t\t\t\ttype,\n\t\t\t};\n}\n\n/**\n * See note inside {@link normalizeAllowedTypesInternal}.\n */\nconst cachedNormalize = new WeakMap<ImplicitAllowedTypes, AllowedTypesFullInternal>();\n\n/**\n * Normalizes allowed types to an {@link AllowedTypesFullInternal}.\n */\nexport function normalizeAllowedTypesInternal(\n\ttype: ImplicitAllowedTypes,\n): AllowedTypesFullInternal {\n\tif (isAnnotatedAllowedTypes(type)) {\n\t\treturn type;\n\t}\n\n\t// This caching accomplishes two things:\n\t// 1. It avoids redundant computations for the same input.\n\t// 2. It provides a stable object identity for the output in case the input is normalized twice and other systems (such as unhydrated contexts) are cached based on the object identity of the output.\n\t// It is this second case which is the more important since creating the AnnotatedAllowedTypesInternal is rather cheap.\n\t// Adding this cache improved the performance of the \"large recursive union\" test (which mostly just constructs a TreeConfiguration) by ~5 times.\n\t// This cache is strictly a performance optimization: it is not required for correctness.\n\treturn getOrCreate(cachedNormalize, type, () => {\n\t\tconst inputArray = isReadonlyArray(type) ? type : [type];\n\t\tObject.freeze(inputArray);\n\t\tconst annotatedTypes: AnnotatedAllowedType[] = inputArray.map(\n\t\t\tnormalizeToAnnotatedAllowedType,\n\t\t);\n\n\t\treturn AnnotatedAllowedTypesInternal.create(annotatedTypes);\n\t});\n}\n\n/**\n * Normalizes an {@link ImplicitAllowedTypes} to an {@link AllowedTypesFullInternalEvaluated} by eagerly evaluating any\n * lazy schema declarations and adding empty metadata if it doesn't already exist.\n *\n * @remarks Note: this must only be called after all required schemas have been declared, otherwise evaluation of\n * recursive schemas may fail.\n */\nexport function normalizeAndEvaluateAnnotatedAllowedTypes(\n\ttypes: ImplicitAllowedTypes,\n): AllowedTypesFullInternalEvaluated {\n\treturn normalizeAllowedTypesInternal(types).evaluate();\n}\n\nconst cachedLazyItem = new WeakMap<() => unknown, unknown>();\n\n/**\n * Returns the schema referenced by the {@link LazyItem}.\n * @remarks\n * Caches results to handle {@link LazyItem}s which compute their resulting schema.\n * @alpha\n */\nexport function evaluateLazySchema<T extends TreeNodeSchema>(value: LazyItem<T>): T {\n\tconst evaluatedSchema = isLazy(value)\n\t\t? (getOrCreate(cachedLazyItem, value, value) as T)\n\t\t: value;\n\n\tcheckForUninitializedSchema(evaluatedSchema);\n\tmarkSchemaMostDerived(evaluatedSchema);\n\treturn evaluatedSchema;\n}\n\n/**\n * Throws a UsageError if the provided schema is undefined, most likely due to being used before it was initialized.\n */\nexport function checkForUninitializedSchema(\n\tschema: ImplicitAllowedTypes | LazyItem<TreeNodeSchema> | AnnotatedAllowedType,\n): void {\n\tif (schema === undefined) {\n\t\tthrow new UsageError(\n\t\t\t`Encountered an undefined schema. This could indicate that some referenced schema has not yet been instantiated. Consider using a lazy schema reference (like \"() => schema\") or delaying the evaluation of the lazy reference if one is already being used.`,\n\t\t);\n\t}\n}\n\n/**\n * Indicates that the provided schema is the \"most derived\" version in its class hierarchy.\n *\n * @param oneTimeInitialize - If true this runs {@link TreeNodeValid.oneTimeInitialize} which does even more initialization and validation.\n * `oneTimeInitialize` can't safely be run until all transitively referenced schema are defined, so which cases can safely use it are more limited.\n * When legal for the caller to set this to true, it is preferred, but it is often not safe due to possible forward references.\n * @remarks\n * See {@link MostDerivedData} and {@link SchemaFactory} for details on what a \"most derived\" schema is and why it matters.\n *\n * This is a helper for invoking {@link TreeNodeValid.markMostDerived} for {@link TreeNodeSchema}.\n *\n * Calling this helps with error messages about invalid schema usage (See {@link SchemaFactory} for the rules, some of which this helps validate).\n * Typically this should be called for each schema as early as practical to improve error reporting for invalid usages of schema\n * (using two different schema derived from the same {@link SchemaFactory} produced base class).\n *\n * Note that construction of actual {@link TreeNode} instances or use of a schema transitively in a {@link TreeViewConfiguration} already do this,\n * so any calls to this that is unconditionally after that point for the given schema is not needed.\n * Instead most usages of this should be from those cases, and from miscellaneous cases where a schema is passed into an public API where theoretically someone could accidentally\n * pass in a base class of a schema instead of the most derived one.\n */\nexport function markSchemaMostDerived(\n\tschema: TreeNodeSchema,\n\toneTimeInitialize = false,\n): void {\n\t// Leaf schema are not classes, and thus do not need to be marked as most derived.\n\tif (schema.kind === NodeKind.Leaf) {\n\t\treturn;\n\t}\n\n\tconst schemaValid = schemaAsTreeNodeValid(schema);\n\n\tif (oneTimeInitialize) {\n\t\tschemaValid.oneTimeInitialize();\n\t} else {\n\t\tschemaValid.markMostDerived();\n\t}\n}\n\n/**\n * Type of tree node for a field of the given schema.\n * @public\n */\nexport type TreeNodeFromImplicitAllowedTypes<\n\tTSchema extends ImplicitAllowedTypes = TreeNodeSchema,\n> = TSchema extends TreeNodeSchema\n\t? NodeFromSchema<TSchema>\n\t: TSchema extends AllowedTypes\n\t\t? NodeFromSchema<FlexListToUnion<TSchema>>\n\t\t: unknown;\n\n/**\n * This type exists only to be linked from documentation to provide a single linkable place to document some details of\n * \"Input\" types and how they handle schema.\n *\n * When a schema is used to describe data which is an input into an API, the API is {@link https://en.wikipedia.org/wiki/Type_variance | contravariant}) over the schema.\n * (See also {@link https://www.typescriptlang.org/docs/handbook/2/generics.html#variance-annotations | TypeScript Variance Annotations}).\n *\n * Since these schema are expressed using TypeScript types, it is possible for the user of the API to provide non-exact values of these types which has implications that depended on the variance.\n *\n * Consider a field with schema type of `A | B` (where A and B are types of schema).\n *\n * - Reading the field behaves covariantly so {@link NodeFromSchema} of `<A | B>` is the same as `NodeFromSchema<A> | NodeFromSchema<B>`, indicating that either type of node can be read from the field.\n *\n * - Writing to the field behaves contravariantly. Since it is unknown if the node actually has a schema `A` or a schema `B`, the only legal values (known to be in schema regardless of which schema the underlying node has) are values which are legal for both `A & B`.\n *\n * Note that this is distinct from the case where the schema is `[A, B]`.\n * In this case it is known that the field allows both A and B (the field can be set to an A or a B value).\n * When `A | B` is used, the field might allow\n * A but not B (so assigning a B value would be out of schema),\n * B but not A (so assigning an A value would be out of schema)\n * or both A and B.\n *\n * This gets more extreme when given completely unspecified schema.\n * For example if a field is just provided {@link ImplicitFieldSchema}, nothing is known about the content of the field.\n * This means that reading the field (via {@link TreeFieldFromImplicitField}) can give any valid tree field content,\n * but there are no safe values which could be written to the field (since it is unknown what values would be out of schema) so {@link InsertableTreeFieldFromImplicitField} gives `never`.\n *\n * To implement this variance correctly, the computation of types for input and output have to use separate utilities\n * which take very different approaches when encountering non-exact schema like unions or `ImplicitFieldSchema`.\n * The utilities which behave contravariantly (as required to handle input correctly) link this documentation to indicate that this is how they behave.\n *\n * In addition to behaving contravariantly, these input type computation utilities often have further limitations.\n * This is due to TypeScript making it difficult to implement this contravariance exactly.\n * When faced with these implementation limitations these contravariant type computation utilities error on the side of producing overly strict requirements.\n * For example in the above case of `A | B`, the utilities might compute an allowed insertable type as `never` even if there happens to be a common value accepted by both `A` and `B`.\n * Future versions of the API can relax these requirements as the type computations are made more accurate.\n *\n * For a more concrete example: if {@link InsertableTreeFieldFromImplicitField} produced `never` for a schema `A | OptionalField<A>`,\n * a future version could instead return a more flexible but still safe type, like `A`.\n *\n * More generally: try to avoid providing non-exact schema, especially for the fields of other schema.\n * While these APIs attempt to handle such cases correctly, there are limitations and known bugs in this handling.\n * Code using non-exact schema is much more likely to have its compilation break due to updates of this package or even TypeScript,\n * and thus compilation breaks due to edge cases of non-exact schema handling, especially with recursive schema, are not considered breaking changes.\n * This may change as the API become more stable.\n *\n * @privateRemarks\n * There likely is a better way to share this documentation, but none was found at the time of writing.\n *\n * TODO: Once {@link InsertableField} is public, consider using it in the examples above.\n * @system @public\n */\nexport type Input<T extends never> = T;\n\n/**\n * Type of content that can be inserted into the tree for a node of the given schema.\n *\n * @see {@link Input}\n *\n * @typeparam TSchema - Schema to process.\n *\n * @privateRemarks\n * This is a bit overly conservative, since cases like `A | [A]` give never and could give `A`.\n * @public\n */\nexport type InsertableTreeNodeFromImplicitAllowedTypes<TSchema extends ImplicitAllowedTypes> =\n\t[TSchema] extends [TreeNodeSchema]\n\t\t? InsertableTypedNode<TSchema>\n\t\t: [TSchema] extends [AllowedTypes]\n\t\t\t? InsertableTreeNodeFromAllowedTypes<TSchema>\n\t\t\t: never;\n\n/**\n * Type of content that can be inserted into the tree for a node of the given schema.\n *\n * @see {@link Input}\n *\n * @typeparam TList - AllowedTypes to process\n *\n * @privateRemarks\n * This loop is non-recursive to allow larger unions before hitting the recursion limit in TypeScript.\n * @system @public\n */\nexport type InsertableTreeNodeFromAllowedTypes<TList extends AllowedTypes> =\n\tIsUnion<TList> extends true\n\t\t? never\n\t\t: {\n\t\t\t\treadonly [Property in keyof TList]: [TList[Property]] extends [\n\t\t\t\t\tLazyItem<infer TSchema extends TreeNodeSchema>,\n\t\t\t\t]\n\t\t\t\t\t? InsertableTypedNode<TSchema>\n\t\t\t\t\t: never;\n\t\t\t}[NumberKeys<TList>];\n\n/**\n * Extracts the keys of `T` which are numbers.\n * @remarks\n * The keys are extracted as strings which can be used to index `T`.\n *\n * This handles cases like `{ x: 4 } & [5, 6]` returning `\"0\"` and `\"1\"`.\n * Such cases are difficult to handle since `keyof` includes `number` in such cases, but the type can not be indexed by `number`.\n * @system @public\n */\nexport type NumberKeys<\n\tT,\n\tTransformed = {\n\t\treadonly [Property in keyof T as number extends Property ? never : Property]: Property;\n\t},\n> = Transformed[`${number}` & keyof Transformed];\n"]}
|
|
@@ -18,5 +18,5 @@ export type { LazyItem, FlexList, FlexListToUnion, ExtractItemType, } from "./fl
|
|
|
18
18
|
export { isLazy } from "./flexList.js";
|
|
19
19
|
export { TreeNodeValid, type MostDerivedData, createTreeNodeSchemaPrivateData, isClassBasedSchema, } from "./treeNodeValid.js";
|
|
20
20
|
export type { SimpleNodeSchemaBase } from "./simpleNodeSchemaBase.js";
|
|
21
|
-
export { type StoredSchemaGenerationOptions,
|
|
21
|
+
export { type StoredSchemaGenerationOptions, type StoredFromViewSchemaGenerationOptions, ExpectStored, type SimpleSchemaTransformationOptions, Unchanged, } from "./toStored.js";
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,KAAK,SAAS,EACd,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,QAAQ,EACb,cAAc,EACd,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,KAAK,UAAU,EACf,KAAK,gBAAgB,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,QAAQ,EACR,YAAY,EACZ,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACX,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,yCAAyC,EACzC,+BAA+B,EAC/B,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,6BAA6B,EAC7B,6BAA6B,EAC7B,aAAa,GACb,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,gCAAgC,EAChC,0CAA0C,EAC1C,kCAAkC,EAClC,KAAK,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,gBAAgB,EAChB,yBAAyB,EACzB,UAAU,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EACN,4BAA4B,EAC5B,mCAAmC,GACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,GACX,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,eAAe,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACN,aAAa,EACb,KAAK,eAAe,EACpB,+BAA+B,EAC/B,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACN,KAAK,6BAA6B,EAClC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,KAAK,SAAS,EACd,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,QAAQ,EACb,cAAc,EACd,g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uB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,GACX,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,eAAe,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACN,aAAa,EACb,KAAK,eAAe,EACpB,+BAA+B,EAC/B,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACN,KAAK,6BAA6B,EAClC,KAAK,qCAAqC,EAC1C,YAAY,EACZ,KAAK,iCAAiC,EACtC,SAAS,GACT,MAAM,eAAe,CAAC"}
|
|
@@ -13,5 +13,5 @@ export { getOrCreateNodeFromInnerNode, getOrCreateNodeFromInnerUnboxedNode, } fr
|
|
|
13
13
|
export { UnhydratedFlexTreeField, UnhydratedFlexTreeNode, UnhydratedSequenceField, UnhydratedContext, createField, } from "./unhydratedFlexTree.js";
|
|
14
14
|
export { isLazy } from "./flexList.js";
|
|
15
15
|
export { TreeNodeValid, createTreeNodeSchemaPrivateData, isClassBasedSchema, } from "./treeNodeValid.js";
|
|
16
|
-
export {
|
|
16
|
+
export { ExpectStored, Unchanged, } from "./toStored.js";
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,cAAc,EACd,SAAS,EACT,oBAAoB,EAEpB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,cAAc,EACd,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,eAAe,CAAC;AAKvB,OAAO,EACN,QAAQ,EACR,YAAY,EACZ,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,yCAAyC,EACzC,+BAA+B,EAC/B,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,6BAA6B,EAC7B,6BAA6B,EAC7B,aAAa,GACb,MAAM,mBAAmB,CAAC;AAoB3B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EACN,4BAA4B,EAC5B,mCAAmC,GACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,GACX,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACN,aAAa,EAEb,+BAA+B,EAC/B,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,cAAc,EACd,SAAS,EACT,oBAAoB,EAEpB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,cAAc,EACd,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,eAAe,CAAC;AAKvB,OAAO,EACN,QAAQ,EACR,YAAY,EACZ,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,yCAAyC,EACzC,+BAA+B,EAC/B,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,6BAA6B,EAC7B,6BAA6B,EAC7B,aAAa,GACb,MAAM,mBAAmB,CAAC;AAoB3B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EACN,4BAA4B,EAC5B,mCAAmC,GACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,GACX,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACN,aAAa,EAEb,+BAA+B,EAC/B,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAGN,YAAY,EAEZ,SAAS,GACT,MAAM,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tisTreeNode,\n\tTreeNodeKernel,\n\tgetKernel,\n\ttryGetTreeNodeSchema,\n\ttype InnerNode,\n\ttryDisposeTreeNode,\n\tgetInnerNode,\n\ttreeNodeFromAnchor,\n\tgetSimpleNodeSchemaFromInnerNode,\n\tSimpleContextSlot,\n\twithBufferedTreeEvents,\n} from \"./treeNodeKernel.js\";\nexport {\n\ttype WithType,\n\ttypeNameSymbol,\n\ttypeSchemaSymbol,\n\tcontentSchemaSymbol,\n} from \"./withType.js\";\nexport {\n\ttype Unhydrated,\n\ttype InternalTreeNode,\n} from \"./types.js\";\nexport {\n\tTreeNode,\n\tprivateToken,\n\tinPrototypeChain,\n} from \"./treeNode.js\";\nexport {\n\tNodeKind,\n\tisTreeNodeSchemaClass,\n\tprivateDataSymbol,\n\tgetTreeNodeSchemaPrivateData,\n\tCompatibilityLevel,\n} from \"./treeNodeSchema.js\";\nexport type {\n\tTreeNodeSchema,\n\tTreeNodeSchemaClass,\n\tTreeNodeSchemaNonClass,\n\tTreeNodeSchemaCore,\n\tTreeNodeSchemaBoth,\n\tNodeSchemaMetadata,\n\tTreeLeafValue,\n\tInsertableTypedNode,\n\tNodeBuilderData,\n\tNodeFromSchema,\n\tTreeNodeSchemaCorePrivate,\n\tTreeNodeSchemaPrivateData,\n\tTreeNodeSchemaInitializedData,\n\tFlexContent,\n} from \"./treeNodeSchema.js\";\nexport {\n\tisAnnotatedAllowedTypes,\n\tisAnnotatedAllowedType,\n\tnormalizeAllowedTypes,\n\tnormalizeAndEvaluateAnnotatedAllowedTypes,\n\tnormalizeToAnnotatedAllowedType,\n\tmarkSchemaMostDerived,\n\tevaluateLazySchema,\n\tcreateSchemaUpgrade,\n\tAnnotatedAllowedTypesInternal,\n\tnormalizeAllowedTypesInternal,\n\tSchemaUpgrade,\n} from \"./allowedTypes.js\";\nexport type {\n\tAnnotatedAllowedType,\n\tAllowedTypesFullEvaluated,\n\tImplicitAllowedTypes,\n\tAllowedTypesMetadata,\n\tAllowedTypes,\n\tTreeNodeFromImplicitAllowedTypes,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n\tInsertableTreeNodeFromAllowedTypes,\n\tInput,\n\tUnannotateAllowedTypesList,\n\tAllowedTypeMetadata,\n\tAnnotatedAllowedTypes,\n\tAnnotateAllowedTypesList,\n\tAllowedTypesFullInternal,\n\tAllowedTypesFull,\n\tAllowedTypesFullFromMixed,\n\tNumberKeys,\n} from \"./allowedTypes.js\";\nexport { walkAllowedTypes, walkNodeSchema, type SchemaVisitor } from \"./walkSchema.js\";\nexport { Context, HydratedContext } from \"./context.js\";\nexport {\n\tgetOrCreateNodeFromInnerNode,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n} from \"./getOrCreateNode.js\";\nexport {\n\tUnhydratedFlexTreeField,\n\tUnhydratedFlexTreeNode,\n\tUnhydratedSequenceField,\n\tUnhydratedContext,\n\tcreateField,\n} from \"./unhydratedFlexTree.js\";\nexport type {\n\tLazyItem,\n\tFlexList,\n\tFlexListToUnion,\n\tExtractItemType,\n} from \"./flexList.js\";\nexport { isLazy } from \"./flexList.js\";\nexport {\n\tTreeNodeValid,\n\ttype MostDerivedData,\n\tcreateTreeNodeSchemaPrivateData,\n\tisClassBasedSchema,\n} from \"./treeNodeValid.js\";\nexport type { SimpleNodeSchemaBase } from \"./simpleNodeSchemaBase.js\";\nexport {\n\ttype StoredSchemaGenerationOptions,\n\ttype StoredFromViewSchemaGenerationOptions,\n\tExpectStored,\n\ttype SimpleSchemaTransformationOptions,\n\tUnchanged,\n} from \"./toStored.js\";\n"]}
|