@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
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.makeDetachedNodeToFieldCodecV2 = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
|
-
const detachedFieldIndexFormatV2_js_1 = require("./detachedFieldIndexFormatV2.js");
|
|
10
|
-
const detachedFieldIndexCodecCommon_js_1 = require("./detachedFieldIndexCodecCommon.js");
|
|
11
9
|
const internal_2 = require("@fluidframework/id-compressor/internal");
|
|
10
|
+
const detachedFieldIndexCodecCommon_js_1 = require("./detachedFieldIndexCodecCommon.js");
|
|
12
11
|
const detachedFieldIndexFormatCommon_js_1 = require("./detachedFieldIndexFormatCommon.js");
|
|
12
|
+
const detachedFieldIndexFormatV2_js_1 = require("./detachedFieldIndexFormatV2.js");
|
|
13
13
|
class MajorCodec {
|
|
14
14
|
constructor(revisionTagCodec, idCompressor) {
|
|
15
15
|
this.revisionTagCodec = revisionTagCodec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detachedFieldIndexCodecV2.js","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexCodecV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;
|
|
1
|
+
{"version":3,"file":"detachedFieldIndexCodecV2.js","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexCodecV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,qEAAoE;AAKpE,yFAA+F;AAC/F,2FAAsF;AACtF,mFAA2E;AAG3E,MAAM,UAAU;IACf,YACkB,gBAAkC,EAClC,YAA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,UAAU,GAAG,IAAI,UAAU,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IAClE,OAAO,IAAA,4EAAyC,EAC/C,UAAU,EACV,mEAA+B,CAAC,EAAE,EAClC,wDAAwB,CACxB,CAAC;AACH,CAAC;AAVD,wEAUC","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 type { IIdCompressor, StableId } from \"@fluidframework/id-compressor\";\nimport { isStableId } from \"@fluidframework/id-compressor/internal\";\n\nimport type { CodecAndSchema, IJsonCodec } from \"../../codec/index.js\";\nimport type { EncodedRevisionTag, RevisionTagCodec, RevisionTag } from \"../rebase/index.js\";\n\nimport { makeDetachedFieldIndexCodecFromMajorCodec } from \"./detachedFieldIndexCodecCommon.js\";\nimport { DetachedFieldIndexFormatVersion } from \"./detachedFieldIndexFormatCommon.js\";\nimport { StableOrFinalRevisionTag } from \"./detachedFieldIndexFormatV2.js\";\nimport type { DetachedFieldSummaryData, Major } from \"./detachedFieldIndexTypes.js\";\n\nclass MajorCodec implements IJsonCodec<Major> {\n\tpublic constructor(\n\t\tprivate readonly revisionTagCodec: RevisionTagCodec,\n\t\tprivate readonly idCompressor: IIdCompressor,\n\t) {}\n\n\tpublic encode(major: Major): EncodedRevisionTag | StableId {\n\t\tassert(major !== undefined, 0xbfb /* Unexpected undefined revision */);\n\t\tconst id = this.revisionTagCodec.encode(major);\n\n\t\tif (id !== \"root\" && id < 0) {\n\t\t\t/**\n\t\t\t * This code path handles the case where the major revision is not finalized.\n\t\t\t * This can happen the SharedTree is being attached to an already attached container.\n\t\t\t */\n\t\t\tassert(major !== \"root\", 0xbfc /* Major revision cannot be 'root' */);\n\t\t\tconst long = this.idCompressor.decompress(major);\n\t\t\treturn long;\n\t\t}\n\t\treturn id;\n\t}\n\n\tpublic decode(major: EncodedRevisionTag | StableId): RevisionTag {\n\t\tassert(\n\t\t\tmajor === \"root\" || (typeof major === \"string\" && isStableId(major)) || major >= 0,\n\t\t\t0xbfd /* Expected root, stable, or final compressed id */,\n\t\t);\n\t\tif (typeof major === \"string\" && isStableId(major)) {\n\t\t\treturn this.idCompressor.recompress(major);\n\t\t}\n\t\treturn this.revisionTagCodec.decode(major, {\n\t\t\toriginatorId: this.revisionTagCodec.localSessionId,\n\t\t\tidCompressor: this.idCompressor,\n\t\t\trevision: undefined,\n\t\t});\n\t}\n}\n\nexport function makeDetachedNodeToFieldCodecV2(\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n): CodecAndSchema<DetachedFieldSummaryData> {\n\tconst majorCodec = new MajorCodec(revisionTagCodec, idCompressor);\n\treturn makeDetachedFieldIndexCodecFromMajorCodec(\n\t\tmajorCodec,\n\t\tDetachedFieldIndexFormatVersion.v2,\n\t\tStableOrFinalRevisionTag,\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detachedFieldIndexFormatV1.d.ts","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexFormatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"detachedFieldIndexFormatV1.d.ts","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexFormatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhD,OAAO,EAAE,+BAA+B,EAAU,MAAM,qCAAqC,CAAC;AAE9F,eAAO,MAAM,QAAQ;;;;EAGpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.FormatV1 = void 0;
|
|
8
|
+
const index_js_1 = require("../../util/index.js");
|
|
9
|
+
const index_js_2 = require("../rebase/index.js");
|
|
8
10
|
const detachedFieldIndexFormatCommon_js_1 = require("./detachedFieldIndexFormatCommon.js");
|
|
9
|
-
|
|
10
|
-
const index_js_2 = require("../../util/index.js");
|
|
11
|
-
exports.FormatV1 = (0, detachedFieldIndexFormatCommon_js_1.Format)((0, index_js_2.brand)(detachedFieldIndexFormatCommon_js_1.DetachedFieldIndexFormatVersion.v1), index_js_1.RevisionTagSchema);
|
|
11
|
+
exports.FormatV1 = (0, detachedFieldIndexFormatCommon_js_1.Format)((0, index_js_1.brand)(detachedFieldIndexFormatCommon_js_1.DetachedFieldIndexFormatVersion.v1), index_js_2.RevisionTagSchema);
|
|
12
12
|
//# sourceMappingURL=detachedFieldIndexFormatV1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detachedFieldIndexFormatV1.js","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexFormatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,
|
|
1
|
+
{"version":3,"file":"detachedFieldIndexFormatV1.js","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexFormatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,kDAA4C;AAC5C,iDAAuD;AAEvD,2FAA8F;AAEjF,QAAA,QAAQ,GAAG,IAAA,0CAAM,EAC7B,IAAA,gBAAK,EAAkC,mEAA+B,CAAC,EAAE,CAAC,EAC1E,4BAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { brand } from \"../../util/index.js\";\nimport { RevisionTagSchema } from \"../rebase/index.js\";\n\nimport { DetachedFieldIndexFormatVersion, Format } from \"./detachedFieldIndexFormatCommon.js\";\n\nexport const FormatV1 = Format(\n\tbrand<DetachedFieldIndexFormatVersion>(DetachedFieldIndexFormatVersion.v1),\n\tRevisionTagSchema,\n);\n\nexport type FormatV1 = Static<typeof FormatV1>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detachedFieldIndexFormatV2.d.ts","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexFormatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"detachedFieldIndexFormatV2.d.ts","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexFormatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKtD,OAAO,EAAE,+BAA+B,EAAU,MAAM,qCAAqC,CAAC;AAE9F,eAAO,MAAM,wBAAwB,4TAAkD,CAAC;AAExF,eAAO,MAAM,QAAQ;;;;EAGpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.FormatV2 = exports.StableOrFinalRevisionTag = void 0;
|
|
8
8
|
const typebox_1 = require("@sinclair/typebox");
|
|
9
|
+
const index_js_1 = require("../../util/index.js");
|
|
10
|
+
const index_js_2 = require("../rebase/index.js");
|
|
9
11
|
const detachedFieldIndexFormatCommon_js_1 = require("./detachedFieldIndexFormatCommon.js");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.StableOrFinalRevisionTag = typebox_1.Type.Union([index_js_1.RevisionTagSchema, index_js_1.StableIdSchema]);
|
|
13
|
-
exports.FormatV2 = (0, detachedFieldIndexFormatCommon_js_1.Format)((0, index_js_2.brand)(detachedFieldIndexFormatCommon_js_1.DetachedFieldIndexFormatVersion.v2), exports.StableOrFinalRevisionTag);
|
|
12
|
+
exports.StableOrFinalRevisionTag = typebox_1.Type.Union([index_js_2.RevisionTagSchema, index_js_2.StableIdSchema]);
|
|
13
|
+
exports.FormatV2 = (0, detachedFieldIndexFormatCommon_js_1.Format)((0, index_js_1.brand)(detachedFieldIndexFormatCommon_js_1.DetachedFieldIndexFormatVersion.v2), exports.StableOrFinalRevisionTag);
|
|
14
14
|
//# sourceMappingURL=detachedFieldIndexFormatV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detachedFieldIndexFormatV2.js","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexFormatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAAsD;AAEtD,
|
|
1
|
+
{"version":3,"file":"detachedFieldIndexFormatV2.js","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexFormatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAAsD;AAEtD,kDAA4C;AAC5C,iDAAuE;AAEvE,2FAA8F;AAEjF,QAAA,wBAAwB,GAAG,cAAI,CAAC,KAAK,CAAC,CAAC,4BAAiB,EAAE,yBAAc,CAAC,CAAC,CAAC;AAE3E,QAAA,QAAQ,GAAG,IAAA,0CAAM,EAC7B,IAAA,gBAAK,EAAkC,mEAA+B,CAAC,EAAE,CAAC,EAC1E,gCAAwB,CACxB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Type, type Static } from \"@sinclair/typebox\";\n\nimport { brand } from \"../../util/index.js\";\nimport { RevisionTagSchema, StableIdSchema } from \"../rebase/index.js\";\n\nimport { DetachedFieldIndexFormatVersion, Format } from \"./detachedFieldIndexFormatCommon.js\";\n\nexport const StableOrFinalRevisionTag = Type.Union([RevisionTagSchema, StableIdSchema]);\n\nexport const FormatV2 = Format(\n\tbrand<DetachedFieldIndexFormatVersion>(DetachedFieldIndexFormatVersion.v2),\n\tStableOrFinalRevisionTag,\n);\n\nexport type FormatV2 = Static<typeof FormatV2>;\n"]}
|
|
@@ -6,7 +6,7 @@ export { type Anchor, type AnchorLocator, AnchorSet, type AnchorSlot, type Ancho
|
|
|
6
6
|
export { type ITreeCursor, CursorLocationType, castCursorToSynchronous, mapCursorField, mapCursorFields, forEachNode, forEachNodeInSubtree, forEachField, iterateCursorField, type ITreeCursorSynchronous, type PathRootPrefix, inCursorField, inCursorNode, CursorMarker, isCursor, } from "./cursor.js";
|
|
7
7
|
export type { ProtoNodes, Root as DeltaRoot, Mark as DeltaMark, DetachedNodeId as DeltaDetachedNodeId, FieldMap as DeltaFieldMap, DetachedNodeChanges as DeltaDetachedNodeChanges, DetachedNodeBuild as DeltaDetachedNodeBuild, DetachedNodeDestruction as DeltaDetachedNodeDestruction, DetachedNodeRename as DeltaDetachedNodeRename, FieldChanges as DeltaFieldChanges, } from "./delta.js";
|
|
8
8
|
export { type MapTree, type ExclusiveMapTree, deepCopyMapTree } from "./mapTree.js";
|
|
9
|
-
export { clonePath, topDownPath, getDepth, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type FieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, compareUpPaths, compareFieldUpPaths, isDetachedUpPathRoot, getDetachedFieldContainingPath,
|
|
9
|
+
export { clonePath, topDownPath, getDepth, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type FieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, compareUpPaths, compareFieldUpPaths, isDetachedUpPathRoot as isDetachedUpPath, getDetachedFieldContainingPath, type UpPathDefault, } from "./pathTree.js";
|
|
10
10
|
export { type FieldMapObject, type GenericFieldsNode, genericTreeDeleteIfEmpty, genericTreeKeys, type GenericTreeNode, getGenericTreeField, type JsonableTree, setGenericTreeField, } from "./treeTextFormat.js";
|
|
11
11
|
export { EncodedJsonableTree } from "./persistedTreeTextFormat.js";
|
|
12
12
|
export { EmptyKey, type TreeType, type ChildLocation, type DetachedField, type ChildCollection, type RootField, type Value, type TreeValue, detachedFieldAsKey, keyAsDetachedField, rootFieldKey, type NodeData, rootField, aboveRootPlaceholder, } from "./types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,SAAS,EACT,KAAK,UAAU,EACf,KAAK,UAAU,EACf,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,WAAW,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACX,UAAU,EACV,IAAI,IAAI,SAAS,EACjB,IAAI,IAAI,SAAS,EACjB,cAAc,IAAI,mBAAmB,EACrC,QAAQ,IAAI,aAAa,EACzB,mBAAmB,IAAI,wBAAwB,EAC/C,iBAAiB,IAAI,sBAAsB,EAC3C,uBAAuB,IAAI,4BAA4B,EACvD,kBAAkB,IAAI,uBAAuB,EAC7C,YAAY,IAAI,iBAAiB,GACjC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EACN,SAAS,EACT,WAAW,EACX,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,cAAc,EACd,mBAAmB,EACnB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,SAAS,EACT,KAAK,UAAU,EACf,KAAK,UAAU,EACf,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,WAAW,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACX,UAAU,EACV,IAAI,IAAI,SAAS,EACjB,IAAI,IAAI,SAAS,EACjB,cAAc,IAAI,mBAAmB,EACrC,QAAQ,IAAI,aAAa,EACzB,mBAAmB,IAAI,wBAAwB,EAC/C,iBAAiB,IAAI,sBAAsB,EAC3C,uBAAuB,IAAI,4BAA4B,EACvD,kBAAkB,IAAI,uBAAuB,EAC7C,YAAY,IAAI,iBAAiB,GACjC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EACN,SAAS,EACT,WAAW,EACX,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,cAAc,EACd,mBAAmB,EACnB,oBAAoB,IAA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,iCAAiC,CAAC;AAEhE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/core/tree/index.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.DetachedFieldIndex = exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.deltaForRootInitialization = exports.getDescendant = exports.SparseNode = exports.makeDetachedFieldIndex = exports.combineVisitors = exports.createAnnouncedVisitor = exports.applyDelta = exports.announceDelta = exports.visitDelta = exports.aboveRootPlaceholder = exports.rootField = exports.rootFieldKey = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.EmptyKey = exports.EncodedJsonableTree = exports.setGenericTreeField = exports.getGenericTreeField = exports.genericTreeKeys = exports.genericTreeDeleteIfEmpty = exports.
|
|
8
|
-
exports.DetachedFieldIndexFormatVersion =
|
|
7
|
+
exports.detachedFieldIndexCodecBuilder = exports.DetachedFieldIndex = exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.deltaForRootInitialization = exports.getDescendant = exports.SparseNode = exports.makeDetachedFieldIndex = exports.combineVisitors = exports.createAnnouncedVisitor = exports.applyDelta = exports.announceDelta = exports.visitDelta = exports.aboveRootPlaceholder = exports.rootField = exports.rootFieldKey = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.EmptyKey = exports.EncodedJsonableTree = exports.setGenericTreeField = exports.getGenericTreeField = exports.genericTreeKeys = exports.genericTreeDeleteIfEmpty = exports.getDetachedFieldContainingPath = exports.isDetachedUpPath = exports.compareFieldUpPaths = exports.compareUpPaths = exports.getDepth = exports.topDownPath = exports.clonePath = exports.deepCopyMapTree = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.iterateCursorField = exports.forEachField = exports.forEachNodeInSubtree = exports.forEachNode = exports.mapCursorFields = exports.mapCursorField = exports.castCursorToSynchronous = exports.CursorLocationType = exports.anchorSlot = exports.AnchorSet = void 0;
|
|
8
|
+
exports.DetachedFieldIndexFormatVersion = void 0;
|
|
9
9
|
var anchorSet_js_1 = require("./anchorSet.js");
|
|
10
10
|
Object.defineProperty(exports, "AnchorSet", { enumerable: true, get: function () { return anchorSet_js_1.AnchorSet; } });
|
|
11
11
|
Object.defineProperty(exports, "anchorSlot", { enumerable: true, get: function () { return anchorSet_js_1.anchorSlot; } });
|
|
@@ -30,9 +30,8 @@ Object.defineProperty(exports, "topDownPath", { enumerable: true, get: function
|
|
|
30
30
|
Object.defineProperty(exports, "getDepth", { enumerable: true, get: function () { return pathTree_js_1.getDepth; } });
|
|
31
31
|
Object.defineProperty(exports, "compareUpPaths", { enumerable: true, get: function () { return pathTree_js_1.compareUpPaths; } });
|
|
32
32
|
Object.defineProperty(exports, "compareFieldUpPaths", { enumerable: true, get: function () { return pathTree_js_1.compareFieldUpPaths; } });
|
|
33
|
-
Object.defineProperty(exports, "
|
|
33
|
+
Object.defineProperty(exports, "isDetachedUpPath", { enumerable: true, get: function () { return pathTree_js_1.isDetachedUpPathRoot; } });
|
|
34
34
|
Object.defineProperty(exports, "getDetachedFieldContainingPath", { enumerable: true, get: function () { return pathTree_js_1.getDetachedFieldContainingPath; } });
|
|
35
|
-
Object.defineProperty(exports, "getDetachedFieldContainingFieldPath", { enumerable: true, get: function () { return pathTree_js_1.getDetachedFieldContainingFieldPath; } });
|
|
36
35
|
var treeTextFormat_js_1 = require("./treeTextFormat.js");
|
|
37
36
|
Object.defineProperty(exports, "genericTreeDeleteIfEmpty", { enumerable: true, get: function () { return treeTextFormat_js_1.genericTreeDeleteIfEmpty; } });
|
|
38
37
|
Object.defineProperty(exports, "genericTreeKeys", { enumerable: true, get: function () { return treeTextFormat_js_1.genericTreeKeys; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,+CASwB;AANvB,yGAAA,SAAS,OAAA;AAGT,0GAAA,UAAU,OAAA;AAIX,yCAgBqB;AAdpB,+GAAA,kBAAkB,OAAA;AAClB,oHAAA,uBAAuB,OAAA;AACvB,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,wGAAA,WAAW,OAAA;AACX,iHAAA,oBAAoB,OAAA;AACpB,yGAAA,YAAY,OAAA;AACZ,+GAAA,kBAAkB,OAAA;AAGlB,0GAAA,aAAa,OAAA;AACb,yGAAA,YAAY,OAAA;AACZ,yGAAA,YAAY,OAAA;AACZ,qGAAA,QAAQ,OAAA;AAcT,2CAAoF;AAAtC,6GAAA,eAAe,OAAA;AAC7D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,+CASwB;AANvB,yGAAA,SAAS,OAAA;AAGT,0GAAA,UAAU,OAAA;AAIX,yCAgBqB;AAdpB,+GAAA,kBAAkB,OAAA;AAClB,oHAAA,uBAAuB,OAAA;AACvB,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,wGAAA,WAAW,OAAA;AACX,iHAAA,oBAAoB,OAAA;AACpB,yGAAA,YAAY,OAAA;AACZ,+GAAA,kBAAkB,OAAA;AAGlB,0GAAA,aAAa,OAAA;AACb,yGAAA,YAAY,OAAA;AACZ,yGAAA,YAAY,OAAA;AACZ,qGAAA,QAAQ,OAAA;AAcT,2CAAoF;AAAtC,6GAAA,eAAe,OAAA;AAC7D,6CAmBuB;AAlBtB,wGAAA,SAAS,OAAA;AACT,0GAAA,WAAW,OAAA;AACX,uGAAA,QAAQ,OAAA;AAWR,6GAAA,cAAc,OAAA;AACd,kHAAA,mBAAmB,OAAA;AACnB,+GAAA,oBAAoB,OAAoB;AACxC,6HAAA,8BAA8B,OAAA;AAG/B,yDAS6B;AAN5B,6HAAA,wBAAwB,OAAA;AACxB,oHAAA,eAAe,OAAA;AAEf,wHAAA,mBAAmB,OAAA;AAEnB,wHAAA,mBAAmB,OAAA;AAEpB,2EAAmE;AAA1D,iIAAA,mBAAmB,OAAA;AAC5B,uCAeoB;AAdnB,oGAAA,QAAQ,OAAA;AAQR,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,wGAAA,YAAY,OAAA;AAEZ,qGAAA,SAAS,OAAA;AACT,gHAAA,oBAAoB,OAAA;AAErB,iDAAgE;AAApC,2GAAA,UAAU,OAAA;AACtC,qDAO2B;AAL1B,gHAAA,aAAa,OAAA;AACb,6GAAA,UAAU,OAAA;AACV,yHAAA,sBAAsB,OAAA;AACtB,kHAAA,eAAe,OAAA;AACf,yHAAA,sBAAsB,OAAA;AAGvB,iDAA4D;AAAnD,2GAAA,UAAU,OAAA;AAAE,8GAAA,aAAa,OAAA;AAElC,+CAKwB;AAJvB,0HAAA,0BAA0B,OAAA;AAC1B,kHAAA,kBAAkB,OAAA;AAClB,8GAAA,cAAc,OAAA;AACd,0GAAA,UAAU,OAAA;AAGX,uCAMoB;AAJnB,qGAAA,SAAS,OAAA;AACT,uGAAA,WAAW,OAAA;AACX,uGAAA,WAAW,OAAA;AAIZ,iEAIiC;AAHhC,2HAAA,kBAAkB,OAAA;AAKnB,6EAA+E;AAAtE,6IAAA,8BAA8B,OAAA;AACvC,yFAAsF;AAA7E,oJAAA,+BAA+B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype Anchor,\n\ttype AnchorLocator,\n\tAnchorSet,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n} from \"./anchorSet.js\";\nexport {\n\ttype ITreeCursor,\n\tCursorLocationType,\n\tcastCursorToSynchronous,\n\tmapCursorField,\n\tmapCursorFields,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\titerateCursorField,\n\ttype ITreeCursorSynchronous,\n\ttype PathRootPrefix,\n\tinCursorField,\n\tinCursorNode,\n\tCursorMarker,\n\tisCursor,\n} from \"./cursor.js\";\nexport type {\n\tProtoNodes,\n\tRoot as DeltaRoot,\n\tMark as DeltaMark,\n\tDetachedNodeId as DeltaDetachedNodeId,\n\tFieldMap as DeltaFieldMap,\n\tDetachedNodeChanges as DeltaDetachedNodeChanges,\n\tDetachedNodeBuild as DeltaDetachedNodeBuild,\n\tDetachedNodeDestruction as DeltaDetachedNodeDestruction,\n\tDetachedNodeRename as DeltaDetachedNodeRename,\n\tFieldChanges as DeltaFieldChanges,\n} from \"./delta.js\";\nexport { type MapTree, type ExclusiveMapTree, deepCopyMapTree } from \"./mapTree.js\";\nexport {\n\tclonePath,\n\ttopDownPath,\n\tgetDepth,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype FieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\tcompareUpPaths,\n\tcompareFieldUpPaths,\n\tisDetachedUpPathRoot as isDetachedUpPath,\n\tgetDetachedFieldContainingPath,\n\ttype UpPathDefault,\n} from \"./pathTree.js\";\nexport {\n\ttype FieldMapObject,\n\ttype GenericFieldsNode,\n\tgenericTreeDeleteIfEmpty,\n\tgenericTreeKeys,\n\ttype GenericTreeNode,\n\tgetGenericTreeField,\n\ttype JsonableTree,\n\tsetGenericTreeField,\n} from \"./treeTextFormat.js\";\nexport { EncodedJsonableTree } from \"./persistedTreeTextFormat.js\";\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype ChildLocation,\n\ttype DetachedField,\n\ttype ChildCollection,\n\ttype RootField,\n\ttype Value,\n\ttype TreeValue,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\trootFieldKey,\n\ttype NodeData,\n\trootField,\n\taboveRootPlaceholder,\n} from \"./types.js\";\nexport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\nexport {\n\ttype AnnouncedVisitor,\n\tannounceDelta,\n\tapplyDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tmakeDetachedFieldIndex,\n} from \"./visitorUtils.js\";\n\nexport { SparseNode, getDescendant } from \"./sparseTree.js\";\n\nexport {\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n} from \"./deltaUtil.js\";\n\nexport {\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n} from \"./chunk.js\";\n\nexport {\n\tDetachedFieldIndex,\n\ttype DetachedFieldIndexCheckpoint,\n\ttype ReadOnlyDetachedFieldIndex,\n} from \"./detachedFieldIndex.js\";\n\nexport { detachedFieldIndexCodecBuilder } from \"./detachedFieldIndexCodecs.js\";\nexport { DetachedFieldIndexFormatVersion } from \"./detachedFieldIndexFormatCommon.js\";\nexport { type FormatV1 } from \"./detachedFieldIndexFormatV1.js\";\n\nexport { type ForestRootId } from \"./detachedFieldIndexTypes.js\";\n"]}
|
|
@@ -104,9 +104,7 @@ export interface FieldUpPath<TUpPath = UpPath> {
|
|
|
104
104
|
/**
|
|
105
105
|
* Given an {@link UpPath}, checks if it is a path to a detached root.
|
|
106
106
|
*/
|
|
107
|
-
export declare function isDetachedUpPathRoot<T>(path: UpPath<T> | NormalizedUpPath): path is NormalizedUpPathRoot
|
|
108
|
-
readonly detachedNodeId: DetachedNodeId;
|
|
109
|
-
};
|
|
107
|
+
export declare function isDetachedUpPathRoot<T>(path: UpPath<T> | NormalizedUpPath): path is NormalizedUpPathRoot;
|
|
110
108
|
/**
|
|
111
109
|
* Delimits the extend of a range.
|
|
112
110
|
*/
|
|
@@ -168,7 +166,7 @@ export declare function clonePath(path: UpPath | undefined): UpPath | undefined;
|
|
|
168
166
|
* Gets the elements of the given `path`, ordered from root-most to child-most.
|
|
169
167
|
* @remarks These elements are unchanged and therefore still point "up".
|
|
170
168
|
*/
|
|
171
|
-
export declare function topDownPath
|
|
169
|
+
export declare function topDownPath(path: UpPath | undefined): UpPath[];
|
|
172
170
|
/**
|
|
173
171
|
* Returns true if and only if `a` and `b` describe the same path.
|
|
174
172
|
* @remarks
|
|
@@ -182,15 +180,9 @@ export declare function compareUpPaths(a: UpPath | undefined, b: UpPath | undefi
|
|
|
182
180
|
*/
|
|
183
181
|
export declare function compareFieldUpPaths(a: FieldUpPath, b: FieldUpPath): boolean;
|
|
184
182
|
/**
|
|
185
|
-
*
|
|
183
|
+
* Checks whether or not a given path is parented under the root field.
|
|
186
184
|
* @param path - the path you want to check.
|
|
187
185
|
* @returns the {@link DetachedField} which contains the path.
|
|
188
186
|
*/
|
|
189
187
|
export declare function getDetachedFieldContainingPath(path: UpPath): DetachedField;
|
|
190
|
-
/**
|
|
191
|
-
* Returns the field key for the root field.
|
|
192
|
-
* @param path - the path you want to check.
|
|
193
|
-
* @returns the {@link DetachedField} which contains the path.
|
|
194
|
-
*/
|
|
195
|
-
export declare function getDetachedFieldContainingFieldPath(path: FieldUpPath): DetachedField;
|
|
196
188
|
//# sourceMappingURL=pathTree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathTree.d.ts","sourceRoot":"","sources":["../../../src/core/tree/pathTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,YAAY,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;;;;;;;;;;GAWG;AACH,MAAM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AAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ7C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAaxE;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAS9D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAYpF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAK3E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAU1E"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.getDetachedFieldContainingPath = exports.compareFieldUpPaths = exports.compareUpPaths = exports.topDownPath = exports.clonePath = exports.getDepth = exports.isDetachedUpPathRoot = void 0;
|
|
8
8
|
const types_js_1 = require("./types.js");
|
|
9
9
|
/**
|
|
10
10
|
* Given an {@link UpPath}, checks if it is a path to a detached root.
|
|
@@ -87,7 +87,7 @@ function compareFieldUpPaths(a, b) {
|
|
|
87
87
|
}
|
|
88
88
|
exports.compareFieldUpPaths = compareFieldUpPaths;
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* Checks whether or not a given path is parented under the root field.
|
|
91
91
|
* @param path - the path you want to check.
|
|
92
92
|
* @returns the {@link DetachedField} which contains the path.
|
|
93
93
|
*/
|
|
@@ -104,16 +104,4 @@ function getDetachedFieldContainingPath(path) {
|
|
|
104
104
|
return (0, types_js_1.keyAsDetachedField)(path.parentField);
|
|
105
105
|
}
|
|
106
106
|
exports.getDetachedFieldContainingPath = getDetachedFieldContainingPath;
|
|
107
|
-
/**
|
|
108
|
-
* Returns the field key for the root field.
|
|
109
|
-
* @param path - the path you want to check.
|
|
110
|
-
* @returns the {@link DetachedField} which contains the path.
|
|
111
|
-
*/
|
|
112
|
-
function getDetachedFieldContainingFieldPath(path) {
|
|
113
|
-
if (path.parent === undefined) {
|
|
114
|
-
return (0, types_js_1.keyAsDetachedField)(path.field);
|
|
115
|
-
}
|
|
116
|
-
return getDetachedFieldContainingPath(path.parent);
|
|
117
|
-
}
|
|
118
|
-
exports.getDetachedFieldContainingFieldPath = getDetachedFieldContainingFieldPath;
|
|
119
107
|
//# sourceMappingURL=pathTree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathTree.js","sourceRoot":"","sources":["../../../src/core/tree/pathTree.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,yCAAoE;AAmHpE;;GAEG;AACH,SAAgB,oBAAoB,CACnC,IAAkC;IAElC,OAAQ,IAA6B,CAAC,cAAc,KAAK,SAAS,CAAC;AACpE,CAAC;AAJD,oDAIC;AAgDD;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACpC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACvB,OAAO,IAAI,KAAK,SAAS,EAAE,CAAC;QAC3B,KAAK,IAAI,CAAC,CAAC;QACX,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AARD,4BAQC;AAcD,SAAgB,SAAS,CAAC,IAAwB;IACjD,IAAI,IAAI,KAAK,SAA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ACD,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC;AALD,kDAKC;AAED;;;;GAIG;AACH,SAAgB,8BAA8B,CAAC,IAAY;IAC1D,IAAI,WAAW,GAAG,IAAI,CAAC;IACvB,OAAO,WAAW,KAAK,SAAS,EAAE,CAAC;QAClC,IAAI,WAAW,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACtC,OAAO,IAAA,6BAAkB,EAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACP,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC;QAClC,CAAC;IACF,CAAC;IACD,OAAO,IAAA,6BAAkB,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC7C,CAAC;AAVD,wEAUC;AAED;;;;GAIG;AACH,SAAgB,mCAAmC,CAAC,IAAiB;IACpE,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,IAAA,6BAAkB,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,8BAA8B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AALD,kFAKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { DetachedNodeId } from \"./delta.js\";\nimport { type DetachedField, keyAsDetachedField } from \"./types.js\";\n\n/**\n * Identical to {@link UpPath}, but a duplicate declaration is needed to make\n * the default type parameter compile.\n */\nexport type UpPathDefault = UpPath;\n\n/**\n * Path from a location in the tree upward.\n * UpPaths can be used with deduplicated upper parts to allow\n * working with paths localized to part of the tree without incurring\n * costs related to the depth of the local subtree.\n *\n * UpPaths can be thought of as terminating at a special root node (that is `undefined`)\n * whose FieldKeys correspond to detached sequences.\n *\n * UpPaths can be mutated over time and should be considered to be invalidated when any edits occurs:\n * Use of an UpPath that was acquired before the most recent edit is undefined behavior.\n */\nexport interface UpPath<TParent = UpPathDefault> {\n\t/**\n\t * The parent, or undefined in the case where this path is a member of a detached sequence.\n\t */\n\treadonly parent: TParent | undefined;\n\t/**\n\t * The Field under which this path points.\n\t * Note that if `parent` returns `undefined`, this key corresponds to a detached sequence.\n\t */\n\treadonly parentField: FieldKey; // TODO: Type information, including when in DetachedField.\n\t/**\n\t * The index within `parentField` this path is pointing to.\n\t */\n\treadonly parentIndex: NodeIndex;\n}\n\n/**\n * Identical to {@link INormalizedUpPath}, but a duplicate declaration is needed to make the default type parameter compile.\n */\nexport type INormalizedUpPathDefault = INormalizedUpPath;\n\n/**\n * Identical to {@link UpPath}, but a with a {@link DetachedNodeId} to specify the ID of detached roots.\n * Note that document roots (i.e., any node in the root field) are not considered detached roots and therefore do not have an associated ID.\n *\n * Use this interface for implementing a class that needs to be used as a {@link NormalizedUpPath}.\n */\nexport interface INormalizedUpPath<TParent = INormalizedUpPathDefault>\n\textends UpPath<TParent> {\n\treadonly detachedNodeId: DetachedNodeId | undefined;\n}\n\n/**\n * Identical to {@link UpPath}, but a with a {@link DetachedNodeId} to specify the ID of detached roots.\n * Note that document roots (i.e., any node in the root field) are not considered detached roots and therefore do not have an associated ID.\n *\n * Prefer this type over {@link INormalizedUpPath} except when implementing a class that needs to be used as a {@link NormalizedUpPath}.\n */\nexport type NormalizedUpPath =\n\t| INormalizedUpPath<NormalizedUpPath>\n\t| NormalizedUpPathInterior<NormalizedUpPath>\n\t| NormalizedUpPathRoot;\n\n/**\n * The root element of a {@link NormalizedUpPath}.\n */\nexport interface NormalizedUpPathRoot extends UpPath<undefined> {\n\t/**\n\t * The ID associated with this node if it is a detached root.\n\t */\n\treadonly detachedNodeId: DetachedNodeId | undefined;\n}\n\n/**\n * Identical to {@link NormalizedUpPathInterior}, but a duplicate declaration is needed to make the default type parameter compile.\n */\nexport type NormalizedUpPathInteriorDefault = NormalizedUpPathInterior;\n\n/**\n * An interior (i.e., non-root) element of a {@link NormalizedUpPath}.\n */\nexport interface NormalizedUpPathInterior<\n\tTParent = NormalizedUpPathInteriorDefault | NormalizedUpPathRoot,\n> extends UpPath<TParent> {\n\t/**\n\t * The parent.\n\t */\n\treadonly parent: TParent;\n}\n\n/**\n * Path from a field in the tree upward.\n *\n * See {@link UpPath}.\n */\nexport type NormalizedFieldUpPath<TParent = NormalizedUpPath> = FieldUpPath<TParent>;\n\n/**\n * Path from a field in the tree upward.\n *\n * See {@link FieldUpPath} and {@link NormalizedUpPath}.\n */\nexport interface FieldUpPath<TUpPath = UpPath> {\n\t/**\n\t * The parent, or undefined in the case where this path is to a detached sequence.\n\t */\n\treadonly parent: TUpPath | undefined;\n\n\t/**\n\t * The Field to which this path points.\n\t * Note that if `parent` returns `undefined`, this key corresponds to a detached sequence.\n\t */\n\treadonly field: FieldKey; // TODO: Type information, including when in DetachedField.\n}\n\n/**\n * Given an {@link UpPath}, checks if it is a path to a detached root.\n */\nexport function isDetachedUpPathRoot<T>(\n\tpath: UpPath<T> | NormalizedUpPath,\n): path is NormalizedUpPathRoot & { readonly detachedNodeId: DetachedNodeId } {\n\treturn (path as NormalizedUpPathRoot).detachedNodeId !== undefined;\n}\n\n/**\n * Delimits the extend of a range.\n */\nexport interface Range {\n\t/**\n\t * The location before the first node.\n\t * Must be less than or equal to `end`.\n\t */\n\treadonly start: PlaceIndex;\n\t/**\n\t * The location after the last node.\n\t * Must be greater than or equal to `start`.\n\t */\n\treadonly end: PlaceIndex;\n}\n\n/**\n * A possibly empty range of nodes in a field.\n * This object only characterizes the location of the range, it does not own/contain the nodes in the range.\n */\nexport interface RangeUpPath<TUpPath extends UpPath = UpPath>\n\textends FieldUpPath<TUpPath>,\n\t\tRange {}\n\n/**\n * A place in a field.\n */\nexport interface PlaceUpPath<TUpPath extends UpPath = UpPath> extends FieldUpPath<TUpPath> {\n\t/**\n\t * The location in the field.\n\t */\n\treadonly index: PlaceIndex;\n}\n\n/**\n * Indicates the index of a node in a field.\n * Zero indicates the first node in a field.\n */\nexport type NodeIndex = number;\n\n/**\n * Indicates a place between nodes in a field or at the extremity of a field.\n * Zero indicates the place at the start of the field (before the first node if any).\n */\nexport type PlaceIndex = number;\n\n/**\n * Gets the number of nodes above this one.\n * @remarks\n * Zero when the path's parent is undefined, meaning the path represents a node in a detached field.\n * Runs in O(depth) time.\n */\nexport function getDepth(path: UpPath): number {\n\tlet depth = 0;\n\tlet next = path.parent;\n\twhile (next !== undefined) {\n\t\tdepth += 1;\n\t\tnext = next.parent;\n\t}\n\treturn depth;\n}\n\n/**\n * Creates deep copy of the provided path as simple JavaScript object.\n * @remarks This is safe to hold onto and use deep object comparisons on.\n */\nexport function clonePath(path: UpPath): UpPath;\n\n/**\n * Creates a deep copy of the provided path as simple JavaScript object.\n * @remarks This is safe to hold onto and use deep object comparisons on.\n */\nexport function clonePath(path: UpPath | undefined): UpPath | undefined;\n\nexport function clonePath(path: UpPath | undefined): UpPath | undefined {\n\tif (path === undefined) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\tparent: clonePath(path.parent),\n\t\tparentField: path.parentField,\n\t\tparentIndex: path.parentIndex,\n\t};\n}\n\n/**\n * Gets the elements of the given `path`, ordered from root-most to child-most.\n * @remarks These elements are unchanged and therefore still point \"up\".\n */\nexport function topDownPath<T extends UpPath<T>>(path: T | undefined): T[] {\n\tconst out: T[] = [];\n\tlet curr = path;\n\twhile (curr !== undefined) {\n\t\tout.push(curr);\n\t\tcurr = curr.parent;\n\t}\n\tout.reverse();\n\treturn out;\n}\n\n/**\n * Returns true if and only if `a` and `b` describe the same path.\n * @remarks\n * Note that for mutable paths (as used in `AnchorSet`), this equality may change over time: this only checks if the two paths are currently the same.\n */\nexport function compareUpPaths(a: UpPath | undefined, b: UpPath | undefined): boolean {\n\tif (a === b) {\n\t\t// This handles the both `undefined` case, as well as provides an early out if a shared node is encountered.\n\t\treturn true;\n\t}\n\tif (a === undefined || b === undefined) {\n\t\treturn false;\n\t}\n\tif (a.parentField !== b.parentField || a.parentIndex !== b.parentIndex) {\n\t\treturn false;\n\t}\n\treturn compareUpPaths(a.parent, b.parent);\n}\n\n/**\n * Returns true if and only if `a` and `b` describe the same field path.\n * @remarks\n * Note that for mutable paths (as used in `AnchorSet`), this equality may change over time: this only checks if the two paths are currently the same.\n */\nexport function compareFieldUpPaths(a: FieldUpPath, b: FieldUpPath): boolean {\n\tif (a.field !== b.field) {\n\t\treturn false;\n\t}\n\treturn compareUpPaths(a.parent, b.parent);\n}\n\n/**\n * Returns the field key for the root field.\n * @param path - the path you want to check.\n * @returns the {@link DetachedField} which contains the path.\n */\nexport function getDetachedFieldContainingPath(path: UpPath): DetachedField {\n\tlet currentPath = path;\n\twhile (currentPath !== undefined) {\n\t\tif (currentPath.parent === undefined) {\n\t\t\treturn keyAsDetachedField(currentPath.parentField);\n\t\t} else {\n\t\t\tcurrentPath = currentPath.parent;\n\t\t}\n\t}\n\treturn keyAsDetachedField(path.parentField);\n}\n\n/**\n * Returns the field key for the root field.\n * @param path - the path you want to check.\n * @returns the {@link DetachedField} which contains the path.\n */\nexport function getDetachedFieldContainingFieldPath(path: FieldUpPath): DetachedField {\n\tif (path.parent === undefined) {\n\t\treturn keyAsDetachedField(path.field);\n\t}\n\treturn getDetachedFieldContainingPath(path.parent);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pathTree.js","sourceRoot":"","sources":["../../../src/core/tree/pathTree.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,yCAAoE;AAmHpE;;GAEG;AACH,SAAgB,oBAAoB,CACnC,IAAkC;IAElC,OAAQ,IAA6B,CAAC,cAAc,KAAK,SAAS,CAAC;AACpE,CAAC;AAJD,oDAIC;AAgDD;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACpC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACvB,OAAO,IAAI,KAAK,SAAS,EAAE,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CAAC;AAC3C,CAAC;AAZD,wCAYC;AAED;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,CAAc,EAAE,CAAc;IACjE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC;AALD,kDAKC;AAED;;;;GAIG;AACH,SAAgB,8BAA8B,CAAC,IAAY;IAC1D,IAAI,WAAW,GAAG,IAAI,CAAC;IACvB,OAAO,WAAW,KAAK,SAAS,EAAE,CAAC;QAClC,IAAI,WAAW,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACtC,OAAO,IAAA,6BAAkB,EAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACP,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC;QAClC,CAAC;IACF,CAAC;IACD,OAAO,IAAA,6BAAkB,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC7C,CAAC;AAVD,wEAUC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { DetachedNodeId } from \"./delta.js\";\nimport { type DetachedField, keyAsDetachedField } from \"./types.js\";\n\n/**\n * Identical to {@link UpPath}, but a duplicate declaration is needed to make\n * the default type parameter compile.\n */\nexport type UpPathDefault = UpPath;\n\n/**\n * Path from a location in the tree upward.\n * UpPaths can be used with deduplicated upper parts to allow\n * working with paths localized to part of the tree without incurring\n * costs related to the depth of the local subtree.\n *\n * UpPaths can be thought of as terminating at a special root node (that is `undefined`)\n * whose FieldKeys correspond to detached sequences.\n *\n * UpPaths can be mutated over time and should be considered to be invalidated when any edits occurs:\n * Use of an UpPath that was acquired before the most recent edit is undefined behavior.\n */\nexport interface UpPath<TParent = UpPathDefault> {\n\t/**\n\t * The parent, or undefined in the case where this path is a member of a detached sequence.\n\t */\n\treadonly parent: TParent | undefined;\n\t/**\n\t * The Field under which this path points.\n\t * Note that if `parent` returns `undefined`, this key corresponds to a detached sequence.\n\t */\n\treadonly parentField: FieldKey; // TODO: Type information, including when in DetachedField.\n\t/**\n\t * The index within `parentField` this path is pointing to.\n\t */\n\treadonly parentIndex: NodeIndex;\n}\n\n/**\n * Identical to {@link INormalizedUpPath}, but a duplicate declaration is needed to make the default type parameter compile.\n */\nexport type INormalizedUpPathDefault = INormalizedUpPath;\n\n/**\n * Identical to {@link UpPath}, but a with a {@link DetachedNodeId} to specify the ID of detached roots.\n * Note that document roots (i.e., any node in the root field) are not considered detached roots and therefore do not have an associated ID.\n *\n * Use this interface for implementing a class that needs to be used as a {@link NormalizedUpPath}.\n */\nexport interface INormalizedUpPath<TParent = INormalizedUpPathDefault>\n\textends UpPath<TParent> {\n\treadonly detachedNodeId: DetachedNodeId | undefined;\n}\n\n/**\n * Identical to {@link UpPath}, but a with a {@link DetachedNodeId} to specify the ID of detached roots.\n * Note that document roots (i.e., any node in the root field) are not considered detached roots and therefore do not have an associated ID.\n *\n * Prefer this type over {@link INormalizedUpPath} except when implementing a class that needs to be used as a {@link NormalizedUpPath}.\n */\nexport type NormalizedUpPath =\n\t| INormalizedUpPath<NormalizedUpPath>\n\t| NormalizedUpPathInterior<NormalizedUpPath>\n\t| NormalizedUpPathRoot;\n\n/**\n * The root element of a {@link NormalizedUpPath}.\n */\nexport interface NormalizedUpPathRoot extends UpPath<undefined> {\n\t/**\n\t * The ID associated with this node if it is a detached root.\n\t */\n\treadonly detachedNodeId: DetachedNodeId | undefined;\n}\n\n/**\n * Identical to {@link NormalizedUpPathInterior}, but a duplicate declaration is needed to make the default type parameter compile.\n */\nexport type NormalizedUpPathInteriorDefault = NormalizedUpPathInterior;\n\n/**\n * An interior (i.e., non-root) element of a {@link NormalizedUpPath}.\n */\nexport interface NormalizedUpPathInterior<\n\tTParent = NormalizedUpPathInteriorDefault | NormalizedUpPathRoot,\n> extends UpPath<TParent> {\n\t/**\n\t * The parent.\n\t */\n\treadonly parent: TParent;\n}\n\n/**\n * Path from a field in the tree upward.\n *\n * See {@link UpPath}.\n */\nexport type NormalizedFieldUpPath<TParent = NormalizedUpPath> = FieldUpPath<TParent>;\n\n/**\n * Path from a field in the tree upward.\n *\n * See {@link FieldUpPath} and {@link NormalizedUpPath}.\n */\nexport interface FieldUpPath<TUpPath = UpPath> {\n\t/**\n\t * The parent, or undefined in the case where this path is to a detached sequence.\n\t */\n\treadonly parent: TUpPath | undefined;\n\n\t/**\n\t * The Field to which this path points.\n\t * Note that if `parent` returns `undefined`, this key corresponds to a detached sequence.\n\t */\n\treadonly field: FieldKey; // TODO: Type information, including when in DetachedField.\n}\n\n/**\n * Given an {@link UpPath}, checks if it is a path to a detached root.\n */\nexport function isDetachedUpPathRoot<T>(\n\tpath: UpPath<T> | NormalizedUpPath,\n): path is NormalizedUpPathRoot {\n\treturn (path as NormalizedUpPathRoot).detachedNodeId !== undefined;\n}\n\n/**\n * Delimits the extend of a range.\n */\nexport interface Range {\n\t/**\n\t * The location before the first node.\n\t * Must be less than or equal to `end`.\n\t */\n\treadonly start: PlaceIndex;\n\t/**\n\t * The location after the last node.\n\t * Must be greater than or equal to `start`.\n\t */\n\treadonly end: PlaceIndex;\n}\n\n/**\n * A possibly empty range of nodes in a field.\n * This object only characterizes the location of the range, it does not own/contain the nodes in the range.\n */\nexport interface RangeUpPath<TUpPath extends UpPath = UpPath>\n\textends FieldUpPath<TUpPath>,\n\t\tRange {}\n\n/**\n * A place in a field.\n */\nexport interface PlaceUpPath<TUpPath extends UpPath = UpPath> extends FieldUpPath<TUpPath> {\n\t/**\n\t * The location in the field.\n\t */\n\treadonly index: PlaceIndex;\n}\n\n/**\n * Indicates the index of a node in a field.\n * Zero indicates the first node in a field.\n */\nexport type NodeIndex = number;\n\n/**\n * Indicates a place between nodes in a field or at the extremity of a field.\n * Zero indicates the place at the start of the field (before the first node if any).\n */\nexport type PlaceIndex = number;\n\n/**\n * Gets the number of nodes above this one.\n * @remarks\n * Zero when the path's parent is undefined, meaning the path represents a node in a detached field.\n * Runs in O(depth) time.\n */\nexport function getDepth(path: UpPath): number {\n\tlet depth = 0;\n\tlet next = path.parent;\n\twhile (next !== undefined) {\n\t\tdepth += 1;\n\t\tnext = next.parent;\n\t}\n\treturn depth;\n}\n\n/**\n * Creates deep copy of the provided path as simple JavaScript object.\n * @remarks This is safe to hold onto and use deep object comparisons on.\n */\nexport function clonePath(path: UpPath): UpPath;\n\n/**\n * Creates a deep copy of the provided path as simple JavaScript object.\n * @remarks This is safe to hold onto and use deep object comparisons on.\n */\nexport function clonePath(path: UpPath | undefined): UpPath | undefined;\n\nexport function clonePath(path: UpPath | undefined): UpPath | undefined {\n\tif (path === undefined) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\tparent: clonePath(path.parent),\n\t\tparentField: path.parentField,\n\t\tparentIndex: path.parentIndex,\n\t};\n}\n\n/**\n * Gets the elements of the given `path`, ordered from root-most to child-most.\n * @remarks These elements are unchanged and therefore still point \"up\".\n */\nexport function topDownPath(path: UpPath | undefined): UpPath[] {\n\tconst out: UpPath[] = [];\n\tlet curr = path;\n\twhile (curr !== undefined) {\n\t\tout.push(curr);\n\t\tcurr = curr.parent;\n\t}\n\tout.reverse();\n\treturn out;\n}\n\n/**\n * Returns true if and only if `a` and `b` describe the same path.\n * @remarks\n * Note that for mutable paths (as used in `AnchorSet`), this equality may change over time: this only checks if the two paths are currently the same.\n */\nexport function compareUpPaths(a: UpPath | undefined, b: UpPath | undefined): boolean {\n\tif (a === b) {\n\t\t// This handles the both `undefined` case, as well as provides an early out if a shared node is encountered.\n\t\treturn true;\n\t}\n\tif (a === undefined || b === undefined) {\n\t\treturn false;\n\t}\n\tif (a.parentField !== b.parentField || a.parentIndex !== b.parentIndex) {\n\t\treturn false;\n\t}\n\treturn compareUpPaths(a.parent, b.parent);\n}\n\n/**\n * Returns true if and only if `a` and `b` describe the same field path.\n * @remarks\n * Note that for mutable paths (as used in `AnchorSet`), this equality may change over time: this only checks if the two paths are currently the same.\n */\nexport function compareFieldUpPaths(a: FieldUpPath, b: FieldUpPath): boolean {\n\tif (a.field !== b.field) {\n\t\treturn false;\n\t}\n\treturn compareUpPaths(a.parent, b.parent);\n}\n\n/**\n * Checks whether or not a given path is parented under the root field.\n * @param path - the path you want to check.\n * @returns the {@link DetachedField} which contains the path.\n */\nexport function getDetachedFieldContainingPath(path: UpPath): DetachedField {\n\tlet currentPath = path;\n\twhile (currentPath !== undefined) {\n\t\tif (currentPath.parent === undefined) {\n\t\t\treturn keyAsDetachedField(currentPath.parentField);\n\t\t} else {\n\t\t\tcurrentPath = currentPath.parent;\n\t\t}\n\t}\n\treturn keyAsDetachedField(path.parentField);\n}\n"]}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
import type { RevisionTag } from "../rebase/index.js";
|
|
5
6
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
6
7
|
import { type ITreeCursorSynchronous } from "./cursor.js";
|
|
7
8
|
import type * as Delta from "./delta.js";
|
|
8
9
|
import type { DetachedFieldIndex } from "./detachedFieldIndex.js";
|
|
9
10
|
import type { NodeIndex, PlaceIndex, Range } from "./pathTree.js";
|
|
10
|
-
import type { RevisionTag } from "../rebase/index.js";
|
|
11
11
|
/**
|
|
12
12
|
* Implementation notes:
|
|
13
13
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitDelta.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitDelta.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"visitDelta.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitDelta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAK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0BAAc,EAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport { type NestedMap, setInNestedMap, tryGetFromNestedMap } from \"../../util/index.js\";\n\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport { mapCursorField, type ITreeCursorSynchronous } from \"./cursor.js\";\nimport type * as Delta from \"./delta.js\";\nimport { areDetachedNodeIdsEqual, offsetDetachId } from \"./deltaUtil.js\";\nimport type { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId, Major, Minor } from \"./detachedFieldIndexTypes.js\";\nimport type { NodeIndex, PlaceIndex, Range } from \"./pathTree.js\";\nimport type { RevisionTag } from \"../rebase/index.js\";\nimport type { TreeChunk } from \"./chunk.js\";\n\n/**\n * Implementation notes:\n *\n * The visit is organized into four phases:\n * 1. a detach pass\n * 2. root transfers\n * 3. an attach pass\n * 4. root destructions\n *\n * The core idea is that before content can be attached, it must first exist and be in a detached field.\n *\n * While the detach pass ensures that nodes to be attached are in a detached state, it does not guarantee that they\n * reside in the correct detached field. That is the responsibility of the root transfers phase.\n *\n * The attach phase carries out attaches.\n *\n * After the attach phase, roots destruction is carried out.\n * This needs to happen last to allow modifications to detached roots to be applied before they are destroyed.\n *\n * The details of the delta visit algorithm can impact how/when events are emitted by the objects that own the visitors.\n * For example, as of 2024-03-27, the subtreeChanged event of an AnchorNode is emitted when exiting a node during a\n * delta visit, and thus the two-pass nature of the algorithm means the event fires twice for any given change.\n */\n\n/**\n * Crawls the given `delta`, calling `visitor`'s callback for each change encountered.\n * Each successive call to the visitor callbacks assumes that the change described by earlier calls have been applied\n * to the document tree. For example, for a change that removes the first and third node of a field, the visitor calls\n * will first call detach with a range from indices 0 to 1 then call detach with a range from indices 1 to 2.\n *\n * @param delta - The delta to be crawled.\n * @param visitor - The object to notify of the changes encountered.\n * @param detachedFieldIndex - Index responsible for keeping track of the existing detached fields.\n * @param latestRevision - The latest revision tag associated with this delta.\n */\nexport function visitDelta(\n\tdelta: Delta.Root,\n\tvisitor: DeltaVisitor,\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tlatestRevision: RevisionTag | undefined,\n): void {\n\tconst detachPassRoots: Map<ForestRootId, Delta.FieldMap> = new Map();\n\tconst attachPassRoots: Map<ForestRootId, Delta.FieldMap> = new Map();\n\tconst rootTransfers: Delta.DetachedNodeRename[] = [];\n\tconst rootDestructions: Delta.DetachedNodeDestruction[] = [];\n\tconst refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous> = new Map();\n\tfor (const {\n\t\tid: { major, minor },\n\t\ttrees,\n\t} of delta.refreshers ?? []) {\n\t\tconst treeCursors = nodeCursorsFromChunk(trees);\n\t\tfor (let i = 0; i < trees.topLevelLength; i += 1) {\n\t\t\tconst offsettedId = minor + i;\n\t\t\tsetInNestedMap(refreshers, major, offsettedId, treeCursors[i]);\n\t\t}\n\t}\n\tconst detachConfig: PassConfig = {\n\t\tfunc: detachPass,\n\t\tlatestRevision,\n\t\trefreshers,\n\t\tdetachedFieldIndex,\n\t\tdetachPassRoots,\n\t\tattachPassRoots,\n\t\trootTransfers,\n\t\trootDestructions,\n\t};\n\tprocessBuilds(delta.build, detachConfig, visitor);\n\tprocessGlobal(delta.global, detachConfig, visitor);\n\tprocessRename(delta.rename, detachConfig);\n\tvisitFieldMarks(delta.fields, visitor, detachConfig);\n\tfixedPointVisitOfRoots(visitor, detachPassRoots, detachConfig);\n\ttransferRoots(\n\t\trootTransfers,\n\t\tattachPassRoots,\n\t\tdetachedFieldIndex,\n\t\tvisitor,\n\t\trefreshers,\n\t\tlatestRevision,\n\t);\n\tconst attachConfig: PassConfig = {\n\t\tfunc: attachPass,\n\t\tlatestRevision,\n\t\trefreshers,\n\t\tdetachedFieldIndex,\n\t\tdetachPassRoots,\n\t\tattachPassRoots,\n\t\trootTransfers,\n\t\trootDestructions,\n\t};\n\tvisitFieldMarks(delta.fields, visitor, attachConfig);\n\tfixedPointVisitOfRoots(visitor, attachPassRoots, attachConfig);\n\tcollectDestroys(delta.destroy, attachConfig);\n\tfor (const { id, count } of rootDestructions) {\n\t\tfor (let i = 0; i < count; i += 1) {\n\t\t\tconst offsetId = offsetDetachId(id, i);\n\t\t\tconst root = detachedFieldIndex.getEntry(offsetId);\n\t\t\tconst field = detachedFieldIndex.toFieldKey(root);\n\t\t\tvisitor.destroy(field, 1);\n\t\t\tdetachedFieldIndex.deleteEntry(offsetId);\n\t\t}\n\t}\n}\n\n/**\n * Visits all nodes in `roots` until none are left.\n * This function tolerates entries being added to and removed from `roots` as part of visits.\n * @param visitor - The visitor to visit the roots with.\n * @param roots - The initial set of roots to visit.\n * Individual entries are removed prior to being visited.\n * @param config - The configuration to use for visits.\n */\nfunction fixedPointVisitOfRoots(\n\tvisitor: DeltaVisitor,\n\troots: Map<ForestRootId, Delta.FieldMap>,\n\tconfig: PassConfig,\n): void {\n\twhile (roots.size > 0) {\n\t\tfor (const [root, modifications] of roots) {\n\t\t\troots.delete(root);\n\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\tvisitor.enterField(field);\n\t\t\t// Note: each visit may lead to `roots` being populated with new entries or having some entries removed.\n\t\t\tvisitNode(0, modifications, visitor, config);\n\t\t\tvisitor.exitField(field);\n\t\t}\n\t}\n}\n\n/**\n * Transfers roots from one detached field to another.\n * This occurs in the following circumstances:\n * - A changeset moves then removes a node\n * - A changeset restores then moves a node\n * - A changeset restores then removes a node\n * TODO#5481: update the DetachedFieldIndex instead of moving the nodes around.\n *\n * @param rootTransfers - The transfers to perform.\n * @param mapToUpdate - A map to update based on the transfers being performed.\n * @param detachedFieldIndex - The index to update based on the transfers being performed.\n * @param visitor - The visitor to inform of the transfers being performed.\n */\nfunction transferRoots(\n\trootTransfers: readonly Delta.DetachedNodeRename[],\n\tmapToUpdate: Map<ForestRootId, unknown>,\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tvisitor: DeltaVisitor,\n\trefreshers: NestedMap<Major, Minor, ITreeCursorSynchronous>,\n\trevision?: RevisionTag,\n): void {\n\ttype AtomizedNodeRename = Omit<Delta.DetachedNodeRename, \"count\">;\n\tlet nextBatch = rootTransfers.flatMap(({ oldId, newId, count }) => {\n\t\tconst atomized: AtomizedNodeRename[] = [];\n\t\t// It's possible for a detached node to be revived transiently such that it ends up back in the same detached field.\n\t\t// Making such a transfer wouldn't just be inefficient, it would lead us to mistakenly think we have moved all content\n\t\t// out of the source detached field, and would lead us to delete the tree index entry for that source detached field.\n\t\t// This would effectively result in the tree index missing an entry for the detached field.\n\t\t// This if statement prevents that from happening.\n\t\tif (!areDetachedNodeIdsEqual(oldId, newId)) {\n\t\t\tfor (let i = 0; i < count; i += 1) {\n\t\t\t\tatomized.push({ oldId: offsetDetachId(oldId, i), newId: offsetDetachId(newId, i) });\n\t\t\t}\n\t\t}\n\t\treturn atomized;\n\t});\n\twhile (nextBatch.length > 0) {\n\t\tconst delayed: AtomizedNodeRename[] = [];\n\t\tconst priorSize = nextBatch.length;\n\t\tfor (const { oldId, newId } of nextBatch) {\n\t\t\tlet oldRootId = detachedFieldIndex.tryGetEntry(oldId);\n\t\t\tif (oldRootId === undefined) {\n\t\t\t\tconst tree = tryGetFromNestedMap(refreshers, oldId.major, oldId.minor);\n\t\t\t\tif (tree !== undefined) {\n\t\t\t\t\tbuildTrees(oldId, [tree], detachedFieldIndex, revision, visitor);\n\t\t\t\t\toldRootId = detachedFieldIndex.getEntry(oldId);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (oldRootId === undefined) {\n\t\t\t\t// The source field is not populated.\n\t\t\t\t// This can happen when another rename needs to be performed first.\n\t\t\t\tdelayed.push({ oldId, newId });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet newRootId = detachedFieldIndex.tryGetEntry(newId);\n\t\t\tif (newRootId !== undefined) {\n\t\t\t\t// The destination field is already occupied.\n\t\t\t\t// This can happen when another rename needs to be performed first.\n\t\t\t\tdelayed.push({ oldId, newId });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- intentional behavior\n\t\t\tnewRootId = detachedFieldIndex.createEntry(newId, revision);\n\t\t\tconst fields = mapToUpdate.get(oldRootId);\n\t\t\tif (fields !== undefined) {\n\t\t\t\tmapToUpdate.delete(oldRootId);\n\t\t\t\tmapToUpdate.set(newRootId, fields);\n\t\t\t}\n\t\t\tconst oldField = detachedFieldIndex.toFieldKey(oldRootId);\n\t\t\tconst newField = detachedFieldIndex.toFieldKey(newRootId);\n\t\t\tvisitor.enterField(oldField);\n\t\t\tvisitor.detach({ start: 0, end: 1 }, newField, newId, false);\n\t\t\tvisitor.exitField(oldField);\n\t\t\tdetachedFieldIndex.deleteEntry(oldId);\n\t\t}\n\t\tassert(delayed.length < priorSize, 0x7cf /* transferRoots should make progress */);\n\t\tnextBatch = delayed;\n\t}\n}\n\n/**\n * Visitor for changes in a delta.\n * Must be freed after use.\n */\nexport interface DeltaVisitor {\n\t/**\n\t * Frees/releases the visitor.\n\t *\n\t * Must be called once the visitor finished traversing the delta for a couple of reasons:\n\t *\n\t * 1. Some visitors, such as those from forests, are put into a special mode while they have a visitor, forbidding some actions (like making more visitors).\n\t *\n\t * 2. Some visitors, such as those from an anchorSet, defer some events for batching purposes until the visitor is freed.\n\t */\n\tfree(): void;\n\t/**\n\t * Creates nodes for the given content in a new detached field.\n\t * @param content - The content to create.\n\t * @param destination - The key for a new detached field.\n\t * A field with this key must not already exist.\n\t */\n\tcreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void;\n\t/**\n\t * Recursively destroys the given detached field and all of the nodes within it.\n\t * @param detachedField - The key for the detached field to destroy.\n\t * @param count - The number of nodes being destroyed.\n\t * Expected to match the number of nodes in the detached field being destroyed.\n\t */\n\tdestroy(detachedField: FieldKey, count: number): void;\n\t/**\n\t * Transfers all the nodes from a detached field to the current field.\n\t * @param source - The detached field to transfer the nodes from.\n\t * @param count - The number of nodes being attached.\n\t * Expected to match the number of nodes in the source detached field.\n\t * @param destination - The index at which to attach the nodes.\n\t */\n\tattach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\t/**\n\t * Transfers a range of nodes from the current field to a new detached field.\n\t * @param source - The bounds of the range of nodes to detach.\n\t * @param destination - The key for a new detached field.\n\t * A field with this key must not already exist.\n\t * @param id - The ID assigned to the first detached node as a result of the detach. The other nodes in the detached range are assigned subsequent IDs.\n\t * @param isReplaced - Whether the detached content will be replaced by a later attach.\n\t * This is not guaranteed to be true in all cases where it could be true,\n\t * but it is guaranteed to be true in all cases where a later attach is needed to keep the data compliant with the schema.\n\t */\n\tdetach(\n\t\tsource: Range,\n\t\tdestination: FieldKey,\n\t\tid: Delta.DetachedNodeId,\n\t\tisReplaced: boolean,\n\t): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Node at the specified index\n\t * within the Field that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param index - The index (within the Field) of the node that should become the new \"current location\".\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Field.\n\t */\n\tenterNode(index: NodeIndex): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Field which contains the Node\n\t * that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param index - The index (within its Field) of the node that is being exited.\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Node.\n\t */\n\texitNode(index: NodeIndex): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Field with the specified key,\n\t * within the Node that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param key - The key of the field that should become the new \"current location\".\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Node.\n\t */\n\tenterField(key: FieldKey): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Node which contains the Field\n\t * that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param key - The key of the field that is being exited.\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Field.\n\t */\n\texitField(key: FieldKey): void;\n}\n\ninterface PassConfig {\n\treadonly func: Pass;\n\n\t/**\n\t * The latest revision tag associated with the given delta. This is used to keep track\n\t * of when repair data should be garbage collected.\n\t */\n\treadonly latestRevision: RevisionTag | undefined;\n\n\treadonly detachedFieldIndex: DetachedFieldIndex;\n\t/**\n\t * A mapping between forest root id and trees that represent refresher data. Each entry is only\n\t * created in the forest once needed.\n\t */\n\treadonly refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous>;\n\t/**\n\t * Nested changes on roots that need to be visited as part of the detach pass.\n\t * Each entry is removed when its associated changes are visited.\n\t */\n\treadonly detachPassRoots: Map<ForestRootId, Delta.FieldMap>;\n\t/**\n\t * Nested changes on roots that need to be visited as part of the attach pass.\n\t * Each entry is removed when its associated changes are visited.\n\t * Some of these roots will attached during the attach pass, in which case the nested changes are visited after\n\t * the node is attached.\n\t * Some of these nodes will never be attached, in which case we visit them in their detached fields at the end of\n\t * the attach pass. Note that such a visit might lead to more nodes being attached, including nodes were visited as\n\t * roots.\n\t */\n\treadonly attachPassRoots: Map<ForestRootId, Delta.FieldMap>;\n\t/**\n\t * Represents transfers of roots from one detached field to another.\n\t */\n\treadonly rootTransfers: Delta.DetachedNodeRename[];\n\t/**\n\t * Represents roots that need to be destroyed.\n\t * Collected as part of the detach pass.\n\t * Carried out at the end of the attach pass.\n\t */\n\treadonly rootDestructions: Delta.DetachedNodeDestruction[];\n}\n\ntype Pass = (delta: Delta.FieldChanges, visitor: DeltaVisitor, config: PassConfig) => void;\n\nfunction visitFieldMarks(\n\tfields: Delta.FieldMap | undefined,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (fields !== undefined) {\n\t\tfor (const [key, field] of fields) {\n\t\t\tvisitor.enterField(key);\n\t\t\tconfig.func(field, visitor, config);\n\t\t\tvisitor.exitField(key);\n\t\t}\n\t}\n}\n\nfunction visitNode(\n\tindex: number,\n\tfields: Delta.FieldMap | undefined,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (fields !== undefined) {\n\t\tvisitor.enterNode(index);\n\t\tvisitFieldMarks(fields, visitor, config);\n\t\tvisitor.exitNode(index);\n\t}\n}\n\n/**\n * Performs the following:\n * - Collects all roots that may need an attach pass\n * - Executes detaches (bottom-up)\n */\nfunction detachPass(\n\tfieldChanges: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tlet index = 0;\n\tfor (const mark of fieldChanges) {\n\t\tif (mark.fields !== undefined) {\n\t\t\tassert(\n\t\t\t\tmark.attach === undefined || mark.detach !== undefined,\n\t\t\t\t0x7d0 /* Invalid nested changes on an additive mark */,\n\t\t\t);\n\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t}\n\t\tif (mark.detach !== undefined) {\n\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\tconst id = offsetDetachId(mark.detach, i);\n\t\t\t\tconst root = config.detachedFieldIndex.createEntry(id, config.latestRevision);\n\t\t\t\tif (mark.fields !== undefined) {\n\t\t\t\t\tconfig.attachPassRoots.set(root, mark.fields);\n\t\t\t\t}\n\t\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\t\tvisitor.detach({ start: index, end: index + 1 }, field, id, mark.attach !== undefined);\n\t\t\t}\n\t\t}\n\t\tif (mark.detach === undefined && mark.attach === undefined) {\n\t\t\tindex += mark.count;\n\t\t}\n\t}\n}\n\nfunction buildTrees(\n\tid: Delta.DetachedNodeId,\n\ttrees: readonly ITreeCursorSynchronous[],\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tlatestRevision: RevisionTag | undefined,\n\tvisitor: DeltaVisitor,\n): void {\n\tfor (const [i, tree] of trees.entries()) {\n\t\tconst offsettedId = offsetDetachId(id, i);\n\t\tlet root = detachedFieldIndex.tryGetEntry(offsettedId);\n\t\tassert(root === undefined, 0x929 /* Unable to build tree that already exists */);\n\t\troot = detachedFieldIndex.createEntry(offsettedId, latestRevision);\n\t\tconst field = detachedFieldIndex.toFieldKey(root);\n\t\tvisitor.create([tree], field);\n\t}\n}\n\nfunction processBuilds(\n\tbuilds: readonly Delta.DetachedNodeBuild[] | undefined,\n\tconfig: PassConfig,\n\tvisitor: DeltaVisitor,\n): void {\n\tif (builds !== undefined) {\n\t\tfor (const { id, trees } of builds) {\n\t\t\tbuildTrees(\n\t\t\t\tid,\n\t\t\t\tnodeCursorsFromChunk(trees),\n\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\tconfig.latestRevision,\n\t\t\t\tvisitor,\n\t\t\t);\n\t\t}\n\t}\n}\n\nfunction processGlobal(\n\tglobal: readonly Delta.DetachedNodeChanges[] | undefined,\n\tconfig: PassConfig,\n\tvisitor: DeltaVisitor,\n): void {\n\tif (global !== undefined) {\n\t\tfor (const { id, fields } of global) {\n\t\t\tlet root = config.detachedFieldIndex.tryGetEntry(id);\n\t\t\tif (root === undefined) {\n\t\t\t\tconst tree = tryGetFromNestedMap(config.refreshers, id.major, id.minor);\n\t\t\t\tassert(tree !== undefined, 0x928 /* refresher data not found */);\n\t\t\t\tbuildTrees(id, [tree], config.detachedFieldIndex, config.latestRevision, visitor);\n\t\t\t\troot = config.detachedFieldIndex.getEntry(id);\n\t\t\t}\n\t\t\t// the revision is updated for any refresher data included in the delta that is used\n\t\t\tconfig.detachedFieldIndex.updateLatestRevision(id, config.latestRevision);\n\t\t\tconfig.detachPassRoots.set(root, fields);\n\t\t\tconfig.attachPassRoots.set(root, fields);\n\t\t}\n\t}\n}\n\nfunction processRename(\n\trename: readonly Delta.DetachedNodeRename[] | undefined,\n\tconfig: PassConfig,\n): void {\n\tif (rename !== undefined) {\n\t\tconfig.rootTransfers.push(...rename);\n\t}\n}\n\nfunction collectDestroys(\n\tdestroys: readonly Delta.DetachedNodeDestruction[] | undefined,\n\tconfig: PassConfig,\n): void {\n\tif (destroys !== undefined) {\n\t\tconfig.rootDestructions.push(...destroys);\n\t}\n}\n\n/**\n * Preforms the following:\n * - Executes attaches (top-down) applying nested changes on the attached nodes\n */\nfunction attachPass(\n\tfieldChanges: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tlet index = 0;\n\tfor (const mark of fieldChanges) {\n\t\tif (mark.attach !== undefined) {\n\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\tconst offsetAttachId = offsetDetachId(mark.attach, i);\n\t\t\t\tlet sourceRoot = config.detachedFieldIndex.tryGetEntry(offsetAttachId);\n\t\t\t\tif (sourceRoot === undefined) {\n\t\t\t\t\tconst tree = tryGetFromNestedMap(\n\t\t\t\t\t\tconfig.refreshers,\n\t\t\t\t\t\toffsetAttachId.major,\n\t\t\t\t\t\toffsetAttachId.minor,\n\t\t\t\t\t);\n\t\t\t\t\tassert(tree !== undefined, 0x92a /* refresher data not found */);\n\t\t\t\t\tbuildTrees(\n\t\t\t\t\t\toffsetAttachId,\n\t\t\t\t\t\t[tree],\n\t\t\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\t\t\tconfig.latestRevision,\n\t\t\t\t\t\tvisitor,\n\t\t\t\t\t);\n\t\t\t\t\tsourceRoot = config.detachedFieldIndex.getEntry(offsetAttachId);\n\t\t\t\t}\n\t\t\t\tconst sourceField = config.detachedFieldIndex.toFieldKey(sourceRoot);\n\t\t\t\tconst offsetIndex = index + i;\n\t\t\t\tvisitor.attach(sourceField, 1, offsetIndex);\n\t\t\t\tconfig.detachedFieldIndex.deleteEntry(offsetAttachId);\n\t\t\t\tconst fields = config.attachPassRoots.get(sourceRoot);\n\t\t\t\tif (fields !== undefined) {\n\t\t\t\t\tconfig.attachPassRoots.delete(sourceRoot);\n\t\t\t\t\tvisitNode(offsetIndex, fields, visitor, config);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (mark.detach === undefined && mark.fields !== undefined) {\n\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t}\n\t\tif (mark.detach === undefined || mark.attach !== undefined) {\n\t\t\tindex += mark.count;\n\t\t}\n\t}\n}\n\n/**\n * Converts a chunk of trees into an array of cursors.\n *\n * TODO: Update the visitDelta logic and downstream APIs to avoid splitting up sequences into individual nodes.\n */\nfunction nodeCursorsFromChunk(trees: TreeChunk): ITreeCursorSynchronous[] {\n\treturn mapCursorField(trees.cursor(), (c) => c.fork());\n}\n"]}
|
|
1
|
+
{"version":3,"file":"visitDelta.js","sourceRoot":"","sources":["../../../src/core/tree/visitDelta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,kDAA0F;AAK1F,2CAA0E;AAE1E,iDAAyE;AAKzE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;GAUG;AACH,SAAgB,UAAU,CACzB,KAAiB,EACjB,OAAqB,EACrB,kBAAsC,EACtC,cAAuC;IAEvC,MAAM,eAAe,GAAsC,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,eAAe,GAAsC,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,aAAa,GAA+B,EAAE,CAAC;IACrD,MAAM,gBAAgB,GAAoC,EAAE,CAAC;IAC7D,MAAM,UAAU,GAAoD,IAAI,GAAG,EAAE,CAAC;IAC9E,KAAK,MAAM,EACV,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EACpB,KAAK,GACL,IAAI,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAChD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,cAAc,E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,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC5D,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC;QACrB,CAAC;IACF,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,KAAgB;IAC7C,OAAO,IAAA,0BAAc,EAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport { type NestedMap, setInNestedMap, tryGetFromNestedMap } from \"../../util/index.js\";\nimport type { RevisionTag } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { TreeChunk } from \"./chunk.js\";\nimport { mapCursorField, type ITreeCursorSynchronous } from \"./cursor.js\";\nimport type * as Delta from \"./delta.js\";\nimport { areDetachedNodeIdsEqual, offsetDetachId } from \"./deltaUtil.js\";\nimport type { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId, Major, Minor } from \"./detachedFieldIndexTypes.js\";\nimport type { NodeIndex, PlaceIndex, Range } from \"./pathTree.js\";\n\n/**\n * Implementation notes:\n *\n * The visit is organized into four phases:\n * 1. a detach pass\n * 2. root transfers\n * 3. an attach pass\n * 4. root destructions\n *\n * The core idea is that before content can be attached, it must first exist and be in a detached field.\n *\n * While the detach pass ensures that nodes to be attached are in a detached state, it does not guarantee that they\n * reside in the correct detached field. That is the responsibility of the root transfers phase.\n *\n * The attach phase carries out attaches.\n *\n * After the attach phase, roots destruction is carried out.\n * This needs to happen last to allow modifications to detached roots to be applied before they are destroyed.\n *\n * The details of the delta visit algorithm can impact how/when events are emitted by the objects that own the visitors.\n * For example, as of 2024-03-27, the subtreeChanged event of an AnchorNode is emitted when exiting a node during a\n * delta visit, and thus the two-pass nature of the algorithm means the event fires twice for any given change.\n */\n\n/**\n * Crawls the given `delta`, calling `visitor`'s callback for each change encountered.\n * Each successive call to the visitor callbacks assumes that the change described by earlier calls have been applied\n * to the document tree. For example, for a change that removes the first and third node of a field, the visitor calls\n * will first call detach with a range from indices 0 to 1 then call detach with a range from indices 1 to 2.\n *\n * @param delta - The delta to be crawled.\n * @param visitor - The object to notify of the changes encountered.\n * @param detachedFieldIndex - Index responsible for keeping track of the existing detached fields.\n * @param latestRevision - The latest revision tag associated with this delta.\n */\nexport function visitDelta(\n\tdelta: Delta.Root,\n\tvisitor: DeltaVisitor,\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tlatestRevision: RevisionTag | undefined,\n): void {\n\tconst detachPassRoots: Map<ForestRootId, Delta.FieldMap> = new Map();\n\tconst attachPassRoots: Map<ForestRootId, Delta.FieldMap> = new Map();\n\tconst rootTransfers: Delta.DetachedNodeRename[] = [];\n\tconst rootDestructions: Delta.DetachedNodeDestruction[] = [];\n\tconst refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous> = new Map();\n\tfor (const {\n\t\tid: { major, minor },\n\t\ttrees,\n\t} of delta.refreshers ?? []) {\n\t\tconst treeCursors = nodeCursorsFromChunk(trees);\n\t\tfor (let i = 0; i < trees.topLevelLength; i += 1) {\n\t\t\tconst offsettedId = minor + i;\n\t\t\tsetInNestedMap(refreshers, major, offsettedId, treeCursors[i]);\n\t\t}\n\t}\n\tconst detachConfig: PassConfig = {\n\t\tfunc: detachPass,\n\t\tlatestRevision,\n\t\trefreshers,\n\t\tdetachedFieldIndex,\n\t\tdetachPassRoots,\n\t\tattachPassRoots,\n\t\trootTransfers,\n\t\trootDestructions,\n\t};\n\tprocessBuilds(delta.build, detachConfig, visitor);\n\tprocessGlobal(delta.global, detachConfig, visitor);\n\tprocessRename(delta.rename, detachConfig);\n\tvisitFieldMarks(delta.fields, visitor, detachConfig);\n\tfixedPointVisitOfRoots(visitor, detachPassRoots, detachConfig);\n\ttransferRoots(\n\t\trootTransfers,\n\t\tattachPassRoots,\n\t\tdetachedFieldIndex,\n\t\tvisitor,\n\t\trefreshers,\n\t\tlatestRevision,\n\t);\n\tconst attachConfig: PassConfig = {\n\t\tfunc: attachPass,\n\t\tlatestRevision,\n\t\trefreshers,\n\t\tdetachedFieldIndex,\n\t\tdetachPassRoots,\n\t\tattachPassRoots,\n\t\trootTransfers,\n\t\trootDestructions,\n\t};\n\tvisitFieldMarks(delta.fields, visitor, attachConfig);\n\tfixedPointVisitOfRoots(visitor, attachPassRoots, attachConfig);\n\tcollectDestroys(delta.destroy, attachConfig);\n\tfor (const { id, count } of rootDestructions) {\n\t\tfor (let i = 0; i < count; i += 1) {\n\t\t\tconst offsetId = offsetDetachId(id, i);\n\t\t\tconst root = detachedFieldIndex.getEntry(offsetId);\n\t\t\tconst field = detachedFieldIndex.toFieldKey(root);\n\t\t\tvisitor.destroy(field, 1);\n\t\t\tdetachedFieldIndex.deleteEntry(offsetId);\n\t\t}\n\t}\n}\n\n/**\n * Visits all nodes in `roots` until none are left.\n * This function tolerates entries being added to and removed from `roots` as part of visits.\n * @param visitor - The visitor to visit the roots with.\n * @param roots - The initial set of roots to visit.\n * Individual entries are removed prior to being visited.\n * @param config - The configuration to use for visits.\n */\nfunction fixedPointVisitOfRoots(\n\tvisitor: DeltaVisitor,\n\troots: Map<ForestRootId, Delta.FieldMap>,\n\tconfig: PassConfig,\n): void {\n\twhile (roots.size > 0) {\n\t\tfor (const [root, modifications] of roots) {\n\t\t\troots.delete(root);\n\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\tvisitor.enterField(field);\n\t\t\t// Note: each visit may lead to `roots` being populated with new entries or having some entries removed.\n\t\t\tvisitNode(0, modifications, visitor, config);\n\t\t\tvisitor.exitField(field);\n\t\t}\n\t}\n}\n\n/**\n * Transfers roots from one detached field to another.\n * This occurs in the following circumstances:\n * - A changeset moves then removes a node\n * - A changeset restores then moves a node\n * - A changeset restores then removes a node\n * TODO#5481: update the DetachedFieldIndex instead of moving the nodes around.\n *\n * @param rootTransfers - The transfers to perform.\n * @param mapToUpdate - A map to update based on the transfers being performed.\n * @param detachedFieldIndex - The index to update based on the transfers being performed.\n * @param visitor - The visitor to inform of the transfers being performed.\n */\nfunction transferRoots(\n\trootTransfers: readonly Delta.DetachedNodeRename[],\n\tmapToUpdate: Map<ForestRootId, unknown>,\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tvisitor: DeltaVisitor,\n\trefreshers: NestedMap<Major, Minor, ITreeCursorSynchronous>,\n\trevision?: RevisionTag,\n): void {\n\ttype AtomizedNodeRename = Omit<Delta.DetachedNodeRename, \"count\">;\n\tlet nextBatch = rootTransfers.flatMap(({ oldId, newId, count }) => {\n\t\tconst atomized: AtomizedNodeRename[] = [];\n\t\t// It's possible for a detached node to be revived transiently such that it ends up back in the same detached field.\n\t\t// Making such a transfer wouldn't just be inefficient, it would lead us to mistakenly think we have moved all content\n\t\t// out of the source detached field, and would lead us to delete the tree index entry for that source detached field.\n\t\t// This would effectively result in the tree index missing an entry for the detached field.\n\t\t// This if statement prevents that from happening.\n\t\tif (!areDetachedNodeIdsEqual(oldId, newId)) {\n\t\t\tfor (let i = 0; i < count; i += 1) {\n\t\t\t\tatomized.push({ oldId: offsetDetachId(oldId, i), newId: offsetDetachId(newId, i) });\n\t\t\t}\n\t\t}\n\t\treturn atomized;\n\t});\n\twhile (nextBatch.length > 0) {\n\t\tconst delayed: AtomizedNodeRename[] = [];\n\t\tconst priorSize = nextBatch.length;\n\t\tfor (const { oldId, newId } of nextBatch) {\n\t\t\tlet oldRootId = detachedFieldIndex.tryGetEntry(oldId);\n\t\t\tif (oldRootId === undefined) {\n\t\t\t\tconst tree = tryGetFromNestedMap(refreshers, oldId.major, oldId.minor);\n\t\t\t\tif (tree !== undefined) {\n\t\t\t\t\tbuildTrees(oldId, [tree], detachedFieldIndex, revision, visitor);\n\t\t\t\t\toldRootId = detachedFieldIndex.getEntry(oldId);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (oldRootId === undefined) {\n\t\t\t\t// The source field is not populated.\n\t\t\t\t// This can happen when another rename needs to be performed first.\n\t\t\t\tdelayed.push({ oldId, newId });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet newRootId = detachedFieldIndex.tryGetEntry(newId);\n\t\t\tif (newRootId !== undefined) {\n\t\t\t\t// The destination field is already occupied.\n\t\t\t\t// This can happen when another rename needs to be performed first.\n\t\t\t\tdelayed.push({ oldId, newId });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- intentional behavior\n\t\t\tnewRootId = detachedFieldIndex.createEntry(newId, revision);\n\t\t\tconst fields = mapToUpdate.get(oldRootId);\n\t\t\tif (fields !== undefined) {\n\t\t\t\tmapToUpdate.delete(oldRootId);\n\t\t\t\tmapToUpdate.set(newRootId, fields);\n\t\t\t}\n\t\t\tconst oldField = detachedFieldIndex.toFieldKey(oldRootId);\n\t\t\tconst newField = detachedFieldIndex.toFieldKey(newRootId);\n\t\t\tvisitor.enterField(oldField);\n\t\t\tvisitor.detach({ start: 0, end: 1 }, newField, newId, false);\n\t\t\tvisitor.exitField(oldField);\n\t\t\tdetachedFieldIndex.deleteEntry(oldId);\n\t\t}\n\t\tassert(delayed.length < priorSize, 0x7cf /* transferRoots should make progress */);\n\t\tnextBatch = delayed;\n\t}\n}\n\n/**\n * Visitor for changes in a delta.\n * Must be freed after use.\n */\nexport interface DeltaVisitor {\n\t/**\n\t * Frees/releases the visitor.\n\t *\n\t * Must be called once the visitor finished traversing the delta for a couple of reasons:\n\t *\n\t * 1. Some visitors, such as those from forests, are put into a special mode while they have a visitor, forbidding some actions (like making more visitors).\n\t *\n\t * 2. Some visitors, such as those from an anchorSet, defer some events for batching purposes until the visitor is freed.\n\t */\n\tfree(): void;\n\t/**\n\t * Creates nodes for the given content in a new detached field.\n\t * @param content - The content to create.\n\t * @param destination - The key for a new detached field.\n\t * A field with this key must not already exist.\n\t */\n\tcreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void;\n\t/**\n\t * Recursively destroys the given detached field and all of the nodes within it.\n\t * @param detachedField - The key for the detached field to destroy.\n\t * @param count - The number of nodes being destroyed.\n\t * Expected to match the number of nodes in the detached field being destroyed.\n\t */\n\tdestroy(detachedField: FieldKey, count: number): void;\n\t/**\n\t * Transfers all the nodes from a detached field to the current field.\n\t * @param source - The detached field to transfer the nodes from.\n\t * @param count - The number of nodes being attached.\n\t * Expected to match the number of nodes in the source detached field.\n\t * @param destination - The index at which to attach the nodes.\n\t */\n\tattach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\t/**\n\t * Transfers a range of nodes from the current field to a new detached field.\n\t * @param source - The bounds of the range of nodes to detach.\n\t * @param destination - The key for a new detached field.\n\t * A field with this key must not already exist.\n\t * @param id - The ID assigned to the first detached node as a result of the detach. The other nodes in the detached range are assigned subsequent IDs.\n\t * @param isReplaced - Whether the detached content will be replaced by a later attach.\n\t * This is not guaranteed to be true in all cases where it could be true,\n\t * but it is guaranteed to be true in all cases where a later attach is needed to keep the data compliant with the schema.\n\t */\n\tdetach(\n\t\tsource: Range,\n\t\tdestination: FieldKey,\n\t\tid: Delta.DetachedNodeId,\n\t\tisReplaced: boolean,\n\t): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Node at the specified index\n\t * within the Field that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param index - The index (within the Field) of the node that should become the new \"current location\".\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Field.\n\t */\n\tenterNode(index: NodeIndex): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Field which contains the Node\n\t * that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param index - The index (within its Field) of the node that is being exited.\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Node.\n\t */\n\texitNode(index: NodeIndex): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Field with the specified key,\n\t * within the Node that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param key - The key of the field that should become the new \"current location\".\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Node.\n\t */\n\tenterField(key: FieldKey): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Node which contains the Field\n\t * that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param key - The key of the field that is being exited.\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Field.\n\t */\n\texitField(key: FieldKey): void;\n}\n\ninterface PassConfig {\n\treadonly func: Pass;\n\n\t/**\n\t * The latest revision tag associated with the given delta. This is used to keep track\n\t * of when repair data should be garbage collected.\n\t */\n\treadonly latestRevision: RevisionTag | undefined;\n\n\treadonly detachedFieldIndex: DetachedFieldIndex;\n\t/**\n\t * A mapping between forest root id and trees that represent refresher data. Each entry is only\n\t * created in the forest once needed.\n\t */\n\treadonly refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous>;\n\t/**\n\t * Nested changes on roots that need to be visited as part of the detach pass.\n\t * Each entry is removed when its associated changes are visited.\n\t */\n\treadonly detachPassRoots: Map<ForestRootId, Delta.FieldMap>;\n\t/**\n\t * Nested changes on roots that need to be visited as part of the attach pass.\n\t * Each entry is removed when its associated changes are visited.\n\t * Some of these roots will attached during the attach pass, in which case the nested changes are visited after\n\t * the node is attached.\n\t * Some of these nodes will never be attached, in which case we visit them in their detached fields at the end of\n\t * the attach pass. Note that such a visit might lead to more nodes being attached, including nodes were visited as\n\t * roots.\n\t */\n\treadonly attachPassRoots: Map<ForestRootId, Delta.FieldMap>;\n\t/**\n\t * Represents transfers of roots from one detached field to another.\n\t */\n\treadonly rootTransfers: Delta.DetachedNodeRename[];\n\t/**\n\t * Represents roots that need to be destroyed.\n\t * Collected as part of the detach pass.\n\t * Carried out at the end of the attach pass.\n\t */\n\treadonly rootDestructions: Delta.DetachedNodeDestruction[];\n}\n\ntype Pass = (delta: Delta.FieldChanges, visitor: DeltaVisitor, config: PassConfig) => void;\n\nfunction visitFieldMarks(\n\tfields: Delta.FieldMap | undefined,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (fields !== undefined) {\n\t\tfor (const [key, field] of fields) {\n\t\t\tvisitor.enterField(key);\n\t\t\tconfig.func(field, visitor, config);\n\t\t\tvisitor.exitField(key);\n\t\t}\n\t}\n}\n\nfunction visitNode(\n\tindex: number,\n\tfields: Delta.FieldMap | undefined,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (fields !== undefined) {\n\t\tvisitor.enterNode(index);\n\t\tvisitFieldMarks(fields, visitor, config);\n\t\tvisitor.exitNode(index);\n\t}\n}\n\n/**\n * Performs the following:\n * - Collects all roots that may need an attach pass\n * - Executes detaches (bottom-up)\n */\nfunction detachPass(\n\tfieldChanges: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tlet index = 0;\n\tfor (const mark of fieldChanges) {\n\t\tif (mark.fields !== undefined) {\n\t\t\tassert(\n\t\t\t\tmark.attach === undefined || mark.detach !== undefined,\n\t\t\t\t0x7d0 /* Invalid nested changes on an additive mark */,\n\t\t\t);\n\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t}\n\t\tif (mark.detach !== undefined) {\n\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\tconst id = offsetDetachId(mark.detach, i);\n\t\t\t\tconst root = config.detachedFieldIndex.createEntry(id, config.latestRevision);\n\t\t\t\tif (mark.fields !== undefined) {\n\t\t\t\t\tconfig.attachPassRoots.set(root, mark.fields);\n\t\t\t\t}\n\t\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\t\tvisitor.detach({ start: index, end: index + 1 }, field, id, mark.attach !== undefined);\n\t\t\t}\n\t\t}\n\t\tif (mark.detach === undefined && mark.attach === undefined) {\n\t\t\tindex += mark.count;\n\t\t}\n\t}\n}\n\nfunction buildTrees(\n\tid: Delta.DetachedNodeId,\n\ttrees: readonly ITreeCursorSynchronous[],\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tlatestRevision: RevisionTag | undefined,\n\tvisitor: DeltaVisitor,\n): void {\n\tfor (const [i, tree] of trees.entries()) {\n\t\tconst offsettedId = offsetDetachId(id, i);\n\t\tlet root = detachedFieldIndex.tryGetEntry(offsettedId);\n\t\tassert(root === undefined, 0x929 /* Unable to build tree that already exists */);\n\t\troot = detachedFieldIndex.createEntry(offsettedId, latestRevision);\n\t\tconst field = detachedFieldIndex.toFieldKey(root);\n\t\tvisitor.create([tree], field);\n\t}\n}\n\nfunction processBuilds(\n\tbuilds: readonly Delta.DetachedNodeBuild[] | undefined,\n\tconfig: PassConfig,\n\tvisitor: DeltaVisitor,\n): void {\n\tif (builds !== undefined) {\n\t\tfor (const { id, trees } of builds) {\n\t\t\tbuildTrees(\n\t\t\t\tid,\n\t\t\t\tnodeCursorsFromChunk(trees),\n\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\tconfig.latestRevision,\n\t\t\t\tvisitor,\n\t\t\t);\n\t\t}\n\t}\n}\n\nfunction processGlobal(\n\tglobal: readonly Delta.DetachedNodeChanges[] | undefined,\n\tconfig: PassConfig,\n\tvisitor: DeltaVisitor,\n): void {\n\tif (global !== undefined) {\n\t\tfor (const { id, fields } of global) {\n\t\t\tlet root = config.detachedFieldIndex.tryGetEntry(id);\n\t\t\tif (root === undefined) {\n\t\t\t\tconst tree = tryGetFromNestedMap(config.refreshers, id.major, id.minor);\n\t\t\t\tassert(tree !== undefined, 0x928 /* refresher data not found */);\n\t\t\t\tbuildTrees(id, [tree], config.detachedFieldIndex, config.latestRevision, visitor);\n\t\t\t\troot = config.detachedFieldIndex.getEntry(id);\n\t\t\t}\n\t\t\t// the revision is updated for any refresher data included in the delta that is used\n\t\t\tconfig.detachedFieldIndex.updateLatestRevision(id, config.latestRevision);\n\t\t\tconfig.detachPassRoots.set(root, fields);\n\t\t\tconfig.attachPassRoots.set(root, fields);\n\t\t}\n\t}\n}\n\nfunction processRename(\n\trename: readonly Delta.DetachedNodeRename[] | undefined,\n\tconfig: PassConfig,\n): void {\n\tif (rename !== undefined) {\n\t\tconfig.rootTransfers.push(...rename);\n\t}\n}\n\nfunction collectDestroys(\n\tdestroys: readonly Delta.DetachedNodeDestruction[] | undefined,\n\tconfig: PassConfig,\n): void {\n\tif (destroys !== undefined) {\n\t\tconfig.rootDestructions.push(...destroys);\n\t}\n}\n\n/**\n * Preforms the following:\n * - Executes attaches (top-down) applying nested changes on the attached nodes\n */\nfunction attachPass(\n\tfieldChanges: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tlet index = 0;\n\tfor (const mark of fieldChanges) {\n\t\tif (mark.attach !== undefined) {\n\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\tconst offsetAttachId = offsetDetachId(mark.attach, i);\n\t\t\t\tlet sourceRoot = config.detachedFieldIndex.tryGetEntry(offsetAttachId);\n\t\t\t\tif (sourceRoot === undefined) {\n\t\t\t\t\tconst tree = tryGetFromNestedMap(\n\t\t\t\t\t\tconfig.refreshers,\n\t\t\t\t\t\toffsetAttachId.major,\n\t\t\t\t\t\toffsetAttachId.minor,\n\t\t\t\t\t);\n\t\t\t\t\tassert(tree !== undefined, 0x92a /* refresher data not found */);\n\t\t\t\t\tbuildTrees(\n\t\t\t\t\t\toffsetAttachId,\n\t\t\t\t\t\t[tree],\n\t\t\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\t\t\tconfig.latestRevision,\n\t\t\t\t\t\tvisitor,\n\t\t\t\t\t);\n\t\t\t\t\tsourceRoot = config.detachedFieldIndex.getEntry(offsetAttachId);\n\t\t\t\t}\n\t\t\t\tconst sourceField = config.detachedFieldIndex.toFieldKey(sourceRoot);\n\t\t\t\tconst offsetIndex = index + i;\n\t\t\t\tvisitor.attach(sourceField, 1, offsetIndex);\n\t\t\t\tconfig.detachedFieldIndex.deleteEntry(offsetAttachId);\n\t\t\t\tconst fields = config.attachPassRoots.get(sourceRoot);\n\t\t\t\tif (fields !== undefined) {\n\t\t\t\t\tconfig.attachPassRoots.delete(sourceRoot);\n\t\t\t\t\tvisitNode(offsetIndex, fields, visitor, config);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (mark.detach === undefined && mark.fields !== undefined) {\n\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t}\n\t\tif (mark.detach === undefined || mark.attach !== undefined) {\n\t\t\tindex += mark.count;\n\t\t}\n\t}\n}\n\n/**\n * Converts a chunk of trees into an array of cursors.\n *\n * TODO: Update the visitDelta logic and downstream APIs to avoid splitting up sequences into individual nodes.\n */\nfunction nodeCursorsFromChunk(trees: TreeChunk): ITreeCursorSynchronous[] {\n\treturn mapCursorField(trees.cursor(), (c) => c.fork());\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitorUtils.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAkB,IAAI,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,M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AG,IAAI,CAAC;IACxD,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9E,WAAW,CACV,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,QAAQ,EACrB,UAAU,EAAE,OAAO,GACjB,IAAI,CAAC;CACR;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,GACzC,gBAAgB,CAmBlB"}
|
|
@@ -104,12 +104,12 @@ function combineVisitors(visitors) {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
exports.combineVisitors = combineVisitors;
|
|
107
|
+
const noOp = () => { };
|
|
107
108
|
/**
|
|
108
109
|
* Creates an announced visitor with only the provided functions and uses a no op for the rest.
|
|
109
110
|
* This is provided to make some of the delta visitor definitions cleaner.
|
|
110
111
|
*/
|
|
111
112
|
function createAnnouncedVisitor(visitorFunctions) {
|
|
112
|
-
const noOp = () => { };
|
|
113
113
|
return {
|
|
114
114
|
type: "Announced",
|
|
115
115
|
free: visitorFunctions.free ?? noOp,
|