@fluidframework/tree 2.81.0-374083 → 2.81.1
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/CHANGELOG.md +57 -0
- package/api-report/tree.alpha.api.md +0 -1
- package/dist/codec/codec.d.ts +2 -2
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +8 -8
- 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 +12 -12
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/core/change-family/changeFamily.d.ts +1 -4
- 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 +4 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +1 -6
- 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 +1 -2
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +1 -2
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +1 -5
- 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 +7 -25
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV2.js +4 -4
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +1 -1
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +0 -6
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +0 -9
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -3
- package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js +2 -2
- package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
- package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.js +4 -4
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/dist/core/tree/index.d.ts +1 -1
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +3 -4
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts +3 -11
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js +2 -14
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +1 -1
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +1 -1
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.d.ts +3 -4
- package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.js +2 -16
- package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +0 -7
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -4
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +78 -245
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +25 -75
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +2 -3
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -5
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/dist/feature-libraries/deltaUtils.d.ts +0 -1
- package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/dist/feature-libraries/deltaUtils.js +1 -6
- package/dist/feature-libraries/deltaUtils.js.map +1 -1
- package/dist/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
- package/dist/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
- package/dist/feature-libraries/fieldKindIdentifiers.js +16 -0
- package/dist/feature-libraries/fieldKindIdentifiers.js.map +1 -0
- package/dist/feature-libraries/flex-tree/context.d.ts +0 -9
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +0 -6
- 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 +7 -8
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +17 -48
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.d.ts +1 -1
- package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +1 -1
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +3 -3
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +3 -8
- 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 +0 -1
- 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/crossFieldQueries.d.ts +21 -97
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +7 -4
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
- 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/fieldKindConfiguration.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +11 -5
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +4 -4
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +2 -2
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +162 -254
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +460 -1325
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +2 -2
- package/dist/feature-libraries/object-forest/objectForest.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 +4 -7
- package/dist/feature-libraries/optional-field/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts +34 -5
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +455 -221
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
- 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 +28 -57
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/optional-field/requiredField.d.ts +36 -0
- package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/requiredField.js +27 -0
- package/dist/feature-libraries/optional-field/requiredField.js.map +1 -0
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +7 -7
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/schemaChecker.js +1 -1
- package/dist/feature-libraries/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts +7 -6
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +259 -83
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
- 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 -13
- package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/index.js +3 -28
- 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 +167 -65
- 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 +56 -4
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js +90 -7
- 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 +114 -107
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +50 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
- package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.js +31 -18
- 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 +2 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +187 -365
- 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 +62 -20
- 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 +2 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.js +24 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
- package/dist/feature-libraries/sequence-field/types.d.ts +59 -30
- 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 +24 -15
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +305 -116
- 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 +2 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +7 -7
- 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 +1 -2
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +5 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +39 -40
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +5 -11
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +5 -43
- 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 +0 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +75 -58
- 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 +4 -10
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +7 -14
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/tree.d.ts.map +1 -1
- package/dist/shared-tree/tree.js +14 -14
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +77 -77
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +29 -13
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +80 -79
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +3 -4
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +3 -4
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.d.ts +18 -31
- package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.js +24 -76
- package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/dist/shared-tree-core/branchIdCodec.d.ts.map +1 -1
- package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
- package/dist/shared-tree-core/changeEnricher.d.ts +8 -43
- package/dist/shared-tree-core/changeEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/changeEnricher.js +0 -13
- package/dist/shared-tree-core/changeEnricher.js.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js +26 -36
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +3 -3
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +11 -11
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +1 -5
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +2 -10
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +1 -2
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +0 -6
- 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 +0 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +4 -4
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +1 -5
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +2 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +2 -6
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +2 -10
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +0 -1
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +0 -6
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +0 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/dist/shared-tree-core/messageTypes.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -5
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +14 -14
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.js +1 -1
- package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +2 -2
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +14 -14
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +1 -1
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +7 -7
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js +23 -23
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.js +1 -1
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/identifierIndex.d.ts +2 -2
- package/dist/simple-tree/api/identifierIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/identifierIndex.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 +6 -6
- package/dist/simple-tree/api/incrementalAllowedTypes.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 +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +7 -7
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +2 -2
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +7 -7
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js +1 -0
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaStatics.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +17 -17
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +14 -14
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +2 -2
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/treeBeta.js +2 -2
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +4 -4
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
- 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/api/verboseTree.d.ts +1 -1
- package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +22 -22
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js +7 -7
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/context.d.ts.map +1 -1
- package/dist/simple-tree/core/context.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +1 -1
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +1 -3
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +5 -5
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts +3 -3
- package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.js +2 -2
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +8 -59
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/core/withType.d.ts.map +1 -1
- package/dist/simple-tree/core/withType.js.map +1 -1
- package/dist/simple-tree/createContext.d.ts.map +1 -1
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +5 -5
- 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 +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +1 -1
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +15 -15
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +47 -49
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
- 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 +2 -2
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +26 -26
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
- 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 +2 -2
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +28 -28
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
- 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 +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +36 -38
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
- 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 +47 -54
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +128 -186
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/treeSchema.d.ts.map +1 -1
- package/dist/simple-tree/treeSchema.js.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +22 -40
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +22 -21
- package/dist/tableSchema.js.map +1 -1
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.js +3 -1
- package/dist/text/index.js.map +1 -1
- package/dist/text/textDomain.d.ts +8 -0
- package/dist/text/textDomain.d.ts.map +1 -1
- package/dist/text/textDomain.js +2 -1
- package/dist/text/textDomain.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +572 -0
- package/dist/text/textDomainFormatted.d.ts.map +1 -0
- package/dist/text/textDomainFormatted.js +183 -0
- package/dist/text/textDomainFormatted.js.map +1 -0
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +11 -21
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/bTreeUtils.d.ts.map +1 -1
- package/dist/util/bTreeUtils.js +1 -1
- package/dist/util/bTreeUtils.js.map +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +1 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/rangeMap.d.ts +12 -24
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +6 -46
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/readSnapshotBlob.d.ts +1 -1
- package/dist/util/readSnapshotBlob.d.ts.map +1 -1
- package/dist/util/readSnapshotBlob.js.map +1 -1
- package/docs/main/sequence-field/move-composition.md +46 -0
- package/eslint.config.mts +4 -4
- package/lib/codec/codec.d.ts +2 -2
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +1 -1
- 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 +2 -2
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +1 -4
- 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 +1 -6
- 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 +1 -2
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +0 -3
- 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 +7 -25
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV2.js +1 -1
- package/lib/core/schema-stored/formatV2.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +1 -1
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +0 -6
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +1 -10
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -2
- package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.js +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/lib/core/tree/index.d.ts +1 -1
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts +3 -11
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js +1 -12
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +1 -1
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js +1 -1
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/feature-libraries/changeAtomIdBTree.d.ts +3 -4
- package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdBTree.js +1 -14
- package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -8
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -4
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +73 -237
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +6 -56
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +2 -3
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -2
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/lib/feature-libraries/deltaUtils.d.ts +0 -1
- package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/lib/feature-libraries/deltaUtils.js +1 -5
- package/lib/feature-libraries/deltaUtils.js.map +1 -1
- package/lib/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
- package/lib/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
- package/lib/feature-libraries/fieldKindIdentifiers.js +13 -0
- package/lib/feature-libraries/fieldKindIdentifiers.js.map +1 -0
- package/lib/feature-libraries/flex-tree/context.d.ts +0 -9
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +0 -6
- 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 +7 -8
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +11 -42
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/observer.d.ts +1 -1
- package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/observer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +1 -1
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +3 -3
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -3
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -2
- 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 +1 -2
- 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/crossFieldQueries.d.ts +21 -97
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js +5 -3
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
- 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/fieldKindConfiguration.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +11 -5
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +4 -4
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +2 -2
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +144 -246
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +463 -1319
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +2 -2
- package/lib/feature-libraries/object-forest/objectForest.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 +2 -2
- package/lib/feature-libraries/optional-field/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts +34 -5
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +453 -221
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
- 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 +26 -55
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/optional-field/requiredField.d.ts +36 -0
- package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/requiredField.js +24 -0
- package/lib/feature-libraries/optional-field/requiredField.js.map +1 -0
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/schemaChecker.js +1 -1
- package/lib/feature-libraries/schemaChecker.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts +7 -6
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +261 -85
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
- 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 -13
- package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/index.js +1 -12
- 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 +169 -67
- 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 +56 -4
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.js +84 -6
- 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 +116 -109
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +46 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
- package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.js +31 -18
- 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 +2 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +182 -356
- 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 +63 -21
- 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 +2 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.js +21 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
- package/lib/feature-libraries/sequence-field/types.d.ts +59 -30
- 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 +24 -15
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +298 -112
- 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.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +3 -3
- 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 +2 -3
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +5 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +42 -43
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +5 -11
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +5 -43
- 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 +0 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +74 -56
- 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 +5 -11
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +6 -12
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/tree.d.ts.map +1 -1
- package/lib/shared-tree/tree.js +7 -7
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +3 -3
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +29 -13
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +55 -54
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +3 -4
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +3 -4
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.d.ts +18 -31
- package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.js +24 -76
- package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/lib/shared-tree-core/branchIdCodec.d.ts.map +1 -1
- package/lib/shared-tree-core/branchIdCodec.js.map +1 -1
- package/lib/shared-tree-core/changeEnricher.d.ts +8 -43
- package/lib/shared-tree-core/changeEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/changeEnricher.js +1 -11
- package/lib/shared-tree-core/changeEnricher.js.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js +28 -38
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +3 -3
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +11 -11
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +1 -5
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +1 -8
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +1 -2
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +0 -6
- 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 +0 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +4 -4
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +2 -3
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +2 -2
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +2 -6
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +1 -8
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +0 -1
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +0 -6
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js +0 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/lib/shared-tree-core/messageTypes.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -5
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +15 -15
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.js +1 -1
- package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +2 -2
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +4 -4
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +1 -1
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +1 -1
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js +3 -3
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.js +1 -1
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/identifierIndex.d.ts +2 -2
- package/lib/simple-tree/api/identifierIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/identifierIndex.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 +3 -3
- package/lib/simple-tree/api/incrementalAllowedTypes.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 +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +2 -2
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +2 -2
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js +1 -0
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaStatics.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.js +3 -3
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +5 -5
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +2 -2
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/treeBeta.js +2 -2
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +4 -4
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
- 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/api/verboseTree.d.ts +1 -1
- package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +3 -3
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js +2 -2
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/context.d.ts.map +1 -1
- package/lib/simple-tree/core/context.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +1 -1
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +1 -3
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +5 -5
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts +3 -3
- package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.js +2 -2
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +8 -58
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/core/withType.d.ts.map +1 -1
- package/lib/simple-tree/core/withType.js.map +1 -1
- package/lib/simple-tree/createContext.d.ts.map +1 -1
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +5 -5
- 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 +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +2 -2
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +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 -8
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
- 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 +2 -2
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +8 -8
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
- 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 +2 -2
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +22 -22
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
- 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 +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +6 -8
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
- 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 +47 -54
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +125 -184
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/treeSchema.d.ts.map +1 -1
- package/lib/simple-tree/treeSchema.js.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +13 -30
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +2 -1
- package/lib/tableSchema.js.map +1 -1
- package/lib/text/index.d.ts +1 -0
- package/lib/text/index.d.ts.map +1 -1
- package/lib/text/index.js +1 -0
- package/lib/text/index.js.map +1 -1
- package/lib/text/textDomain.d.ts +8 -0
- package/lib/text/textDomain.d.ts.map +1 -1
- package/lib/text/textDomain.js +1 -1
- package/lib/text/textDomain.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +572 -0
- package/lib/text/textDomainFormatted.d.ts.map +1 -0
- package/lib/text/textDomainFormatted.js +180 -0
- package/lib/text/textDomainFormatted.js.map +1 -0
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +4 -14
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/bTreeUtils.d.ts.map +1 -1
- package/lib/util/bTreeUtils.js +1 -1
- package/lib/util/bTreeUtils.js.map +1 -1
- package/lib/util/index.d.ts +1 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +1 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/rangeMap.d.ts +12 -24
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +5 -44
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/readSnapshotBlob.d.ts +1 -1
- package/lib/util/readSnapshotBlob.d.ts.map +1 -1
- package/lib/util/readSnapshotBlob.js.map +1 -1
- package/package.json +22 -22
- package/src/codec/codec.ts +10 -7
- package/src/codec/versioned/codec.ts +3 -3
- package/src/core/change-family/changeFamily.ts +0 -5
- package/src/core/change-family/index.ts +0 -1
- package/src/core/index.ts +1 -4
- package/src/core/rebase/changeRebaser.ts +1 -6
- package/src/core/rebase/index.ts +0 -1
- package/src/core/rebase/types.ts +1 -8
- package/src/core/rebase/utils.ts +7 -31
- package/src/core/schema-stored/formatV2.ts +2 -1
- package/src/core/tree/anchorSet.ts +1 -1
- package/src/core/tree/detachedFieldIndex.ts +2 -18
- package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
- package/src/core/tree/detachedFieldIndexCodecV1.ts +2 -2
- package/src/core/tree/detachedFieldIndexCodecV2.ts +3 -3
- package/src/core/tree/detachedFieldIndexFormatV1.ts +3 -2
- package/src/core/tree/detachedFieldIndexFormatV2.ts +3 -2
- package/src/core/tree/index.ts +1 -2
- package/src/core/tree/pathTree.ts +4 -16
- package/src/core/tree/visitDelta.ts +2 -3
- package/src/core/tree/visitorUtils.ts +2 -1
- package/src/feature-libraries/changeAtomIdBTree.ts +4 -28
- package/src/feature-libraries/chunked-forest/basicChunk.ts +1 -7
- package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -7
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +2 -2
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +1 -0
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +3 -3
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +128 -405
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +27 -123
- package/src/feature-libraries/default-schema/index.ts +5 -22
- package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
- package/src/feature-libraries/deltaUtils.ts +1 -6
- package/src/feature-libraries/fieldKindIdentifiers.ts +16 -0
- package/src/feature-libraries/flex-tree/context.ts +0 -17
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -7
- package/src/feature-libraries/flex-tree/lazyField.ts +26 -69
- package/src/feature-libraries/flex-tree/observer.ts +3 -1
- package/src/feature-libraries/forest-summary/codec.ts +1 -1
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +6 -6
- package/src/feature-libraries/forest-summary/formatV1.ts +1 -0
- package/src/feature-libraries/forest-summary/formatV2.ts +1 -0
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +9 -7
- package/src/feature-libraries/forest-summary/summaryTypes.ts +1 -0
- package/src/feature-libraries/index.ts +8 -27
- package/src/feature-libraries/mapTreeCursor.ts +2 -3
- package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +44 -142
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +58 -32
- package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +1 -0
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +20 -8
- package/src/feature-libraries/modular-schema/index.ts +15 -16
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +336 -543
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +2 -2
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +3 -15
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +753 -2582
- package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +0 -1
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +8 -55
- package/src/feature-libraries/object-forest/objectForest.ts +2 -2
- package/src/feature-libraries/optional-field/index.ts +5 -5
- package/src/feature-libraries/optional-field/optionalField.ts +592 -317
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +38 -24
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +35 -89
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
- package/src/feature-libraries/optional-field/requiredField.ts +62 -0
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +1 -1
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -0
- package/src/feature-libraries/schemaChecker.ts +3 -2
- package/src/feature-libraries/sequence-field/compose.ts +522 -139
- package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
- package/src/feature-libraries/sequence-field/index.ts +2 -42
- package/src/feature-libraries/sequence-field/invert.ts +228 -103
- package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
- package/src/feature-libraries/sequence-field/moveEffectTable.ts +195 -8
- package/src/feature-libraries/sequence-field/rebase.ts +205 -169
- package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
- package/src/feature-libraries/sequence-field/replaceRevisions.ts +47 -25
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -0
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +228 -648
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +70 -56
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +27 -25
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +129 -19
- package/src/feature-libraries/sequence-field/sequenceKind.ts +40 -0
- package/src/feature-libraries/sequence-field/types.ts +64 -34
- package/src/feature-libraries/sequence-field/utils.ts +353 -139
- package/src/index.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +4 -3
- package/src/shared-tree/index.ts +2 -3
- package/src/shared-tree/schematizeTree.ts +8 -21
- package/src/shared-tree/schematizingTreeView.ts +79 -61
- package/src/shared-tree/sharedTree.ts +10 -64
- package/src/shared-tree/sharedTreeChangeCodecs.ts +2 -5
- package/src/shared-tree/sharedTreeChangeEnricher.ts +87 -68
- package/src/shared-tree/sharedTreeChangeFamily.ts +5 -15
- package/src/shared-tree/sharedTreeEditBuilder.ts +8 -39
- package/src/shared-tree/tree.ts +10 -10
- package/src/shared-tree/treeAlpha.ts +26 -25
- package/src/shared-tree/treeCheckout.ts +119 -94
- package/src/shared-tree-core/branch.ts +6 -12
- package/src/shared-tree-core/branchCommitEnricher.ts +25 -77
- package/src/shared-tree-core/branchIdCodec.ts +1 -0
- package/src/shared-tree-core/changeEnricher.ts +8 -52
- package/src/shared-tree-core/defaultResubmitMachine.ts +39 -51
- package/src/shared-tree-core/editManager.ts +8 -22
- package/src/shared-tree-core/editManagerCodecs.ts +3 -13
- package/src/shared-tree-core/editManagerCodecsCommons.ts +7 -6
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
- package/src/shared-tree-core/editManagerFormatCommons.ts +1 -6
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -3
- package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +3 -2
- package/src/shared-tree-core/index.ts +2 -7
- package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -5
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +4 -4
- package/src/shared-tree-core/messageCodecs.ts +3 -13
- package/src/shared-tree-core/messageFormat.ts +0 -6
- package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -3
- package/src/shared-tree-core/messageFormatVSharedBranches.ts +1 -0
- package/src/shared-tree-core/messageTypes.ts +1 -0
- package/src/shared-tree-core/sharedTreeCore.ts +27 -31
- package/src/shared-tree-core/versionedSummarizer.ts +3 -1
- package/src/simple-tree/api/configuration.ts +9 -9
- package/src/simple-tree/api/create.ts +7 -6
- package/src/simple-tree/api/dirtyIndex.ts +4 -2
- package/src/simple-tree/api/discrepancies.ts +9 -8
- package/src/simple-tree/api/getJsonSchema.ts +4 -3
- package/src/simple-tree/api/identifierIndex.ts +4 -2
- package/src/simple-tree/api/incrementalAllowedTypes.ts +6 -5
- package/src/simple-tree/api/schemaCompatibilityTester.ts +3 -3
- package/src/simple-tree/api/schemaCreationUtilities.ts +4 -3
- package/src/simple-tree/api/schemaFactory.ts +16 -17
- package/src/simple-tree/api/schemaFactoryAlpha.ts +21 -21
- package/src/simple-tree/api/schemaFactoryBeta.ts +17 -15
- package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -1
- package/src/simple-tree/api/schemaFromSimple.ts +1 -1
- package/src/simple-tree/api/schemaStatics.ts +2 -0
- package/src/simple-tree/api/simpleSchemaCodec.ts +12 -11
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +20 -18
- package/src/simple-tree/api/simpleTreeIndex.ts +6 -4
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +7 -5
- package/src/simple-tree/api/storedSchema.ts +2 -1
- package/src/simple-tree/api/tree.ts +2 -2
- package/src/simple-tree/api/treeBeta.ts +3 -3
- package/src/simple-tree/api/treeNodeApi.ts +14 -13
- package/src/simple-tree/api/typesUnsafe.ts +7 -8
- package/src/simple-tree/api/verboseTree.ts +6 -5
- package/src/simple-tree/core/allowedTypes.ts +4 -4
- package/src/simple-tree/core/context.ts +1 -1
- package/src/simple-tree/core/treeNode.ts +1 -1
- package/src/simple-tree/core/treeNodeKernel.ts +1 -3
- package/src/simple-tree/core/treeNodeSchema.ts +7 -6
- package/src/simple-tree/core/treeNodeValid.ts +9 -9
- package/src/simple-tree/core/unhydratedFlexTree.ts +37 -88
- package/src/simple-tree/core/withType.ts +3 -2
- package/src/simple-tree/createContext.ts +1 -0
- package/src/simple-tree/fieldSchema.ts +5 -8
- package/src/simple-tree/index.ts +1 -2
- package/src/simple-tree/leafNodeSchema.ts +3 -3
- package/src/simple-tree/node-kinds/array/arrayNode.ts +20 -21
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +2 -2
- package/src/simple-tree/node-kinds/common.ts +6 -3
- package/src/simple-tree/node-kinds/map/mapNode.ts +20 -19
- package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +2 -2
- package/src/simple-tree/node-kinds/object/objectNode.ts +37 -37
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +8 -7
- package/src/simple-tree/node-kinds/record/recordNode.ts +21 -22
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +1 -2
- package/src/simple-tree/prepareForInsertion.ts +205 -345
- package/src/simple-tree/simpleSchema.ts +1 -0
- package/src/simple-tree/treeSchema.ts +1 -0
- package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +16 -44
- package/src/tableSchema.ts +3 -1
- package/src/text/index.ts +1 -0
- package/src/text/textDomain.ts +1 -1
- package/src/text/textDomainFormatted.ts +309 -0
- package/src/treeFactory.ts +8 -18
- package/src/util/bTreeUtils.ts +1 -1
- package/src/util/index.ts +0 -3
- package/src/util/rangeMap.ts +18 -72
- package/src/util/readSnapshotBlob.ts +4 -2
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -132
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -393
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -32
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -31
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -57
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
- package/dist/shared-tree-core/transactionEnricher.d.ts +0 -23
- package/dist/shared-tree-core/transactionEnricher.d.ts.map +0 -1
- package/dist/shared-tree-core/transactionEnricher.js +0 -74
- package/dist/shared-tree-core/transactionEnricher.js.map +0 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -128
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -389
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -29
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -27
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -53
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
- package/lib/shared-tree-core/transactionEnricher.d.ts +0 -23
- package/lib/shared-tree-core/transactionEnricher.d.ts.map +0 -1
- package/lib/shared-tree-core/transactionEnricher.js +0 -70
- package/lib/shared-tree-core/transactionEnricher.js.map +0 -1
- package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -188
- package/src/feature-libraries/modular-schema/modularChangeCodecV3.ts +0 -760
- package/src/feature-libraries/modular-schema/modularChangeFormatV3.ts +0 -62
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +0 -45
- package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +0 -94
- package/src/shared-tree-core/transactionEnricher.ts +0 -74
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/shared-tree/tree.ts"],"names":[],"mappings":"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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ImplicitFieldSchema,\n\ttype TreeNode,\n\ttype TreeNodeApi,\n\ttype TreeView,\n\tgetInnerNode,\n\ttreeNodeApi,\n\trollback,\n\ttype TransactionConstraint,\n} from \"../simple-tree/index.js\";\n\nimport {\n\taddConstraintsToTransaction,\n\tSchematizingSimpleTreeView,\n} from \"./schematizingTreeView.js\";\nimport type { ITreeCheckout } from \"./treeCheckout.js\";\nimport { Context } from \"../feature-libraries/index.js\";\n\n/**\n * Provides various functions for interacting with {@link TreeNode}s.\n * @remarks\n * This type should only be used via the {@link (Tree:variable)} export.\n * @system @sealed @public\n */\nexport interface Tree extends TreeNodeApi {\n\t/**\n\t * Run a {@link RunTransaction | transaction}.\n\t */\n\treadonly runTransaction: RunTransaction;\n\t/**\n\t * Check if the subtree defined by `node` contains `other`.\n\t *\n\t * @returns true if `other` is an inclusive descendant of `node`, and false otherwise.\n\t * @remarks\n\t * This includes direct and indirect children:\n\t * as long as `node` is an ancestor of `other` (occurs in its parentage chain), this returns true, regardless of the number of levels of the tree between.\n\t *\n\t * `node` is considered to contain itself, so the case where `node === other` returns true.\n\t *\n\t * This is handy when checking if moving `node` into `other` would create a cycle and would thus be invalid.\n\t *\n\t * This check walks the parents of `other` looking for `node`,\n\t * and thus runs in time proportional to the depth of child in the tree.\n\t */\n\tcontains(node: TreeNode, other: TreeNode): boolean;\n}\n\n/**\n * The {@link (Tree:interface)} singleton which holds various functions for interacting with {@link TreeNode}s.\n * @public\n */\nexport const Tree: Tree = {\n\t...treeNodeApi,\n\n\t// Note: the implementation details of `createRunTransaction` are deprecated.\n\t// We have introduced replacement `@alpha` APIs on `TreeBranch`, but until they are `@public`, we can't reasonably deprecated this.\n\t// Once they have been promoted to public, we can deprecate this API.\n\trunTransaction: createRunTransaction(),\n\n\tcontains(parent: TreeNode, child: TreeNode): boolean {\n\t\tlet toCheck: TreeNode | undefined = child;\n\t\twhile (toCheck !== undefined) {\n\t\t\tif (toCheck === parent) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\ttoCheck = Tree.parent(toCheck);\n\t\t}\n\t\treturn false;\n\t},\n};\n\n/**\n * A function which runs a transaction in a SharedTree.\n * @privateRemarks\n * This interface exists so that the (generously) overloaded `Tree.runTransaction` function can have the \"rollback\" property hanging off of it.\n * The rollback property being available on the function itself gives users a convenient option for rolling back a transaction without having to import another symbol.\n * @sealed @public\n */\nexport interface RunTransaction {\n\t/**\n\t * The {@link rollback} object used to roll back a transaction.\n\t */\n\treadonly rollback: typeof rollback;\n\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode, TResult>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => TResult,\n\t): TResult;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t// TODO: TreeView is invariant over the schema, so to accept any view, `any` is the only real option unless a non generic (or covariant) base type for view is introduced (which is planned).\n\t// This use of any is actually type safe as it is only used as a constraint, and the actual strongly typed view (TView) is passed to the callback.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>, TResult>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => TResult,\n\t): TResult;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * At any point during the transaction, the function may return the special {@link RunTransaction.rollback | rollback value} (`Tree.runTransaction.rollback`) to abort the transaction and discard any changes it made so far.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back (whether by an error or by returning the {@link RunTransaction.rollback} | rollback value), a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode, TResult>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => TResult | typeof rollback,\n\t): TResult | typeof rollback;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * At any point during the transaction, the function may return the special {@link RunTransaction.rollback | rollback value} (`Tree.runTransaction.rollback`) to abort the transaction and discard any changes it made so far.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back (whether by an error or by returning the {@link RunTransaction.rollback} | rollback value), a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>, TResult>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => TResult | typeof rollback,\n\t): TResult | typeof rollback;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode>(node: TNode, transaction: (node: TNode) => void): void;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>>(tree: TView, transaction: (root: TView[\"root\"]) => void): void;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode, TResult>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => TResult,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): TResult;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>, TResult>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => TResult,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): TResult;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * At any point during the transaction, the function may return the special {@link RunTransaction.rollback | rollback value} (`Tree.runTransaction.rollback`) to abort the transaction and discard any changes it made so far.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back (whether by an error or by returning the {@link RunTransaction.rollback} | rollback value), a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode, TResult>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => TResult | typeof rollback,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): TResult | typeof rollback;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * At any point during the transaction, the function may return the special {@link RunTransaction.rollback | rollback value} (`Tree.runTransaction.rollback`) to abort the transaction and discard any changes it made so far.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back (whether by an error or by returning the {@link RunTransaction.rollback} | rollback value), a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>, TResult>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => TResult | typeof rollback,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): TResult | typeof rollback;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => void,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): void;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => void,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): void;\n}\n\n// TODO: Add more constraint types here\n\n/** Creates a copy of `runTransaction` with the `rollback` property added so as to satisfy the `RunTransaction` interface. */\nfunction createRunTransaction(): RunTransaction {\n\t/** A type-safe helper to add a \"rollback\" property (as required by the `RunTransaction` interface) to a given object */\n\tfunction defineRollbackProperty<T extends object>(\n\t\ttarget: T,\n\t): T & { rollback: typeof rollback } {\n\t\tReflect.defineProperty(target, \"rollback\", { value: rollback });\n\t\treturn target as T & { readonly rollback: typeof rollback };\n\t}\n\n\treturn defineRollbackProperty(runTransaction.bind({}));\n}\n\n/**\n * Run the given transaction.\n * @remarks\n * This API is not publicly exported but is exported outside of this module so that test code may unit test the `Tree.runTransaction` function directly without being restricted to its public API overloads.\n * @deprecated This API catches exceptions then tries to modify the tree before rethrowing: this is not robust. Use {@link TreeViewAlpha.runTransaction} instead which does not try to edit content in the error case.\n */\nexport function runTransaction<\n\tTNode extends TreeNode,\n\tTRoot extends ImplicitFieldSchema,\n\tTResult,\n>(\n\ttreeOrNode: TNode | TreeView<TRoot>,\n\ttransaction:\n\t\t| ((node: TNode) => TResult | typeof rollback)\n\t\t| ((root: TRoot) => TResult | typeof rollback),\n\tpreconditions: readonly TransactionConstraint[] = [],\n): TResult | typeof rollback {\n\tif (treeOrNode instanceof SchematizingSimpleTreeView) {\n\t\tconst t = transaction as (root: TRoot) => TResult | typeof rollback;\n\t\treturn runTransactionInCheckout(\n\t\t\ttreeOrNode.checkout,\n\t\t\t() => t(treeOrNode.root as TRoot),\n\t\t\tpreconditions,\n\t\t);\n\t} else {\n\t\tconst node = treeOrNode as TNode;\n\t\tconst t = transaction as (node: TNode) => TResult | typeof rollback;\n\t\tconst context = getInnerNode(node).context;\n\t\tif (context.isHydrated() === false) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Transactions cannot be run on Unhydrated nodes. Transactions apply to a TreeView and Unhydrated nodes are not part of a TreeView.\",\n\t\t\t);\n\t\t}\n\t\tassert(context instanceof Context, 0xbe3 /* Expected context to be a Context instance. */);\n\t\treturn runTransactionInCheckout(context.checkout, () => t(node), preconditions);\n\t}\n}\n\n/**\n * Run the given transaction.\n * @deprecated This API catches exceptions then tries to modify the tree before rethrowing: this is not robust. Use {@link TreeViewAlpha.runTransaction} instead which does not try to editing content in the error case.\n */\nfunction runTransactionInCheckout<TResult>(\n\tcheckout: ITreeCheckout,\n\ttransaction: () => TResult | typeof rollback,\n\tpreconditions: readonly TransactionConstraint[],\n): TResult | typeof rollback {\n\tcheckout.transaction.start();\n\taddConstraintsToTransaction(checkout, false, preconditions);\n\n\tlet result: ReturnType<typeof transaction>;\n\ttry {\n\t\tresult = transaction();\n\t} catch (error) {\n\t\t// If the transaction has an unhandled error, abort and rollback the transaction but continue to propagate the error.\n\t\t// This might try and modify the tree or trigger events while things are in an inconsistent state.\n\t\t// It is up to the user of runTransaction to ensure that does not cause problems (and they have no robust way to do that, which is why its deprecated).\n\t\tcheckout.transaction.abort();\n\t\tthrow error;\n\t}\n\n\tif (result === rollback) {\n\t\tcheckout.transaction.abort();\n\t} else {\n\t\tcheckout.transaction.commit();\n\t}\n\n\treturn result;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/shared-tree/tree.ts"],"names":[],"mappings":"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","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 { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { Context } from \"../feature-libraries/index.js\";\nimport {\n\ttype ImplicitFieldSchema,\n\ttype TreeNode,\n\ttype TreeNodeApi,\n\ttype TreeView,\n\tgetInnerNode,\n\ttreeNodeApi,\n\trollback,\n\ttype TransactionConstraint,\n} from \"../simple-tree/index.js\";\n\nimport {\n\taddConstraintsToTransaction,\n\tSchematizingSimpleTreeView,\n} from \"./schematizingTreeView.js\";\nimport type { ITreeCheckout } from \"./treeCheckout.js\";\n\n/**\n * Provides various functions for interacting with {@link TreeNode}s.\n * @remarks\n * This type should only be used via the {@link (Tree:variable)} export.\n * @system @sealed @public\n */\nexport interface Tree extends TreeNodeApi {\n\t/**\n\t * Run a {@link RunTransaction | transaction}.\n\t */\n\treadonly runTransaction: RunTransaction;\n\t/**\n\t * Check if the subtree defined by `node` contains `other`.\n\t *\n\t * @returns true if `other` is an inclusive descendant of `node`, and false otherwise.\n\t * @remarks\n\t * This includes direct and indirect children:\n\t * as long as `node` is an ancestor of `other` (occurs in its parentage chain), this returns true, regardless of the number of levels of the tree between.\n\t *\n\t * `node` is considered to contain itself, so the case where `node === other` returns true.\n\t *\n\t * This is handy when checking if moving `node` into `other` would create a cycle and would thus be invalid.\n\t *\n\t * This check walks the parents of `other` looking for `node`,\n\t * and thus runs in time proportional to the depth of child in the tree.\n\t */\n\tcontains(node: TreeNode, other: TreeNode): boolean;\n}\n\n/**\n * The {@link (Tree:interface)} singleton which holds various functions for interacting with {@link TreeNode}s.\n * @public\n */\nexport const Tree: Tree = {\n\t...treeNodeApi,\n\n\t// Note: the implementation details of `createRunTransaction` are deprecated.\n\t// We have introduced replacement `@alpha` APIs on `TreeBranch`, but until they are `@public`, we can't reasonably deprecated this.\n\t// Once they have been promoted to public, we can deprecate this API.\n\trunTransaction: createRunTransaction(),\n\n\tcontains(parent: TreeNode, child: TreeNode): boolean {\n\t\tlet toCheck: TreeNode | undefined = child;\n\t\twhile (toCheck !== undefined) {\n\t\t\tif (toCheck === parent) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\ttoCheck = Tree.parent(toCheck);\n\t\t}\n\t\treturn false;\n\t},\n};\n\n/**\n * A function which runs a transaction in a SharedTree.\n * @privateRemarks\n * This interface exists so that the (generously) overloaded `Tree.runTransaction` function can have the \"rollback\" property hanging off of it.\n * The rollback property being available on the function itself gives users a convenient option for rolling back a transaction without having to import another symbol.\n * @sealed @public\n */\nexport interface RunTransaction {\n\t/**\n\t * The {@link rollback} object used to roll back a transaction.\n\t */\n\treadonly rollback: typeof rollback;\n\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode, TResult>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => TResult,\n\t): TResult;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t// TODO: TreeView is invariant over the schema, so to accept any view, `any` is the only real option unless a non generic (or covariant) base type for view is introduced (which is planned).\n\t// This use of any is actually type safe as it is only used as a constraint, and the actual strongly typed view (TView) is passed to the callback.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>, TResult>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => TResult,\n\t): TResult;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * At any point during the transaction, the function may return the special {@link RunTransaction.rollback | rollback value} (`Tree.runTransaction.rollback`) to abort the transaction and discard any changes it made so far.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back (whether by an error or by returning the {@link RunTransaction.rollback} | rollback value), a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode, TResult>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => TResult | typeof rollback,\n\t): TResult | typeof rollback;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * At any point during the transaction, the function may return the special {@link RunTransaction.rollback | rollback value} (`Tree.runTransaction.rollback`) to abort the transaction and discard any changes it made so far.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back (whether by an error or by returning the {@link RunTransaction.rollback} | rollback value), a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>, TResult>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => TResult | typeof rollback,\n\t): TResult | typeof rollback;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode>(node: TNode, transaction: (node: TNode) => void): void;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>>(tree: TView, transaction: (root: TView[\"root\"]) => void): void;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode, TResult>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => TResult,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): TResult;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>, TResult>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => TResult,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): TResult;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * At any point during the transaction, the function may return the special {@link RunTransaction.rollback | rollback value} (`Tree.runTransaction.rollback`) to abort the transaction and discard any changes it made so far.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back (whether by an error or by returning the {@link RunTransaction.rollback} | rollback value), a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode, TResult>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => TResult | typeof rollback,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): TResult | typeof rollback;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * At any point during the transaction, the function may return the special {@link RunTransaction.rollback | rollback value} (`Tree.runTransaction.rollback`) to abort the transaction and discard any changes it made so far.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @returns The value returned by the inner `transaction` function.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back (whether by an error or by returning the {@link RunTransaction.rollback} | rollback value), a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>, TResult>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => TResult | typeof rollback,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): TResult | typeof rollback;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param node - The node that will be passed to `transaction`.\n\t * This is typically the root node of the subtree that will be modified by the transaction.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the provided `node`.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t<TNode extends TreeNode>(\n\t\tnode: TNode,\n\t\ttransaction: (node: TNode) => void,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): void;\n\t/**\n\t * Apply one or more edits to the tree as a single atomic unit.\n\t * @param tree - The tree which will be edited by the transaction\n\t * @param transaction - The function to run as the body of the transaction.\n\t * This function is passed the root of the tree.\n\t * @param preconditions - An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.\n\t * If any of the constraints are not met when `runTransaction` is called, it will throw an error.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t * @remarks\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t *\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction function throws an error then the transaction will be automatically rolled back (discarding any changes made to the tree so far) before the error is propagated up from this function.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t */\n\t// See comment on previous overload about use of any here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t<TView extends TreeView<any>>(\n\t\ttree: TView,\n\t\ttransaction: (root: TView[\"root\"]) => void,\n\t\tpreconditions?: readonly TransactionConstraint[],\n\t): void;\n}\n\n// TODO: Add more constraint types here\n\n/** A type-safe helper to add a \"rollback\" property (as required by the `RunTransaction` interface) to a given object */\nfunction defineRollbackProperty<T extends object>(\n\ttarget: T,\n): T & { rollback: typeof rollback } {\n\tReflect.defineProperty(target, \"rollback\", { value: rollback });\n\treturn target as T & { readonly rollback: typeof rollback };\n}\n\n/** Creates a copy of `runTransaction` with the `rollback` property added so as to satisfy the `RunTransaction` interface. */\nfunction createRunTransaction(): RunTransaction {\n\treturn defineRollbackProperty(runTransaction.bind({}));\n}\n\n/**\n * Run the given transaction.\n * @remarks\n * This API is not publicly exported but is exported outside of this module so that test code may unit test the `Tree.runTransaction` function directly without being restricted to its public API overloads.\n * @deprecated This API catches exceptions then tries to modify the tree before rethrowing: this is not robust. Use {@link TreeViewAlpha.runTransaction} instead which does not try to edit content in the error case.\n */\nexport function runTransaction<\n\tTNode extends TreeNode,\n\tTRoot extends ImplicitFieldSchema,\n\tTResult,\n>(\n\ttreeOrNode: TNode | TreeView<TRoot>,\n\ttransaction:\n\t\t| ((node: TNode) => TResult | typeof rollback)\n\t\t| ((root: TRoot) => TResult | typeof rollback),\n\tpreconditions: readonly TransactionConstraint[] = [],\n): TResult | typeof rollback {\n\tif (treeOrNode instanceof SchematizingSimpleTreeView) {\n\t\tconst t = transaction as (root: TRoot) => TResult | typeof rollback;\n\t\treturn runTransactionInCheckout(\n\t\t\ttreeOrNode.checkout,\n\t\t\t() => t(treeOrNode.root as TRoot),\n\t\t\tpreconditions,\n\t\t);\n\t} else {\n\t\tconst node = treeOrNode as TNode;\n\t\tconst t = transaction as (node: TNode) => TResult | typeof rollback;\n\t\tconst context = getInnerNode(node).context;\n\t\tif (context.isHydrated() === false) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Transactions cannot be run on Unhydrated nodes. Transactions apply to a TreeView and Unhydrated nodes are not part of a TreeView.\",\n\t\t\t);\n\t\t}\n\t\tassert(context instanceof Context, 0xbe3 /* Expected context to be a Context instance. */);\n\t\treturn runTransactionInCheckout(context.checkout, () => t(node), preconditions);\n\t}\n}\n\n/**\n * Run the given transaction.\n * @deprecated This API catches exceptions then tries to modify the tree before rethrowing: this is not robust. Use {@link TreeViewAlpha.runTransaction} instead which does not try to editing content in the error case.\n */\nfunction runTransactionInCheckout<TResult>(\n\tcheckout: ITreeCheckout,\n\ttransaction: () => TResult | typeof rollback,\n\tpreconditions: readonly TransactionConstraint[],\n): TResult | typeof rollback {\n\tcheckout.transaction.start();\n\taddConstraintsToTransaction(checkout, false, preconditions);\n\n\tlet result: ReturnType<typeof transaction>;\n\ttry {\n\t\tresult = transaction();\n\t} catch (error) {\n\t\t// If the transaction has an unhandled error, abort and rollback the transaction but continue to propagate the error.\n\t\t// This might try and modify the tree or trigger events while things are in an inconsistent state.\n\t\t// It is up to the user of runTransaction to ensure that does not cause problems (and they have no robust way to do that, which is why its deprecated).\n\t\tcheckout.transaction.abort();\n\t\tthrow error;\n\t}\n\n\tif (result === rollback) {\n\t\tcheckout.transaction.abort();\n\t} else {\n\t\tcheckout.transaction.commit();\n\t}\n\n\treturn result;\n}\n"]}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
6
6
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
|
+
import { type ICodecOptions, type CodecWriteOptions } from "../codec/index.js";
|
|
7
8
|
import { TreeNode, type Unhydrated, type ImplicitFieldSchema, type InsertableField, type TreeFieldFromImplicitField, type TreeLeafValue, type UnsafeUnknownSchema, type TreeEncodingOptions, type VerboseTree, type TreeBranch, type TreeParsingOptions, type ConciseTree, type TreeNodeSchema, type TreeBranchAlpha } from "../simple-tree/index.js";
|
|
8
9
|
import { type JsonCompatible } from "../util/index.js";
|
|
9
|
-
import { type ICodecOptions, type CodecWriteOptions } from "../codec/index.js";
|
|
10
10
|
/**
|
|
11
11
|
* A utility interface for manipulating node identifiers.
|
|
12
12
|
* @remarks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treeAlpha.d.ts","sourceRoot":"","sources":["../../src/shared-tree/treeAlpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"treeAlpha.d.ts","sourceRoot":"","sources":["../../src/shared-tree/treeAlpha.ts"],"names":[],"mappings":"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"}
|
|
@@ -7,32 +7,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.TreeAlpha = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const internal_2 = require("@fluidframework/id-compressor/internal");
|
|
10
|
+
const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
10
11
|
const internal_3 = require("@fluidframework/telemetry-utils/internal");
|
|
11
|
-
const index_js_1 = require("../
|
|
12
|
-
const index_js_2 = require("../
|
|
13
|
-
const index_js_3 = require("../
|
|
14
|
-
const index_js_4 = require("../
|
|
15
|
-
const index_js_5 = require("../
|
|
12
|
+
const index_js_1 = require("../codec/index.js");
|
|
13
|
+
const index_js_2 = require("../core/index.js");
|
|
14
|
+
const index_js_3 = require("../feature-libraries/index.js");
|
|
15
|
+
const index_js_4 = require("../simple-tree/index.js");
|
|
16
|
+
const index_js_5 = require("../util/index.js");
|
|
16
17
|
const independentView_js_1 = require("./independentView.js");
|
|
17
18
|
const schematizingTreeView_js_1 = require("./schematizingTreeView.js");
|
|
18
|
-
const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
19
19
|
const identifier = (node) => {
|
|
20
|
-
return (0,
|
|
20
|
+
return (0, index_js_4.getIdentifierFromNode)(node, "uncompressed");
|
|
21
21
|
};
|
|
22
22
|
identifier.shorten = (branch, nodeIdentifier) => {
|
|
23
23
|
(0, internal_1.assert)(branch instanceof schematizingTreeView_js_1.SchematizingSimpleTreeView, 0xcac /* Unexpected branch implementation */);
|
|
24
24
|
const { nodeKeyManager } = branch;
|
|
25
25
|
const localNodeKey = nodeKeyManager.tryLocalizeNodeIdentifier(nodeIdentifier);
|
|
26
|
-
return localNodeKey === undefined ? undefined : (0,
|
|
26
|
+
return localNodeKey === undefined ? undefined : (0, index_js_5.extractFromOpaque)(localNodeKey);
|
|
27
27
|
};
|
|
28
28
|
identifier.lengthen = (branch, nodeIdentifier) => {
|
|
29
29
|
(0, internal_1.assert)(branch instanceof schematizingTreeView_js_1.SchematizingSimpleTreeView, 0xcad /* Unexpected branch implementation */);
|
|
30
30
|
const { nodeKeyManager } = branch;
|
|
31
|
-
const local = (0,
|
|
31
|
+
const local = (0, index_js_5.brand)(nodeIdentifier);
|
|
32
32
|
return nodeKeyManager.stabilizeNodeIdentifier(local);
|
|
33
33
|
};
|
|
34
34
|
identifier.getShort = (node) => {
|
|
35
|
-
const shortIdentifier = (0,
|
|
35
|
+
const shortIdentifier = (0, index_js_4.getIdentifierFromNode)(node, "compressed");
|
|
36
36
|
return typeof shortIdentifier === "number" ? shortIdentifier : undefined;
|
|
37
37
|
};
|
|
38
38
|
identifier.create = (branch) => {
|
|
@@ -50,16 +50,16 @@ class NodeSubscription {
|
|
|
50
50
|
constructor(onInvalidation, flexNode) {
|
|
51
51
|
this.onInvalidation = onInvalidation;
|
|
52
52
|
// TODO:Performance: It is possible to optimize this to not use the public TreeNode API.
|
|
53
|
-
const node = (0,
|
|
54
|
-
(0, internal_1.assert)(node instanceof
|
|
53
|
+
const node = (0, index_js_4.getOrCreateNodeFromInnerNode)(flexNode);
|
|
54
|
+
(0, internal_1.assert)(node instanceof index_js_4.TreeNode, 0xc54 /* Unexpected leaf value */);
|
|
55
55
|
const handler = (data) => {
|
|
56
56
|
if (this.keys === undefined || data.changedProperties === undefined) {
|
|
57
57
|
this.onInvalidation();
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
60
|
let keyMap;
|
|
61
|
-
const schema =
|
|
62
|
-
if ((0,
|
|
61
|
+
const schema = index_js_4.treeNodeApi.schema(node);
|
|
62
|
+
if ((0, index_js_4.isObjectNodeSchema)(schema)) {
|
|
63
63
|
keyMap = schema.storedKeyToPropertyKey;
|
|
64
64
|
}
|
|
65
65
|
// TODO:Performance: Ideally this would use Set.prototype.isDisjointFrom when available.
|
|
@@ -73,7 +73,7 @@ class NodeSubscription {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
this.unsubscribe =
|
|
76
|
+
this.unsubscribe = index_js_4.TreeBeta.on(node, "nodeChanged", handler);
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Create an {@link Observer} which subscribes to what was observed in {@link NodeSubscription}s.
|
|
@@ -126,7 +126,7 @@ class NodeSubscription {
|
|
|
126
126
|
// TODO: better APIS should be provided which make handling this case practical.
|
|
127
127
|
throw new internal_3.UsageError("Observation tracking for parents is currently not supported.");
|
|
128
128
|
}
|
|
129
|
-
const parent = (0,
|
|
129
|
+
const parent = (0, index_js_3.withObservation)(undefined, () => node.parentField.parent);
|
|
130
130
|
if (parent.parent === undefined) {
|
|
131
131
|
// TODO: better APIS should be provided which make handling this case practical.
|
|
132
132
|
throw new internal_3.UsageError("Observation tracking for parents is currently not supported when parent is undefined.");
|
|
@@ -161,7 +161,7 @@ function trackObservations(onInvalidation, trackDuring, onlyOnce = false) {
|
|
|
161
161
|
onInvalidation();
|
|
162
162
|
};
|
|
163
163
|
const { observer, unsubscribe } = NodeSubscription.createObserver(invalidate, onlyOnce);
|
|
164
|
-
const result = (0,
|
|
164
|
+
const result = (0, index_js_3.withObservation)(observer, trackDuring);
|
|
165
165
|
observing = false;
|
|
166
166
|
return {
|
|
167
167
|
result,
|
|
@@ -187,7 +187,7 @@ exports.TreeAlpha = {
|
|
|
187
187
|
return result;
|
|
188
188
|
},
|
|
189
189
|
branch(node) {
|
|
190
|
-
const kernel = (0,
|
|
190
|
+
const kernel = (0, index_js_4.getKernel)(node);
|
|
191
191
|
if (!kernel.isHydrated()) {
|
|
192
192
|
return undefined;
|
|
193
193
|
}
|
|
@@ -196,41 +196,41 @@ exports.TreeAlpha = {
|
|
|
196
196
|
return view;
|
|
197
197
|
},
|
|
198
198
|
create(schema, data) {
|
|
199
|
-
const mapTree = (0,
|
|
200
|
-
const result = mapTree === undefined ? undefined : (0,
|
|
199
|
+
const mapTree = (0, index_js_4.unhydratedFlexTreeFromInsertable)(data, schema);
|
|
200
|
+
const result = mapTree === undefined ? undefined : (0, index_js_4.getOrCreateNodeFromInnerNode)(mapTree);
|
|
201
201
|
return result;
|
|
202
202
|
},
|
|
203
203
|
importConcise(schema, data) {
|
|
204
|
-
return (0,
|
|
204
|
+
return (0, index_js_4.importConcise)(schema, data);
|
|
205
205
|
},
|
|
206
|
-
exportConcise:
|
|
206
|
+
exportConcise: index_js_4.exportConcise,
|
|
207
207
|
importVerbose(schema, data, options) {
|
|
208
208
|
const config = { ...options };
|
|
209
209
|
// Create a config which is standalone, and thus can be used without having to refer back to the schema.
|
|
210
|
-
const schemalessConfig = (0,
|
|
210
|
+
const schemalessConfig = (0, index_js_4.applySchemaToParserOptions)(schema, config);
|
|
211
211
|
if (data === undefined) {
|
|
212
|
-
const field = (0,
|
|
213
|
-
if (field.kind !==
|
|
212
|
+
const field = (0, index_js_4.normalizeFieldSchema)(schema);
|
|
213
|
+
if (field.kind !== index_js_4.FieldKind.Optional) {
|
|
214
214
|
throw new internal_3.UsageError("undefined provided for non-optional field.");
|
|
215
215
|
}
|
|
216
216
|
return undefined;
|
|
217
217
|
}
|
|
218
|
-
const cursor = (0,
|
|
219
|
-
return (0,
|
|
218
|
+
const cursor = (0, index_js_4.cursorFromVerbose)(data, schemalessConfig);
|
|
219
|
+
return (0, index_js_4.createFromCursor)(schema, cursor, (0, index_js_4.getUnhydratedContext)(schema).flexContext.schema.rootFieldSchema);
|
|
220
220
|
},
|
|
221
221
|
exportVerbose(node, options) {
|
|
222
|
-
if ((0,
|
|
222
|
+
if ((0, index_js_3.isTreeValue)(node)) {
|
|
223
223
|
return node;
|
|
224
224
|
}
|
|
225
225
|
const config = { ...options };
|
|
226
|
-
const cursor = (0,
|
|
227
|
-
const kernel = (0,
|
|
228
|
-
return (0,
|
|
226
|
+
const cursor = (0, index_js_4.borrowCursorFromTreeNodeOrValue)(node);
|
|
227
|
+
const kernel = (0, index_js_4.getKernel)(node);
|
|
228
|
+
return (0, index_js_4.verboseFromCursor)(cursor, kernel.context, config);
|
|
229
229
|
},
|
|
230
230
|
exportCompressed(node, options) {
|
|
231
|
-
const schema = (0,
|
|
232
|
-
const codec = (0,
|
|
233
|
-
jsonValidator:
|
|
231
|
+
const schema = (0, index_js_4.tryGetSchema)(node) ?? (0, internal_1.fail)(0xacf /* invalid input */);
|
|
232
|
+
const codec = (0, index_js_3.makeFieldBatchCodec)({
|
|
233
|
+
jsonValidator: index_js_1.FormatValidatorNoOp,
|
|
234
234
|
minVersionForCollab: options.minVersionForCollab,
|
|
235
235
|
});
|
|
236
236
|
const cursor = borrowFieldCursorFromTreeNodeOrValue(node);
|
|
@@ -239,58 +239,58 @@ exports.TreeAlpha = {
|
|
|
239
239
|
const idCompressor = options.idCompressor ?? (0, internal_2.createIdCompressor)();
|
|
240
240
|
// Grabbing an existing stored schema from the node is important to ensure that unknown optional fields can be preserved.
|
|
241
241
|
// Note that if the node is unhydrated, this can result in all staged allowed types being included in the schema, which might be undesired.
|
|
242
|
-
const storedSchema = (0,
|
|
243
|
-
? (0,
|
|
244
|
-
: (0,
|
|
242
|
+
const storedSchema = (0, index_js_4.isTreeNode)(node)
|
|
243
|
+
? (0, index_js_4.getKernel)(node).context.flexContext.schema
|
|
244
|
+
: (0, index_js_4.toInitialSchema)(schema);
|
|
245
245
|
const context = {
|
|
246
|
-
encodeType:
|
|
246
|
+
encodeType: index_js_3.TreeCompressionStrategy.Compressed,
|
|
247
247
|
idCompressor,
|
|
248
248
|
originatorId: idCompressor.localSessionId, // TODO: Why is this needed?
|
|
249
|
-
schema: { schema: storedSchema, policy:
|
|
249
|
+
schema: { schema: storedSchema, policy: index_js_3.defaultSchemaPolicy },
|
|
250
250
|
};
|
|
251
251
|
const result = codec.encode(batch, context);
|
|
252
252
|
return result;
|
|
253
253
|
},
|
|
254
254
|
importCompressed(schema, compressedData, options) {
|
|
255
|
-
const config = new
|
|
255
|
+
const config = new index_js_4.TreeViewConfigurationAlpha({ schema });
|
|
256
256
|
const content = {
|
|
257
257
|
// Always use a v1 schema codec for consistency.
|
|
258
258
|
// TODO: reevaluate how staged schema should behave in schema import/export APIs before stabilizing this.
|
|
259
|
-
schema: (0,
|
|
259
|
+
schema: (0, index_js_4.extractPersistedSchema)(config.schema, index_js_1.FluidClientVersion.v2_0, () => true),
|
|
260
260
|
tree: compressedData,
|
|
261
261
|
idCompressor: options.idCompressor ?? (0, internal_2.createIdCompressor)(),
|
|
262
262
|
};
|
|
263
263
|
const view = (0, independentView_js_1.independentInitializedView)(config, options, content);
|
|
264
|
-
return
|
|
264
|
+
return index_js_4.TreeBeta.clone(view.root);
|
|
265
265
|
},
|
|
266
266
|
identifier,
|
|
267
267
|
key2(node) {
|
|
268
268
|
// If the parent is undefined, then this node is under the root field,
|
|
269
|
-
const parent =
|
|
269
|
+
const parent = index_js_4.treeNodeApi.parent(node);
|
|
270
270
|
if (parent === undefined) {
|
|
271
271
|
return undefined;
|
|
272
272
|
}
|
|
273
273
|
// The flex-domain strictly operates in terms of "stored keys".
|
|
274
274
|
// To find the associated developer-facing "property key", we need to look up the field associated with
|
|
275
275
|
// the stored key from the flex-domain, and get property key its simple-domain counterpart was created with.
|
|
276
|
-
const storedKey = (0,
|
|
277
|
-
const parentSchema =
|
|
278
|
-
return (0,
|
|
276
|
+
const storedKey = (0, index_js_4.getStoredKey)(node);
|
|
277
|
+
const parentSchema = index_js_4.treeNodeApi.schema(parent);
|
|
278
|
+
return (0, index_js_4.getPropertyKeyFromStoredKey)(parentSchema, storedKey);
|
|
279
279
|
},
|
|
280
280
|
child: (node, propertyKey) => {
|
|
281
|
-
const flexNode = (0,
|
|
281
|
+
const flexNode = (0, index_js_4.getInnerNode)(node);
|
|
282
282
|
(0, internal_1.debugAssert)(() => !flexNode.context.isDisposed() || "The provided tree node has been disposed.");
|
|
283
|
-
const schema =
|
|
283
|
+
const schema = index_js_4.treeNodeApi.schema(node);
|
|
284
284
|
switch (schema.kind) {
|
|
285
|
-
case
|
|
286
|
-
const sequence = flexNode.tryGetField(
|
|
285
|
+
case index_js_4.NodeKind.Array: {
|
|
286
|
+
const sequence = flexNode.tryGetField(index_js_2.EmptyKey);
|
|
287
287
|
// Empty sequence - cannot have children.
|
|
288
288
|
if (sequence === undefined) {
|
|
289
289
|
return undefined;
|
|
290
290
|
}
|
|
291
291
|
const index = typeof propertyKey === "number"
|
|
292
292
|
? propertyKey
|
|
293
|
-
: (0,
|
|
293
|
+
: (0, index_js_4.asIndex)(propertyKey, Number.POSITIVE_INFINITY);
|
|
294
294
|
// If the key is not a valid index, then there is no corresponding child.
|
|
295
295
|
if (index === undefined) {
|
|
296
296
|
return undefined;
|
|
@@ -300,32 +300,32 @@ exports.TreeAlpha = {
|
|
|
300
300
|
if (childFlexTree === undefined) {
|
|
301
301
|
return undefined;
|
|
302
302
|
}
|
|
303
|
-
return (0,
|
|
303
|
+
return (0, index_js_4.getOrCreateNodeFromInnerUnboxedNode)(childFlexTree);
|
|
304
304
|
}
|
|
305
|
-
case
|
|
305
|
+
case index_js_4.NodeKind.Map: {
|
|
306
306
|
if (typeof propertyKey !== "string") {
|
|
307
307
|
// Map nodes only support string keys.
|
|
308
308
|
return undefined;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
// Fall through
|
|
312
|
-
case
|
|
313
|
-
case
|
|
312
|
+
case index_js_4.NodeKind.Record:
|
|
313
|
+
case index_js_4.NodeKind.Object: {
|
|
314
314
|
let storedKey = propertyKey;
|
|
315
|
-
if ((0,
|
|
315
|
+
if ((0, index_js_4.isObjectNodeSchema)(schema)) {
|
|
316
316
|
const fieldSchema = schema.fields.get(String(propertyKey));
|
|
317
317
|
if (fieldSchema === undefined) {
|
|
318
318
|
return undefined;
|
|
319
319
|
}
|
|
320
320
|
storedKey = fieldSchema.storedKey;
|
|
321
321
|
}
|
|
322
|
-
const field = flexNode.tryGetField((0,
|
|
322
|
+
const field = flexNode.tryGetField((0, index_js_5.brand)(String(storedKey)));
|
|
323
323
|
if (field !== undefined) {
|
|
324
|
-
return (0,
|
|
324
|
+
return (0, index_js_4.tryGetTreeNodeForField)(field);
|
|
325
325
|
}
|
|
326
326
|
return undefined;
|
|
327
327
|
}
|
|
328
|
-
case
|
|
328
|
+
case index_js_4.NodeKind.Leaf: {
|
|
329
329
|
(0, internal_1.fail)(0xbc3 /* Leaf schema associated with non-leaf tree node. */);
|
|
330
330
|
}
|
|
331
331
|
default: {
|
|
@@ -334,48 +334,48 @@ exports.TreeAlpha = {
|
|
|
334
334
|
}
|
|
335
335
|
},
|
|
336
336
|
children(node) {
|
|
337
|
-
const flexNode = (0,
|
|
337
|
+
const flexNode = (0, index_js_4.getInnerNode)(node);
|
|
338
338
|
(0, internal_1.debugAssert)(() => !flexNode.context.isDisposed() || "The provided tree node has been disposed.");
|
|
339
|
-
const schema =
|
|
339
|
+
const schema = index_js_4.treeNodeApi.schema(node);
|
|
340
340
|
const result = [];
|
|
341
341
|
switch (schema.kind) {
|
|
342
|
-
case
|
|
343
|
-
const sequence = flexNode.tryGetField(
|
|
342
|
+
case index_js_4.NodeKind.Array: {
|
|
343
|
+
const sequence = flexNode.tryGetField(index_js_2.EmptyKey);
|
|
344
344
|
if (sequence === undefined) {
|
|
345
345
|
break;
|
|
346
346
|
}
|
|
347
347
|
for (let index = 0; index < sequence.length; index++) {
|
|
348
348
|
const childFlexTree = sequence.at(index);
|
|
349
349
|
(0, internal_1.assert)(childFlexTree !== undefined, 0xbc4 /* Sequence child was undefined. */);
|
|
350
|
-
const childTree = (0,
|
|
350
|
+
const childTree = (0, index_js_4.getOrCreateNodeFromInnerUnboxedNode)(childFlexTree);
|
|
351
351
|
result.push([index, childTree]);
|
|
352
352
|
}
|
|
353
353
|
break;
|
|
354
354
|
}
|
|
355
|
-
case
|
|
356
|
-
case
|
|
355
|
+
case index_js_4.NodeKind.Map:
|
|
356
|
+
case index_js_4.NodeKind.Record: {
|
|
357
357
|
for (const [key, flexField] of flexNode.fields) {
|
|
358
|
-
const childTreeNode = (0,
|
|
358
|
+
const childTreeNode = (0, index_js_4.tryGetTreeNodeForField)(flexField);
|
|
359
359
|
if (childTreeNode !== undefined) {
|
|
360
360
|
result.push([key, childTreeNode]);
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
break;
|
|
364
364
|
}
|
|
365
|
-
case
|
|
366
|
-
(0, internal_1.assert)((0,
|
|
365
|
+
case index_js_4.NodeKind.Object: {
|
|
366
|
+
(0, internal_1.assert)((0, index_js_4.isObjectNodeSchema)(schema), 0xbc5 /* Expected object schema. */);
|
|
367
367
|
for (const [propertyKey, fieldSchema] of schema.fields) {
|
|
368
368
|
const storedKey = fieldSchema.storedKey;
|
|
369
|
-
const flexField = flexNode.tryGetField((0,
|
|
369
|
+
const flexField = flexNode.tryGetField((0, index_js_5.brand)(String(storedKey)));
|
|
370
370
|
if (flexField !== undefined) {
|
|
371
|
-
const childTreeNode = (0,
|
|
371
|
+
const childTreeNode = (0, index_js_4.tryGetTreeNodeForField)(flexField);
|
|
372
372
|
(0, internal_1.assert)(childTreeNode !== undefined, 0xbc6 /* Expected child tree node for field. */);
|
|
373
373
|
result.push([propertyKey, childTreeNode]);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
break;
|
|
377
377
|
}
|
|
378
|
-
case
|
|
378
|
+
case index_js_4.NodeKind.Leaf: {
|
|
379
379
|
(0, internal_1.fail)(0xbc7 /* Leaf schema associated with non-leaf tree node. */);
|
|
380
380
|
}
|
|
381
381
|
default: {
|
|
@@ -386,7 +386,7 @@ exports.TreeAlpha = {
|
|
|
386
386
|
},
|
|
387
387
|
tagContentSchema(schema, node) {
|
|
388
388
|
if (typeof node === "object" && node !== null && !(0, runtime_utils_1.isFluidHandle)(node)) {
|
|
389
|
-
Reflect.defineProperty(node,
|
|
389
|
+
Reflect.defineProperty(node, index_js_4.contentSchemaSymbol, {
|
|
390
390
|
configurable: false,
|
|
391
391
|
enumerable: false,
|
|
392
392
|
writable: true,
|
|
@@ -403,11 +403,11 @@ exports.TreeAlpha = {
|
|
|
403
403
|
*/
|
|
404
404
|
function borrowFieldCursorFromTreeNodeOrValue(node) {
|
|
405
405
|
if (node === undefined) {
|
|
406
|
-
return (0,
|
|
406
|
+
return (0, index_js_3.cursorForMapTreeField)([]);
|
|
407
407
|
}
|
|
408
|
-
const cursor = (0,
|
|
408
|
+
const cursor = (0, index_js_4.borrowCursorFromTreeNodeOrValue)(node);
|
|
409
409
|
// TODO: avoid copy: borrow cursor from field instead.
|
|
410
|
-
const mapTree = (0,
|
|
411
|
-
return (0,
|
|
410
|
+
const mapTree = (0, index_js_3.mapTreeFromCursor)(cursor);
|
|
411
|
+
return (0, index_js_3.cursorForMapTreeField)([mapTree]);
|
|
412
412
|
}
|
|
413
413
|
//# sourceMappingURL=treeAlpha.js.map
|