@fluidframework/tree 2.74.0-365691 → 2.74.0-370705
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 +91 -42
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +238 -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 +5 -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 +8 -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 +6 -6
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +13 -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 +49 -15
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1306 -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/optionalFieldChangeFormatV3.d.ts +23 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +31 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +1 -0
- 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/optional-field/optionalFieldCodecV3.d.ts +12 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +57 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +5 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.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 +26 -12
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +10 -4
- 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 +14 -7
- 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 +91 -42
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +236 -70
- 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 +6 -6
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +5 -4
- 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 +49 -15
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1291 -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/optionalFieldChangeFormatV3.d.ts +23 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +27 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +1 -0
- 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/optional-field/optionalFieldCodecV3.d.ts +12 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +53 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +5 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.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 +27 -13
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +11 -5
- 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 +12 -6
- 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 +398 -127
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +35 -38
- package/src/feature-libraries/default-schema/index.ts +17 -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 +23 -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 +22 -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 +2547 -739
- 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/optionalFieldChangeFormatV3.ts +45 -0
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +24 -38
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +89 -35
- package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +94 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +5 -1
- 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 +33 -11
- package/src/shared-tree/sharedTreeChangeFamily.ts +15 -5
- package/src/shared-tree/sharedTreeEditBuilder.ts +47 -13
- 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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { HasListeners, Listenable } from "@fluidframework/core-interfaces/internal";
|
|
6
6
|
import { type AnchorEvents, type FieldKey, type FieldKindIdentifier, type ITreeCursorSynchronous, type NodeData, type NormalizedFieldUpPath, type SchemaPolicy, type TreeNodeSchemaIdentifier, type TreeNodeStoredSchema, type TreeStoredSchema, type TreeValue, type Value } from "../../core/index.js";
|
|
7
|
-
import { type FlexTreeContext, FlexTreeEntityKind, type FlexTreeField, type FlexTreeNode, type FlexTreeOptionalField, type FlexTreeSequenceField, type FlexTreeTypedField, type FlexTreeUnknownUnboxed, flexTreeMarker, type FlexTreeHydratedContext, type FlexFieldKind, type
|
|
7
|
+
import { type FlexTreeContext, FlexTreeEntityKind, type FlexTreeField, type FlexTreeNode, type FlexTreeOptionalField, type FlexTreeRequiredField, type FlexTreeSequenceField, type FlexTreeTypedField, type FlexTreeUnknownUnboxed, flexTreeMarker, type FlexTreeHydratedContext, type FlexFieldKind, type SequenceFieldEditor, type RequiredFieldEditor, type FlexTreeHydratedContextMinimal, type MapTreeFieldViewGeneric, type MapTreeNodeViewGeneric, type HydratedFlexTreeNode, type FlexibleNodeContent, type OptionalFieldEditor, type MinimalFieldMap } from "../../feature-libraries/index.js";
|
|
8
8
|
import type { Context } from "./context.js";
|
|
9
9
|
import type { ContextualFieldProvider } from "../fieldSchema.js";
|
|
10
10
|
import type { TreeNode } from "./treeNode.js";
|
|
@@ -14,7 +14,7 @@ type LocationInField = FlexTreeNode["parentField"];
|
|
|
14
14
|
/**
|
|
15
15
|
* The {@link Unhydrated} implementation of {@link FlexTreeNode}.
|
|
16
16
|
*/
|
|
17
|
-
export declare class UnhydratedFlexTreeNode implements FlexTreeNode, MapTreeNodeViewGeneric<
|
|
17
|
+
export declare class UnhydratedFlexTreeNode implements FlexTreeNode, MapTreeNodeViewGeneric<FlexTreeNode> {
|
|
18
18
|
#private;
|
|
19
19
|
/**
|
|
20
20
|
* The {@link NodeData} for this node.
|
|
@@ -122,11 +122,12 @@ export declare class UnhydratedContext implements FlexTreeContext {
|
|
|
122
122
|
constructor(schemaPolicy: SchemaPolicy, schema: TreeStoredSchema);
|
|
123
123
|
isDisposed(): boolean;
|
|
124
124
|
isHydrated(): this is FlexTreeHydratedContext;
|
|
125
|
+
runInTransaction(fn: () => void): void;
|
|
125
126
|
}
|
|
126
127
|
/**
|
|
127
128
|
* The {@link Unhydrated} implementation of {@link FlexTreeField}.
|
|
128
129
|
*/
|
|
129
|
-
export declare class UnhydratedFlexTreeField implements FlexTreeField, MapTreeFieldViewGeneric<
|
|
130
|
+
export declare class UnhydratedFlexTreeField implements FlexTreeField, MapTreeFieldViewGeneric<FlexTreeNode> {
|
|
130
131
|
readonly context: FlexTreeContext;
|
|
131
132
|
readonly schema: FieldKindIdentifier;
|
|
132
133
|
readonly key: FieldKey;
|
|
@@ -148,7 +149,7 @@ export declare class UnhydratedFlexTreeField implements FlexTreeField, MapTreeFi
|
|
|
148
149
|
* See {@link fillPendingDefaults}.
|
|
149
150
|
* Note that any fields using a {@link ConstantFieldProvider} should be evaluated before constructing the UnhydratedFlexTreeField.
|
|
150
151
|
*/
|
|
151
|
-
lazyChildren:
|
|
152
|
+
lazyChildren: FlexTreeNode[] | ContextualFieldProvider);
|
|
152
153
|
borrowCursor(): ITreeCursorSynchronous;
|
|
153
154
|
private getPendingDefault;
|
|
154
155
|
/**
|
|
@@ -162,11 +163,11 @@ export declare class UnhydratedFlexTreeField implements FlexTreeField, MapTreeFi
|
|
|
162
163
|
* Returns true if this field has a pending default due to defined defined using a {@link ContextualFieldProvider}.
|
|
163
164
|
*/
|
|
164
165
|
get pendingDefault(): boolean;
|
|
165
|
-
get children():
|
|
166
|
+
get children(): FlexTreeNode[];
|
|
166
167
|
get length(): number;
|
|
167
168
|
is<TKind2 extends FlexFieldKind>(kind: TKind2): this is FlexTreeTypedField<TKind2>;
|
|
168
169
|
boxedAt(index: number): FlexTreeNode | undefined;
|
|
169
|
-
[Symbol.iterator](): IterableIterator<
|
|
170
|
+
[Symbol.iterator](): IterableIterator<FlexTreeNode>;
|
|
170
171
|
/**
|
|
171
172
|
* Mutate this field.
|
|
172
173
|
* @param edit - A function which receives the current `MapTree`s that comprise the contents of the field so that it may be mutated.
|
|
@@ -175,28 +176,27 @@ export declare class UnhydratedFlexTreeField implements FlexTreeField, MapTreeFi
|
|
|
175
176
|
* @remarks All edits to the field (i.e. mutations of the field's MapTrees) should be directed through this function.
|
|
176
177
|
* This function ensures that the parent MapTree has no empty fields (which is an invariant of `MapTree`) after the mutation.
|
|
177
178
|
*/
|
|
178
|
-
protected edit(edit: (mapTrees:
|
|
179
|
+
protected edit(edit: (mapTrees: FlexTreeNode[]) => void | FlexTreeNode[]): void;
|
|
179
180
|
getFieldPath(): NormalizedFieldUpPath;
|
|
180
181
|
/** Unboxes leaf nodes to their values */
|
|
181
|
-
protected unboxed(index: number): TreeValue |
|
|
182
|
+
protected unboxed(index: number): TreeValue | FlexTreeNode;
|
|
182
183
|
}
|
|
183
184
|
/**
|
|
184
185
|
* The {@link Unhydrated} implementation of {@link FlexTreeOptionalField}.
|
|
185
186
|
*/
|
|
186
187
|
export declare class UnhydratedOptionalField extends UnhydratedFlexTreeField implements FlexTreeOptionalField {
|
|
187
|
-
readonly editor:
|
|
188
|
-
set: (newContent: FlexibleNodeContent | undefined) => void;
|
|
189
|
-
};
|
|
188
|
+
readonly editor: OptionalFieldEditor<FlexibleNodeContent, FlexTreeNode>;
|
|
190
189
|
get content(): FlexTreeUnknownUnboxed | undefined;
|
|
191
190
|
}
|
|
191
|
+
export declare class UnhydratedRequiredField extends UnhydratedFlexTreeField implements FlexTreeRequiredField {
|
|
192
|
+
readonly editor: RequiredFieldEditor<FlexibleNodeContent, FlexTreeNode>;
|
|
193
|
+
get content(): FlexTreeUnknownUnboxed;
|
|
194
|
+
}
|
|
192
195
|
/**
|
|
193
196
|
* The {@link Unhydrated} implementation of {@link FlexTreeSequenceField}.
|
|
194
197
|
*/
|
|
195
198
|
export declare class UnhydratedSequenceField extends UnhydratedFlexTreeField implements FlexTreeSequenceField {
|
|
196
|
-
readonly editor:
|
|
197
|
-
insert: (index: number, newContent: FlexibleFieldContent) => void;
|
|
198
|
-
remove: (index: number, count: number) => UnhydratedFlexTreeNode[];
|
|
199
|
-
};
|
|
199
|
+
readonly editor: SequenceFieldEditor<readonly FlexibleNodeContent[], readonly FlexTreeNode[], FlexTreeNode[]>;
|
|
200
200
|
at(index: number): FlexTreeUnknownUnboxed | undefined;
|
|
201
201
|
map<U>(callbackfn: (value: FlexTreeUnknownUnboxed, index: number) => U): U[];
|
|
202
202
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unhydratedFlexTree.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/core/unhydratedFlexTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,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AM,EAAE,mBAAmB,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAc5E;IAEF,IAAW,OAAO,IAAI,sBAAsB,CAQ3C;CACD;AAED;;GAEG;AACH,qBAAa,uBACZ,SAAQ,uBACR,YAAW,qBAAqB;IAEhC,SAAgB,MAAM,EAAE,mBAAmB,CAC1C,SAAS,mBAAmB,EAAE,EAC9B,SAAS,YAAY,EAAE,EACvB,YAAY,EAAE,CACd,CA+BkD;IAE5C,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS;IAOrD,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE;CAGnF;AAID,gDAAgD;AAChD,wBAAgB,WAAW,CAC1B,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,uBAAuB,CAAC,GAC5D,uBAAuB,CAezB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAM7D"}
|
|
@@ -9,7 +9,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
};
|
|
10
10
|
var _UnhydratedFlexTreeNode_instances, _a, _UnhydratedFlexTreeNode_emitSubtreeChangedEvents, _b, _c;
|
|
11
11
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
12
|
-
import { assert, oob, fail } from "@fluidframework/core-utils/internal";
|
|
12
|
+
import { assert, oob, fail, debugAssert } from "@fluidframework/core-utils/internal";
|
|
13
13
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
14
14
|
import { dummyRoot, } from "../../core/index.js";
|
|
15
15
|
import { FlexTreeEntityKind, flexTreeMarker, indexForAt, FieldKinds, cursorForMapTreeNode, cursorForMapTreeField, currentObserver, } from "../../feature-libraries/index.js";
|
|
@@ -183,6 +183,10 @@ export class UnhydratedContext {
|
|
|
183
183
|
isHydrated() {
|
|
184
184
|
return false;
|
|
185
185
|
}
|
|
186
|
+
runInTransaction(fn) {
|
|
187
|
+
debugAssert(() => !this.isDisposed() || "Disposed");
|
|
188
|
+
fn();
|
|
189
|
+
}
|
|
186
190
|
}
|
|
187
191
|
// #region Fields
|
|
188
192
|
/**
|
|
@@ -226,7 +230,12 @@ export class UnhydratedFlexTreeField {
|
|
|
226
230
|
// "Adopt" each child by updating its parent information to point to this field.
|
|
227
231
|
if (Array.isArray(lazyChildren)) {
|
|
228
232
|
for (const [i, child] of lazyChildren.entries()) {
|
|
229
|
-
child
|
|
233
|
+
if (child instanceof UnhydratedFlexTreeNode) {
|
|
234
|
+
child.adoptBy(this, i);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
// TODO: hook up events from hydrated to unhydrated nodes.
|
|
238
|
+
}
|
|
230
239
|
}
|
|
231
240
|
}
|
|
232
241
|
}
|
|
@@ -291,12 +300,12 @@ export class UnhydratedFlexTreeField {
|
|
|
291
300
|
edit(edit) {
|
|
292
301
|
// Clear parents for all old map trees.
|
|
293
302
|
for (const tree of this.children) {
|
|
294
|
-
tree
|
|
303
|
+
orphan(tree);
|
|
295
304
|
}
|
|
296
305
|
this.lazyChildren = edit(this.children) ?? this.children;
|
|
297
306
|
// Set parents for all new map trees.
|
|
298
307
|
for (const [index, tree] of this.children.entries()) {
|
|
299
|
-
|
|
308
|
+
adoptNode(this, tree, index);
|
|
300
309
|
}
|
|
301
310
|
this.parent?.emitChangedEvent(this.key);
|
|
302
311
|
}
|
|
@@ -313,6 +322,22 @@ export class UnhydratedFlexTreeField {
|
|
|
313
322
|
return child;
|
|
314
323
|
}
|
|
315
324
|
}
|
|
325
|
+
function adoptNode(parent, node, index) {
|
|
326
|
+
if (node instanceof UnhydratedFlexTreeNode) {
|
|
327
|
+
node.adoptBy(parent, index);
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
// TODO: handle parenting for hydrated nodes.
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
function orphan(node) {
|
|
334
|
+
if (node instanceof UnhydratedFlexTreeNode) {
|
|
335
|
+
node.adoptBy(undefined);
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
// TODO: handle unparenting for hydrated nodes.
|
|
339
|
+
}
|
|
340
|
+
}
|
|
316
341
|
/**
|
|
317
342
|
* The {@link Unhydrated} implementation of {@link FlexTreeOptionalField}.
|
|
318
343
|
*/
|
|
@@ -321,6 +346,7 @@ export class UnhydratedOptionalField extends UnhydratedFlexTreeField {
|
|
|
321
346
|
super(...arguments);
|
|
322
347
|
this.editor = {
|
|
323
348
|
set: (newContent) => {
|
|
349
|
+
// If the new content is a UnhydratedFlexTreeNode, it needs to have its parent pointer updated
|
|
324
350
|
if (newContent !== undefined) {
|
|
325
351
|
assert(newContent instanceof UnhydratedFlexTreeNode, 0xbb7 /* Expected unhydrated node */);
|
|
326
352
|
}
|
|
@@ -333,6 +359,12 @@ export class UnhydratedOptionalField extends UnhydratedFlexTreeField {
|
|
|
333
359
|
}
|
|
334
360
|
});
|
|
335
361
|
},
|
|
362
|
+
clear: () => {
|
|
363
|
+
this.editor.set(undefined, true /* <- dummy wasEmpty argument */);
|
|
364
|
+
},
|
|
365
|
+
attach: (content) => {
|
|
366
|
+
this.editor.set(content, true /* <- dummy wasEmpty argument */);
|
|
367
|
+
},
|
|
336
368
|
};
|
|
337
369
|
}
|
|
338
370
|
get content() {
|
|
@@ -343,11 +375,26 @@ export class UnhydratedOptionalField extends UnhydratedFlexTreeField {
|
|
|
343
375
|
return undefined;
|
|
344
376
|
}
|
|
345
377
|
}
|
|
346
|
-
class UnhydratedRequiredField extends
|
|
378
|
+
export class UnhydratedRequiredField extends UnhydratedFlexTreeField {
|
|
379
|
+
constructor() {
|
|
380
|
+
super(...arguments);
|
|
381
|
+
this.editor = {
|
|
382
|
+
set: (newContent) => {
|
|
383
|
+
assert(newContent instanceof UnhydratedFlexTreeNode, 0xbb7 /* Expected unhydrated node */);
|
|
384
|
+
this.edit((mapTrees) => {
|
|
385
|
+
mapTrees[0] = newContent;
|
|
386
|
+
});
|
|
387
|
+
},
|
|
388
|
+
attach: (content) => {
|
|
389
|
+
this.editor.set(content);
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
}
|
|
347
393
|
get content() {
|
|
394
|
+
const value = this.children[0];
|
|
348
395
|
// This cannot use ?? since null is a legal value here.
|
|
349
|
-
assert(
|
|
350
|
-
return
|
|
396
|
+
assert(value !== undefined, 0xa57 /* Expected EagerMapTree required field to have a value */);
|
|
397
|
+
return this.unboxed(0);
|
|
351
398
|
}
|
|
352
399
|
}
|
|
353
400
|
/**
|
|
@@ -360,7 +407,7 @@ export class UnhydratedSequenceField extends UnhydratedFlexTreeField {
|
|
|
360
407
|
insert: (index, newContent) => {
|
|
361
408
|
for (const c of newContent) {
|
|
362
409
|
assert(c !== undefined, 0xa0a /* Unexpected sparse array content */);
|
|
363
|
-
|
|
410
|
+
// TODO: ensure somewhere checks for not already having parents
|
|
364
411
|
}
|
|
365
412
|
const newContentChecked = newContent;
|
|
366
413
|
this.edit((mapTrees) => {
|
|
@@ -385,6 +432,9 @@ export class UnhydratedSequenceField extends UnhydratedFlexTreeField {
|
|
|
385
432
|
});
|
|
386
433
|
return removed ?? fail(0xb4a /* Expected removed to be set by edit */);
|
|
387
434
|
},
|
|
435
|
+
attach: (index, content) => {
|
|
436
|
+
this.editor.insert(index, content);
|
|
437
|
+
},
|
|
388
438
|
};
|
|
389
439
|
}
|
|
390
440
|
at(index) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unhydratedFlexTree.js","sourceRoot":"","sources":["../../../src/simple-tree/core/unhydratedFlexTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,UA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AK,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACrC,CAAC;CACD;AAED,oBAAoB;AAEpB,gDAAgD;AAChD,MAAM,UAAU,WAAW,CAC1B,GAAG,IAA2D;IAE9D,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACjB,KAAK,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;QACpC,KAAK,UAAU,CAAC,UAAU,CAAC,UAAU;YACpC,OAAO,IAAI,uBAAuB,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,QAAQ,CAAC,UAAU;YAClC,OAAO,IAAI,uBAAuB,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,QAAQ,CAAC,UAAU;YAClC,OAAO,IAAI,uBAAuB,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,SAAS,CAAC,UAAU;YACnC,mHAAmH;YACnH,OAAO,IAAI,uBAAuB,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7C;YACC,OAAO,IAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAClD,CAAC;AACF,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACrD,OAAO,IAAI,UAAU,CACpB,GACC,OAAO,IAAI,WACZ,4EAA4E,CAC5E,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type { HasListeners, Listenable } from \"@fluidframework/core-interfaces/internal\";\nimport { assert, oob, fail } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\ttype AnchorEvents,\n\tdummyRoot,\n\ttype FieldKey,\n\ttype FieldKindIdentifier,\n\ttype ITreeCursorSynchronous,\n\ttype NodeData,\n\ttype NormalizedFieldUpPath,\n\ttype SchemaPolicy,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\ttype TreeValue,\n\ttype Value,\n} from \"../../core/index.js\";\nimport {\n\ttype FlexTreeContext,\n\tFlexTreeEntityKind,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeUnknownUnboxed,\n\tflexTreeMarker,\n\tindexForAt,\n\ttype FlexTreeHydratedContext,\n\ttype FlexFieldKind,\n\tFieldKinds,\n\ttype SequenceFieldEditBuilder,\n\tcursorForMapTreeNode,\n\ttype OptionalFieldEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype FlexibleNodeContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype FlexibleFieldContent,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype HydratedFlexTreeNode,\n\tcursorForMapTreeField,\n\ttype MinimalFieldMap,\n\tcurrentObserver,\n} from \"../../feature-libraries/index.js\";\nimport { brand, filterIterable, getOrCreate, mapIterable } from \"../../util/index.js\";\n\nimport type { Context } from \"./context.js\";\nimport type { ContextualFieldProvider } from \"../fieldSchema.js\";\nimport type { TreeNode } from \"./treeNode.js\";\n\ninterface UnhydratedTreeSequenceFieldEditBuilder\n\textends SequenceFieldEditBuilder<FlexibleFieldContent, UnhydratedFlexTreeNode[]> {}\n\ntype UnhydratedFlexTreeNodeEvents = Pick<\n\tAnchorEvents,\n\t\"childrenChangedAfterBatch\" | \"subtreeChangedAfterBatch\"\n>;\n\n/** A node's parent field and its index in that field */\ntype LocationInField = FlexTreeNode[\"parentField\"];\n\n/**\n * The {@link Unhydrated} implementation of {@link FlexTreeNode}.\n */\nexport class UnhydratedFlexTreeNode\n\timplements FlexTreeNode, MapTreeNodeViewGeneric<UnhydratedFlexTreeNode>\n{\n\tpublic isHydrated(): this is HydratedFlexTreeNode {\n\t\treturn false;\n\t}\n\n\tprivate location = unparentedLocation;\n\n\tpublic get storedSchema(): TreeNodeStoredSchema {\n\t\treturn (\n\t\t\tthis.context.schema.nodeSchema.get(this.data.type) ?? fail(0xb46 /* missing schema */)\n\t\t);\n\t}\n\n\t/**\n\t * Cache storing the {@link TreeNode} for this inner node.\n\t * @remarks\n\t * When creating a `TreeNode` for this `UnhydratedFlexTreeNode`, cache the `TreeNode` in this property.\n\t * Currently this is done by {@link TreeNodeKernel}.\n\t *\n\t * See {@link getOrCreateNodeFromInnerNode} how to get the `TreeNode`, even if not already created, regardless of hydration status.\n\t */\n\tpublic treeNode: TreeNode | undefined;\n\n\tpublic readonly [flexTreeMarker] = FlexTreeEntityKind.Node as const;\n\n\tprivate readonly _events = createEmitter<UnhydratedFlexTreeNodeEvents>();\n\tpublic get events(): Listenable<UnhydratedFlexTreeNodeEvents> &\n\t\tHasListeners<UnhydratedFlexTreeNodeEvents> {\n\t\treturn this._events;\n\t}\n\n\tpublic get context(): FlexTreeContext {\n\t\treturn this.simpleContext.flexContext;\n\t}\n\n\t/**\n\t * Create a new UnhydratedFlexTreeNode.\n\t */\n\tpublic constructor(\n\t\t/**\n\t\t * The {@link NodeData} for this node.\n\t\t */\n\t\tpublic readonly data: NodeData,\n\t\t/**\n\t\t * All {@link UnhydratedFlexTreeField} for this node that have been created so far.\n\t\t * @remarks\n\t\t * This includes all non-empty fields, but also any empty fields which have been previously requested.\n\t\t */\n\t\tprivate readonly fieldsAll: Map<FieldKey, UnhydratedFlexTreeField>,\n\t\t/**\n\t\t * The {@link Context} for this node.\n\t\t * @remarks\n\t\t * Provides access to all schema reachable from this node.\n\t\t * See {@link getUnhydratedContext}.\n\t\t */\n\t\tpublic readonly simpleContext: Context,\n\t) {\n\t\tfor (const [_key, field] of this.fieldsAll) {\n\t\t\tfield.parent = this;\n\t\t}\n\t}\n\n\t/**\n\t * The non-empty fields on this node.\n\t * @remarks\n\t * This is needed to implement {@link MapTreeNodeViewGeneric.fields}, which must omit empty fields.\n\t * Due to having to detect if a field is empty, this forces the evaluation of any pending defaults in the fields.\n\t * Use {@link allFieldsLazy} to avoid evaluating pending defaults.\n\t */\n\tpublic readonly fields: MinimalFieldMap<UnhydratedFlexTreeField> = {\n\t\tget: (key: FieldKey): UnhydratedFlexTreeField | undefined => this.tryGetField(key),\n\t\t[Symbol.iterator]: (): IterableIterator<[FieldKey, UnhydratedFlexTreeField]> => {\n\t\t\tcurrentObserver?.observeNodeFields(this);\n\t\t\treturn filterIterable(this.fieldsAll, ([, field]) => field.length > 0);\n\t\t},\n\t};\n\n\tpublic [Symbol.iterator](): IterableIterator<UnhydratedFlexTreeField> {\n\t\treturn mapIterable(this.fields, ([, field]) => field)[Symbol.iterator]();\n\t}\n\n\t/**\n\t * Gets all fields, without filtering out empty ones.\n\t * @remarks\n\t * This avoids forcing the evaluating of pending defaults in the fields, and also saves a copy on access.\n\t */\n\tpublic get allFieldsLazy(): ReadonlyMap<FieldKey, UnhydratedFlexTreeField> {\n\t\treturn this.fieldsAll;\n\t}\n\n\tpublic get type(): TreeNodeSchemaIdentifier {\n\t\treturn this.data.type;\n\t}\n\n\tprivate getOrCreateField(key: FieldKey): UnhydratedFlexTreeField {\n\t\treturn getOrCreate(this.fieldsAll, key, () => {\n\t\t\tconst stored = this.storedSchema.getFieldSchema(key).kind;\n\t\t\tconst field = createField(this.context, stored, key, []);\n\t\t\tfield.parent = this;\n\t\t\treturn field;\n\t\t});\n\t}\n\n\t/**\n\t * Set this node's parentage (see {@link FlexTreeNode.parentField}).\n\t * @remarks The node may be given a parent if it has none, or may have its parent removed (by passing `undefined`).\n\t * However, a node with a parent may not be directly re-assigned a different parent.\n\t * That likely indicates either an attempted multi-parenting or an attempt to \"move\" the node, neither of which are supported.\n\t * Removing a node's parent twice in a row is also not supported, as it likely indicates a bug.\n\t */\n\tpublic adoptBy(parent: undefined): void;\n\tpublic adoptBy(parent: UnhydratedFlexTreeField, index: number): void;\n\tpublic adoptBy(parent: UnhydratedFlexTreeField | undefined, index?: number): void {\n\t\tif (parent !== undefined) {\n\t\t\tassert(index !== undefined, 0xa08 /* Expected index */);\n\t\t\tif (this.location !== unparentedLocation) {\n\t\t\t\tthrow new UsageError(\"A node may not be in more than one place in the tree\");\n\t\t\t}\n\t\t\tlet unhydratedNode: UnhydratedFlexTreeNode | undefined = parent.parent;\n\t\t\twhile (unhydratedNode !== undefined) {\n\t\t\t\tif (unhydratedNode === this) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\"A node may not be inserted into a location that is under itself\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst parentNode: FlexTreeNode | undefined = unhydratedNode.parentField.parent.parent;\n\t\t\t\tassert(\n\t\t\t\t\tparentNode === undefined || parentNode instanceof UnhydratedFlexTreeNode,\n\t\t\t\t\t0xb77 /* Unhydrated node's parent should be an unhydrated node */,\n\t\t\t\t);\n\t\t\t\tunhydratedNode = parentNode;\n\t\t\t}\n\t\t\tthis.location = { parent, index };\n\t\t} else {\n\t\t\tassert(\n\t\t\t\tthis.location !== unparentedLocation,\n\t\t\t\t0xa09 /* Node may not be un-adopted if it does not have a parent */,\n\t\t\t);\n\t\t\tthis.location = unparentedLocation;\n\t\t}\n\t}\n\n\t/**\n\t * The field this tree is in, and the index within that field.\n\t * @remarks If this node is unparented, this method will return the special {@link unparentedLocation} as the parent.\n\t */\n\tpublic get parentField(): LocationInField {\n\t\tcurrentObserver?.observeParentOf(this);\n\t\treturn this.location;\n\t}\n\n\tpublic borrowCursor(): ITreeCursorSynchronous {\n\t\treturn cursorForMapTreeNode<MapTreeNodeViewGeneric<UnhydratedFlexTreeNode>>(this);\n\t}\n\n\tpublic tryGetField(key: FieldKey): UnhydratedFlexTreeField | undefined {\n\t\tcurrentObserver?.observeNodeField(this, key);\n\n\t\tconst field = this.fieldsAll.get(key);\n\t\t// Only return the field if it is not empty, in order to fulfill the contract of `tryGetField`.\n\t\tif (field !== undefined && field.length > 0) {\n\t\t\treturn field;\n\t\t}\n\t}\n\n\tpublic getBoxed(key: string): UnhydratedFlexTreeField {\n\t\tconst fieldKey: FieldKey = brand(key);\n\n\t\tcurrentObserver?.observeNodeField(this, fieldKey);\n\n\t\treturn this.getOrCreateField(fieldKey);\n\t}\n\n\tpublic keys(): IterableIterator<FieldKey> {\n\t\treturn Array.from(this.fields, ([key]) => key)[Symbol.iterator]();\n\t}\n\n\tpublic get value(): Value {\n\t\treturn this.data.value;\n\t}\n\n\tpublic emitChangedEvent(key: FieldKey): void {\n\t\tthis._events.emit(\"childrenChangedAfterBatch\", { changedFields: new Set([key]) });\n\n\t\t// Also emit subtree changed event for this node and all ancestors.\n\t\tthis.#emitSubtreeChangedEvents();\n\t}\n\n\t/**\n\t * Emit subtree changed events for this node and all ancestors.\n\t */\n\t#emitSubtreeChangedEvents(): void {\n\t\tthis._events.emit(\"subtreeChangedAfterBatch\");\n\n\t\tconst parent = this.parentField.parent.parent;\n\t\tassert(\n\t\t\tparent === undefined || parent instanceof UnhydratedFlexTreeNode,\n\t\t\t0xb76 /* Unhydrated node's parent should be an unhydrated node */,\n\t\t);\n\t\tif (parent !== undefined) {\n\t\t\tparent.#emitSubtreeChangedEvents();\n\t\t}\n\t}\n}\n\n/**\n * Implementation of `FlexTreeContext`.\n *\n * @remarks An editor is required to edit the FlexTree.\n */\nexport class UnhydratedContext implements FlexTreeContext {\n\t/**\n\t * @param flexSchema - Schema to use when working with the tree.\n\t */\n\tpublic constructor(\n\t\tpublic readonly schemaPolicy: SchemaPolicy,\n\t\tpublic readonly schema: TreeStoredSchema,\n\t) {}\n\n\tpublic isDisposed(): boolean {\n\t\treturn false;\n\t}\n\n\tpublic isHydrated(): this is FlexTreeHydratedContext {\n\t\treturn false;\n\t}\n}\n\n// #region Fields\n\n/**\n * A special singleton that is the implicit {@link LocationInField} of all un-parented {@link UnhydratedFlexTreeNode}s.\n * @remarks This exists because {@link UnhydratedFlexTreeNode.parentField} must return a field.\n * If a {@link UnhydratedFlexTreeNode} is created without a parent, its {@link UnhydratedFlexTreeNode.parentField} property will point to this object.\n * However, this field cannot be used in any practical way because it is empty, i.e. it does not actually contain the children that claim to be parented under it.\n * It has the \"empty\" schema and it will always contain zero children if queried.\n * Any nodes with this location will have a dummy parent index of `-1`.\n *\n * TODO: make this make sense.\n */\nconst unparentedLocation: LocationInField = {\n\tparent: {\n\t\tkey: dummyRoot,\n\t\tparent: undefined,\n\t\tschema: brand(FieldKinds.optional.identifier),\n\t},\n\tindex: 0,\n};\n\n/**\n * The {@link Unhydrated} implementation of {@link FlexTreeField}.\n */\nexport class UnhydratedFlexTreeField\n\timplements FlexTreeField, MapTreeFieldViewGeneric<UnhydratedFlexTreeNode>\n{\n\tpublic [flexTreeMarker] = FlexTreeEntityKind.Field as const;\n\n\tpublic parent: UnhydratedFlexTreeNode | undefined = undefined;\n\n\tpublic constructor(\n\t\tpublic readonly context: FlexTreeContext,\n\t\tpublic readonly schema: FieldKindIdentifier,\n\t\tpublic readonly key: FieldKey,\n\t\t/**\n\t\t * The children of this field.\n\t\t * @remarks\n\t\t * This is either an array of {@link UnhydratedFlexTreeNode}s or a {@link ContextualFieldProvider} that will be used to populate the children lazily (after which it will become an array).\n\t\t * See {@link fillPendingDefaults}.\n\t\t * Note that any fields using a {@link ConstantFieldProvider} should be evaluated before constructing the UnhydratedFlexTreeField.\n\t\t */\n\t\tprivate lazyChildren: UnhydratedFlexTreeNode[] | ContextualFieldProvider,\n\t) {\n\t\t// When this field is created (which only happens one time, because it is cached), all the children become parented for the first time.\n\t\t// \"Adopt\" each child by updating its parent information to point to this field.\n\t\tif (Array.isArray(lazyChildren)) {\n\t\t\tfor (const [i, child] of lazyChildren.entries()) {\n\t\t\t\tchild.adoptBy(this, i);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic borrowCursor(): ITreeCursorSynchronous {\n\t\treturn cursorForMapTreeField<MapTreeNodeViewGeneric<UnhydratedFlexTreeNode>>(\n\t\t\tthis.children,\n\t\t);\n\t}\n\n\tprivate getPendingDefault(): ContextualFieldProvider | undefined {\n\t\treturn !Array.isArray(this.lazyChildren) ? this.lazyChildren : undefined;\n\t}\n\n\t/**\n\t * Populate pending default (if present) using the provided context.\n\t * @remarks\n\t * This apply to just this field: caller will likely want to recursively walk the tree.\n\t * @see {@link pendingDefault}.\n\t */\n\tpublic fillPendingDefaults(context: FlexTreeHydratedContextMinimal): void {\n\t\tconst provider = this.getPendingDefault();\n\t\tif (provider) {\n\t\t\tconst content = provider(context);\n\t\t\tthis.lazyChildren = content;\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if this field has a pending default due to defined defined using a {@link ContextualFieldProvider}.\n\t */\n\tpublic get pendingDefault(): boolean {\n\t\treturn this.getPendingDefault() !== undefined;\n\t}\n\n\tpublic get children(): UnhydratedFlexTreeNode[] {\n\t\tconst provider = this.getPendingDefault();\n\t\tif (provider) {\n\t\t\tconst content = provider(\"UseGlobalContext\");\n\t\t\tthis.lazyChildren = content;\n\t\t}\n\t\treturn this.lazyChildren as UnhydratedFlexTreeNode[];\n\t}\n\n\tpublic get length(): number {\n\t\treturn this.children.length;\n\t}\n\n\tpublic is<TKind2 extends FlexFieldKind>(kind: TKind2): this is FlexTreeTypedField<TKind2> {\n\t\treturn this.schema === kind.identifier;\n\t}\n\n\tpublic boxedAt(index: number): FlexTreeNode | undefined {\n\t\tconst i = indexForAt(index, this.length);\n\t\tif (i === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst m = this.children[i];\n\t\treturn m;\n\t}\n\n\tpublic [Symbol.iterator](): IterableIterator<UnhydratedFlexTreeNode> {\n\t\treturn this.children[Symbol.iterator]();\n\t}\n\n\t/**\n\t * Mutate this field.\n\t * @param edit - A function which receives the current `MapTree`s that comprise the contents of the field so that it may be mutated.\n\t * The function may mutate the array in place or return a new array.\n\t * If a new array is returned then it will be used as the new contents of the field, otherwise the original array will be continue to be used.\n\t * @remarks All edits to the field (i.e. mutations of the field's MapTrees) should be directed through this function.\n\t * This function ensures that the parent MapTree has no empty fields (which is an invariant of `MapTree`) after the mutation.\n\t */\n\tprotected edit(\n\t\tedit: (mapTrees: UnhydratedFlexTreeNode[]) => void | UnhydratedFlexTreeNode[],\n\t): void {\n\t\t// Clear parents for all old map trees.\n\t\tfor (const tree of this.children) {\n\t\t\ttree.adoptBy(undefined);\n\t\t}\n\n\t\tthis.lazyChildren = edit(this.children) ?? this.children;\n\n\t\t// Set parents for all new map trees.\n\t\tfor (const [index, tree] of this.children.entries()) {\n\t\t\ttree.adoptBy(this, index);\n\t\t}\n\n\t\tthis.parent?.emitChangedEvent(this.key);\n\t}\n\n\tpublic getFieldPath(): NormalizedFieldUpPath {\n\t\tthrow unsupportedUsageError(\"Editing an array\");\n\t}\n\n\t/** Unboxes leaf nodes to their values */\n\tprotected unboxed(index: number): TreeValue | UnhydratedFlexTreeNode {\n\t\tconst child = this.children[index] ?? oob();\n\t\tconst value = child.value;\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\t\t}\n\t\treturn child;\n\t}\n}\n\n/**\n * The {@link Unhydrated} implementation of {@link FlexTreeOptionalField}.\n */\nexport class UnhydratedOptionalField\n\textends UnhydratedFlexTreeField\n\timplements FlexTreeOptionalField\n{\n\tpublic readonly editor = {\n\t\tset: (newContent: FlexibleNodeContent | undefined): void => {\n\t\t\tif (newContent !== undefined) {\n\t\t\t\tassert(\n\t\t\t\t\tnewContent instanceof UnhydratedFlexTreeNode,\n\t\t\t\t\t0xbb7 /* Expected unhydrated node */,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.edit((mapTrees) => {\n\t\t\t\tif (newContent !== undefined) {\n\t\t\t\t\tmapTrees[0] = newContent;\n\t\t\t\t} else {\n\t\t\t\t\tmapTrees.length = 0;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t} satisfies OptionalFieldEditBuilder<FlexibleNodeContent> &\n\t\tValueFieldEditBuilder<FlexibleNodeContent>;\n\n\tpublic get content(): FlexTreeUnknownUnboxed | undefined {\n\t\tconst value = this.children[0];\n\t\tif (value !== undefined) {\n\t\t\treturn this.unboxed(0);\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nclass UnhydratedRequiredField\n\textends UnhydratedOptionalField\n\timplements FlexTreeRequiredField\n{\n\tpublic override get content(): FlexTreeUnknownUnboxed {\n\t\t// This cannot use ?? since null is a legal value here.\n\t\tassert(\n\t\t\tsuper.content !== undefined,\n\t\t\t0xa57 /* Expected EagerMapTree required field to have a value */,\n\t\t);\n\t\treturn super.content;\n\t}\n}\n\n/**\n * The {@link Unhydrated} implementation of {@link FlexTreeSequenceField}.\n */\nexport class UnhydratedSequenceField\n\textends UnhydratedFlexTreeField\n\timplements FlexTreeSequenceField\n{\n\tpublic readonly editor = {\n\t\tinsert: (index, newContent): void => {\n\t\t\tfor (const c of newContent) {\n\t\t\t\tassert(c !== undefined, 0xa0a /* Unexpected sparse array content */);\n\t\t\t\tassert(c instanceof UnhydratedFlexTreeNode, 0xbb8 /* Expected unhydrated node */);\n\t\t\t}\n\t\t\tconst newContentChecked = newContent as readonly UnhydratedFlexTreeNode[];\n\t\t\tthis.edit((mapTrees) => {\n\t\t\t\tif (newContent.length < 1000) {\n\t\t\t\t\t// For \"smallish arrays\" (`1000` is not empirically derived), the `splice` function is appropriate...\n\t\t\t\t\tmapTrees.splice(index, 0, ...newContentChecked);\n\t\t\t\t} else {\n\t\t\t\t\t// ...but we avoid using `splice` + spread for very large input arrays since there is a limit on how many elements can be spread (too many will overflow the stack).\n\t\t\t\t\treturn mapTrees.slice(0, index).concat(newContentChecked, mapTrees.slice(index));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tremove: (index, count): UnhydratedFlexTreeNode[] => {\n\t\t\tfor (let i = index; i < index + count; i++) {\n\t\t\t\tconst c = this.children[i];\n\t\t\t\tassert(c !== undefined, 0xa0b /* Unexpected sparse array */);\n\t\t\t}\n\t\t\tlet removed: UnhydratedFlexTreeNode[] | undefined;\n\t\t\tthis.edit((mapTrees) => {\n\t\t\t\tremoved = mapTrees.splice(index, count);\n\t\t\t});\n\t\t\treturn removed ?? fail(0xb4a /* Expected removed to be set by edit */);\n\t\t},\n\t} satisfies UnhydratedTreeSequenceFieldEditBuilder;\n\n\tpublic at(index: number): FlexTreeUnknownUnboxed | undefined {\n\t\tconst i = indexForAt(index, this.length);\n\t\tif (i === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.unboxed(i);\n\t}\n\tpublic map<U>(callbackfn: (value: FlexTreeUnknownUnboxed, index: number) => U): U[] {\n\t\treturn Array.from(this, callbackfn);\n\t}\n}\n\n// #endregion Fields\n\n/** Creates a field with the given attributes */\nexport function createField(\n\t...args: ConstructorParameters<typeof UnhydratedFlexTreeField>\n): UnhydratedFlexTreeField {\n\tswitch (args[1]) {\n\t\tcase FieldKinds.required.identifier:\n\t\tcase FieldKinds.identifier.identifier:\n\t\t\treturn new UnhydratedRequiredField(...args);\n\t\tcase FieldKinds.optional.identifier:\n\t\t\treturn new UnhydratedOptionalField(...args);\n\t\tcase FieldKinds.sequence.identifier:\n\t\t\treturn new UnhydratedSequenceField(...args);\n\t\tcase FieldKinds.forbidden.identifier:\n\t\t\t// TODO: this seems to used by unknown optional fields. They should probably use \"optional\" not \"Forbidden\" schema.\n\t\t\treturn new UnhydratedFlexTreeField(...args);\n\t\tdefault:\n\t\t\treturn fail(0xb9d /* unsupported field kind */);\n\t}\n}\n\nexport function unsupportedUsageError(message?: string): Error {\n\treturn new UsageError(\n\t\t`${\n\t\t\tmessage ?? \"Operation\"\n\t\t} is not supported for content that has not yet been inserted into the tree`,\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"unhydratedFlexTree.js","sourceRoot":"","sources":["../../../src/simple-tree/core/unhydratedFlexTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,GAAG,EAA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esContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type { HasListeners, Listenable } from \"@fluidframework/core-interfaces/internal\";\nimport { assert, oob, fail, debugAssert } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\ttype AnchorEvents,\n\tdummyRoot,\n\ttype FieldKey,\n\ttype FieldKindIdentifier,\n\ttype ITreeCursorSynchronous,\n\ttype NodeData,\n\ttype NormalizedFieldUpPath,\n\ttype SchemaPolicy,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\ttype TreeValue,\n\ttype Value,\n} from \"../../core/index.js\";\nimport {\n\ttype FlexTreeContext,\n\tFlexTreeEntityKind,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeUnknownUnboxed,\n\tflexTreeMarker,\n\tindexForAt,\n\ttype FlexTreeHydratedContext,\n\ttype FlexFieldKind,\n\tFieldKinds,\n\tcursorForMapTreeNode,\n\ttype SequenceFieldEditor,\n\ttype RequiredFieldEditor,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype FlexibleFieldContent,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype HydratedFlexTreeNode,\n\ttype FlexibleNodeContent,\n\ttype OptionalFieldEditor,\n\tcursorForMapTreeField,\n\ttype MinimalFieldMap,\n\tcurrentObserver,\n} from \"../../feature-libraries/index.js\";\nimport { brand, filterIterable, getOrCreate, mapIterable } from \"../../util/index.js\";\n\nimport type { Context } from \"./context.js\";\nimport type { ContextualFieldProvider } from \"../fieldSchema.js\";\nimport type { TreeNode } from \"./treeNode.js\";\n\ninterface UnhydratedTreeSequenceFieldEditBuilder\n\textends SequenceFieldEditor<FlexibleFieldContent, readonly FlexTreeNode[]> {}\n\ntype UnhydratedFlexTreeNodeEvents = Pick<\n\tAnchorEvents,\n\t\"childrenChangedAfterBatch\" | \"subtreeChangedAfterBatch\"\n>;\n\n/** A node's parent field and its index in that field */\ntype LocationInField = FlexTreeNode[\"parentField\"];\n\n/**\n * The {@link Unhydrated} implementation of {@link FlexTreeNode}.\n */\nexport class UnhydratedFlexTreeNode\n\timplements FlexTreeNode, MapTreeNodeViewGeneric<FlexTreeNode>\n{\n\tpublic isHydrated(): this is HydratedFlexTreeNode {\n\t\treturn false;\n\t}\n\n\tprivate location = unparentedLocation;\n\n\tpublic get storedSchema(): TreeNodeStoredSchema {\n\t\treturn (\n\t\t\tthis.context.schema.nodeSchema.get(this.data.type) ?? fail(0xb46 /* missing schema */)\n\t\t);\n\t}\n\n\t/**\n\t * Cache storing the {@link TreeNode} for this inner node.\n\t * @remarks\n\t * When creating a `TreeNode` for this `UnhydratedFlexTreeNode`, cache the `TreeNode` in this property.\n\t * Currently this is done by {@link TreeNodeKernel}.\n\t *\n\t * See {@link getOrCreateNodeFromInnerNode} how to get the `TreeNode`, even if not already created, regardless of hydration status.\n\t */\n\tpublic treeNode: TreeNode | undefined;\n\n\tpublic readonly [flexTreeMarker] = FlexTreeEntityKind.Node as const;\n\n\tprivate readonly _events = createEmitter<UnhydratedFlexTreeNodeEvents>();\n\tpublic get events(): Listenable<UnhydratedFlexTreeNodeEvents> &\n\t\tHasListeners<UnhydratedFlexTreeNodeEvents> {\n\t\treturn this._events;\n\t}\n\n\tpublic get context(): FlexTreeContext {\n\t\treturn this.simpleContext.flexContext;\n\t}\n\n\t/**\n\t * Create a new UnhydratedFlexTreeNode.\n\t */\n\tpublic constructor(\n\t\t/**\n\t\t * The {@link NodeData} for this node.\n\t\t */\n\t\tpublic readonly data: NodeData,\n\t\t/**\n\t\t * All {@link UnhydratedFlexTreeField} for this node that have been created so far.\n\t\t * @remarks\n\t\t * This includes all non-empty fields, but also any empty fields which have been previously requested.\n\t\t */\n\t\tprivate readonly fieldsAll: Map<FieldKey, UnhydratedFlexTreeField>,\n\t\t/**\n\t\t * The {@link Context} for this node.\n\t\t * @remarks\n\t\t * Provides access to all schema reachable from this node.\n\t\t * See {@link getUnhydratedContext}.\n\t\t */\n\t\tpublic readonly simpleContext: Context,\n\t) {\n\t\tfor (const [_key, field] of this.fieldsAll) {\n\t\t\tfield.parent = this;\n\t\t}\n\t}\n\n\t/**\n\t * The non-empty fields on this node.\n\t * @remarks\n\t * This is needed to implement {@link MapTreeNodeViewGeneric.fields}, which must omit empty fields.\n\t * Due to having to detect if a field is empty, this forces the evaluation of any pending defaults in the fields.\n\t * Use {@link allFieldsLazy} to avoid evaluating pending defaults.\n\t */\n\tpublic readonly fields: MinimalFieldMap<UnhydratedFlexTreeField> = {\n\t\tget: (key: FieldKey): UnhydratedFlexTreeField | undefined => this.tryGetField(key),\n\t\t[Symbol.iterator]: (): IterableIterator<[FieldKey, UnhydratedFlexTreeField]> => {\n\t\t\tcurrentObserver?.observeNodeFields(this);\n\t\t\treturn filterIterable(this.fieldsAll, ([, field]) => field.length > 0);\n\t\t},\n\t};\n\n\tpublic [Symbol.iterator](): IterableIterator<UnhydratedFlexTreeField> {\n\t\treturn mapIterable(this.fields, ([, field]) => field)[Symbol.iterator]();\n\t}\n\n\t/**\n\t * Gets all fields, without filtering out empty ones.\n\t * @remarks\n\t * This avoids forcing the evaluating of pending defaults in the fields, and also saves a copy on access.\n\t */\n\tpublic get allFieldsLazy(): ReadonlyMap<FieldKey, UnhydratedFlexTreeField> {\n\t\treturn this.fieldsAll;\n\t}\n\n\tpublic get type(): TreeNodeSchemaIdentifier {\n\t\treturn this.data.type;\n\t}\n\n\tprivate getOrCreateField(key: FieldKey): UnhydratedFlexTreeField {\n\t\treturn getOrCreate(this.fieldsAll, key, () => {\n\t\t\tconst stored = this.storedSchema.getFieldSchema(key).kind;\n\t\t\tconst field = createField(this.context, stored, key, []);\n\t\t\tfield.parent = this;\n\t\t\treturn field;\n\t\t});\n\t}\n\n\t/**\n\t * Set this node's parentage (see {@link FlexTreeNode.parentField}).\n\t * @remarks The node may be given a parent if it has none, or may have its parent removed (by passing `undefined`).\n\t * However, a node with a parent may not be directly re-assigned a different parent.\n\t * That likely indicates either an attempted multi-parenting or an attempt to \"move\" the node, neither of which are supported.\n\t * Removing a node's parent twice in a row is also not supported, as it likely indicates a bug.\n\t */\n\tpublic adoptBy(parent: undefined): void;\n\tpublic adoptBy(parent: UnhydratedFlexTreeField, index: number): void;\n\tpublic adoptBy(parent: UnhydratedFlexTreeField | undefined, index?: number): void {\n\t\tif (parent !== undefined) {\n\t\t\tassert(index !== undefined, 0xa08 /* Expected index */);\n\t\t\tif (this.location !== unparentedLocation) {\n\t\t\t\tthrow new UsageError(\"A node may not be in more than one place in the tree\");\n\t\t\t}\n\t\t\tlet unhydratedNode: UnhydratedFlexTreeNode | undefined = parent.parent;\n\t\t\twhile (unhydratedNode !== undefined) {\n\t\t\t\tif (unhydratedNode === this) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\"A node may not be inserted into a location that is under itself\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst parentNode: FlexTreeNode | undefined = unhydratedNode.parentField.parent.parent;\n\t\t\t\tassert(\n\t\t\t\t\tparentNode === undefined || parentNode instanceof UnhydratedFlexTreeNode,\n\t\t\t\t\t0xb77 /* Unhydrated node's parent should be an unhydrated node */,\n\t\t\t\t);\n\t\t\t\tunhydratedNode = parentNode;\n\t\t\t}\n\t\t\tthis.location = { parent, index };\n\t\t} else {\n\t\t\tassert(\n\t\t\t\tthis.location !== unparentedLocation,\n\t\t\t\t0xa09 /* Node may not be un-adopted if it does not have a parent */,\n\t\t\t);\n\t\t\tthis.location = unparentedLocation;\n\t\t}\n\t}\n\n\t/**\n\t * The field this tree is in, and the index within that field.\n\t * @remarks If this node is unparented, this method will return the special {@link unparentedLocation} as the parent.\n\t */\n\tpublic get parentField(): LocationInField {\n\t\tcurrentObserver?.observeParentOf(this);\n\t\treturn this.location;\n\t}\n\n\tpublic borrowCursor(): ITreeCursorSynchronous {\n\t\treturn cursorForMapTreeNode<MapTreeNodeViewGeneric<FlexTreeNode>>(this);\n\t}\n\n\tpublic tryGetField(key: FieldKey): UnhydratedFlexTreeField | undefined {\n\t\tcurrentObserver?.observeNodeField(this, key);\n\n\t\tconst field = this.fieldsAll.get(key);\n\t\t// Only return the field if it is not empty, in order to fulfill the contract of `tryGetField`.\n\t\tif (field !== undefined && field.length > 0) {\n\t\t\treturn field;\n\t\t}\n\t}\n\n\tpublic getBoxed(key: string): UnhydratedFlexTreeField {\n\t\tconst fieldKey: FieldKey = brand(key);\n\n\t\tcurrentObserver?.observeNodeField(this, fieldKey);\n\n\t\treturn this.getOrCreateField(fieldKey);\n\t}\n\n\tpublic keys(): IterableIterator<FieldKey> {\n\t\treturn Array.from(this.fields, ([key]) => key)[Symbol.iterator]();\n\t}\n\n\tpublic get value(): Value {\n\t\treturn this.data.value;\n\t}\n\n\tpublic emitChangedEvent(key: FieldKey): void {\n\t\tthis._events.emit(\"childrenChangedAfterBatch\", { changedFields: new Set([key]) });\n\n\t\t// Also emit subtree changed event for this node and all ancestors.\n\t\tthis.#emitSubtreeChangedEvents();\n\t}\n\n\t/**\n\t * Emit subtree changed events for this node and all ancestors.\n\t */\n\t#emitSubtreeChangedEvents(): void {\n\t\tthis._events.emit(\"subtreeChangedAfterBatch\");\n\n\t\tconst parent = this.parentField.parent.parent;\n\t\tassert(\n\t\t\tparent === undefined || parent instanceof UnhydratedFlexTreeNode,\n\t\t\t0xb76 /* Unhydrated node's parent should be an unhydrated node */,\n\t\t);\n\t\tif (parent !== undefined) {\n\t\t\tparent.#emitSubtreeChangedEvents();\n\t\t}\n\t}\n}\n\n/**\n * Implementation of `FlexTreeContext`.\n *\n * @remarks An editor is required to edit the FlexTree.\n */\nexport class UnhydratedContext implements FlexTreeContext {\n\t/**\n\t * @param flexSchema - Schema to use when working with the tree.\n\t */\n\tpublic constructor(\n\t\tpublic readonly schemaPolicy: SchemaPolicy,\n\t\tpublic readonly schema: TreeStoredSchema,\n\t) {}\n\n\tpublic isDisposed(): boolean {\n\t\treturn false;\n\t}\n\n\tpublic isHydrated(): this is FlexTreeHydratedContext {\n\t\treturn false;\n\t}\n\n\tpublic runInTransaction(fn: () => void): void {\n\t\tdebugAssert(() => !this.isDisposed() || \"Disposed\");\n\t\tfn();\n\t}\n}\n\n// #region Fields\n\n/**\n * A special singleton that is the implicit {@link LocationInField} of all un-parented {@link UnhydratedFlexTreeNode}s.\n * @remarks This exists because {@link UnhydratedFlexTreeNode.parentField} must return a field.\n * If a {@link UnhydratedFlexTreeNode} is created without a parent, its {@link UnhydratedFlexTreeNode.parentField} property will point to this object.\n * However, this field cannot be used in any practical way because it is empty, i.e. it does not actually contain the children that claim to be parented under it.\n * It has the \"empty\" schema and it will always contain zero children if queried.\n * Any nodes with this location will have a dummy parent index of `-1`.\n *\n * TODO: make this make sense.\n */\nconst unparentedLocation: LocationInField = {\n\tparent: {\n\t\tkey: dummyRoot,\n\t\tparent: undefined,\n\t\tschema: brand(FieldKinds.optional.identifier),\n\t},\n\tindex: 0,\n};\n\n/**\n * The {@link Unhydrated} implementation of {@link FlexTreeField}.\n */\nexport class UnhydratedFlexTreeField\n\timplements FlexTreeField, MapTreeFieldViewGeneric<FlexTreeNode>\n{\n\tpublic [flexTreeMarker] = FlexTreeEntityKind.Field as const;\n\n\tpublic parent: UnhydratedFlexTreeNode | undefined = undefined;\n\n\tpublic constructor(\n\t\tpublic readonly context: FlexTreeContext,\n\t\tpublic readonly schema: FieldKindIdentifier,\n\t\tpublic readonly key: FieldKey,\n\t\t/**\n\t\t * The children of this field.\n\t\t * @remarks\n\t\t * This is either an array of {@link UnhydratedFlexTreeNode}s or a {@link ContextualFieldProvider} that will be used to populate the children lazily (after which it will become an array).\n\t\t * See {@link fillPendingDefaults}.\n\t\t * Note that any fields using a {@link ConstantFieldProvider} should be evaluated before constructing the UnhydratedFlexTreeField.\n\t\t */\n\t\tprivate lazyChildren: FlexTreeNode[] | ContextualFieldProvider,\n\t) {\n\t\t// When this field is created (which only happens one time, because it is cached), all the children become parented for the first time.\n\t\t// \"Adopt\" each child by updating its parent information to point to this field.\n\t\tif (Array.isArray(lazyChildren)) {\n\t\t\tfor (const [i, child] of lazyChildren.entries()) {\n\t\t\t\tif (child instanceof UnhydratedFlexTreeNode) {\n\t\t\t\t\tchild.adoptBy(this, i);\n\t\t\t\t} else {\n\t\t\t\t\t// TODO: hook up events from hydrated to unhydrated nodes.\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic borrowCursor(): ITreeCursorSynchronous {\n\t\treturn cursorForMapTreeField<MapTreeNodeViewGeneric<FlexTreeNode>>(this.children);\n\t}\n\n\tprivate getPendingDefault(): ContextualFieldProvider | undefined {\n\t\treturn !Array.isArray(this.lazyChildren) ? this.lazyChildren : undefined;\n\t}\n\n\t/**\n\t * Populate pending default (if present) using the provided context.\n\t * @remarks\n\t * This apply to just this field: caller will likely want to recursively walk the tree.\n\t * @see {@link pendingDefault}.\n\t */\n\tpublic fillPendingDefaults(context: FlexTreeHydratedContextMinimal): void {\n\t\tconst provider = this.getPendingDefault();\n\t\tif (provider) {\n\t\t\tconst content = provider(context);\n\t\t\tthis.lazyChildren = content;\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if this field has a pending default due to defined defined using a {@link ContextualFieldProvider}.\n\t */\n\tpublic get pendingDefault(): boolean {\n\t\treturn this.getPendingDefault() !== undefined;\n\t}\n\n\tpublic get children(): FlexTreeNode[] {\n\t\tconst provider = this.getPendingDefault();\n\t\tif (provider) {\n\t\t\tconst content = provider(\"UseGlobalContext\");\n\t\t\tthis.lazyChildren = content;\n\t\t}\n\t\treturn this.lazyChildren as FlexTreeNode[];\n\t}\n\n\tpublic get length(): number {\n\t\treturn this.children.length;\n\t}\n\n\tpublic is<TKind2 extends FlexFieldKind>(kind: TKind2): this is FlexTreeTypedField<TKind2> {\n\t\treturn this.schema === kind.identifier;\n\t}\n\n\tpublic boxedAt(index: number): FlexTreeNode | undefined {\n\t\tconst i = indexForAt(index, this.length);\n\t\tif (i === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst m = this.children[i];\n\t\treturn m;\n\t}\n\n\tpublic [Symbol.iterator](): IterableIterator<FlexTreeNode> {\n\t\treturn this.children[Symbol.iterator]();\n\t}\n\n\t/**\n\t * Mutate this field.\n\t * @param edit - A function which receives the current `MapTree`s that comprise the contents of the field so that it may be mutated.\n\t * The function may mutate the array in place or return a new array.\n\t * If a new array is returned then it will be used as the new contents of the field, otherwise the original array will be continue to be used.\n\t * @remarks All edits to the field (i.e. mutations of the field's MapTrees) should be directed through this function.\n\t * This function ensures that the parent MapTree has no empty fields (which is an invariant of `MapTree`) after the mutation.\n\t */\n\tprotected edit(edit: (mapTrees: FlexTreeNode[]) => void | FlexTreeNode[]): void {\n\t\t// Clear parents for all old map trees.\n\t\tfor (const tree of this.children) {\n\t\t\torphan(tree);\n\t\t}\n\n\t\tthis.lazyChildren = edit(this.children) ?? this.children;\n\n\t\t// Set parents for all new map trees.\n\t\tfor (const [index, tree] of this.children.entries()) {\n\t\t\tadoptNode(this, tree, index);\n\t\t}\n\n\t\tthis.parent?.emitChangedEvent(this.key);\n\t}\n\n\tpublic getFieldPath(): NormalizedFieldUpPath {\n\t\tthrow unsupportedUsageError(\"Editing an array\");\n\t}\n\n\t/** Unboxes leaf nodes to their values */\n\tprotected unboxed(index: number): TreeValue | FlexTreeNode {\n\t\tconst child = this.children[index] ?? oob();\n\t\tconst value = child.value;\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\t\t}\n\t\treturn child;\n\t}\n}\n\nfunction adoptNode(parent: UnhydratedFlexTreeField, node: FlexTreeNode, index: number): void {\n\tif (node instanceof UnhydratedFlexTreeNode) {\n\t\tnode.adoptBy(parent, index);\n\t} else {\n\t\t// TODO: handle parenting for hydrated nodes.\n\t}\n}\n\nfunction orphan(node: FlexTreeNode): void {\n\tif (node instanceof UnhydratedFlexTreeNode) {\n\t\tnode.adoptBy(undefined);\n\t} else {\n\t\t// TODO: handle unparenting for hydrated nodes.\n\t}\n}\n\n/**\n * The {@link Unhydrated} implementation of {@link FlexTreeOptionalField}.\n */\nexport class UnhydratedOptionalField\n\textends UnhydratedFlexTreeField\n\timplements FlexTreeOptionalField\n{\n\tpublic readonly editor: OptionalFieldEditor<FlexibleNodeContent, FlexTreeNode> = {\n\t\tset: (newContent: FlexibleNodeContent | undefined): void => {\n\t\t\t// If the new content is a UnhydratedFlexTreeNode, it needs to have its parent pointer updated\n\t\t\tif (newContent !== undefined) {\n\t\t\t\tassert(\n\t\t\t\t\tnewContent instanceof UnhydratedFlexTreeNode,\n\t\t\t\t\t0xbb7 /* Expected unhydrated node */,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.edit((mapTrees) => {\n\t\t\t\tif (newContent !== undefined) {\n\t\t\t\t\tmapTrees[0] = newContent;\n\t\t\t\t} else {\n\t\t\t\t\tmapTrees.length = 0;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tclear: (): void => {\n\t\t\tthis.editor.set(undefined, true /* <- dummy wasEmpty argument */);\n\t\t},\n\t\tattach: (content): void => {\n\t\t\tthis.editor.set(content, true /* <- dummy wasEmpty argument */);\n\t\t},\n\t};\n\n\tpublic get content(): FlexTreeUnknownUnboxed | undefined {\n\t\tconst value = this.children[0];\n\t\tif (value !== undefined) {\n\t\t\treturn this.unboxed(0);\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class UnhydratedRequiredField\n\textends UnhydratedFlexTreeField\n\timplements FlexTreeRequiredField\n{\n\tpublic readonly editor: RequiredFieldEditor<FlexibleNodeContent, FlexTreeNode> = {\n\t\tset: (newContent: FlexibleNodeContent): void => {\n\t\t\tassert(\n\t\t\t\tnewContent instanceof UnhydratedFlexTreeNode,\n\t\t\t\t0xbb7 /* Expected unhydrated node */,\n\t\t\t);\n\n\t\t\tthis.edit((mapTrees) => {\n\t\t\t\tmapTrees[0] = newContent;\n\t\t\t});\n\t\t},\n\t\tattach: (content): void => {\n\t\t\tthis.editor.set(content);\n\t\t},\n\t};\n\n\tpublic get content(): FlexTreeUnknownUnboxed {\n\t\tconst value = this.children[0];\n\t\t// This cannot use ?? since null is a legal value here.\n\t\tassert(\n\t\t\tvalue !== undefined,\n\t\t\t0xa57 /* Expected EagerMapTree required field to have a value */,\n\t\t);\n\t\treturn this.unboxed(0);\n\t}\n}\n\n/**\n * The {@link Unhydrated} implementation of {@link FlexTreeSequenceField}.\n */\nexport class UnhydratedSequenceField\n\textends UnhydratedFlexTreeField\n\timplements FlexTreeSequenceField\n{\n\tpublic readonly editor: SequenceFieldEditor<\n\t\treadonly FlexibleNodeContent[],\n\t\treadonly FlexTreeNode[],\n\t\tFlexTreeNode[]\n\t> = {\n\t\tinsert: (index, newContent): void => {\n\t\t\tfor (const c of newContent) {\n\t\t\t\tassert(c !== undefined, 0xa0a /* Unexpected sparse array content */);\n\t\t\t\t// TODO: ensure somewhere checks for not already having parents\n\t\t\t}\n\t\t\tconst newContentChecked: readonly FlexTreeNode[] = newContent;\n\t\t\tthis.edit((mapTrees) => {\n\t\t\t\tif (newContent.length < 1000) {\n\t\t\t\t\t// For \"smallish arrays\" (`1000` is not empirically derived), the `splice` function is appropriate...\n\t\t\t\t\tmapTrees.splice(index, 0, ...newContentChecked);\n\t\t\t\t} else {\n\t\t\t\t\t// ...but we avoid using `splice` + spread for very large input arrays since there is a limit on how many elements can be spread (too many will overflow the stack).\n\t\t\t\t\treturn mapTrees.slice(0, index).concat(newContentChecked, mapTrees.slice(index));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tremove: (index, count): FlexTreeNode[] => {\n\t\t\tfor (let i = index; i < index + count; i++) {\n\t\t\t\tconst c = this.children[i];\n\t\t\t\tassert(c !== undefined, 0xa0b /* Unexpected sparse array */);\n\t\t\t}\n\t\t\tlet removed: FlexTreeNode[] | undefined;\n\t\t\tthis.edit((mapTrees) => {\n\t\t\t\tremoved = mapTrees.splice(index, count);\n\t\t\t});\n\t\t\treturn removed ?? fail(0xb4a /* Expected removed to be set by edit */);\n\t\t},\n\t\tattach: (index, content: readonly FlexTreeNode[]): void => {\n\t\t\tthis.editor.insert(index, content);\n\t\t},\n\t} satisfies UnhydratedTreeSequenceFieldEditBuilder;\n\n\tpublic at(index: number): FlexTreeUnknownUnboxed | undefined {\n\t\tconst i = indexForAt(index, this.length);\n\t\tif (i === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.unboxed(i);\n\t}\n\tpublic map<U>(callbackfn: (value: FlexTreeUnknownUnboxed, index: number) => U): U[] {\n\t\treturn Array.from(this, callbackfn);\n\t}\n}\n\n// #endregion Fields\n\n/** Creates a field with the given attributes */\nexport function createField(\n\t...args: ConstructorParameters<typeof UnhydratedFlexTreeField>\n): UnhydratedFlexTreeField {\n\tswitch (args[1]) {\n\t\tcase FieldKinds.required.identifier:\n\t\tcase FieldKinds.identifier.identifier:\n\t\t\treturn new UnhydratedRequiredField(...args);\n\t\tcase FieldKinds.optional.identifier:\n\t\t\treturn new UnhydratedOptionalField(...args);\n\t\tcase FieldKinds.sequence.identifier:\n\t\t\treturn new UnhydratedSequenceField(...args);\n\t\tcase FieldKinds.forbidden.identifier:\n\t\t\t// TODO: this seems to used by unknown optional fields. They should probably use \"optional\" not \"Forbidden\" schema.\n\t\t\treturn new UnhydratedFlexTreeField(...args);\n\t\tdefault:\n\t\t\treturn fail(0xb9d /* unsupported field kind */);\n\t}\n}\n\nexport function unsupportedUsageError(message?: string): Error {\n\treturn new UsageError(\n\t\t`${\n\t\t\tmessage ?? \"Operation\"\n\t\t} is not supported for content that has not yet been inserted into the tree`,\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walkSchema.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/core/walkSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,
|
|
1
|
+
{"version":3,"file":"walkSchema.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/core/walkSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAE9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAExF;;;GAGG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,GAC7B,IAAI,CA8BN;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,qBAAqB,EAAE,yBAAyB,EAChD,OAAO,EAAE,aAAa,EACtB,UAAU,GAAE,GAAG,CAAC,cAAc,CAAa,GACzC,IAAI,CAON;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IACxC;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACjE;;;;;;;;;OASG;IACH,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,oBAAoB,CAAC,cAAc,CAAC,KAAK,OAAO,CAAC;CACnF"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { normalizeAndEvaluateAnnotatedAllowedTypes, } from "./allowedTypes.js";
|
|
5
|
+
import { normalizeAndEvaluateAnnotatedAllowedTypes, markSchemaMostDerived, } from "./allowedTypes.js";
|
|
6
6
|
import { getTreeNodeSchemaPrivateData } from "./treeNodeSchema.js";
|
|
7
7
|
/**
|
|
8
8
|
* Traverses all {@link TreeNodeSchema} schema reachable from `schema`, applying the visitor pattern.
|
|
@@ -13,6 +13,10 @@ export function walkNodeSchema(schema, visitor, visitedSet) {
|
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
visitedSet.add(schema);
|
|
16
|
+
// Ensure all reachable schema are marked as most derived.
|
|
17
|
+
// This ensures if multiple schema extending the same schema factory generated class are present (or have had instances of them constructed, or get instances of them constructed in the future),
|
|
18
|
+
// an error is reported.
|
|
19
|
+
markSchemaMostDerived(schema, false);
|
|
16
20
|
// Since walkNodeSchema is used in the implementation of TreeNodeSchemaPrivateData.idempotentInitialize,
|
|
17
21
|
// Avoid depending on it here to avoid circular dependencies for recursive schema.
|
|
18
22
|
// Instead normalize/evaluate the allowed types as needed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walkSchema.js","sourceRoot":"","sources":["../../../src/simple-tree/core/walkSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,yCAAyC,
|
|
1
|
+
{"version":3,"file":"walkSchema.js","sourceRoot":"","sources":["../../../src/simple-tree/core/walkSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,yCAAyC,EAGzC,qBAAqB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,4BAA4B,EAAuB,MAAM,qBAAqB,CAAC;AAExF;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC7B,MAAsB,EACtB,OAAsB,EACtB,UAA+B;IAE/B,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,OAAO;IACR,CAAC;IAED,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAEvB,0DAA0D;IAC1D,iMAAiM;IACjM,wBAAwB;IACxB,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAErC,wGAAwG;IACxG,kFAAkF;IAClF,0DAA0D;IAC1D,MAAM,qBAAqB,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC;IAErF,KAAK,MAAM,iBAAiB,IAAI,qBAAqB,EAAE,CAAC;QACvD,gBAAgB,CACf,yCAAyC,CAAC,iBAAiB,CAAC,EAC5D,OAAO,EACP,UAAU,CACV,CAAC;IACH,CAAC;IAED,kFAAkF;IAClF,4CAA4C;IAC5C,wGAAwG;IACxG,gIAAgI;IAChI,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC/B,qBAAgD,EAChD,OAAsB,EACtB,aAAkC,IAAI,GAAG,EAAE;IAE3C,KAAK,MAAM,WAAW,IAAI,qBAAqB,CAAC,KAAK,EAAE,CAAC;QACvD,IAAI,CAAC,OAAO,CAAC,iBAAiB,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;YAC9D,cAAc,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACvD,CAAC;IACF,CAAC;IACD,OAAO,CAAC,YAAY,EAAE,CAAC,qBAAqB,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tnormalizeAndEvaluateAnnotatedAllowedTypes,\n\ttype AnnotatedAllowedType,\n\ttype AllowedTypesFullEvaluated,\n\tmarkSchemaMostDerived,\n} from \"./allowedTypes.js\";\nimport { getTreeNodeSchemaPrivateData, type TreeNodeSchema } from \"./treeNodeSchema.js\";\n\n/**\n * Traverses all {@link TreeNodeSchema} schema reachable from `schema`, applying the visitor pattern.\n * @internal\n */\nexport function walkNodeSchema(\n\tschema: TreeNodeSchema,\n\tvisitor: SchemaVisitor,\n\tvisitedSet: Set<TreeNodeSchema>,\n): void {\n\tif (visitedSet.has(schema)) {\n\t\treturn;\n\t}\n\n\tvisitedSet.add(schema);\n\n\t// Ensure all reachable schema are marked as most derived.\n\t// This ensures if multiple schema extending the same schema factory generated class are present (or have had instances of them constructed, or get instances of them constructed in the future),\n\t// an error is reported.\n\tmarkSchemaMostDerived(schema, false);\n\n\t// Since walkNodeSchema is used in the implementation of TreeNodeSchemaPrivateData.idempotentInitialize,\n\t// Avoid depending on it here to avoid circular dependencies for recursive schema.\n\t// Instead normalize/evaluate the allowed types as needed.\n\tconst annotatedAllowedTypes = getTreeNodeSchemaPrivateData(schema).childAllowedTypes;\n\n\tfor (const fieldAllowedTypes of annotatedAllowedTypes) {\n\t\twalkAllowedTypes(\n\t\t\tnormalizeAndEvaluateAnnotatedAllowedTypes(fieldAllowedTypes),\n\t\t\tvisitor,\n\t\t\tvisitedSet,\n\t\t);\n\t}\n\n\t// This visit is done at the end so the traversal order is most inner types first.\n\t// This was picked since when fixing errors,\n\t// working from the inner types out to the types that use them will probably go better than the reverse.\n\t// This does not however ensure all types referenced by a type are visited before it, since in recursive cases thats impossible.\n\tvisitor.node?.(schema);\n}\n\n/**\n * Traverses all {@link TreeNodeSchema} schema reachable from `allowedTypes`, applying the visitor pattern.\n * @internal\n */\nexport function walkAllowedTypes(\n\tannotatedAllowedTypes: AllowedTypesFullEvaluated,\n\tvisitor: SchemaVisitor,\n\tvisitedSet: Set<TreeNodeSchema> = new Set(),\n): void {\n\tfor (const allowedType of annotatedAllowedTypes.types) {\n\t\tif ((visitor.allowedTypeFilter ?? (() => true))(allowedType)) {\n\t\t\twalkNodeSchema(allowedType.type, visitor, visitedSet);\n\t\t}\n\t}\n\tvisitor.allowedTypes?.(annotatedAllowedTypes);\n}\n\n/**\n * Callbacks and options for use in {@link walkFieldSchema} / {@link walkAllowedTypes} / {@link walkNodeSchema}.\n * @internal\n */\nexport interface SchemaVisitor {\n\t/**\n\t * Called once for each node schema reached.\n\t */\n\tnode?: (schema: TreeNodeSchema) => void;\n\t/**\n\t * Called once for each set of allowed types.\n\t * @remarks\n\t * This includes every field, as well as the allowed types for maps and arrays nodes and the root if starting at {@link walkAllowedTypes}.\n\t *\n\t * Each allowed types in the schema is visited as it was in the original schema except for normalization.\n\t *\n\t * After this is called {@link SchemaVisitor.allowedTypeFilter} is applied to each allowed type in the schema to determine which of them are walked into.\n\t */\n\tallowedTypes?: (allowedTypes: AllowedTypesFullEvaluated) => void;\n\t/**\n\t * If true, will walk into this `allowedType`.\n\t * If false, the `allowedType` will not be walked into.\n\t *\n\t * If not provided, all allowedTypes will be walked into.\n\t * @remarks\n\t * Called after {@link SchemaVisitor.allowedTypes}.\n\t * @privateRemarks\n\t * It would be possible to combine this with `allowedTypes` into a single callback, but for the current usage this separation is more convenient.\n\t */\n\tallowedTypeFilter?: (allowedType: AnnotatedAllowedType<TreeNodeSchema>) => boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createContext.d.ts","sourceRoot":"","sources":["../../src/simple-tree/createContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"createContext.d.ts","sourceRoot":"","sources":["../../src/simple-tree/createContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,OAAO,EAGP,KAAK,cAAc,EACnB,KAAK,6BAA6B,EAClC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAwB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUlF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAsBzE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC/C,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,IAAI,CAAC,6BAA6B,EAAE,eAAe,GAAG,0BAA0B,CAAC,GACxF,6BAA6B,CAO/B"}
|
|
@@ -2,23 +2,38 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
5
6
|
import { defaultSchemaPolicy } from "../feature-libraries/index.js";
|
|
6
7
|
import { getOrCreate } from "../util/index.js";
|
|
7
8
|
import { Context, getTreeNodeSchemaPrivateData, UnhydratedContext, } from "./core/index.js";
|
|
8
9
|
import { normalizeFieldSchema } from "./fieldSchema.js";
|
|
9
10
|
import { toStoredSchema, toUnhydratedSchema } from "./toStoredSchema.js";
|
|
10
11
|
const contextCache = new WeakMap();
|
|
12
|
+
/**
|
|
13
|
+
* See note in {@link getUnhydratedContext}.
|
|
14
|
+
*/
|
|
15
|
+
let getUnhydratedContextIsRunning = false;
|
|
11
16
|
/**
|
|
12
17
|
* Utility for creating {@link Context}s for unhydrated nodes.
|
|
13
18
|
* @remarks
|
|
14
19
|
* The resulting context will not allow any unknown optional fields.
|
|
15
20
|
*/
|
|
16
21
|
export function getUnhydratedContext(schema) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
// Due to caching, calling this reentrantly can cause issues.
|
|
23
|
+
// Due to recursive schema, and generally lots of lazy initialization code depending on this, bugs with this going reentrant are not uncommon.
|
|
24
|
+
// To make debugging such cases much easier, we assert that this is not called reentrantly.
|
|
25
|
+
assert(!getUnhydratedContextIsRunning, "getUnhydratedContext should not be reentrant");
|
|
26
|
+
getUnhydratedContextIsRunning = true;
|
|
27
|
+
try {
|
|
28
|
+
return getOrCreate(contextCache, schema, (s) => {
|
|
29
|
+
const normalized = normalizeFieldSchema(schema);
|
|
30
|
+
const flexContext = new UnhydratedContext(defaultSchemaPolicy, toStoredSchema(schema, toUnhydratedSchema));
|
|
31
|
+
return new Context(flexContext, Context.schemaMapFromRootSchema(normalized.allowedTypesFull.evaluate()));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
getUnhydratedContextIsRunning = false;
|
|
36
|
+
}
|
|
22
37
|
}
|
|
23
38
|
/**
|
|
24
39
|
* Utility for creating {@link TreeNodeSchemaInitializedData}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createContext.js","sourceRoot":"","sources":["../../src/simple-tree/createContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACN,OAAO,EACP,4BAA4B,EAC5B,iBAAiB,GAGjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAA4B,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzE,MAAM,YAAY,GAA0C,IAAI,OAAO,EAAE,CAAC;AAE1E;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAA2B;IAC/D,OAAO,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"createContext.js","sourceRoot":"","sources":["../../src/simple-tree/createContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACN,OAAO,EACP,4BAA4B,EAC5B,iBAAiB,GAGjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAA4B,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzE,MAAM,YAAY,GAA0C,IAAI,OAAO,EAAE,CAAC;AAE1E;;GAEG;AACH,IAAI,6BAA6B,GAAG,KAAK,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAA2B;IAC/D,6DAA6D;IAC7D,8IAA8I;IAC9I,2FAA2F;IAC3F,MAAM,CAAC,CAAC,6BAA6B,EAAE,8CAA8C,CAAC,CAAC;IACvF,6BAA6B,GAAG,IAAI,CAAC;IACrC,IAAI,CAAC;QACJ,OAAO,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;YAC9C,MAAM,UAAU,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAEhD,MAAM,WAAW,GAAG,IAAI,iBAAiB,CACxC,mBAAmB,EACnB,cAAc,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAC1C,CAAC;YACF,OAAO,IAAI,OAAO,CACjB,WAAW,EACX,OAAO,CAAC,uBAAuB,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CACvE,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;YAAS,CAAC;QACV,6BAA6B,GAAG,KAAK,CAAC;IACvC,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gCAAgC,CAC/C,MAAsB,EACtB,OAA0F;IAE1F,MAAM,IAAI,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC;IAClD,OAAO;QACN,GAAG,OAAO;QACV,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC;QACrC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;KAClE,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { defaultSchemaPolicy } from \"../feature-libraries/index.js\";\nimport { getOrCreate } from \"../util/index.js\";\n\nimport {\n\tContext,\n\tgetTreeNodeSchemaPrivateData,\n\tUnhydratedContext,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaInitializedData,\n} from \"./core/index.js\";\nimport { normalizeFieldSchema, type ImplicitFieldSchema } from \"./fieldSchema.js\";\nimport { toStoredSchema, toUnhydratedSchema } from \"./toStoredSchema.js\";\n\nconst contextCache: WeakMap<ImplicitFieldSchema, Context> = new WeakMap();\n\n/**\n * See note in {@link getUnhydratedContext}.\n */\nlet getUnhydratedContextIsRunning = false;\n\n/**\n * Utility for creating {@link Context}s for unhydrated nodes.\n * @remarks\n * The resulting context will not allow any unknown optional fields.\n */\nexport function getUnhydratedContext(schema: ImplicitFieldSchema): Context {\n\t// Due to caching, calling this reentrantly can cause issues.\n\t// Due to recursive schema, and generally lots of lazy initialization code depending on this, bugs with this going reentrant are not uncommon.\n\t// To make debugging such cases much easier, we assert that this is not called reentrantly.\n\tassert(!getUnhydratedContextIsRunning, \"getUnhydratedContext should not be reentrant\");\n\tgetUnhydratedContextIsRunning = true;\n\ttry {\n\t\treturn getOrCreate(contextCache, schema, (s) => {\n\t\t\tconst normalized = normalizeFieldSchema(schema);\n\n\t\t\tconst flexContext = new UnhydratedContext(\n\t\t\t\tdefaultSchemaPolicy,\n\t\t\t\ttoStoredSchema(schema, toUnhydratedSchema),\n\t\t\t);\n\t\t\treturn new Context(\n\t\t\t\tflexContext,\n\t\t\t\tContext.schemaMapFromRootSchema(normalized.allowedTypesFull.evaluate()),\n\t\t\t);\n\t\t});\n\t} finally {\n\t\tgetUnhydratedContextIsRunning = false;\n\t}\n}\n\n/**\n * Utility for creating {@link TreeNodeSchemaInitializedData}.\n */\nexport function getTreeNodeSchemaInitializedData(\n\tschema: TreeNodeSchema,\n\thandler: Pick<TreeNodeSchemaInitializedData, \"toFlexContent\" | \"shallowCompatibilityTest\">,\n): TreeNodeSchemaInitializedData {\n\tconst data = getTreeNodeSchemaPrivateData(schema);\n\treturn {\n\t\t...handler,\n\t\tcontext: getUnhydratedContext(schema),\n\t\tchildAllowedTypes: data.childAllowedTypes.map((t) => t.evaluate()),\n\t};\n}\n"]}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ErasedType } from "@fluidframework/core-interfaces";
|
|
6
6
|
import type { FieldKey } from "../core/index.js";
|
|
7
|
-
import type { FlexTreeHydratedContextMinimal } from "../feature-libraries/index.js";
|
|
7
|
+
import type { FlexTreeHydratedContextMinimal, FlexTreeNode } from "../feature-libraries/index.js";
|
|
8
8
|
import { type MakeNominal, type UnionToIntersection, type JsonCompatibleReadOnlyObject } from "../util/index.js";
|
|
9
|
-
import type { TreeNodeSchema, TreeNode,
|
|
10
|
-
import type { SimpleAllowedTypeAttributes, SimpleFieldSchema } from "./simpleSchema.js";
|
|
9
|
+
import type { TreeNodeSchema, TreeNode, ImplicitAllowedTypes, TreeNodeFromImplicitAllowedTypes, TreeLeafValue, InsertableTreeNodeFromImplicitAllowedTypes, AllowedTypesFull } from "./core/index.js";
|
|
10
|
+
import type { SchemaType, SimpleAllowedTypeAttributes, SimpleFieldSchema } from "./simpleSchema.js";
|
|
11
11
|
import type { UnsafeUnknownSchema } from "./unsafeUnknownSchema.js";
|
|
12
12
|
import type { InsertableContent } from "./unhydratedFlexTreeFromInsertable.js";
|
|
13
13
|
/**
|
|
@@ -147,11 +147,11 @@ export interface FieldPropsAlpha<TCustomMetadata = unknown> extends FieldProps<T
|
|
|
147
147
|
/**
|
|
148
148
|
* A {@link FieldProvider} which requires additional context in order to produce its content
|
|
149
149
|
*/
|
|
150
|
-
export type ContextualFieldProvider = (context: FlexTreeHydratedContextMinimal | "UseGlobalContext") =>
|
|
150
|
+
export type ContextualFieldProvider = (context: FlexTreeHydratedContextMinimal | "UseGlobalContext") => FlexTreeNode[];
|
|
151
151
|
/**
|
|
152
152
|
* A {@link FieldProvider} which can produce its content in a vacuum.
|
|
153
153
|
*/
|
|
154
|
-
export type ConstantFieldProvider = () =>
|
|
154
|
+
export type ConstantFieldProvider = () => FlexTreeNode[];
|
|
155
155
|
/**
|
|
156
156
|
* A function which produces content for a field every time that it is called.
|
|
157
157
|
*/
|
|
@@ -288,7 +288,7 @@ export declare class FieldSchema<out Kind extends FieldKind = FieldKind, out Typ
|
|
|
288
288
|
* This class will go away once the alpha APIs are stable and implemented by {@link FieldSchema}.
|
|
289
289
|
* @sealed @alpha
|
|
290
290
|
*/
|
|
291
|
-
export declare class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types extends ImplicitAllowedTypes = ImplicitAllowedTypes, TCustomMetadata = unknown> extends FieldSchema<Kind, Types, TCustomMetadata> implements SimpleFieldSchema {
|
|
291
|
+
export declare class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types extends ImplicitAllowedTypes = ImplicitAllowedTypes, TCustomMetadata = unknown> extends FieldSchema<Kind, Types, TCustomMetadata> implements SimpleFieldSchema<SchemaType.View> {
|
|
292
292
|
private readonly propsAlpha;
|
|
293
293
|
get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined;
|
|
294
294
|
/**
|
|
@@ -296,7 +296,7 @@ export declare class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types
|
|
|
296
296
|
*/
|
|
297
297
|
readonly allowedTypesFull: AllowedTypesFull;
|
|
298
298
|
get allowedTypesIdentifiers(): ReadonlySet<string>;
|
|
299
|
-
get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypeAttributes
|
|
299
|
+
get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.View>>;
|
|
300
300
|
protected constructor(kind: Kind, types: Types, props?: FieldPropsAlpha<TCustomMetadata>);
|
|
301
301
|
}
|
|
302
302
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldSchema.d.ts","sourceRoot":"","sources":["../../src/simple-tree/fieldSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAIlE,OAAO,KAA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