@fluidframework/tree 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +2 -0
- package/CHANGELOG.md +74 -0
- package/api-extractor.json +2 -3
- package/api-report/tree.api.md +208 -154
- package/beta.d.ts +11 -0
- package/dist/beta.d.ts +90 -0
- package/dist/codec/codec.d.ts +10 -4
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +2 -2
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/discriminatedUnions.d.ts.map +1 -1
- package/dist/codec/discriminatedUnions.js +6 -2
- package/dist/codec/discriminatedUnions.js.map +1 -1
- package/dist/codec/index.d.ts +2 -2
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +3 -2
- package/dist/codec/index.js.map +1 -1
- package/dist/codec/noopValidator.d.ts.map +1 -1
- package/dist/codec/noopValidator.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +10 -2
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +28 -6
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/index.d.ts +1 -1
- package/dist/codec/versioned/index.d.ts.map +1 -1
- package/dist/codec/versioned/index.js +2 -1
- package/dist/codec/versioned/index.js.map +1 -1
- package/dist/core/change-family/changeFamily.d.ts +2 -2
- package/dist/core/change-family/changeFamily.d.ts.map +1 -1
- package/dist/core/change-family/changeFamily.js.map +1 -1
- package/dist/core/forest/editableForest.d.ts +1 -1
- package/dist/core/forest/editableForest.d.ts.map +1 -1
- package/dist/core/forest/editableForest.js +2 -2
- package/dist/core/forest/editableForest.js.map +1 -1
- package/dist/core/forest/forest.d.ts +5 -1
- package/dist/core/forest/forest.d.ts.map +1 -1
- package/dist/core/forest/forest.js +2 -2
- package/dist/core/forest/forest.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 +6 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
- package/dist/core/rebase/changeRebaser.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +4 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
- package/dist/core/rebase/revisionTagCodec.js +2 -2
- package/dist/core/rebase/revisionTagCodec.js.map +1 -1
- package/dist/core/rebase/types.d.ts +30 -0
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +26 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +11 -10
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/revertible/index.d.ts +1 -1
- package/dist/core/revertible/index.d.ts.map +1 -1
- package/dist/core/revertible/index.js +1 -3
- package/dist/core/revertible/index.js.map +1 -1
- package/dist/core/revertible/revertible.d.ts +15 -49
- package/dist/core/revertible/revertible.d.ts.map +1 -1
- package/dist/core/revertible/revertible.js +3 -33
- package/dist/core/revertible/revertible.js.map +1 -1
- package/dist/core/schema-stored/format.d.ts.map +1 -1
- package/dist/core/schema-stored/format.js.map +1 -1
- package/dist/core/schema-stored/index.d.ts +2 -1
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js +4 -1
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/multiplicity.d.ts.map +1 -0
- package/dist/{feature-libraries → core/schema-stored}/multiplicity.js +2 -2
- package/{lib/feature-libraries → dist/core/schema-stored}/multiplicity.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +32 -9
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +14 -7
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +31 -16
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +37 -62
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/cursor.d.ts.map +1 -1
- package/dist/core/tree/cursor.js +4 -4
- package/dist/core/tree/cursor.js.map +1 -1
- package/dist/core/tree/delta.d.ts.map +1 -1
- package/dist/core/tree/delta.js.map +1 -1
- package/dist/core/tree/deltaUtil.d.ts +1 -1
- package/dist/core/tree/deltaUtil.d.ts.map +1 -1
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +2 -2
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +15 -15
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.js +4 -4
- package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormat.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormat.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/dist/core/tree/mapTree.d.ts.map +1 -1
- package/dist/core/tree/mapTree.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/dist/core/tree/sparseTree.d.ts.map +1 -1
- package/dist/core/tree/sparseTree.js +5 -5
- package/dist/core/tree/sparseTree.js.map +1 -1
- package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/treeTextFormat.js.map +1 -1
- package/dist/core/tree/types.d.ts +1 -1
- package/dist/core/tree/types.d.ts.map +1 -1
- package/dist/core/tree/types.js +7 -7
- package/dist/core/tree/types.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +13 -2
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js +47 -18
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitPath.d.ts +1 -1
- package/dist/core/tree/visitPath.d.ts.map +1 -1
- package/dist/core/tree/visitPath.js +4 -0
- package/dist/core/tree/visitPath.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts +4 -4
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +2 -2
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/domains/json/jsonCursor.d.ts.map +1 -1
- package/dist/domains/json/jsonCursor.js +7 -7
- package/dist/domains/json/jsonCursor.js.map +1 -1
- package/dist/domains/json/jsonDomainSchema.d.ts.map +1 -1
- package/dist/domains/json/jsonDomainSchema.js.map +1 -1
- package/dist/domains/leafDomain.d.ts.map +1 -1
- package/dist/domains/leafDomain.js +8 -8
- package/dist/domains/leafDomain.js.map +1 -1
- package/dist/domains/nodeKey/nodeKeySchema.d.ts.map +1 -1
- package/dist/domains/nodeKey/nodeKeySchema.js +2 -2
- package/dist/domains/nodeKey/nodeKeySchema.js.map +1 -1
- package/dist/domains/schemaBuilder.d.ts +19 -81
- package/dist/domains/schemaBuilder.d.ts.map +1 -1
- package/dist/domains/schemaBuilder.js +24 -93
- package/dist/domains/schemaBuilder.js.map +1 -1
- package/dist/domains/testRecursiveDomain.d.ts +0 -4
- package/dist/domains/testRecursiveDomain.d.ts.map +1 -1
- package/dist/domains/testRecursiveDomain.js +1 -8
- package/dist/domains/testRecursiveDomain.js.map +1 -1
- package/dist/events/events.d.ts.map +1 -1
- package/dist/events/events.js +2 -2
- package/dist/events/events.js.map +1 -1
- package/dist/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/dist/external-utilities/typeboxValidator.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.d.ts +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +29 -29
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunk.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunk.js +2 -2
- package/dist/feature-libraries/chunked-forest/chunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +13 -14
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +25 -24
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +4 -4
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.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 +13 -13
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +3 -3
- 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 +4 -9
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +6 -5
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +8 -8
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +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 -2
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js +4 -5
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +21 -21
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/contextuallyTyped.d.ts +5 -9
- package/dist/feature-libraries/contextuallyTyped.d.ts.map +1 -1
- package/dist/feature-libraries/contextuallyTyped.js +33 -48
- package/dist/feature-libraries/contextuallyTyped.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -5
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +7 -7
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +18 -4
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +59 -24
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -1
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +8 -0
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -0
- package/dist/feature-libraries/default-schema/noChangeCodecs.js +10 -0
- package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -0
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +2 -2
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.js +6 -6
- package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
- package/dist/feature-libraries/fieldGenerator.d.ts +1 -1
- package/dist/feature-libraries/fieldGenerator.d.ts.map +1 -1
- package/dist/feature-libraries/fieldGenerator.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +16 -4
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +27 -15
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +43 -36
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js +9 -6
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts +3 -3
- package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/index.js +3 -2
- package/dist/feature-libraries/flex-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +7 -8
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.js +12 -17
- package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +21 -7
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +69 -46
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts +12 -9
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +51 -97
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/nodeKeys.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/nodeKeys.js.map +1 -1
- package/dist/feature-libraries/flex-tree/treeEvents.d.ts +7 -70
- package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
- package/dist/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/unboxed.js +1 -1
- package/dist/feature-libraries/flex-tree/unboxed.js.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +2 -2
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +14 -14
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/format.js +4 -4
- package/dist/feature-libraries/forest-summary/format.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +8 -9
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +9 -9
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +2 -2
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +20 -20
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +19 -13
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts +3 -4
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +21 -0
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js +7 -0
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -0
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -2
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +4 -4
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +3 -7
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +3 -5
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +7 -7
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +4 -4
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +5 -4
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +3 -2
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.js +10 -11
- package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -5
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +73 -37
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +13 -25
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +261 -169
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +5 -12
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js +0 -10
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +6 -4
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/node-key/nodeKey.d.ts +1 -1
- package/dist/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/nodeKey.js.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts +2 -2
- package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyIndex.js +3 -3
- package/dist/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +2 -2
- package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.js +9 -9
- package/dist/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +49 -48
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/index.js +1 -2
- package/dist/feature-libraries/optional-field/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts +3 -5
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +33 -39
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/{optionalFieldChangeFormat.d.ts → optionalFieldChangeFormatV1.d.ts} +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/{optionalFieldChangeFormat.js → optionalFieldChangeFormatV1.js} +11 -2
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +25 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +44 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +4 -7
- 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/optionalFieldCodecV1.d.ts +12 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js +158 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +12 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +87 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -4
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +7 -150
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-aware/schemaAware.d.ts +3 -4
- package/dist/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
- package/dist/feature-libraries/schema-aware/schemaAware.js +1 -1
- package/dist/feature-libraries/schema-aware/schemaAware.js.map +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/index.js +2 -2
- package/dist/feature-libraries/schema-edits/index.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -3
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +13 -5
- 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/schema-edits/schemaChangeTypes.d.ts +5 -0
- package/dist/feature-libraries/schema-edits/schemaChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeTypes.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +10 -10
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/format.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/format.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +4 -4
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/feature-libraries/schemaBuilder.d.ts +1 -1
- package/dist/feature-libraries/schemaBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/schemaBuilder.js +1 -1
- package/dist/feature-libraries/schemaBuilder.js.map +1 -1
- package/dist/feature-libraries/schemaBuilderBase.d.ts +1 -1
- package/dist/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
- package/dist/feature-libraries/schemaBuilderBase.js +19 -19
- package/dist/feature-libraries/schemaBuilderBase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts +9 -13
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +76 -43
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/format.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/format.js +14 -14
- package/dist/feature-libraries/sequence-field/format.js.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts +3 -3
- 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 +5 -5
- package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/index.js.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.d.ts +1 -2
- package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +30 -39
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markListFactory.d.ts +4 -4
- package/dist/feature-libraries/sequence-field/markListFactory.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/markListFactory.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.d.ts +7 -7
- package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.js +2 -2
- package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +25 -14
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js +20 -11
- package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/dist/feature-libraries/sequence-field/prune.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -4
- package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.js +34 -40
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +2 -2
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js +17 -19
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +17 -17
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +10 -10
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +7 -8
- 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 +42 -35
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +43 -21
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/feature-libraries/storedToViewSchema.d.ts +2 -2
- package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
- package/dist/feature-libraries/storedToViewSchema.js +3 -3
- package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.d.ts +1 -1
- package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.js +8 -8
- package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
- package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
- package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
- package/dist/feature-libraries/treeTextCursor.js +3 -3
- package/dist/feature-libraries/treeTextCursor.js.map +1 -1
- package/dist/feature-libraries/typed-schema/flexList.d.ts +1 -2
- package/dist/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/flexList.js.map +1 -1
- package/dist/feature-libraries/typed-schema/index.d.ts +0 -1
- package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/index.js.map +1 -1
- package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/schemaCollection.js +14 -14
- package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
- package/dist/feature-libraries/typed-schema/typeUtils.d.ts +0 -5
- package/dist/feature-libraries/typed-schema/typeUtils.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/typeUtils.js.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +5 -4
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js +19 -11
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/dist/feature-libraries/typed-schema/view.d.ts +1 -1
- package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/view.js +10 -10
- package/dist/feature-libraries/typed-schema/view.js.map +1 -1
- package/dist/feature-libraries/valueUtilities.d.ts +6 -3
- package/dist/feature-libraries/valueUtilities.d.ts.map +1 -1
- package/dist/feature-libraries/valueUtilities.js +11 -10
- package/dist/feature-libraries/valueUtilities.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +90 -0
- package/dist/shared-tree/index.d.ts +3 -3
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +2 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +1 -1
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +11 -11
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +10 -3
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +39 -39
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +58 -8
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +45 -12
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +3 -5
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +18 -11
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -0
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +9 -6
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts +4 -188
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.js +3 -3
- package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +4 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/treeApi.d.ts +83 -2
- package/dist/shared-tree/treeApi.d.ts.map +1 -1
- package/dist/shared-tree/treeApi.js +37 -14
- package/dist/shared-tree/treeApi.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +41 -20
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +135 -61
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/treeView.d.ts +3 -3
- package/dist/shared-tree/treeView.d.ts.map +1 -1
- package/dist/shared-tree/treeView.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +5 -32
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +12 -142
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +2 -15
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +38 -82
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +4 -4
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +24 -10
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormat.d.ts +4 -5
- package/dist/shared-tree-core/editManagerFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormat.js +9 -10
- package/dist/shared-tree-core/editManagerFormat.js.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +7 -6
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +6 -9
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +1 -1
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +2 -2
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +7 -4
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +21 -4
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +10 -2
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +1 -0
- package/dist/shared-tree-core/messageFormat.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/sequenceIdUtils.d.ts.map +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +10 -5
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +18 -18
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +187 -0
- package/dist/simple-tree/arrayNode.d.ts.map +1 -0
- package/dist/simple-tree/arrayNode.js +438 -0
- package/dist/simple-tree/arrayNode.js.map +1 -0
- package/dist/simple-tree/index.d.ts +10 -8
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +9 -8
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +11 -0
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -0
- package/dist/simple-tree/leafNodeSchema.js +51 -0
- package/dist/simple-tree/leafNodeSchema.js.map +1 -0
- package/dist/simple-tree/mapNode.d.ts +86 -0
- package/dist/simple-tree/mapNode.d.ts.map +1 -0
- package/dist/simple-tree/mapNode.js +204 -0
- package/dist/simple-tree/mapNode.js.map +1 -0
- package/dist/simple-tree/objectNode.d.ts +62 -0
- package/dist/simple-tree/objectNode.d.ts.map +1 -0
- package/dist/simple-tree/objectNode.js +242 -0
- package/dist/simple-tree/objectNode.js.map +1 -0
- package/dist/simple-tree/proxies.d.ts +21 -62
- package/dist/simple-tree/proxies.d.ts.map +1 -1
- package/dist/simple-tree/proxies.js +128 -679
- package/dist/simple-tree/proxies.js.map +1 -1
- package/dist/simple-tree/proxyBinding.d.ts +48 -0
- package/dist/simple-tree/proxyBinding.d.ts.map +1 -0
- package/dist/simple-tree/proxyBinding.js +132 -0
- package/dist/simple-tree/proxyBinding.js.map +1 -0
- package/dist/simple-tree/rawNode.d.ts +9 -50
- package/dist/simple-tree/rawNode.d.ts.map +1 -1
- package/dist/simple-tree/rawNode.js +15 -91
- package/dist/simple-tree/rawNode.js.map +1 -1
- package/dist/simple-tree/schemaCaching.d.ts +26 -0
- package/dist/simple-tree/schemaCaching.d.ts.map +1 -0
- package/dist/simple-tree/schemaCaching.js +69 -0
- package/dist/simple-tree/schemaCaching.js.map +1 -0
- package/dist/simple-tree/schemaCreationUtilities.d.ts +2 -1
- package/dist/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/schemaCreationUtilities.js +3 -3
- package/dist/simple-tree/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/schemaFactory.d.ts +92 -43
- package/dist/simple-tree/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/schemaFactory.js +124 -177
- package/dist/simple-tree/schemaFactory.js.map +1 -1
- package/dist/simple-tree/schemaFactoryRecursive.d.ts +27 -83
- package/dist/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/schemaFactoryRecursive.js +1 -115
- package/dist/simple-tree/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +123 -70
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +86 -5
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/testRecursiveDomain.d.ts +8 -8
- package/dist/simple-tree/testRecursiveDomain.d.ts.map +1 -1
- package/dist/simple-tree/testRecursiveDomain.js +2 -2
- package/dist/simple-tree/testRecursiveDomain.js.map +1 -1
- package/dist/simple-tree/toFlexSchema.d.ts +8 -20
- package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/dist/simple-tree/toFlexSchema.js +33 -41
- package/dist/simple-tree/toFlexSchema.js.map +1 -1
- package/dist/simple-tree/toMapTree.d.ts +12 -22
- package/dist/simple-tree/toMapTree.d.ts.map +1 -1
- package/dist/simple-tree/toMapTree.js +185 -136
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/simple-tree/tree.d.ts +20 -3
- package/dist/simple-tree/tree.d.ts.map +1 -1
- package/dist/simple-tree/tree.js.map +1 -1
- package/dist/simple-tree/treeApi.d.ts +82 -5
- package/dist/simple-tree/treeApi.d.ts.map +1 -1
- package/dist/simple-tree/treeApi.js +96 -18
- package/dist/simple-tree/treeApi.js.map +1 -1
- package/dist/simple-tree/types.d.ts +1 -142
- package/dist/simple-tree/types.d.ts.map +1 -1
- package/dist/simple-tree/types.js.map +1 -1
- package/dist/simple-tree/typesUnsafe.d.ts +32 -17
- package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/typesUnsafe.js.map +1 -1
- package/dist/treeFactory.d.ts +31 -14
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +50 -23
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/brand.d.ts +26 -114
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js +24 -91
- package/dist/util/brand.js.map +1 -1
- package/dist/util/idAllocator.d.ts.map +1 -1
- package/dist/util/idAllocator.js +2 -2
- package/dist/util/idAllocator.js.map +1 -1
- package/dist/util/index.d.ts +5 -3
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +8 -9
- package/dist/util/index.js.map +1 -1
- package/dist/util/nestedSet.d.ts.map +1 -1
- package/dist/util/nestedSet.js.map +1 -1
- package/dist/util/opaque.d.ts +46 -0
- package/dist/util/opaque.d.ts.map +1 -0
- package/dist/util/opaque.js +29 -0
- package/dist/util/opaque.js.map +1 -0
- package/dist/util/referenceCounting.d.ts +1 -1
- package/dist/util/referenceCounting.d.ts.map +1 -1
- package/dist/util/referenceCounting.js +3 -3
- package/dist/util/referenceCounting.js.map +1 -1
- package/dist/util/typeCheckTests.d.ts +1 -1
- package/dist/util/typeCheckTests.d.ts.map +1 -1
- package/dist/util/typeCheckTests.js.map +1 -1
- package/dist/util/typeUtils.d.ts +13 -0
- package/dist/util/typeUtils.d.ts.map +1 -1
- package/dist/util/typeUtils.js.map +1 -1
- package/dist/util/typeboxBrand.d.ts +17 -0
- package/dist/util/typeboxBrand.d.ts.map +1 -0
- package/dist/util/typeboxBrand.js +32 -0
- package/dist/util/typeboxBrand.js.map +1 -0
- package/dist/util/utils.d.ts +2 -15
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +11 -11
- package/dist/util/utils.js.map +1 -1
- package/docs/main/compatibility.md +95 -0
- package/docs/main/schema2.md +3 -3
- package/docs/main/sequence-field/move-composition.md +46 -0
- package/docs/main/tree-content-apis.md +5 -5
- package/docs/roadmap.md +4 -4
- package/internal.d.ts +11 -0
- package/lib/beta.d.ts +90 -0
- package/lib/codec/codec.d.ts +10 -4
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +2 -2
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/discriminatedUnions.d.ts.map +1 -1
- package/lib/codec/discriminatedUnions.js +5 -1
- package/lib/codec/discriminatedUnions.js.map +1 -1
- package/lib/codec/index.d.ts +2 -2
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/codec/noopValidator.d.ts.map +1 -1
- package/lib/codec/noopValidator.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +10 -2
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +25 -4
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/index.d.ts +1 -1
- package/lib/codec/versioned/index.d.ts.map +1 -1
- package/lib/codec/versioned/index.js +1 -1
- package/lib/codec/versioned/index.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +2 -2
- package/lib/core/change-family/changeFamily.d.ts.map +1 -1
- package/lib/core/change-family/changeFamily.js.map +1 -1
- package/lib/core/forest/editableForest.d.ts +1 -1
- package/lib/core/forest/editableForest.d.ts.map +1 -1
- package/lib/core/forest/editableForest.js +2 -2
- package/lib/core/forest/editableForest.js.map +1 -1
- package/lib/core/forest/forest.d.ts +5 -1
- package/lib/core/forest/forest.d.ts.map +1 -1
- package/lib/core/forest/forest.js +1 -1
- package/lib/core/forest/forest.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 +3 -3
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
- package/lib/core/rebase/changeRebaser.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/revisionTagCodec.d.ts.map +1 -1
- package/lib/core/rebase/revisionTagCodec.js +1 -1
- package/lib/core/rebase/revisionTagCodec.js.map +1 -1
- package/lib/core/rebase/types.d.ts +30 -0
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +23 -0
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +6 -5
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/revertible/index.d.ts +1 -1
- package/lib/core/revertible/index.d.ts.map +1 -1
- package/lib/core/revertible/index.js +1 -1
- package/lib/core/revertible/index.js.map +1 -1
- package/lib/core/revertible/revertible.d.ts +15 -49
- package/lib/core/revertible/revertible.d.ts.map +1 -1
- package/lib/core/revertible/revertible.js +2 -32
- package/lib/core/revertible/revertible.js.map +1 -1
- package/lib/core/schema-stored/format.d.ts.map +1 -1
- package/lib/core/schema-stored/format.js.map +1 -1
- package/lib/core/schema-stored/index.d.ts +2 -1
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js +2 -1
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/multiplicity.d.ts.map +1 -0
- package/lib/core/schema-stored/multiplicity.js.map +1 -0
- package/lib/core/schema-stored/schema.d.ts +32 -9
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +13 -7
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts +31 -16
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +10 -35
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/cursor.d.ts.map +1 -1
- package/lib/core/tree/cursor.js +1 -1
- package/lib/core/tree/cursor.js.map +1 -1
- package/lib/core/tree/delta.d.ts.map +1 -1
- package/lib/core/tree/delta.js.map +1 -1
- package/lib/core/tree/deltaUtil.d.ts +1 -1
- package/lib/core/tree/deltaUtil.d.ts.map +1 -1
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +2 -2
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +2 -2
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.js +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormat.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormat.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/lib/core/tree/mapTree.d.ts.map +1 -1
- package/lib/core/tree/mapTree.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/lib/core/tree/sparseTree.d.ts.map +1 -1
- package/lib/core/tree/sparseTree.js +1 -1
- package/lib/core/tree/sparseTree.js.map +1 -1
- package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/treeTextFormat.js.map +1 -1
- package/lib/core/tree/types.d.ts +1 -1
- package/lib/core/tree/types.d.ts.map +1 -1
- package/lib/core/tree/types.js +1 -1
- package/lib/core/tree/types.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +13 -2
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js +43 -14
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitPath.d.ts +1 -1
- package/lib/core/tree/visitPath.d.ts.map +1 -1
- package/lib/core/tree/visitPath.js +4 -0
- package/lib/core/tree/visitPath.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts +4 -4
- 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/domains/json/jsonCursor.d.ts.map +1 -1
- package/lib/domains/json/jsonCursor.js +1 -1
- package/lib/domains/json/jsonCursor.js.map +1 -1
- package/lib/domains/json/jsonDomainSchema.d.ts.map +1 -1
- package/lib/domains/json/jsonDomainSchema.js.map +1 -1
- package/lib/domains/leafDomain.d.ts.map +1 -1
- package/lib/domains/leafDomain.js +1 -1
- package/lib/domains/leafDomain.js.map +1 -1
- package/lib/domains/nodeKey/nodeKeySchema.d.ts.map +1 -1
- package/lib/domains/nodeKey/nodeKeySchema.js +2 -2
- package/lib/domains/nodeKey/nodeKeySchema.js.map +1 -1
- package/lib/domains/schemaBuilder.d.ts +19 -81
- package/lib/domains/schemaBuilder.d.ts.map +1 -1
- package/lib/domains/schemaBuilder.js +24 -92
- package/lib/domains/schemaBuilder.js.map +1 -1
- package/lib/domains/testRecursiveDomain.d.ts +0 -4
- package/lib/domains/testRecursiveDomain.d.ts.map +1 -1
- package/lib/domains/testRecursiveDomain.js +1 -8
- package/lib/domains/testRecursiveDomain.js.map +1 -1
- package/lib/events/events.d.ts.map +1 -1
- package/lib/events/events.js +1 -1
- package/lib/events/events.js.map +1 -1
- package/lib/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/lib/external-utilities/typeboxValidator.js.map +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.d.ts +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +4 -4
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunk.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunk.js +1 -1
- package/lib/feature-libraries/chunked-forest/chunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +5 -6
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +4 -3
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.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 +3 -3
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +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 +4 -9
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +4 -3
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +2 -3
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js +3 -4
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.js +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +4 -4
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/contextuallyTyped.d.ts +5 -9
- package/lib/feature-libraries/contextuallyTyped.d.ts.map +1 -1
- package/lib/feature-libraries/contextuallyTyped.js +6 -20
- package/lib/feature-libraries/contextuallyTyped.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -5
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +6 -6
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +18 -4
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +55 -20
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultSchema.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +8 -0
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -0
- package/lib/feature-libraries/default-schema/noChangeCodecs.js +7 -0
- package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -0
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
- package/lib/feature-libraries/editableTreeBinder.js +1 -1
- package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
- package/lib/feature-libraries/fieldGenerator.d.ts +1 -1
- package/lib/feature-libraries/fieldGenerator.d.ts.map +1 -1
- package/lib/feature-libraries/fieldGenerator.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +16 -4
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +17 -5
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +43 -36
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js +8 -5
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts +3 -3
- package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/index.js +2 -2
- package/lib/feature-libraries/flex-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +7 -8
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.js +8 -12
- package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +21 -7
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +43 -22
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts +12 -9
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +35 -80
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/nodeKeys.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/nodeKeys.js.map +1 -1
- package/lib/feature-libraries/flex-tree/treeEvents.d.ts +7 -70
- package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
- package/lib/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/unboxed.js +1 -1
- package/lib/feature-libraries/flex-tree/unboxed.js.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.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 +3 -3
- 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/format.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/format.js +1 -1
- package/lib/feature-libraries/forest-summary/format.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +8 -9
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +6 -7
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js +2 -2
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.js +1 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.js +3 -3
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +19 -13
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts +3 -4
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +21 -0
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -0
- package/lib/{test/codec/codec.spec.d.ts → feature-libraries/modular-schema/fieldKindConfiguration.js} +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -0
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -2
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +3 -3
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +3 -7
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +3 -5
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +7 -7
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +4 -4
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +5 -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/isNeverTree.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.js +6 -7
- package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -5
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +63 -27
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +13 -25
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +202 -110
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +5 -12
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js +2 -12
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +6 -4
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/node-key/nodeKey.d.ts +1 -1
- package/lib/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/nodeKey.js.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts +2 -2
- package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyIndex.js +2 -2
- package/lib/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +2 -2
- package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.js +2 -2
- package/lib/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +6 -5
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/index.js +1 -1
- package/lib/feature-libraries/optional-field/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts +3 -5
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +18 -22
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/{optionalFieldChangeFormat.d.ts → optionalFieldChangeFormatV1.d.ts} +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/{optionalFieldChangeFormat.js → optionalFieldChangeFormatV1.js} +11 -2
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +25 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +40 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +4 -7
- 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/optionalFieldCodecV1.d.ts +12 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js +154 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +12 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +83 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -4
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +7 -150
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-aware/schemaAware.d.ts +3 -4
- package/lib/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
- package/lib/feature-libraries/schema-aware/schemaAware.js +1 -1
- package/lib/feature-libraries/schema-aware/schemaAware.js.map +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/index.js +1 -1
- package/lib/feature-libraries/schema-edits/index.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -3
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +10 -2
- 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/schema-edits/schemaChangeTypes.d.ts +5 -0
- package/lib/feature-libraries/schema-edits/schemaChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeTypes.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +3 -3
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/format.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/format.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +2 -2
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/feature-libraries/schemaBuilder.d.ts +1 -1
- package/lib/feature-libraries/schemaBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/schemaBuilder.js +1 -1
- package/lib/feature-libraries/schemaBuilder.js.map +1 -1
- package/lib/feature-libraries/schemaBuilderBase.d.ts +1 -1
- package/lib/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
- package/lib/feature-libraries/schemaBuilderBase.js +2 -2
- package/lib/feature-libraries/schemaBuilderBase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts +9 -13
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +63 -30
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/format.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/format.js +1 -1
- package/lib/feature-libraries/sequence-field/format.js.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts +3 -3
- 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 +5 -5
- package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/index.js.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.d.ts +1 -2
- package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +20 -29
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markListFactory.d.ts +4 -4
- package/lib/feature-libraries/sequence-field/markListFactory.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/markListFactory.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.d.ts +7 -7
- package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +25 -14
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.js +15 -6
- package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/lib/feature-libraries/sequence-field/prune.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -4
- package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.js +11 -17
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +2 -2
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js +13 -15
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +17 -17
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +7 -7
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +7 -8
- 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 +42 -35
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +28 -7
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/feature-libraries/storedToViewSchema.d.ts +2 -2
- package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
- package/lib/feature-libraries/storedToViewSchema.js +3 -3
- package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.d.ts +1 -1
- package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.js +2 -2
- package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
- package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
- package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
- package/lib/feature-libraries/treeTextCursor.js +2 -2
- package/lib/feature-libraries/treeTextCursor.js.map +1 -1
- package/lib/feature-libraries/typed-schema/flexList.d.ts +1 -2
- package/lib/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/flexList.js.map +1 -1
- package/lib/feature-libraries/typed-schema/index.d.ts +0 -1
- package/lib/feature-libraries/typed-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/index.js.map +1 -1
- package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/schemaCollection.js +4 -4
- package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
- package/lib/feature-libraries/typed-schema/typeUtils.d.ts +0 -5
- package/lib/feature-libraries/typed-schema/typeUtils.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/typeUtils.js.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +5 -4
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js +16 -8
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/lib/feature-libraries/typed-schema/view.d.ts +1 -1
- package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/view.js +1 -1
- package/lib/feature-libraries/typed-schema/view.js.map +1 -1
- package/lib/feature-libraries/valueUtilities.d.ts +6 -3
- package/lib/feature-libraries/valueUtilities.d.ts.map +1 -1
- package/lib/feature-libraries/valueUtilities.js +8 -7
- package/lib/feature-libraries/valueUtilities.js.map +1 -1
- package/lib/index.d.ts +7 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -7
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +90 -0
- package/lib/shared-tree/index.d.ts +3 -3
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +2 -2
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +1 -1
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +6 -6
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +10 -3
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +21 -21
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +58 -8
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +43 -10
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +3 -5
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +18 -10
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -0
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +7 -5
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts +4 -188
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.js +3 -3
- package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +4 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/treeApi.d.ts +83 -2
- package/lib/shared-tree/treeApi.d.ts.map +1 -1
- package/lib/shared-tree/treeApi.js +30 -7
- package/lib/shared-tree/treeApi.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +41 -20
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +115 -41
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/treeView.d.ts +3 -3
- package/lib/shared-tree/treeView.d.ts.map +1 -1
- package/lib/shared-tree/treeView.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +5 -32
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +9 -139
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +2 -15
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +4 -48
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +4 -4
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +19 -6
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormat.d.ts +4 -5
- package/lib/shared-tree-core/editManagerFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormat.js +2 -3
- package/lib/shared-tree-core/editManagerFormat.js.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +7 -6
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +4 -7
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +1 -1
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +7 -4
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +19 -3
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +10 -2
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +1 -0
- package/lib/shared-tree-core/messageFormat.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/sequenceIdUtils.d.ts.map +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +10 -5
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +12 -12
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts +187 -0
- package/lib/simple-tree/arrayNode.d.ts.map +1 -0
- package/lib/simple-tree/arrayNode.js +433 -0
- package/lib/simple-tree/arrayNode.js.map +1 -0
- package/lib/simple-tree/index.d.ts +10 -8
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +4 -4
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +11 -0
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -0
- package/lib/simple-tree/leafNodeSchema.js +48 -0
- package/lib/simple-tree/leafNodeSchema.js.map +1 -0
- package/lib/simple-tree/mapNode.d.ts +86 -0
- package/lib/simple-tree/mapNode.d.ts.map +1 -0
- package/lib/simple-tree/mapNode.js +198 -0
- package/lib/simple-tree/mapNode.js.map +1 -0
- package/lib/simple-tree/objectNode.d.ts +62 -0
- package/lib/simple-tree/objectNode.d.ts.map +1 -0
- package/lib/simple-tree/objectNode.js +236 -0
- package/lib/simple-tree/objectNode.js.map +1 -0
- package/lib/simple-tree/proxies.d.ts +21 -62
- package/lib/simple-tree/proxies.d.ts.map +1 -1
- package/lib/simple-tree/proxies.js +119 -667
- package/lib/simple-tree/proxies.js.map +1 -1
- package/lib/simple-tree/proxyBinding.d.ts +48 -0
- package/lib/simple-tree/proxyBinding.d.ts.map +1 -0
- package/lib/simple-tree/proxyBinding.js +124 -0
- package/lib/simple-tree/proxyBinding.js.map +1 -0
- package/lib/simple-tree/rawNode.d.ts +9 -50
- package/lib/simple-tree/rawNode.d.ts.map +1 -1
- package/lib/simple-tree/rawNode.js +12 -85
- package/lib/simple-tree/rawNode.js.map +1 -1
- package/lib/simple-tree/schemaCaching.d.ts +26 -0
- package/lib/simple-tree/schemaCaching.d.ts.map +1 -0
- package/lib/simple-tree/schemaCaching.js +61 -0
- package/lib/simple-tree/schemaCaching.js.map +1 -0
- package/lib/simple-tree/schemaCreationUtilities.d.ts +2 -1
- package/lib/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/schemaCreationUtilities.js +1 -1
- package/lib/simple-tree/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/schemaFactory.d.ts +92 -43
- package/lib/simple-tree/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/schemaFactory.js +105 -157
- package/lib/simple-tree/schemaFactory.js.map +1 -1
- package/lib/simple-tree/schemaFactoryRecursive.d.ts +27 -83
- package/lib/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/schemaFactoryRecursive.js +1 -114
- package/lib/simple-tree/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +123 -70
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +81 -4
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/testRecursiveDomain.d.ts +8 -8
- package/lib/simple-tree/testRecursiveDomain.d.ts.map +1 -1
- package/lib/simple-tree/testRecursiveDomain.js +2 -2
- package/lib/simple-tree/testRecursiveDomain.js.map +1 -1
- package/lib/simple-tree/toFlexSchema.d.ts +8 -20
- package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/lib/simple-tree/toFlexSchema.js +22 -27
- package/lib/simple-tree/toFlexSchema.js.map +1 -1
- package/lib/simple-tree/toMapTree.d.ts +12 -22
- package/lib/simple-tree/toMapTree.d.ts.map +1 -1
- package/lib/simple-tree/toMapTree.js +183 -133
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/simple-tree/tree.d.ts +20 -3
- package/lib/simple-tree/tree.d.ts.map +1 -1
- package/lib/simple-tree/tree.js.map +1 -1
- package/lib/simple-tree/treeApi.d.ts +82 -5
- package/lib/simple-tree/treeApi.d.ts.map +1 -1
- package/lib/simple-tree/treeApi.js +90 -12
- package/lib/simple-tree/treeApi.js.map +1 -1
- package/lib/simple-tree/types.d.ts +1 -142
- package/lib/simple-tree/types.d.ts.map +1 -1
- package/lib/simple-tree/types.js.map +1 -1
- package/lib/simple-tree/typesUnsafe.d.ts +32 -17
- package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/typesUnsafe.js.map +1 -1
- package/lib/treeFactory.d.ts +31 -14
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +48 -22
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/brand.d.ts +26 -114
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js +23 -83
- package/lib/util/brand.js.map +1 -1
- package/lib/util/idAllocator.d.ts.map +1 -1
- package/lib/util/idAllocator.js +1 -1
- package/lib/util/idAllocator.js.map +1 -1
- package/lib/util/index.d.ts +5 -3
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +3 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/nestedSet.d.ts.map +1 -1
- package/lib/util/nestedSet.js.map +1 -1
- package/lib/util/opaque.d.ts +46 -0
- package/lib/util/opaque.d.ts.map +1 -0
- package/lib/util/opaque.js +24 -0
- package/lib/util/opaque.js.map +1 -0
- package/lib/util/referenceCounting.d.ts +1 -1
- package/lib/util/referenceCounting.d.ts.map +1 -1
- package/lib/util/referenceCounting.js +2 -2
- package/lib/util/referenceCounting.js.map +1 -1
- package/lib/util/typeCheckTests.d.ts +1 -1
- package/lib/util/typeCheckTests.d.ts.map +1 -1
- package/lib/util/typeCheckTests.js.map +1 -1
- package/lib/util/typeUtils.d.ts +13 -0
- package/lib/util/typeUtils.d.ts.map +1 -1
- package/lib/util/typeUtils.js.map +1 -1
- package/lib/util/typeboxBrand.d.ts +17 -0
- package/lib/util/typeboxBrand.d.ts.map +1 -0
- package/lib/util/typeboxBrand.js +27 -0
- package/lib/util/typeboxBrand.js.map +1 -0
- package/lib/util/utils.d.ts +2 -15
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +3 -3
- package/lib/util/utils.js.map +1 -1
- package/package.json +55 -50
- package/src/codec/codec.ts +15 -7
- package/src/codec/discriminatedUnions.ts +3 -1
- package/src/codec/index.ts +8 -1
- package/src/codec/noopValidator.ts +1 -0
- package/src/codec/versioned/codec.ts +55 -25
- package/src/codec/versioned/index.ts +5 -1
- package/src/core/README.md +1 -5
- package/src/core/change-family/changeFamily.ts +3 -2
- package/src/core/forest/editableForest.ts +7 -5
- package/src/core/forest/forest.ts +11 -4
- package/src/core/index.ts +10 -8
- package/src/core/rebase/changeRebaser.ts +1 -0
- package/src/core/rebase/index.ts +4 -0
- package/src/core/rebase/revisionTagCodec.ts +3 -1
- package/src/core/rebase/types.ts +46 -1
- package/src/core/rebase/utils.ts +9 -6
- package/src/core/revertible/index.ts +1 -1
- package/src/core/revertible/revertible.ts +17 -50
- package/src/core/schema-stored/format.ts +1 -0
- package/src/core/schema-stored/index.ts +5 -2
- package/src/{feature-libraries → core/schema-stored}/multiplicity.ts +1 -0
- package/src/core/schema-stored/schema.ts +51 -23
- package/src/core/schema-stored/storedSchemaRepository.ts +4 -2
- package/src/core/tree/anchorSet.ts +52 -63
- package/src/core/tree/cursor.ts +3 -1
- package/src/core/tree/delta.ts +1 -0
- package/src/core/tree/deltaUtil.ts +2 -1
- package/src/core/tree/detachedFieldIndex.ts +6 -4
- package/src/core/tree/detachedFieldIndexCodec.ts +4 -2
- package/src/core/tree/detachedFieldIndexFormat.ts +2 -0
- package/src/core/tree/detachedFieldIndexTypes.ts +1 -0
- package/src/core/tree/mapTree.ts +1 -0
- package/src/core/tree/pathTree.ts +1 -0
- package/src/core/tree/persistedTreeTextFormat.ts +1 -0
- package/src/core/tree/sparseTree.ts +4 -2
- package/src/core/tree/treeTextFormat.ts +1 -0
- package/src/core/tree/types.ts +2 -1
- package/src/core/tree/visitDelta.ts +65 -18
- package/src/core/tree/visitPath.ts +2 -1
- package/src/core/tree/visitorUtils.ts +7 -5
- package/src/domains/json/jsonCursor.ts +6 -4
- package/src/domains/json/jsonDomainSchema.ts +1 -2
- package/src/domains/leafDomain.ts +1 -1
- package/src/domains/nodeKey/nodeKeySchema.ts +5 -4
- package/src/domains/schemaBuilder.ts +25 -214
- package/src/domains/testRecursiveDomain.ts +2 -25
- package/src/events/events.ts +2 -1
- package/src/external-utilities/typeboxValidator.ts +2 -1
- package/src/feature-libraries/README.md +4 -4
- package/src/feature-libraries/changeAtomIdCodec.ts +4 -4
- package/src/feature-libraries/chunked-forest/basicChunk.ts +12 -10
- package/src/feature-libraries/chunked-forest/chunk.ts +3 -2
- package/src/feature-libraries/chunked-forest/chunkTree.ts +17 -15
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +20 -17
- package/src/feature-libraries/chunked-forest/codec/chunkCodecUtilities.ts +4 -3
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +16 -14
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +5 -3
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +9 -12
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +11 -9
- package/src/feature-libraries/chunked-forest/codec/format.ts +4 -3
- package/src/feature-libraries/chunked-forest/codec/index.ts +1 -6
- package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +8 -6
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncoding.ts +13 -11
- package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +2 -1
- package/src/feature-libraries/chunked-forest/emptyChunk.ts +5 -4
- package/src/feature-libraries/chunked-forest/index.ts +0 -1
- package/src/feature-libraries/chunked-forest/sequenceChunk.ts +3 -2
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +11 -9
- package/src/feature-libraries/contextuallyTyped.ts +23 -36
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +36 -57
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +78 -25
- package/src/feature-libraries/default-schema/defaultSchema.ts +1 -0
- package/src/feature-libraries/default-schema/index.ts +2 -0
- package/src/feature-libraries/default-schema/noChangeCodecs.ts +12 -0
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +4 -3
- package/src/feature-libraries/editableTreeBinder.ts +3 -1
- package/src/feature-libraries/fieldGenerator.ts +2 -1
- package/src/feature-libraries/flex-tree/README.md +2 -2
- package/src/feature-libraries/flex-tree/context.ts +34 -8
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +63 -45
- package/src/feature-libraries/flex-tree/index.ts +3 -3
- package/src/feature-libraries/flex-tree/lazyEntity.ts +13 -23
- package/src/feature-libraries/flex-tree/lazyField.ts +95 -47
- package/src/feature-libraries/flex-tree/lazyNode.ts +65 -131
- package/src/feature-libraries/flex-tree/nodeKeys.ts +1 -0
- package/src/feature-libraries/flex-tree/treeEvents.ts +7 -73
- package/src/feature-libraries/flex-tree/unboxed.ts +3 -2
- package/src/feature-libraries/flex-tree/utilities.ts +1 -0
- package/src/feature-libraries/forest-summary/codec.ts +3 -1
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +13 -11
- package/src/feature-libraries/forest-summary/format.ts +2 -1
- package/src/feature-libraries/index.ts +13 -12
- package/src/feature-libraries/mapTreeCursor.ts +8 -6
- package/src/feature-libraries/memoizedIdRangeAllocator.ts +3 -3
- package/src/feature-libraries/modular-schema/comparison.ts +11 -9
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +29 -28
- package/src/feature-libraries/modular-schema/fieldKind.ts +8 -4
- package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +24 -0
- package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +7 -5
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +12 -20
- package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +18 -31
- package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +2 -2
- package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +4 -4
- package/src/feature-libraries/modular-schema/index.ts +5 -2
- package/src/feature-libraries/modular-schema/isNeverTree.ts +12 -12
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +151 -56
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +460 -251
- package/src/feature-libraries/modular-schema/modularChangeFormat.ts +4 -22
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +7 -3
- package/src/feature-libraries/node-key/nodeKey.ts +2 -1
- package/src/feature-libraries/node-key/nodeKeyIndex.ts +5 -3
- package/src/feature-libraries/node-key/nodeKeyManager.ts +6 -4
- package/src/feature-libraries/object-forest/objectForest.ts +25 -23
- package/src/feature-libraries/optional-field/index.ts +1 -1
- package/src/feature-libraries/optional-field/optionalField.ts +38 -44
- package/src/feature-libraries/optional-field/{optionalFieldChangeFormat.ts → optionalFieldChangeFormatV1.ts} +10 -1
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +60 -0
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +4 -7
- package/src/feature-libraries/optional-field/optionalFieldCodecV1.ts +204 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +135 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +11 -207
- package/src/feature-libraries/schema-aware/README.md +1 -1
- package/src/feature-libraries/schema-aware/schemaAware.ts +13 -9
- package/src/feature-libraries/schema-edits/index.ts +1 -1
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +23 -3
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -0
- package/src/feature-libraries/schema-edits/schemaChangeTypes.ts +6 -0
- package/src/feature-libraries/schema-index/codec.ts +8 -7
- package/src/feature-libraries/schema-index/format.ts +1 -0
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +10 -8
- package/src/feature-libraries/schemaBuilder.ts +2 -1
- package/src/feature-libraries/schemaBuilderBase.ts +16 -14
- package/src/feature-libraries/sequence-field/compose.ts +283 -176
- package/src/feature-libraries/sequence-field/format.ts +2 -1
- package/src/feature-libraries/sequence-field/helperTypes.ts +5 -5
- package/src/feature-libraries/sequence-field/index.ts +4 -5
- package/src/feature-libraries/sequence-field/invert.ts +49 -82
- package/src/feature-libraries/sequence-field/markListFactory.ts +4 -4
- package/src/feature-libraries/sequence-field/markQueue.ts +12 -10
- package/src/feature-libraries/sequence-field/moveEffectTable.ts +61 -31
- package/src/feature-libraries/sequence-field/prune.ts +4 -8
- package/src/feature-libraries/sequence-field/rebase.ts +128 -141
- package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +9 -10
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +3 -2
- package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +3 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +31 -38
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +38 -59
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +15 -15
- package/src/feature-libraries/sequence-field/types.ts +7 -9
- package/src/feature-libraries/sequence-field/utils.ts +95 -76
- package/src/feature-libraries/storedToViewSchema.ts +13 -12
- package/src/feature-libraries/treeCursorUtils.ts +9 -8
- package/src/feature-libraries/treeTextCursor.ts +12 -10
- package/src/feature-libraries/typed-schema/flexList.ts +1 -3
- package/src/feature-libraries/typed-schema/index.ts +0 -2
- package/src/feature-libraries/typed-schema/schemaCollection.ts +11 -10
- package/src/feature-libraries/typed-schema/typeUtils.ts +0 -6
- package/src/feature-libraries/typed-schema/typedTreeSchema.ts +32 -18
- package/src/feature-libraries/typed-schema/view.ts +6 -5
- package/src/feature-libraries/valueUtilities.ts +11 -9
- package/src/index.ts +34 -26
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/index.ts +9 -1
- package/src/shared-tree/schematizeTree.ts +12 -10
- package/src/shared-tree/schematizingTreeView.ts +47 -28
- package/src/shared-tree/sharedTree.ts +131 -44
- package/src/shared-tree/sharedTreeChangeCodecs.ts +79 -62
- package/src/shared-tree/sharedTreeChangeFamily.ts +13 -7
- package/src/shared-tree/sharedTreeChangeFormat.ts +4 -3
- package/src/shared-tree/sharedTreeEditBuilder.ts +5 -1
- package/src/shared-tree/treeApi.ts +141 -10
- package/src/shared-tree/treeCheckout.ts +203 -60
- package/src/shared-tree/treeView.ts +5 -4
- package/src/shared-tree-core/branch.ts +20 -204
- package/src/shared-tree-core/editManager.ts +20 -78
- package/src/shared-tree-core/editManagerCodecs.ts +111 -63
- package/src/shared-tree-core/editManagerFormat.ts +7 -8
- package/src/shared-tree-core/editManagerSummarizer.ts +14 -36
- package/src/shared-tree-core/index.ts +2 -0
- package/src/shared-tree-core/messageCodecs.ts +62 -5
- package/src/shared-tree-core/messageFormat.ts +12 -2
- package/src/shared-tree-core/messageTypes.ts +1 -0
- package/src/shared-tree-core/sequenceIdUtils.ts +1 -0
- package/src/shared-tree-core/sharedTreeCore.ts +40 -22
- package/src/simple-tree/ProxyBinding.md +102 -0
- package/src/simple-tree/README.md +0 -6
- package/src/simple-tree/arrayNode.ts +769 -0
- package/src/simple-tree/index.ts +16 -9
- package/src/simple-tree/leafNodeSchema.ts +72 -0
- package/src/simple-tree/mapNode.ts +343 -0
- package/src/simple-tree/objectNode.ts +411 -0
- package/src/simple-tree/proxies.ts +197 -932
- package/src/simple-tree/proxyBinding.ts +182 -0
- package/src/simple-tree/rawNode.ts +19 -135
- package/src/simple-tree/schemaCaching.ts +90 -0
- package/src/simple-tree/schemaCreationUtilities.ts +6 -9
- package/src/simple-tree/schemaFactory.ts +247 -261
- package/src/simple-tree/schemaFactoryRecursive.ts +32 -185
- package/src/simple-tree/schemaTypes.ts +149 -81
- package/src/simple-tree/testRecursiveDomain.ts +3 -3
- package/src/simple-tree/toFlexSchema.ts +39 -47
- package/src/simple-tree/toMapTree.ts +236 -196
- package/src/simple-tree/tree.ts +24 -3
- package/src/simple-tree/treeApi.ts +209 -24
- package/src/simple-tree/types.ts +1 -173
- package/src/simple-tree/typesUnsafe.ts +42 -21
- package/src/treeFactory.ts +51 -26
- package/src/util/brand.ts +36 -168
- package/src/util/idAllocator.ts +2 -1
- package/src/util/index.ts +4 -18
- package/src/util/nestedSet.ts +1 -1
- package/src/util/opaque.ts +68 -0
- package/src/util/referenceCounting.ts +3 -3
- package/src/util/typeCheckTests.ts +7 -7
- package/src/util/typeUtils.ts +14 -0
- package/src/util/typeboxBrand.ts +31 -0
- package/src/util/utils.ts +3 -17
- package/tsconfig.json +1 -1
- package/api-extractor-cjs.json +0 -18
- package/api-extractor-esm.json +0 -14
- package/dist/feature-libraries/multiplicity.d.ts.map +0 -1
- package/dist/feature-libraries/multiplicity.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormat.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormat.js.map +0 -1
- package/dist/simple-tree/flexNode.d.ts +0 -35
- package/dist/simple-tree/flexNode.d.ts.map +0 -1
- package/dist/simple-tree/flexNode.js +0 -62
- package/dist/simple-tree/flexNode.js.map +0 -1
- package/dist/simple-tree/treeArrayNode.d.ts +0 -46
- package/dist/simple-tree/treeArrayNode.d.ts.map +0 -1
- package/dist/simple-tree/treeArrayNode.js +0 -50
- package/dist/simple-tree/treeArrayNode.js.map +0 -1
- package/dist/tree-alpha.d.ts +0 -2159
- package/dist/tree-beta.d.ts +0 -2159
- package/dist/tree-public.d.ts +0 -1942
- package/dist/tree-untrimmed.d.ts +0 -6880
- package/lib/feature-libraries/multiplicity.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormat.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormat.js.map +0 -1
- package/lib/simple-tree/flexNode.d.ts +0 -35
- package/lib/simple-tree/flexNode.d.ts.map +0 -1
- package/lib/simple-tree/flexNode.js +0 -55
- package/lib/simple-tree/flexNode.js.map +0 -1
- package/lib/simple-tree/treeArrayNode.d.ts +0 -46
- package/lib/simple-tree/treeArrayNode.d.ts.map +0 -1
- package/lib/simple-tree/treeArrayNode.js +0 -46
- package/lib/simple-tree/treeArrayNode.js.map +0 -1
- package/lib/test/codec/ajvValidator.cjs +0 -70
- package/lib/test/codec/ajvValidator.cjs.map +0 -1
- package/lib/test/codec/ajvValidator.d.cts +0 -13
- package/lib/test/codec/ajvValidator.d.cts.map +0 -1
- package/lib/test/codec/codec.spec.d.ts.map +0 -1
- package/lib/test/codec/codec.spec.js +0 -36
- package/lib/test/codec/codec.spec.js.map +0 -1
- package/lib/test/codec/index.d.ts +0 -7
- package/lib/test/codec/index.d.ts.map +0 -1
- package/lib/test/codec/index.js +0 -7
- package/lib/test/codec/index.js.map +0 -1
- package/lib/test/codec/utils.d.ts +0 -58
- package/lib/test/codec/utils.d.ts.map +0 -1
- package/lib/test/codec/utils.js +0 -61
- package/lib/test/codec/utils.js.map +0 -1
- package/lib/test/cursorTestSuite.d.ts +0 -106
- package/lib/test/cursorTestSuite.d.ts.map +0 -1
- package/lib/test/cursorTestSuite.js +0 -680
- package/lib/test/cursorTestSuite.js.map +0 -1
- package/lib/test/domains/json/benchmarks.d.ts +0 -17
- package/lib/test/domains/json/benchmarks.d.ts.map +0 -1
- package/lib/test/domains/json/benchmarks.js +0 -61
- package/lib/test/domains/json/benchmarks.js.map +0 -1
- package/lib/test/domains/json/canada.d.ts +0 -33
- package/lib/test/domains/json/canada.d.ts.map +0 -1
- package/lib/test/domains/json/canada.js +0 -81
- package/lib/test/domains/json/canada.js.map +0 -1
- package/lib/test/domains/json/citm.d.ts +0 -81
- package/lib/test/domains/json/citm.d.ts.map +0 -1
- package/lib/test/domains/json/citm.js +0 -515
- package/lib/test/domains/json/citm.js.map +0 -1
- package/lib/test/domains/json/jsDirectObject.bench.d.ts +0 -13
- package/lib/test/domains/json/jsDirectObject.bench.d.ts.map +0 -1
- package/lib/test/domains/json/jsDirectObject.bench.js +0 -74
- package/lib/test/domains/json/jsDirectObject.bench.js.map +0 -1
- package/lib/test/domains/json/jsObjectUtil.d.ts +0 -12
- package/lib/test/domains/json/jsObjectUtil.d.ts.map +0 -1
- package/lib/test/domains/json/jsObjectUtil.js +0 -36
- package/lib/test/domains/json/jsObjectUtil.js.map +0 -1
- package/lib/test/domains/json/jsonCursor.bench.d.ts +0 -11
- package/lib/test/domains/json/jsonCursor.bench.d.ts.map +0 -1
- package/lib/test/domains/json/jsonCursor.bench.js +0 -220
- package/lib/test/domains/json/jsonCursor.bench.js.map +0 -1
- package/lib/test/domains/json/jsonCursor.spec.d.ts +0 -6
- package/lib/test/domains/json/jsonCursor.spec.d.ts.map +0 -1
- package/lib/test/domains/json/jsonCursor.spec.js +0 -75
- package/lib/test/domains/json/jsonCursor.spec.js.map +0 -1
- package/lib/test/domains/json/jsonGeneratorUtils.d.ts +0 -9
- package/lib/test/domains/json/jsonGeneratorUtils.d.ts.map +0 -1
- package/lib/test/domains/json/jsonGeneratorUtils.js +0 -36
- package/lib/test/domains/json/jsonGeneratorUtils.js.map +0 -1
- package/lib/test/domains/json/twitter.d.ts +0 -204
- package/lib/test/domains/json/twitter.d.ts.map +0 -1
- package/lib/test/domains/json/twitter.js +0 -7413
- package/lib/test/domains/json/twitter.js.map +0 -1
- package/lib/test/domains/schemaBuilder.spec.d.ts +0 -6
- package/lib/test/domains/schemaBuilder.spec.d.ts.map +0 -1
- package/lib/test/domains/schemaBuilder.spec.js +0 -148
- package/lib/test/domains/schemaBuilder.spec.js.map +0 -1
- package/lib/test/editMinter.d.ts +0 -8
- package/lib/test/editMinter.d.ts.map +0 -1
- package/lib/test/editMinter.js +0 -21
- package/lib/test/editMinter.js.map +0 -1
- package/lib/test/events/eventEmitter.spec.d.ts +0 -6
- package/lib/test/events/eventEmitter.spec.d.ts.map +0 -1
- package/lib/test/events/eventEmitter.spec.js +0 -159
- package/lib/test/events/eventEmitter.spec.js.map +0 -1
- package/lib/test/exhaustiveRebaserUtils.d.ts +0 -78
- package/lib/test/exhaustiveRebaserUtils.d.ts.map +0 -1
- package/lib/test/exhaustiveRebaserUtils.js +0 -53
- package/lib/test/exhaustiveRebaserUtils.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.js +0 -161
- package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.d.ts +0 -2
- package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.js +0 -102
- package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.js +0 -259
- package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.js +0 -47
- package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.d.ts +0 -9
- package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.js +0 -124
- package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.js +0 -187
- package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.js +0 -308
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.js +0 -123
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.d.ts +0 -7
- package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.js +0 -135
- package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.d.ts +0 -11
- package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.js +0 -211
- package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/format.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/format.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/format.spec.js +0 -15
- package/lib/test/feature-libraries/chunked-forest/codec/format.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.js +0 -98
- package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.js +0 -176
- package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.js +0 -29
- package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.d.ts +0 -12
- package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.js +0 -38
- package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.js +0 -138
- package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.d.ts +0 -34
- package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.js +0 -114
- package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.js.map +0 -1
- package/lib/test/feature-libraries/contextuallyTyped.spec.d.ts +0 -6
- package/lib/test/feature-libraries/contextuallyTyped.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/contextuallyTyped.spec.js +0 -107
- package/lib/test/feature-libraries/contextuallyTyped.spec.js.map +0 -1
- package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.d.ts +0 -6
- package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.js +0 -850
- package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.js.map +0 -1
- package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.d.ts +0 -6
- package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.js +0 -110
- package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.js.map +0 -1
- package/lib/test/feature-libraries/deltaUtils.spec.d.ts +0 -6
- package/lib/test/feature-libraries/deltaUtils.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/deltaUtils.spec.js +0 -87
- package/lib/test/feature-libraries/deltaUtils.spec.js.map +0 -1
- package/lib/test/feature-libraries/fieldKindTestUtils.d.ts +0 -20
- package/lib/test/feature-libraries/fieldKindTestUtils.d.ts.map +0 -1
- package/lib/test/feature-libraries/fieldKindTestUtils.js +0 -42
- package/lib/test/feature-libraries/fieldKindTestUtils.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.js +0 -91
- package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.js +0 -225
- package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/events.spec.d.ts +0 -2
- package/lib/test/feature-libraries/flex-tree/events.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/events.spec.js +0 -605
- package/lib/test/feature-libraries/flex-tree/events.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/lazyField.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/lazyField.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/lazyField.spec.js +0 -326
- package/lib/test/feature-libraries/flex-tree/lazyField.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/lazyNode.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/lazyNode.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/lazyNode.spec.js +0 -381
- package/lib/test/feature-libraries/flex-tree/lazyNode.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/navigation.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/navigation.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/navigation.spec.js +0 -50
- package/lib/test/feature-libraries/flex-tree/navigation.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/unboxed.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/unboxed.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/unboxed.spec.js +0 -197
- package/lib/test/feature-libraries/flex-tree/unboxed.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/utilities.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/utilities.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/utilities.spec.js +0 -109
- package/lib/test/feature-libraries/flex-tree/utilities.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/utils.d.ts +0 -32
- package/lib/test/feature-libraries/flex-tree/utils.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/utils.js +0 -50
- package/lib/test/feature-libraries/flex-tree/utils.js.map +0 -1
- package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.d.ts +0 -6
- package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.js +0 -115
- package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.js.map +0 -1
- package/lib/test/feature-libraries/mapTreeCursor.spec.d.ts +0 -6
- package/lib/test/feature-libraries/mapTreeCursor.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/mapTreeCursor.spec.js +0 -8
- package/lib/test/feature-libraries/mapTreeCursor.spec.js.map +0 -1
- package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.d.ts +0 -6
- package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.js +0 -80
- package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.js.map +0 -1
- package/lib/test/feature-libraries/mitigatedChangeFamily.spec.d.ts +0 -6
- package/lib/test/feature-libraries/mitigatedChangeFamily.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/mitigatedChangeFamily.spec.js +0 -96
- package/lib/test/feature-libraries/mitigatedChangeFamily.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/basicRebasers.d.ts +0 -44
- package/lib/test/feature-libraries/modular-schema/basicRebasers.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/basicRebasers.js +0 -77
- package/lib/test/feature-libraries/modular-schema/basicRebasers.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/comparison.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/comparison.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/comparison.spec.js +0 -264
- package/lib/test/feature-libraries/modular-schema/comparison.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.js +0 -345
- package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.js +0 -49
- package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.js +0 -126
- package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.js +0 -1070
- package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/rangeMap.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/rangeMap.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/rangeMap.spec.js +0 -182
- package/lib/test/feature-libraries/modular-schema/rangeMap.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.js +0 -390
- package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.js.map +0 -1
- package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.js +0 -556
- package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.js.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKey.spec.d.ts +0 -6
- package/lib/test/feature-libraries/node-key/nodeKey.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKey.spec.js +0 -74
- package/lib/test/feature-libraries/node-key/nodeKey.spec.js.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.bench.d.ts +0 -6
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.bench.d.ts.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.bench.js +0 -258
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.bench.js.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.d.ts +0 -6
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.js +0 -262
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.js.map +0 -1
- package/lib/test/feature-libraries/objectForest.spec.d.ts +0 -6
- package/lib/test/feature-libraries/objectForest.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/objectForest.spec.js +0 -62
- package/lib/test/feature-libraries/objectForest.spec.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.d.ts +0 -6
- package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.js +0 -352
- package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalField.spec.d.ts +0 -6
- package/lib/test/feature-libraries/optional-field/optionalField.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalField.spec.js +0 -396
- package/lib/test/feature-libraries/optional-field/optionalField.spec.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.d.ts +0 -6
- package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.js +0 -50
- package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.d.ts +0 -6
- package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.js +0 -59
- package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldUtils.d.ts +0 -62
- package/lib/test/feature-libraries/optional-field/optionalFieldUtils.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldUtils.js +0 -232
- package/lib/test/feature-libraries/optional-field/optionalFieldUtils.js.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaAware.spec.d.ts +0 -6
- package/lib/test/feature-libraries/schema-aware/schemaAware.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaAware.spec.js +0 -133
- package/lib/test/feature-libraries/schema-aware/schemaAware.spec.js.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaComplex.d.ts +0 -16
- package/lib/test/feature-libraries/schema-aware/schemaComplex.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaComplex.js +0 -40
- package/lib/test/feature-libraries/schema-aware/schemaComplex.js.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaSimple.d.ts +0 -13
- package/lib/test/feature-libraries/schema-aware/schemaSimple.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaSimple.js +0 -28
- package/lib/test/feature-libraries/schema-aware/schemaSimple.js.map +0 -1
- package/lib/test/feature-libraries/schema-index/codec.spec.d.ts +0 -6
- package/lib/test/feature-libraries/schema-index/codec.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-index/codec.spec.js +0 -81
- package/lib/test/feature-libraries/schema-index/codec.spec.js.map +0 -1
- package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.d.ts +0 -6
- package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.js +0 -28
- package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.js.map +0 -1
- package/lib/test/feature-libraries/schemaBuilder.spec.d.ts +0 -6
- package/lib/test/feature-libraries/schemaBuilder.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/schemaBuilder.spec.js +0 -88
- package/lib/test/feature-libraries/schemaBuilder.spec.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/compose.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/compose.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/compose.test.js +0 -1431
- package/lib/test/feature-libraries/sequence-field/compose.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/invert.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/invert.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/invert.test.js +0 -418
- package/lib/test/feature-libraries/sequence-field/invert.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/markListFactory.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/markListFactory.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/markListFactory.test.js +0 -239
- package/lib/test/feature-libraries/sequence-field/markListFactory.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/populatedMarks.d.ts +0 -18
- package/lib/test/feature-libraries/sequence-field/populatedMarks.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/populatedMarks.js +0 -95
- package/lib/test/feature-libraries/sequence-field/populatedMarks.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.d.ts +0 -12
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.js +0 -35
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.js +0 -42
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/rebase.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/rebase.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/rebase.test.js +0 -1038
- package/lib/test/feature-libraries/sequence-field/rebase.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.js +0 -211
- package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.d.ts +0 -11
- package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.js +0 -784
- package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceField.spec.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceField.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceField.spec.js +0 -36
- package/lib/test/feature-libraries/sequence-field/sequenceField.spec.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.js +0 -34
- package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.js +0 -38
- package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.js +0 -34
- package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.js +0 -417
- package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.js +0 -40
- package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/testEdits.d.ts +0 -124
- package/lib/test/feature-libraries/sequence-field/testEdits.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/testEdits.js +0 -270
- package/lib/test/feature-libraries/sequence-field/testEdits.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/utils.d.ts +0 -106
- package/lib/test/feature-libraries/sequence-field/utils.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/utils.js +0 -535
- package/lib/test/feature-libraries/sequence-field/utils.js.map +0 -1
- package/lib/test/feature-libraries/storedToViewSchema.spec.d.ts +0 -6
- package/lib/test/feature-libraries/storedToViewSchema.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/storedToViewSchema.spec.js +0 -117
- package/lib/test/feature-libraries/storedToViewSchema.spec.js.map +0 -1
- package/lib/test/feature-libraries/treeCursorUtils.spec.d.ts +0 -6
- package/lib/test/feature-libraries/treeCursorUtils.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/treeCursorUtils.spec.js +0 -237
- package/lib/test/feature-libraries/treeCursorUtils.spec.js.map +0 -1
- package/lib/test/feature-libraries/treeTextCursor.spec.d.ts +0 -6
- package/lib/test/feature-libraries/treeTextCursor.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/treeTextCursor.spec.js +0 -8
- package/lib/test/feature-libraries/treeTextCursor.spec.js.map +0 -1
- package/lib/test/feature-libraries/typedSchema/example.spec.d.ts +0 -6
- package/lib/test/feature-libraries/typedSchema/example.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/typedSchema/example.spec.js +0 -20
- package/lib/test/feature-libraries/typedSchema/example.spec.js.map +0 -1
- package/lib/test/feature-libraries/typedSchema/flexList.spec.d.ts +0 -6
- package/lib/test/feature-libraries/typedSchema/flexList.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/typedSchema/flexList.spec.js +0 -52
- package/lib/test/feature-libraries/typedSchema/flexList.spec.js.map +0 -1
- package/lib/test/feature-libraries/typedSchema/typeUtils.spec.d.ts +0 -6
- package/lib/test/feature-libraries/typedSchema/typeUtils.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/typedSchema/typeUtils.spec.js +0 -10
- package/lib/test/feature-libraries/typedSchema/typeUtils.spec.js.map +0 -1
- package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.d.ts +0 -6
- package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.js +0 -83
- package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.js.map +0 -1
- package/lib/test/feature-libraries/valueUtilities.spec.d.ts +0 -6
- package/lib/test/feature-libraries/valueUtilities.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/valueUtilities.spec.js +0 -69
- package/lib/test/feature-libraries/valueUtilities.spec.js.map +0 -1
- package/lib/test/forestTestSuite.d.ts +0 -26
- package/lib/test/forestTestSuite.d.ts.map +0 -1
- package/lib/test/forestTestSuite.js +0 -793
- package/lib/test/forestTestSuite.js.map +0 -1
- package/lib/test/objMerge.d.ts +0 -24
- package/lib/test/objMerge.d.ts.map +0 -1
- package/lib/test/objMerge.js +0 -181
- package/lib/test/objMerge.js.map +0 -1
- package/lib/test/rebase/findAncestor.spec.d.ts +0 -6
- package/lib/test/rebase/findAncestor.spec.d.ts.map +0 -1
- package/lib/test/rebase/findAncestor.spec.js +0 -139
- package/lib/test/rebase/findAncestor.spec.js.map +0 -1
- package/lib/test/rebase/fuzz.d.ts +0 -16
- package/lib/test/rebase/fuzz.d.ts.map +0 -1
- package/lib/test/rebase/fuzz.js +0 -57
- package/lib/test/rebase/fuzz.js.map +0 -1
- package/lib/test/rebase/generateFuzzyCombinedChange.spec.d.ts +0 -6
- package/lib/test/rebase/generateFuzzyCombinedChange.spec.d.ts.map +0 -1
- package/lib/test/rebase/generateFuzzyCombinedChange.spec.js +0 -42
- package/lib/test/rebase/generateFuzzyCombinedChange.spec.js.map +0 -1
- package/lib/test/rebase/rebaseBranch.spec.d.ts +0 -6
- package/lib/test/rebase/rebaseBranch.spec.d.ts.map +0 -1
- package/lib/test/rebase/rebaseBranch.spec.js +0 -208
- package/lib/test/rebase/rebaseBranch.spec.js.map +0 -1
- package/lib/test/rebase/rebaser.spec.d.ts +0 -14
- package/lib/test/rebase/rebaser.spec.d.ts.map +0 -1
- package/lib/test/rebase/rebaser.spec.js +0 -166
- package/lib/test/rebase/rebaser.spec.js.map +0 -1
- package/lib/test/rebase/revisionTagCodec.spec.d.ts +0 -6
- package/lib/test/rebase/revisionTagCodec.spec.d.ts.map +0 -1
- package/lib/test/rebase/revisionTagCodec.spec.js +0 -56
- package/lib/test/rebase/revisionTagCodec.spec.js.map +0 -1
- package/lib/test/rebase/verifyChangeRebaser.spec.d.ts +0 -6
- package/lib/test/rebase/verifyChangeRebaser.spec.d.ts.map +0 -1
- package/lib/test/rebase/verifyChangeRebaser.spec.js +0 -52
- package/lib/test/rebase/verifyChangeRebaser.spec.js.map +0 -1
- package/lib/test/rebaserAxiomaticTests.d.ts +0 -15
- package/lib/test/rebaserAxiomaticTests.d.ts.map +0 -1
- package/lib/test/rebaserAxiomaticTests.js +0 -202
- package/lib/test/rebaserAxiomaticTests.js.map +0 -1
- package/lib/test/scalableTestTrees.d.ts +0 -89
- package/lib/test/scalableTestTrees.d.ts.map +0 -1
- package/lib/test/scalableTestTrees.js +0 -188
- package/lib/test/scalableTestTrees.js.map +0 -1
- package/lib/test/shared-tree/editing.spec.d.ts +0 -2
- package/lib/test/shared-tree/editing.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/editing.spec.js +0 -2091
- package/lib/test/shared-tree/editing.spec.js.map +0 -1
- package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.d.ts +0 -2
- package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.js +0 -161
- package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.js.map +0 -1
- package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.d.ts +0 -2
- package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.js +0 -105
- package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.js.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzEditGenerators.d.ts +0 -127
- package/lib/test/shared-tree/fuzz/fuzzEditGenerators.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzEditGenerators.js +0 -439
- package/lib/test/shared-tree/fuzz/fuzzEditGenerators.js.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzEditReducers.d.ts +0 -21
- package/lib/test/shared-tree/fuzz/fuzzEditReducers.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzEditReducers.js +0 -214
- package/lib/test/shared-tree/fuzz/fuzzEditReducers.js.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzUtils.d.ts +0 -33
- package/lib/test/shared-tree/fuzz/fuzzUtils.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzUtils.js +0 -78
- package/lib/test/shared-tree/fuzz/fuzzUtils.js.map +0 -1
- package/lib/test/shared-tree/fuzz/operationTypes.d.ts +0 -116
- package/lib/test/shared-tree/fuzz/operationTypes.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/operationTypes.js +0 -6
- package/lib/test/shared-tree/fuzz/operationTypes.js.map +0 -1
- package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.d.ts +0 -2
- package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.js +0 -110
- package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.js.map +0 -1
- package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.d.ts +0 -6
- package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.js +0 -220
- package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.js.map +0 -1
- package/lib/test/shared-tree/opSize.bench.d.ts +0 -2
- package/lib/test/shared-tree/opSize.bench.d.ts.map +0 -1
- package/lib/test/shared-tree/opSize.bench.js +0 -559
- package/lib/test/shared-tree/opSize.bench.js.map +0 -1
- package/lib/test/shared-tree/schematizeTree.spec.d.ts +0 -6
- package/lib/test/shared-tree/schematizeTree.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/schematizeTree.spec.js +0 -331
- package/lib/test/shared-tree/schematizeTree.spec.js.map +0 -1
- package/lib/test/shared-tree/schematizingTreeView.spec.d.ts +0 -6
- package/lib/test/shared-tree/schematizingTreeView.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/schematizingTreeView.spec.js +0 -137
- package/lib/test/shared-tree/schematizingTreeView.spec.js.map +0 -1
- package/lib/test/shared-tree/sharedTree.bench.d.ts +0 -2
- package/lib/test/shared-tree/sharedTree.bench.d.ts.map +0 -1
- package/lib/test/shared-tree/sharedTree.bench.js +0 -349
- package/lib/test/shared-tree/sharedTree.bench.js.map +0 -1
- package/lib/test/shared-tree/sharedTree.spec.d.ts +0 -2
- package/lib/test/shared-tree/sharedTree.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/sharedTree.spec.js +0 -1375
- package/lib/test/shared-tree/sharedTree.spec.js.map +0 -1
- package/lib/test/shared-tree/sharedTreeChangeCodec.spec.d.ts +0 -6
- package/lib/test/shared-tree/sharedTreeChangeCodec.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/sharedTreeChangeCodec.spec.js +0 -52
- package/lib/test/shared-tree/sharedTreeChangeCodec.spec.js.map +0 -1
- package/lib/test/shared-tree/sharedTreeChangeFamily.spec.d.ts +0 -6
- package/lib/test/shared-tree/sharedTreeChangeFamily.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/sharedTreeChangeFamily.spec.js +0 -139
- package/lib/test/shared-tree/sharedTreeChangeFamily.spec.js.map +0 -1
- package/lib/test/shared-tree/summary.bench.d.ts +0 -6
- package/lib/test/shared-tree/summary.bench.d.ts.map +0 -1
- package/lib/test/shared-tree/summary.bench.js +0 -111
- package/lib/test/shared-tree/summary.bench.js.map +0 -1
- package/lib/test/shared-tree/treeApi.spec.d.ts +0 -2
- package/lib/test/shared-tree/treeApi.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/treeApi.spec.js +0 -151
- package/lib/test/shared-tree/treeApi.spec.js.map +0 -1
- package/lib/test/shared-tree/treeCheckout.spec.d.ts +0 -2
- package/lib/test/shared-tree/treeCheckout.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/treeCheckout.spec.js +0 -678
- package/lib/test/shared-tree/treeCheckout.spec.js.map +0 -1
- package/lib/test/shared-tree/treeView.spec.d.ts +0 -2
- package/lib/test/shared-tree/treeView.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/treeView.spec.js +0 -16
- package/lib/test/shared-tree/treeView.spec.js.map +0 -1
- package/lib/test/shared-tree/undo.spec.d.ts +0 -2
- package/lib/test/shared-tree/undo.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/undo.spec.js +0 -298
- package/lib/test/shared-tree/undo.spec.js.map +0 -1
- package/lib/test/shared-tree-core/branch.spec.d.ts +0 -6
- package/lib/test/shared-tree-core/branch.spec.d.ts.map +0 -1
- package/lib/test/shared-tree-core/branch.spec.js +0 -766
- package/lib/test/shared-tree-core/branch.spec.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManager.bench.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManager.bench.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManager.bench.js +0 -227
- package/lib/test/shared-tree-core/edit-manager/editManager.bench.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManager.spec.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManager.spec.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManager.spec.js +0 -13
- package/lib/test/shared-tree-core/edit-manager/editManager.spec.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.js +0 -161
- package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.js +0 -568
- package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.js +0 -442
- package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerScenario.d.ts +0 -80
- package/lib/test/shared-tree-core/edit-manager/editManagerScenario.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerScenario.js +0 -267
- package/lib/test/shared-tree-core/edit-manager/editManagerScenario.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.d.ts +0 -211
- package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.js +0 -130
- package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.js.map +0 -1
- package/lib/test/shared-tree-core/message.spec.d.ts +0 -2
- package/lib/test/shared-tree-core/message.spec.d.ts.map +0 -1
- package/lib/test/shared-tree-core/message.spec.js +0 -99
- package/lib/test/shared-tree-core/message.spec.js.map +0 -1
- package/lib/test/shared-tree-core/sharedTreeCore.spec.d.ts +0 -2
- package/lib/test/shared-tree-core/sharedTreeCore.spec.d.ts.map +0 -1
- package/lib/test/shared-tree-core/sharedTreeCore.spec.js +0 -316
- package/lib/test/shared-tree-core/sharedTreeCore.spec.js.map +0 -1
- package/lib/test/shared-tree-core/utils.d.ts +0 -19
- package/lib/test/shared-tree-core/utils.d.ts.map +0 -1
- package/lib/test/shared-tree-core/utils.js +0 -26
- package/lib/test/shared-tree-core/utils.js.map +0 -1
- package/lib/test/simple-tree/list.spec.d.ts +0 -6
- package/lib/test/simple-tree/list.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/list.spec.js +0 -613
- package/lib/test/simple-tree/list.spec.js.map +0 -1
- package/lib/test/simple-tree/object.spec.d.ts +0 -6
- package/lib/test/simple-tree/object.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/object.spec.js +0 -390
- package/lib/test/simple-tree/object.spec.js.map +0 -1
- package/lib/test/simple-tree/objectFactory.spec.d.ts +0 -6
- package/lib/test/simple-tree/objectFactory.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/objectFactory.spec.js +0 -210
- package/lib/test/simple-tree/objectFactory.spec.js.map +0 -1
- package/lib/test/simple-tree/primitives.spec.d.ts +0 -6
- package/lib/test/simple-tree/primitives.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/primitives.spec.js +0 -134
- package/lib/test/simple-tree/primitives.spec.js.map +0 -1
- package/lib/test/simple-tree/proxies.spec.d.ts +0 -6
- package/lib/test/simple-tree/proxies.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/proxies.spec.js +0 -597
- package/lib/test/simple-tree/proxies.spec.js.map +0 -1
- package/lib/test/simple-tree/rawObjectNode.spec.d.ts +0 -6
- package/lib/test/simple-tree/rawObjectNode.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/rawObjectNode.spec.js +0 -73
- package/lib/test/simple-tree/rawObjectNode.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaCreationUtilities.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaCreationUtilities.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaCreationUtilities.spec.js +0 -153
- package/lib/test/simple-tree/schemaCreationUtilities.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaFactory.examples.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaFactory.examples.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaFactory.examples.spec.js +0 -107
- package/lib/test/simple-tree/schemaFactory.examples.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaFactory.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaFactory.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaFactory.spec.js +0 -515
- package/lib/test/simple-tree/schemaFactory.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaFactoryRecursive.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaFactoryRecursive.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaFactoryRecursive.spec.js +0 -282
- package/lib/test/simple-tree/schemaFactoryRecursive.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaTypes.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaTypes.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaTypes.spec.js +0 -89
- package/lib/test/simple-tree/schemaTypes.spec.js.map +0 -1
- package/lib/test/simple-tree/toFlexSchema.spec.d.ts +0 -6
- package/lib/test/simple-tree/toFlexSchema.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/toFlexSchema.spec.js +0 -30
- package/lib/test/simple-tree/toFlexSchema.spec.js.map +0 -1
- package/lib/test/simple-tree/toMapTree.spec.d.ts +0 -6
- package/lib/test/simple-tree/toMapTree.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/toMapTree.spec.js +0 -423
- package/lib/test/simple-tree/toMapTree.spec.js.map +0 -1
- package/lib/test/simple-tree/tree.spec.d.ts +0 -6
- package/lib/test/simple-tree/tree.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/tree.spec.js +0 -71
- package/lib/test/simple-tree/tree.spec.js.map +0 -1
- package/lib/test/simple-tree/treeApi.spec.d.ts +0 -6
- package/lib/test/simple-tree/treeApi.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/treeApi.spec.js +0 -146
- package/lib/test/simple-tree/treeApi.spec.js.map +0 -1
- package/lib/test/simple-tree/utils.d.ts +0 -16
- package/lib/test/simple-tree/utils.d.ts.map +0 -1
- package/lib/test/simple-tree/utils.js +0 -33
- package/lib/test/simple-tree/utils.js.map +0 -1
- package/lib/test/snapshots/gc.spec.d.ts +0 -6
- package/lib/test/snapshots/gc.spec.d.ts.map +0 -1
- package/lib/test/snapshots/gc.spec.js +0 -106
- package/lib/test/snapshots/gc.spec.js.map +0 -1
- package/lib/test/snapshots/index.d.ts +0 -6
- package/lib/test/snapshots/index.d.ts.map +0 -1
- package/lib/test/snapshots/index.js +0 -6
- package/lib/test/snapshots/index.js.map +0 -1
- package/lib/test/snapshots/schema.spec.d.ts +0 -6
- package/lib/test/snapshots/schema.spec.d.ts.map +0 -1
- package/lib/test/snapshots/schema.spec.js +0 -17
- package/lib/test/snapshots/schema.spec.js.map +0 -1
- package/lib/test/snapshots/snapshotTools.d.ts +0 -25
- package/lib/test/snapshots/snapshotTools.d.ts.map +0 -1
- package/lib/test/snapshots/snapshotTools.js +0 -85
- package/lib/test/snapshots/snapshotTools.js.map +0 -1
- package/lib/test/snapshots/summary.spec.d.ts +0 -6
- package/lib/test/snapshots/summary.spec.d.ts.map +0 -1
- package/lib/test/snapshots/summary.spec.js +0 -26
- package/lib/test/snapshots/summary.spec.js.map +0 -1
- package/lib/test/snapshots/testTrees.d.ts +0 -15
- package/lib/test/snapshots/testTrees.d.ts.map +0 -1
- package/lib/test/snapshots/testTrees.js +0 -374
- package/lib/test/snapshots/testTrees.js.map +0 -1
- package/lib/test/snapshots/utils.d.ts +0 -7
- package/lib/test/snapshots/utils.d.ts.map +0 -1
- package/lib/test/snapshots/utils.js +0 -106
- package/lib/test/snapshots/utils.js.map +0 -1
- package/lib/test/testChange.d.ts +0 -90
- package/lib/test/testChange.d.ts.map +0 -1
- package/lib/test/testChange.js +0 -234
- package/lib/test/testChange.js.map +0 -1
- package/lib/test/testChange.spec.d.ts +0 -6
- package/lib/test/testChange.spec.d.ts.map +0 -1
- package/lib/test/testChange.spec.js +0 -113
- package/lib/test/testChange.spec.js.map +0 -1
- package/lib/test/testTrees.d.ts +0 -56
- package/lib/test/testTrees.d.ts.map +0 -1
- package/lib/test/testTrees.js +0 -175
- package/lib/test/testTrees.js.map +0 -1
- package/lib/test/tree/anchorSet.spec.d.ts +0 -6
- package/lib/test/tree/anchorSet.spec.d.ts.map +0 -1
- package/lib/test/tree/anchorSet.spec.js +0 -593
- package/lib/test/tree/anchorSet.spec.js.map +0 -1
- package/lib/test/tree/detachedFieldIndex.spec.d.ts +0 -11
- package/lib/test/tree/detachedFieldIndex.spec.d.ts.map +0 -1
- package/lib/test/tree/detachedFieldIndex.spec.js +0 -218
- package/lib/test/tree/detachedFieldIndex.spec.js.map +0 -1
- package/lib/test/tree/pathTree.spec.d.ts +0 -6
- package/lib/test/tree/pathTree.spec.d.ts.map +0 -1
- package/lib/test/tree/pathTree.spec.js +0 -122
- package/lib/test/tree/pathTree.spec.js.map +0 -1
- package/lib/test/tree/visitDelta.spec.d.ts +0 -6
- package/lib/test/tree/visitDelta.spec.d.ts.map +0 -1
- package/lib/test/tree/visitDelta.spec.js +0 -1055
- package/lib/test/tree/visitDelta.spec.js.map +0 -1
- package/lib/test/util/brand.spec.d.ts +0 -22
- package/lib/test/util/brand.spec.d.ts.map +0 -1
- package/lib/test/util/brand.spec.js +0 -19
- package/lib/test/util/brand.spec.js.map +0 -1
- package/lib/test/util/deepFreeze.spec.d.ts +0 -6
- package/lib/test/util/deepFreeze.spec.d.ts.map +0 -1
- package/lib/test/util/deepFreeze.spec.js +0 -176
- package/lib/test/util/deepFreeze.spec.js.map +0 -1
- package/lib/test/util/nestedMap.spec.d.ts +0 -6
- package/lib/test/util/nestedMap.spec.d.ts.map +0 -1
- package/lib/test/util/nestedMap.spec.js +0 -190
- package/lib/test/util/nestedMap.spec.js.map +0 -1
- package/lib/test/util/offsetList.spec.d.ts +0 -6
- package/lib/test/util/offsetList.spec.d.ts.map +0 -1
- package/lib/test/util/offsetList.spec.js +0 -35
- package/lib/test/util/offsetList.spec.js.map +0 -1
- package/lib/test/util/testTreeProvider.spec.d.ts +0 -6
- package/lib/test/util/testTreeProvider.spec.d.ts.map +0 -1
- package/lib/test/util/testTreeProvider.spec.js +0 -56
- package/lib/test/util/testTreeProvider.spec.js.map +0 -1
- package/lib/test/util/typeUtils.spec.d.ts +0 -6
- package/lib/test/util/typeUtils.spec.d.ts.map +0 -1
- package/lib/test/util/typeUtils.spec.js +0 -19
- package/lib/test/util/typeUtils.spec.js.map +0 -1
- package/lib/test/util/utils.spec.d.ts +0 -6
- package/lib/test/util/utils.spec.d.ts.map +0 -1
- package/lib/test/util/utils.spec.js +0 -27
- package/lib/test/util/utils.spec.js.map +0 -1
- package/lib/test/utils.d.ts +0 -313
- package/lib/test/utils.d.ts.map +0 -1
- package/lib/test/utils.js +0 -765
- package/lib/test/utils.js.map +0 -1
- package/lib/tree-alpha.d.ts +0 -2159
- package/lib/tree-beta.d.ts +0 -2159
- package/lib/tree-public.d.ts +0 -1942
- package/lib/tree-untrimmed.d.ts +0 -6880
- package/src/simple-tree/flexNode.ts +0 -96
- package/src/simple-tree/treeArrayNode.ts +0 -70
- /package/dist/{feature-libraries → core/schema-stored}/multiplicity.d.ts +0 -0
- /package/lib/{feature-libraries → core/schema-stored}/multiplicity.d.ts +0 -0
- /package/lib/{feature-libraries → core/schema-stored}/multiplicity.js +0 -0
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
|
@@ -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 { assert } from "@fluidframework/core-utils/internal";
|
|
5
6
|
import { BTree } from "@tylerbu/sorted-btree-es6";
|
|
6
|
-
import { assert } from "@fluidframework/core-utils";
|
|
7
|
-
import { brand, fail, getOrCreate, mapIterable, } from "../util/index.js";
|
|
8
7
|
import { findAncestor, findCommonAncestor, mintCommit, rebaseChange, } from "../core/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { brand, fail, getOrCreate, mapIterable, } from "../util/index.js";
|
|
9
|
+
import { SharedTreeBranch, getChangeReplaceType, onForkTransitive } from "./branch.js";
|
|
10
|
+
import { decrementSequenceId, equalSequenceIds, maxSequenceId, minSequenceId, sequenceIdComparator, } from "./sequenceIdUtils.js";
|
|
11
11
|
export const minimumPossibleSequenceNumber = brand(Number.MIN_SAFE_INTEGER);
|
|
12
12
|
const minimumPossibleSequenceId = {
|
|
13
13
|
sequenceNumber: minimumPossibleSequenceNumber,
|
|
@@ -78,7 +78,6 @@ export class EditManager {
|
|
|
78
78
|
findCommonAncestor([this.localBranch.getHead(), this.localCommits], this.trunk.getHead());
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
-
this.localBranch.on("revertibleDisposed", this.onRevertibleDisposed.bind(this));
|
|
82
81
|
// Track all forks of the local branch for purposes of trunk eviction. Unlike the local branch, they have
|
|
83
82
|
// an unknown lifetime and rebase frequency, so we can not make any assumptions about which trunk commits
|
|
84
83
|
// they require and therefore we monitor them explicitly.
|
|
@@ -155,41 +154,6 @@ export class EditManager {
|
|
|
155
154
|
}
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
|
-
/**
|
|
159
|
-
* Returns the sequence id of the oldest sequenced revertible commit on the local branch.
|
|
160
|
-
*
|
|
161
|
-
* TODO: may be more performant to maintain the oldest revertible on the branches themselves
|
|
162
|
-
* this should be tested and revisited once branches are supported
|
|
163
|
-
*/
|
|
164
|
-
getOldestRevertibleSequenceId() {
|
|
165
|
-
if (this._oldestRevertibleSequenceId === undefined) {
|
|
166
|
-
let oldest;
|
|
167
|
-
for (const revision of this.localBranch.revertibleCommits()) {
|
|
168
|
-
if (oldest === undefined) {
|
|
169
|
-
oldest = this.trunkMetadata.get(revision)?.sequenceId;
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
const current = this.trunkMetadata.get(revision)?.sequenceId;
|
|
173
|
-
if (current !== undefined) {
|
|
174
|
-
oldest = minSequenceId(oldest, current);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
this._oldestRevertibleSequenceId = oldest;
|
|
179
|
-
}
|
|
180
|
-
return this._oldestRevertibleSequenceId;
|
|
181
|
-
}
|
|
182
|
-
onRevertibleDisposed(revertible, revision) {
|
|
183
|
-
const metadata = this.trunkMetadata.get(revision);
|
|
184
|
-
// if this revision hasn't been sequenced, it won't be evicted
|
|
185
|
-
if (metadata !== undefined) {
|
|
186
|
-
const { sequenceId: id } = metadata;
|
|
187
|
-
// if this revision corresponds with the current oldest revertible sequence id, replace it with the new oldest
|
|
188
|
-
if (id === this._oldestRevertibleSequenceId) {
|
|
189
|
-
this._oldestRevertibleSequenceId = undefined;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
157
|
/**
|
|
194
158
|
* Advances the minimum sequence number, and removes all commits from the trunk which lie outside the collaboration window,
|
|
195
159
|
* if they are not retained by revertibles or local branches.
|
|
@@ -224,13 +188,6 @@ export class EditManager {
|
|
|
224
188
|
const sequenceIdBeforeMinimumBranchBase = decrementSequenceId(minimumBranchBaseSequenceId);
|
|
225
189
|
trunkTailSequenceId = minSequenceId(trunkTailSequenceId, sequenceIdBeforeMinimumBranchBase);
|
|
226
190
|
}
|
|
227
|
-
// TODO get the oldest revertible sequence id from all registered branches, not just the local branch
|
|
228
|
-
const oldestRevertibleSequenceId = this.getOldestRevertibleSequenceId();
|
|
229
|
-
if (oldestRevertibleSequenceId !== undefined) {
|
|
230
|
-
// use a smaller sequence number so that the oldest revertible is not trimmed
|
|
231
|
-
const sequenceIdBeforeOldestRevertible = decrementSequenceId(oldestRevertibleSequenceId);
|
|
232
|
-
trunkTailSequenceId = minSequenceId(trunkTailSequenceId, sequenceIdBeforeOldestRevertible);
|
|
233
|
-
}
|
|
234
191
|
const [sequenceId, latestEvicted] = this.getClosestTrunkCommit(maxSequenceId(trunkTailSequenceId, this.sequenceMap.minKey() ?? minimumPossibleSequenceId));
|
|
235
192
|
// Don't do any work if the commit found by the search is already the tail of the trunk
|
|
236
193
|
if (latestEvicted !== this.trunkBase) {
|
|
@@ -452,7 +409,6 @@ export class EditManager {
|
|
|
452
409
|
}
|
|
453
410
|
pushGraphCommitToTrunk(sequenceId, graphCommit, sessionId) {
|
|
454
411
|
this.trunk.setHead(graphCommit);
|
|
455
|
-
this.localBranch.updateRevertibleCommit(graphCommit);
|
|
456
412
|
const trunkHead = this.trunk.getHead();
|
|
457
413
|
this.sequenceMap.set(sequenceId, trunkHead);
|
|
458
414
|
this.trunkMetadata.set(trunkHead.revision, { sequenceId, sessionId });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManager.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EACN,KAAK,EACL,IAAI,EACJ,WAAW,EACX,WAAW,GAGX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGN,YAAY,EACZ,kBAAkB,EAElB,UAAU,EACV,YAAY,GAGZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQvF,OAAO,EACN,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,aAAa,GACb,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,6BAA6B,GAAc,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACvF,MAAM,yBAAyB,GAAe;IAC7C,cAAc,EAAE,6BAA6B;CAC7C,CAAC;AAEF;;;GAGG;AACH,sDAAsD;AACtD,MAAM,OAAO,WAAW;IA4EvB;;;OAGG;IACH,YACiB,YAA2B,EAC3B,cAAyB,EACxB,eAAkC;QAFnC,iBAAY,GAAZ,YAAY,CAAe;QAC3B,mBAAc,GAAd,cAAc,CAAW;QACxB,oBAAe,GAAf,eAAe,CAAmB;QA3EpD;;;WAGG;QACc,kBAAa,GAAG,IAAI,GAAG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F,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { BTree } from \"@tylerbu/sorted-btree-es6\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport { SessionId } from \"@fluidframework/id-compressor\";\nimport {\n\tbrand,\n\tfail,\n\tgetOrCreate,\n\tmapIterable,\n\tMutable,\n\tRecursiveReadonly,\n} from \"../util/index.js\";\nimport {\n\tChangeFamily,\n\tChangeFamilyEditor,\n\tfindAncestor,\n\tfindCommonAncestor,\n\tGraphCommit,\n\tmintCommit,\n\trebaseChange,\n\tRevertible,\n\tRevisionTag,\n} from \"../core/index.js\";\nimport { getChangeReplaceType, onForkTransitive, SharedTreeBranch } from \"./branch.js\";\nimport {\n\tCommit,\n\tSequenceId,\n\tSummarySessionBranch,\n\tSeqNumber,\n\tSequencedCommit,\n} from \"./editManagerFormat.js\";\nimport {\n\tsequenceIdComparator,\n\tequalSequenceIds,\n\tminSequenceId,\n\tdecrementSequenceId,\n\tmaxSequenceId,\n} from \"./sequenceIdUtils.js\";\n\nexport const minimumPossibleSequenceNumber: SeqNumber = brand(Number.MIN_SAFE_INTEGER);\nconst minimumPossibleSequenceId: SequenceId = {\n\tsequenceNumber: minimumPossibleSequenceNumber,\n};\n\n/**\n * Represents a local branch of a document and interprets the effect on the document of adding sequenced changes,\n * which were based on a given session's branch, to the document history\n */\n// TODO: Try to reduce this to a single type parameter\nexport class EditManager<\n\tTEditor extends ChangeFamilyEditor,\n\tTChangeset,\n\tTChangeFamily extends ChangeFamily<TEditor, TChangeset>,\n> {\n\t/** The \"trunk\" branch. The trunk represents the list of received sequenced changes. */\n\tprivate readonly trunk: SharedTreeBranch<TEditor, TChangeset>;\n\n\t/**\n\t * Records extra data associated with commits in the {@link trunk}.\n\t * This does not include an entry for the {@link trunkBase}.\n\t */\n\tprivate readonly trunkMetadata = new Map<\n\t\tRevisionTag,\n\t\t{ sequenceId: SequenceId; sessionId: SessionId }\n\t>();\n\t/**\n\t * A map from a sequence id to the commit in the {@link trunk} which has that sequence id.\n\t * This also includes an entry for the {@link trunkBase} which always has the lowest key in the map.\n\t */\n\tprivate readonly sequenceMap = new BTree<SequenceId, GraphCommit<TChangeset>>(\n\t\tundefined,\n\t\tsequenceIdComparator,\n\t);\n\n\t/**\n\t * Branches are maintained to represent the local change list that the issuing client had\n\t * at the time of submitting the latest known edit on the branch.\n\t * This means the head commit of each branch is always in its original (non-rebased) form.\n\t */\n\t// TODO:#4593: Add test to ensure that peer branches are never initialized with a repairDataStoreProvider\n\tprivate readonly peerLocalBranches: Map<SessionId, SharedTreeBranch<TEditor, TChangeset>> =\n\t\tnew Map();\n\n\t/**\n\t * This branch holds the changes made by this client which have not yet been confirmed as sequenced changes.\n\t */\n\tpublic readonly localBranch: SharedTreeBranch<TEditor, TChangeset>;\n\n\t/**\n\t * Tracks where on the trunk all registered branches are based. Each key is the sequence id of a commit on\n\t * the trunk, and the value is the set of all branches who have that commit as their common ancestor with the trunk.\n\t */\n\tprivate readonly trunkBranches = new BTree<\n\t\tSequenceId,\n\t\tSet<SharedTreeBranch<TEditor, TChangeset>>\n\t>(undefined, sequenceIdComparator);\n\n\t/**\n\t * The sequence number of the newest commit on the trunk that has been received by all peers.\n\t * Defaults to {@link minimumPossibleSequenceNumber} if no commits have been received.\n\t *\n\t * @remarks If there are more than one commit with the same sequence number we assume this refers to the last commit in the batch.\n\t */\n\tprivate minimumSequenceNumber = minimumPossibleSequenceNumber;\n\n\t/**\n\t * The sequence ID corresponding to the oldest revertible commit owned by the local branch. This is used\n\t * to prevent the trunk from trimming this commit or commits after it as they're needed for undo.\n\t */\n\tprivate _oldestRevertibleSequenceId?: SequenceId;\n\n\t/**\n\t * A special commit that is a \"base\" (tail) of the trunk, though not part of the trunk itself.\n\t * This makes it possible to model the trunk in the same way as any other branch (it branches off of a base commit)\n\t * which allows it to use branching APIs to interact with the other branches.\n\t * Each time trunk eviction occurs, the most recent evicted commit becomes the new `trunkBase`.\n\t */\n\tprivate trunkBase: GraphCommit<TChangeset>;\n\n\t/**\n\t * The list of commits (from oldest to most recent) that are on the local branch but not on the trunk.\n\t * When a local commit is sequenced, the first commit in this list shifted onto the tip of the trunk.\n\t */\n\tprivate readonly localCommits: GraphCommit<TChangeset>[] = [];\n\n\t/**\n\t * @param changeFamily - the change family of changes on the trunk and local branch\n\t * @param localSessionId - the id of the local session that will be used for local commits\n\t */\n\tpublic constructor(\n\t\tpublic readonly changeFamily: TChangeFamily,\n\t\tpublic readonly localSessionId: SessionId,\n\t\tprivate readonly mintRevisionTag: () => RevisionTag,\n\t) {\n\t\tthis.trunkBase = {\n\t\t\trevision: \"root\",\n\t\t\tchange: changeFamily.rebaser.compose([]),\n\t\t};\n\t\tthis.sequenceMap.set(minimumPossibleSequenceId, this.trunkBase);\n\t\tthis.trunk = new SharedTreeBranch(this.trunkBase, changeFamily, mintRevisionTag);\n\t\tthis.localBranch = new SharedTreeBranch(\n\t\t\tthis.trunk.getHead(),\n\t\t\tchangeFamily,\n\t\t\tmintRevisionTag,\n\t\t);\n\n\t\tthis.localBranch.on(\"afterChange\", (event) => {\n\t\t\tif (event.type === \"append\") {\n\t\t\t\tfor (const commit of event.newCommits) {\n\t\t\t\t\tthis.localCommits.push(commit);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.localCommits.length = 0;\n\t\t\t\tfindCommonAncestor(\n\t\t\t\t\t[this.localBranch.getHead(), this.localCommits],\n\t\t\t\t\tthis.trunk.getHead(),\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t\tthis.localBranch.on(\"revertibleDisposed\", this.onRevertibleDisposed.bind(this));\n\n\t\t// Track all forks of the local branch for purposes of trunk eviction. Unlike the local branch, they have\n\t\t// an unknown lifetime and rebase frequency, so we can not make any assumptions about which trunk commits\n\t\t// they require and therefore we monitor them explicitly.\n\t\tonForkTransitive(this.localBranch, (fork) => this.registerBranch(fork));\n\t}\n\n\t/**\n\t * Make the given branch known to the `EditManager`. The `EditManager` will ensure that all registered\n\t * branches remain usable even as the minimum sequence number advances.\n\t *\n\t * TODO#AB6926: Refactor local branch management into a separate class that encapsulates `trunkBranches` and everything\n\t * that touches it.\n\t * TODO#AB6925: Maintain the divergence point between each branch and the trunk so that we don't have to recompute\n\t * it so often.\n\t */\n\tprivate registerBranch(branch: SharedTreeBranch<TEditor, TChangeset>): void {\n\t\tthis.trackBranch(branch);\n\t\t// Whenever the branch is rebased, update our record of its base trunk commit\n\t\tconst offBeforeRebase = branch.on(\"beforeChange\", (args) => {\n\t\t\tif (args.type === \"replace\" && getChangeReplaceType(args) === \"rebase\") {\n\t\t\t\tthis.untrackBranch(branch);\n\t\t\t}\n\t\t});\n\t\tconst offAfterRebase = branch.on(\"afterChange\", (args) => {\n\t\t\tif (args.type === \"replace\" && getChangeReplaceType(args) === \"rebase\") {\n\t\t\t\tthis.trackBranch(branch);\n\t\t\t\tthis.trimTrunk();\n\t\t\t}\n\t\t});\n\t\t// When the branch is disposed, update our branch set and trim the trunk\n\t\tconst offDispose = branch.on(\"dispose\", () => {\n\t\t\tthis.untrackBranch(branch);\n\t\t\tthis.trimTrunk();\n\t\t\toffBeforeRebase();\n\t\t\toffAfterRebase();\n\t\t\toffDispose();\n\t\t});\n\t}\n\n\tprivate trackBranch(b: SharedTreeBranch<TEditor, TChangeset>): void {\n\t\tconst trunkCommit =\n\t\t\tfindCommonAncestor(this.trunk.getHead(), b.getHead()) ??\n\t\t\tfail(\"Expected branch to be related to trunk\");\n\t\tconst sequenceId = this.getCommitSequenceId(trunkCommit);\n\t\tconst branches = getOrCreate(this.trunkBranches, sequenceId, () => new Set());\n\n\t\tassert(!branches.has(b), 0x670 /* Branch was registered more than once */);\n\t\tbranches.add(b);\n\t}\n\n\tprivate untrackBranch(b: SharedTreeBranch<TEditor, TChangeset>): void {\n\t\tconst trunkCommit =\n\t\t\tfindCommonAncestor(this.trunk.getHead(), b.getHead()) ??\n\t\t\tfail(\"Expected branch to be related to trunk\");\n\t\tconst sequenceId = this.getCommitSequenceId(trunkCommit);\n\t\tconst branches =\n\t\t\tthis.trunkBranches.get(sequenceId) ?? fail(\"Expected branch to be tracked\");\n\n\t\tassert(branches.delete(b), 0x671 /* Expected branch to be tracked */);\n\t\tif (branches.size === 0) {\n\t\t\tthis.trunkBranches.delete(sequenceId);\n\t\t}\n\t}\n\n\t/**\n\t * Updates the `trunkBranches` map to reflect the fact that a new local commit was fast-forwarded to the trunk.\n\t * @param priorTrunkCommit - The trunk head prior to the fast-forward.\n\t * @param newId - The ID of the new trunk head.\n\t */\n\tprivate fastForwardBranches(\n\t\tpriorTrunkCommit: GraphCommit<TChangeset>,\n\t\tnewId: SequenceId,\n\t): void {\n\t\tconst currentId = this.getCommitSequenceId(priorTrunkCommit);\n\t\tconst currentBranches = this.trunkBranches.get(currentId);\n\t\tif (currentBranches !== undefined) {\n\t\t\tconst newBranches = getOrCreate(this.trunkBranches, newId, () => new Set());\n\t\t\tfor (const branch of currentBranches) {\n\t\t\t\tif (branch.getHead() !== priorTrunkCommit) {\n\t\t\t\t\tnewBranches.add(branch);\n\t\t\t\t\tcurrentBranches.delete(branch);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentBranches.size === 0) {\n\t\t\t\tthis.trunkBranches.delete(currentId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the sequence id of the oldest sequenced revertible commit on the local branch.\n\t *\n\t * TODO: may be more performant to maintain the oldest revertible on the branches themselves\n\t * this should be tested and revisited once branches are supported\n\t */\n\tprivate getOldestRevertibleSequenceId(): SequenceId | undefined {\n\t\tif (this._oldestRevertibleSequenceId === undefined) {\n\t\t\tlet oldest: SequenceId | undefined;\n\t\t\tfor (const revision of this.localBranch.revertibleCommits()) {\n\t\t\t\tif (oldest === undefined) {\n\t\t\t\t\toldest = this.trunkMetadata.get(revision)?.sequenceId;\n\t\t\t\t} else {\n\t\t\t\t\tconst current = this.trunkMetadata.get(revision)?.sequenceId;\n\t\t\t\t\tif (current !== undefined) {\n\t\t\t\t\t\toldest = minSequenceId(oldest, current);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._oldestRevertibleSequenceId = oldest;\n\t\t}\n\n\t\treturn this._oldestRevertibleSequenceId;\n\t}\n\n\tprivate onRevertibleDisposed(revertible: Revertible, revision: RevisionTag): void {\n\t\tconst metadata = this.trunkMetadata.get(revision);\n\n\t\t// if this revision hasn't been sequenced, it won't be evicted\n\t\tif (metadata !== undefined) {\n\t\t\tconst { sequenceId: id } = metadata;\n\t\t\t// if this revision corresponds with the current oldest revertible sequence id, replace it with the new oldest\n\t\t\tif (id === this._oldestRevertibleSequenceId) {\n\t\t\t\tthis._oldestRevertibleSequenceId = undefined;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Advances the minimum sequence number, and removes all commits from the trunk which lie outside the collaboration window,\n\t * if they are not retained by revertibles or local branches.\n\t * @param minimumSequenceNumber - the sequence number of the newest commit that all peers (including this one) have received and applied to their trunks.\n\t *\n\t * @remarks If there are more than one commit with the same sequence number we assume this refers to the last commit in the batch.\n\t */\n\tpublic advanceMinimumSequenceNumber(minimumSequenceNumber: SeqNumber): void {\n\t\tif (minimumSequenceNumber === this.minimumSequenceNumber) {\n\t\t\treturn;\n\t\t}\n\n\t\tassert(\n\t\t\tminimumSequenceNumber > this.minimumSequenceNumber,\n\t\t\t0x476 /* number must be larger or equal to current minimumSequenceNumber. */,\n\t\t);\n\n\t\tthis.minimumSequenceNumber = minimumSequenceNumber;\n\t\tthis.trimTrunk();\n\t}\n\n\t/**\n\t * Examines the latest known minimum sequence number and the trunk bases of any registered branches to determine\n\t * if any commits on the trunk are unreferenced and unneeded for future computation; those found are evicted from the trunk.\n\t * @returns the number of commits that were removed from the trunk\n\t */\n\tprivate trimTrunk(): void {\n\t\t/** The sequence id of the oldest commit on the trunk that will be retained */\n\t\tlet trunkTailSequenceId: SequenceId = {\n\t\t\tsequenceNumber: this.minimumSequenceNumber,\n\t\t\tindexInBatch: Number.POSITIVE_INFINITY,\n\t\t};\n\t\t// If there are any outstanding registered branches, get the one that is the oldest (has the \"most behind\" trunk base)\n\t\tconst minimumBranchBaseSequenceId = this.trunkBranches.minKey();\n\t\tif (minimumBranchBaseSequenceId !== undefined) {\n\t\t\t// If that branch is behind the minimum sequence id, we only want to evict commits older than it,\n\t\t\t// even if those commits are behind the minimum sequence id\n\t\t\tconst sequenceIdBeforeMinimumBranchBase = decrementSequenceId(\n\t\t\t\tminimumBranchBaseSequenceId,\n\t\t\t);\n\t\t\ttrunkTailSequenceId = minSequenceId(\n\t\t\t\ttrunkTailSequenceId,\n\t\t\t\tsequenceIdBeforeMinimumBranchBase,\n\t\t\t);\n\t\t}\n\n\t\t// TODO get the oldest revertible sequence id from all registered branches, not just the local branch\n\t\tconst oldestRevertibleSequenceId = this.getOldestRevertibleSequenceId();\n\t\tif (oldestRevertibleSequenceId !== undefined) {\n\t\t\t// use a smaller sequence number so that the oldest revertible is not trimmed\n\t\t\tconst sequenceIdBeforeOldestRevertible = decrementSequenceId(\n\t\t\t\toldestRevertibleSequenceId,\n\t\t\t);\n\t\t\ttrunkTailSequenceId = minSequenceId(\n\t\t\t\ttrunkTailSequenceId,\n\t\t\t\tsequenceIdBeforeOldestRevertible,\n\t\t\t);\n\t\t}\n\n\t\tconst [sequenceId, latestEvicted] = this.getClosestTrunkCommit(\n\t\t\tmaxSequenceId(\n\t\t\t\ttrunkTailSequenceId,\n\t\t\t\tthis.sequenceMap.minKey() ?? minimumPossibleSequenceId,\n\t\t\t),\n\t\t);\n\n\t\t// Don't do any work if the commit found by the search is already the tail of the trunk\n\t\tif (latestEvicted !== this.trunkBase) {\n\t\t\t// The minimum sequence number informs us that all peer branches are at least caught up to the tail commit,\n\t\t\t// so rebase them accordingly. This is necessary to prevent peer branches from referencing any evicted commits.\n\t\t\tfor (const [, branch] of this.peerLocalBranches) {\n\t\t\t\tbranch.rebaseOnto(this.trunk, latestEvicted);\n\t\t\t}\n\n\t\t\t// This mutation is a performance hack. If commits are truly immutable, then changing the trunk's tail requires\n\t\t\t// regenerating the entire commit graph. Instead, we can simply chop off the tail like this if we're certain\n\t\t\t// that there are no outstanding references to any of the commits being removed (other than the references via\n\t\t\t// the trunk). The peer branches have been rebased to the head of the trunk, the local branch is already rebased\n\t\t\t// to the head of the trunk, and all other branches are tracked by `trunkBranches` and known to be ahead of or at\n\t\t\t// `newTrunkBase`. Therefore, no branches should have unique references to any of the commits being evicted here.\n\t\t\t// We mutate the most recent of the evicted commits to become the new trunk base. That way, any other commits that\n\t\t\t// have parent pointers to the latest evicted commit will stay linked, even though that it is no longer part of the trunk.\n\t\t\tconst newTrunkBase = latestEvicted as Mutable<typeof latestEvicted>;\n\t\t\t// The metadata for new trunk base revision needs to be deleted before modifying it.\n\t\t\tthis.trunkMetadata.delete(newTrunkBase.revision);\n\t\t\t// Copying the revision of the old trunk base into the new trunk base means we don't need to write out the original\n\t\t\t// revision to summaries. All clients agree that the trunk base always has the same hardcoded revision.\n\t\t\tnewTrunkBase.revision = this.trunkBase.revision;\n\t\t\t// Overwriting the change is not strictly necessary, but done here for consistency (so all trunk bases are deeply equal).\n\t\t\tnewTrunkBase.change = this.trunkBase.change;\n\t\t\t// Dropping the parent field removes (transitively) all references to the evicted commits so they can be garbage collected.\n\t\t\tdelete newTrunkBase.parent;\n\t\t\tthis.trunkBase = newTrunkBase;\n\n\t\t\t// Update any state that is derived from trunk commits\n\t\t\tthis.sequenceMap.editRange(\n\t\t\t\tminimumPossibleSequenceId,\n\t\t\t\tsequenceId,\n\t\t\t\ttrue,\n\t\t\t\t(s, { revision }) => {\n\t\t\t\t\t// Cleanup look-aside data for each evicted commit\n\t\t\t\t\tthis.trunkMetadata.delete(revision);\n\t\t\t\t\t// Delete all evicted commits from `sequenceMap` except for the latest one, which is the new `trunkBase`\n\t\t\t\t\tif (equalSequenceIds(s, sequenceId)) {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\trevision === newTrunkBase.revision,\n\t\t\t\t\t\t\t0x729 /* Expected last evicted commit to be new trunk base */,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn { delete: true };\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tconst trunkSize = getPathFromBase(this.trunk.getHead(), this.trunkBase).length;\n\t\t\tassert(\n\t\t\t\tthis.sequenceMap.size === trunkSize + 1,\n\t\t\t\t0x744 /* The size of the sequenceMap must have one element more than the trunk */,\n\t\t\t);\n\t\t\tassert(\n\t\t\t\tthis.trunkMetadata.size === trunkSize,\n\t\t\t\t0x745 /* The size of the trunkMetadata must be the same as the trunk */,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn (\n\t\t\tthis.trunk.getHead() === this.trunkBase &&\n\t\t\tthis.peerLocalBranches.size === 0 &&\n\t\t\tthis.localBranch.getHead() === this.trunk.getHead() &&\n\t\t\tthis.minimumSequenceNumber === minimumPossibleSequenceNumber\n\t\t);\n\t}\n\n\tpublic getSummaryData(): SummaryData<TChangeset> {\n\t\t// The assert below is acceptable at present because summarization only ever occurs on a client with no\n\t\t// local/in-flight changes.\n\t\t// In the future we may wish to relax this constraint. For that to work, the current implementation of\n\t\t// `EditManager` would have to be amended in one of two ways:\n\t\t// A) Changes made by the local session should be represented by a branch in `EditManager.branches`.\n\t\t// B) The contents of such a branch should be computed on demand based on the trunk.\n\t\t// Note that option (A) would be a simple change to `addSequencedChange` whereas (B) would likely require\n\t\t// rebasing trunk changes over the inverse of trunk changes.\n\t\tassert(\n\t\t\tthis.localBranch.getHead() === this.trunk.getHead(),\n\t\t\t0x428 /* Clients with local changes cannot be used to generate summaries */,\n\t\t);\n\n\t\tlet oldestCommitInCollabWindow = this.getClosestTrunkCommit(this.minimumSequenceNumber)[1];\n\t\tassert(\n\t\t\toldestCommitInCollabWindow.parent !== undefined ||\n\t\t\t\toldestCommitInCollabWindow === this.trunkBase,\n\t\t\t0x8c7 /* Expected oldest commit in collab window to have a parent or be the trunk base */,\n\t\t);\n\n\t\t// Path construction is exclusive, so we need to use the parent of the oldest commit in the window if it exists\n\t\toldestCommitInCollabWindow =\n\t\t\toldestCommitInCollabWindow.parent ?? oldestCommitInCollabWindow;\n\n\t\tconst trunk = getPathFromBase(this.trunk.getHead(), oldestCommitInCollabWindow).map((c) => {\n\t\t\tconst metadata =\n\t\t\t\tthis.trunkMetadata.get(c.revision) ?? fail(\"Expected metadata for trunk commit\");\n\t\t\tconst commit: SequencedCommit<TChangeset> = {\n\t\t\t\tchange: c.change,\n\t\t\t\trevision: c.revision,\n\t\t\t\tsequenceNumber: metadata.sequenceId.sequenceNumber,\n\t\t\t\tsessionId: metadata.sessionId,\n\t\t\t};\n\t\t\tif (metadata.sequenceId.indexInBatch !== undefined) {\n\t\t\t\tcommit.indexInBatch = metadata.sequenceId.indexInBatch;\n\t\t\t}\n\t\t\treturn commit;\n\t\t});\n\n\t\tconst peerLocalBranches = new Map<SessionId, SummarySessionBranch<TChangeset>>(\n\t\t\tmapIterable(this.peerLocalBranches.entries(), ([sessionId, branch]) => {\n\t\t\t\tconst branchPath: GraphCommit<TChangeset>[] = [];\n\t\t\t\tconst ancestor =\n\t\t\t\t\tfindCommonAncestor([branch.getHead(), branchPath], this.trunk.getHead()) ??\n\t\t\t\t\tfail(\"Expected branch to be based on trunk\");\n\n\t\t\t\treturn [\n\t\t\t\t\tsessionId,\n\t\t\t\t\t{\n\t\t\t\t\t\tbase: ancestor.revision,\n\t\t\t\t\t\tcommits: branchPath.map((c) => {\n\t\t\t\t\t\t\tconst commit: Commit<TChangeset> = {\n\t\t\t\t\t\t\t\tchange: c.change,\n\t\t\t\t\t\t\t\trevision: c.revision,\n\t\t\t\t\t\t\t\tsessionId,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\treturn commit;\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t}),\n\t\t);\n\n\t\treturn { trunk, peerLocalBranches };\n\t}\n\n\tpublic loadSummaryData(data: SummaryData<TChangeset>): void {\n\t\tassert(\n\t\t\tthis.isEmpty(),\n\t\t\t0x68a /* Attempted to load from summary after edit manager was already mutated */,\n\t\t);\n\t\t// Record the tags of each trunk commit as we generate the trunk so they can be looked up quickly\n\t\t// when hydrating the peer branches below\n\t\tconst trunkRevisionCache = new Map<RevisionTag, GraphCommit<TChangeset>>();\n\t\ttrunkRevisionCache.set(this.trunkBase.revision, this.trunkBase);\n\t\tthis.trunk.setHead(\n\t\t\tdata.trunk.reduce((base, c) => {\n\t\t\t\tconst sequenceId: SequenceId =\n\t\t\t\t\tc.indexInBatch === undefined\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tsequenceNumber: c.sequenceNumber,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tsequenceNumber: c.sequenceNumber,\n\t\t\t\t\t\t\t\tindexInBatch: c.indexInBatch,\n\t\t\t\t\t\t };\n\t\t\t\tconst commit = mintCommit(base, c);\n\t\t\t\tthis.sequenceMap.set(sequenceId, commit);\n\t\t\t\tthis.trunkMetadata.set(c.revision, {\n\t\t\t\t\tsequenceId,\n\t\t\t\t\tsessionId: c.sessionId,\n\t\t\t\t});\n\t\t\t\ttrunkRevisionCache.set(c.revision, commit);\n\t\t\t\treturn commit;\n\t\t\t}, this.trunkBase),\n\t\t);\n\n\t\tthis.localBranch.setHead(this.trunk.getHead());\n\n\t\tfor (const [sessionId, branch] of data.peerLocalBranches) {\n\t\t\tconst commit =\n\t\t\t\ttrunkRevisionCache.get(branch.base) ??\n\t\t\t\tfail(\"Expected summary branch to be based off of a revision in the trunk\");\n\n\t\t\tthis.peerLocalBranches.set(\n\t\t\t\tsessionId,\n\t\t\t\tnew SharedTreeBranch(\n\t\t\t\t\tbranch.commits.reduce(mintCommit, commit),\n\t\t\t\t\tthis.changeFamily,\n\t\t\t\t\tthis.mintRevisionTag,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate getCommitSequenceId(commit: GraphCommit<TChangeset>): SequenceId {\n\t\treturn this.trunkMetadata.get(commit.revision)?.sequenceId ?? minimumPossibleSequenceId;\n\t}\n\n\tpublic getTrunkChanges(): readonly RecursiveReadonly<TChangeset>[] {\n\t\treturn this.getTrunkCommits().map((c) => c.change);\n\t}\n\n\tpublic getTrunkCommits(): readonly RecursiveReadonly<GraphCommit<TChangeset>>[] {\n\t\treturn getPathFromBase(this.trunk.getHead(), this.trunkBase);\n\t}\n\n\tpublic getTrunkHead(): GraphCommit<TChangeset> {\n\t\treturn this.trunk.getHead();\n\t}\n\n\tpublic getLocalChanges(): readonly RecursiveReadonly<TChangeset>[] {\n\t\treturn this.getLocalCommits().map((c) => c.change);\n\t}\n\n\tpublic getLocalCommits(): readonly RecursiveReadonly<GraphCommit<TChangeset>>[] {\n\t\treturn this.localCommits;\n\t}\n\n\t/**\n\t * @returns The length of the longest branch maintained by this EditManager.\n\t * This may be the length of a peer branch or the local branch.\n\t * The length is counted from the lowest common ancestor with the trunk such that a fully sequenced branch would\n\t * have length zero.\n\t */\n\tpublic getLongestBranchLength(): number {\n\t\tlet max = 0;\n\t\tconst trunkHead = this.trunk.getHead();\n\t\tfor (const branch of this.peerLocalBranches.values()) {\n\t\t\tconst branchPath = getPathFromBase(branch.getHead(), trunkHead);\n\t\t\tif (branchPath.length > max) {\n\t\t\t\tmax = branchPath.length;\n\t\t\t}\n\t\t}\n\t\tconst localPath = getPathFromBase(this.localBranch.getHead(), trunkHead);\n\t\treturn Math.max(max, localPath.length);\n\t}\n\n\tpublic addSequencedChange(\n\t\tnewCommit: Commit<TChangeset>,\n\t\tsequenceNumber: SeqNumber,\n\t\treferenceSequenceNumber: SeqNumber,\n\t): void {\n\t\tassert(\n\t\t\tsequenceNumber > this.minimumSequenceNumber,\n\t\t\t0x713 /* Expected change sequence number to exceed the last known minimum sequence number */,\n\t\t);\n\n\t\tconst commitsSequenceNumber = this.getBatch(sequenceNumber);\n\t\tconst sequenceId: SequenceId =\n\t\t\tcommitsSequenceNumber.length === 0\n\t\t\t\t? {\n\t\t\t\t\t\tsequenceNumber,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tsequenceNumber,\n\t\t\t\t\t\tindexInBatch: commitsSequenceNumber.length,\n\t\t\t\t };\n\n\t\tif (newCommit.sessionId === this.localSessionId) {\n\t\t\tconst headTrunkCommit = this.trunk.getHead();\n\t\t\tconst firstLocalCommit = this.localCommits.shift();\n\t\t\tassert(\n\t\t\t\tfirstLocalCommit !== undefined,\n\t\t\t\t0x6b5 /* Received a sequenced change from the local session despite having no local changes */,\n\t\t\t);\n\n\t\t\t// The first local branch commit is already rebased over the trunk, so we can push it directly to the trunk.\n\t\t\tthis.pushGraphCommitToTrunk(sequenceId, firstLocalCommit, this.localSessionId);\n\t\t\tthis.fastForwardBranches(headTrunkCommit, sequenceId);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the revision that the remote change is based on\n\t\tconst [, baseRevisionInTrunk] = this.getClosestTrunkCommit(referenceSequenceNumber);\n\t\t// Rebase that branch over the part of the trunk up to the base revision\n\t\t// This will be a no-op if the sending client has not advanced since the last time we received an edit from it\n\t\tconst peerLocalBranch = getOrCreate(\n\t\t\tthis.peerLocalBranches,\n\t\t\tnewCommit.sessionId,\n\t\t\t() =>\n\t\t\t\tnew SharedTreeBranch(baseRevisionInTrunk, this.changeFamily, this.mintRevisionTag),\n\t\t);\n\t\tpeerLocalBranch.rebaseOnto(this.trunk, baseRevisionInTrunk);\n\n\t\tif (peerLocalBranch.getHead() === this.trunk.getHead()) {\n\t\t\t// If the branch is fully caught up and empty after being rebased, then push to the trunk directly\n\t\t\tthis.pushCommitToTrunk(sequenceId, newCommit);\n\t\t\tpeerLocalBranch.setHead(this.trunk.getHead());\n\t\t} else {\n\t\t\t// Otherwise, rebase the change over the trunk and append it, and append the original change to the peer branch.\n\t\t\tconst newChangeFullyRebased = rebaseChange(\n\t\t\t\tthis.changeFamily.rebaser,\n\t\t\t\tnewCommit.change,\n\t\t\t\tpeerLocalBranch.getHead(),\n\t\t\t\tthis.trunk.getHead(),\n\t\t\t\tthis.mintRevisionTag,\n\t\t\t);\n\n\t\t\tpeerLocalBranch.apply(newCommit.change, newCommit.revision);\n\t\t\tthis.pushCommitToTrunk(sequenceId, {\n\t\t\t\t...newCommit,\n\t\t\t\tchange: newChangeFullyRebased,\n\t\t\t});\n\t\t}\n\n\t\tthis.localBranch.rebaseOnto(this.trunk);\n\t}\n\n\tpublic findLocalCommit(\n\t\trevision: RevisionTag,\n\t): [commit: GraphCommit<TChangeset>, commitsAfter: GraphCommit<TChangeset>[]] {\n\t\tconst commits: GraphCommit<TChangeset>[] = [];\n\t\tconst commit = findAncestor(\n\t\t\t[this.localBranch.getHead(), commits],\n\t\t\t(c) => c.revision === revision,\n\t\t);\n\t\tassert(commit !== undefined, 0x599 /* Expected local branch to contain revision */);\n\t\treturn [commit, commits];\n\t}\n\n\tprivate pushCommitToTrunk(\n\t\tsequenceId: SequenceId,\n\t\tcommit: Commit<TChangeset>,\n\t\tlocal = false,\n\t): void {\n\t\tconst mintedCommit = mintCommit(this.trunk.getHead(), commit);\n\t\tthis.pushGraphCommitToTrunk(sequenceId, mintedCommit, commit.sessionId);\n\t}\n\n\tprivate pushGraphCommitToTrunk(\n\t\tsequenceId: SequenceId,\n\t\tgraphCommit: GraphCommit<TChangeset>,\n\t\tsessionId: SessionId,\n\t): void {\n\t\tthis.trunk.setHead(graphCommit);\n\t\tthis.localBranch.updateRevertibleCommit(graphCommit);\n\t\tconst trunkHead = this.trunk.getHead();\n\t\tthis.sequenceMap.set(sequenceId, trunkHead);\n\t\tthis.trunkMetadata.set(trunkHead.revision, { sequenceId, sessionId });\n\t}\n\n\t/**\n\t * Finds the most recent trunk commit that was sequenced at or before the given point.\n\t * @param searchBy - the sequence number or the sequence id to search for\n\t * @remarks Fails if there is no eligible commit.\n\t * @returns the closest commit and its sequence id\n\t */\n\tprivate getClosestTrunkCommit(searchBy: SeqNumber): [SequenceId, GraphCommit<TChangeset>];\n\tprivate getClosestTrunkCommit(searchBy: SequenceId): [SequenceId, GraphCommit<TChangeset>];\n\tprivate getClosestTrunkCommit(\n\t\tsearchBy: SeqNumber | SequenceId,\n\t): [SequenceId, GraphCommit<TChangeset>] {\n\t\tconst sequenceId: SequenceId =\n\t\t\ttypeof searchBy === \"number\"\n\t\t\t\t? {\n\t\t\t\t\t\t// This is to make sure that the correct commit is selected in this 2 scenarios:\n\t\t\t\t\t\t// 1) The commit is unique for that sequence number\n\t\t\t\t\t\t// 2) There are more than one commit for the same sequence number, in this case we need to select the last one.\n\t\t\t\t\t\tsequenceNumber: searchBy,\n\t\t\t\t\t\tindexInBatch: Number.POSITIVE_INFINITY,\n\t\t\t\t }\n\t\t\t\t: searchBy;\n\n\t\tconst commit = this.sequenceMap.getPairOrNextLower(sequenceId);\n\t\tassert(commit !== undefined, 0x746 /* sequence id has been evicted */);\n\t\treturn commit;\n\t}\n\n\tprivate getBatch(sequenceNumber: SeqNumber): [SequenceId, GraphCommit<TChangeset>][] {\n\t\tconst startSequenceId: SequenceId = {\n\t\t\tsequenceNumber,\n\t\t};\n\t\tconst endSequenceId: SequenceId = {\n\t\t\tsequenceNumber: brand((sequenceNumber as number) + 1),\n\t\t};\n\n\t\treturn this.sequenceMap.getRange(startSequenceId, endSequenceId, false);\n\t}\n}\n\n/**\n * The in-memory data that summaries contain\n */\nexport interface SummaryData<TChangeset> {\n\treadonly trunk: readonly SequencedCommit<TChangeset>[];\n\treadonly peerLocalBranches: ReadonlyMap<SessionId, SummarySessionBranch<TChangeset>>;\n}\n\n/**\n * @returns the path from the base of a branch to its head\n */\nfunction getPathFromBase<TCommit extends { parent?: TCommit }>(\n\tbranchHead: TCommit,\n\tbaseBranchHead: TCommit,\n): TCommit[] {\n\tconst path: TCommit[] = [];\n\tassert(\n\t\tfindCommonAncestor([branchHead, path], baseBranchHead) !== undefined,\n\t\t0x573 /* Expected branches to be related */,\n\t);\n\treturn path;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"editManager.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAKN,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGN,KAAK,EACL,IAAI,EACJ,WAAW,EACX,WAAW,GACX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQvF,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,6BAA6B,GAAc,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACvF,MAAM,yBAAyB,GAAe;IAC7C,cAAc,EAAE,6BAA6B;CAC7C,CAAC;AAEF;;;GAGG;AACH,sDAAsD;AACtD,MAAM,OAAO,WAAW;IAsEvB;;;OAGG;IACH,YACiB,YAA2B,EAC3B,cAAyB,EACxB,eAAkC;QAFnC,iBAAY,GAAZ,YAAY,CAAe;QAC3B,mBAAc,GAAd,cAAc,CAAW;QACxB,oBAAe,GAAf,eAAe,CAAmB;QArEpD;;;WAGG;QACc,kBAAa,GAAG,IAAI,GAAG,EAGrC,CAAC;QACJ;;;WAGG;QACc,gBAAW,GAAG,IAAI,KAAK,CACvC,SAAS,EACT,oBAAoB,CACpB,CAAC;QAEF;;;;WAIG;QACH,yGAAyG;QACxF,sBAAiB,GACjC,IAAI,GAAG,EAAE,CAAC;QAOX;;;WAGG;QACc,kBAAa,GAAG,IAAI,KAAK,CAGxC,SAAS,EAAE,oBA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AE,QAAQ;gBACxB,YAAY,EAAE,MAAM,CAAC,iBAAiB;aACrC;YACH,CAAC,CAAC,QAAQ,CAAC;QAEb,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAC/D,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC;IACf,CAAC;IAEO,QAAQ,CAAC,cAAyB;QACzC,MAAM,eAAe,GAAe;YACnC,cAAc;SACd,CAAC;QACF,MAAM,aAAa,GAAe;YACjC,cAAc,EAAE,KAAK,CAAE,cAAyB,GAAG,CAAC,CAAC;SACrD,CAAC;QAEF,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;IACzE,CAAC;CACD;AAUD;;GAEG;AACH,SAAS,eAAe,CACvB,UAAmB,EACnB,cAAuB;IAEvB,MAAM,IAAI,GAAc,EAAE,CAAC;IAC3B,MAAM,CACL,kBAAkB,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,cAAc,CAAC,KAAK,SAAS,EACpE,KAAK,CAAC,qCAAqC,CAC3C,CAAC;IACF,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { SessionId } from \"@fluidframework/id-compressor\";\nimport { BTree } from \"@tylerbu/sorted-btree-es6\";\n\nimport {\n\tChangeFamily,\n\tChangeFamilyEditor,\n\tGraphCommit,\n\tRevisionTag,\n\tfindAncestor,\n\tfindCommonAncestor,\n\tmintCommit,\n\trebaseChange,\n} from \"../core/index.js\";\nimport {\n\tMutable,\n\tRecursiveReadonly,\n\tbrand,\n\tfail,\n\tgetOrCreate,\n\tmapIterable,\n} from \"../util/index.js\";\n\nimport { SharedTreeBranch, getChangeReplaceType, onForkTransitive } from \"./branch.js\";\nimport {\n\tCommit,\n\tSeqNumber,\n\tSequenceId,\n\tSequencedCommit,\n\tSummarySessionBranch,\n} from \"./editManagerFormat.js\";\nimport {\n\tdecrementSequenceId,\n\tequalSequenceIds,\n\tmaxSequenceId,\n\tminSequenceId,\n\tsequenceIdComparator,\n} from \"./sequenceIdUtils.js\";\n\nexport const minimumPossibleSequenceNumber: SeqNumber = brand(Number.MIN_SAFE_INTEGER);\nconst minimumPossibleSequenceId: SequenceId = {\n\tsequenceNumber: minimumPossibleSequenceNumber,\n};\n\n/**\n * Represents a local branch of a document and interprets the effect on the document of adding sequenced changes,\n * which were based on a given session's branch, to the document history\n */\n// TODO: Try to reduce this to a single type parameter\nexport class EditManager<\n\tTEditor extends ChangeFamilyEditor,\n\tTChangeset,\n\tTChangeFamily extends ChangeFamily<TEditor, TChangeset>,\n> {\n\t/** The \"trunk\" branch. The trunk represents the list of received sequenced changes. */\n\tprivate readonly trunk: SharedTreeBranch<TEditor, TChangeset>;\n\n\t/**\n\t * Records extra data associated with commits in the {@link trunk}.\n\t * This does not include an entry for the {@link trunkBase}.\n\t */\n\tprivate readonly trunkMetadata = new Map<\n\t\tRevisionTag,\n\t\t{ sequenceId: SequenceId; sessionId: SessionId }\n\t>();\n\t/**\n\t * A map from a sequence id to the commit in the {@link trunk} which has that sequence id.\n\t * This also includes an entry for the {@link trunkBase} which always has the lowest key in the map.\n\t */\n\tprivate readonly sequenceMap = new BTree<SequenceId, GraphCommit<TChangeset>>(\n\t\tundefined,\n\t\tsequenceIdComparator,\n\t);\n\n\t/**\n\t * Branches are maintained to represent the local change list that the issuing client had\n\t * at the time of submitting the latest known edit on the branch.\n\t * This means the head commit of each branch is always in its original (non-rebased) form.\n\t */\n\t// TODO:#4593: Add test to ensure that peer branches are never initialized with a repairDataStoreProvider\n\tprivate readonly peerLocalBranches: Map<SessionId, SharedTreeBranch<TEditor, TChangeset>> =\n\t\tnew Map();\n\n\t/**\n\t * This branch holds the changes made by this client which have not yet been confirmed as sequenced changes.\n\t */\n\tpublic readonly localBranch: SharedTreeBranch<TEditor, TChangeset>;\n\n\t/**\n\t * Tracks where on the trunk all registered branches are based. Each key is the sequence id of a commit on\n\t * the trunk, and the value is the set of all branches who have that commit as their common ancestor with the trunk.\n\t */\n\tprivate readonly trunkBranches = new BTree<\n\t\tSequenceId,\n\t\tSet<SharedTreeBranch<TEditor, TChangeset>>\n\t>(undefined, sequenceIdComparator);\n\n\t/**\n\t * The sequence number of the newest commit on the trunk that has been received by all peers.\n\t * Defaults to {@link minimumPossibleSequenceNumber} if no commits have been received.\n\t *\n\t * @remarks If there are more than one commit with the same sequence number we assume this refers to the last commit in the batch.\n\t */\n\tprivate minimumSequenceNumber = minimumPossibleSequenceNumber;\n\n\t/**\n\t * A special commit that is a \"base\" (tail) of the trunk, though not part of the trunk itself.\n\t * This makes it possible to model the trunk in the same way as any other branch (it branches off of a base commit)\n\t * which allows it to use branching APIs to interact with the other branches.\n\t * Each time trunk eviction occurs, the most recent evicted commit becomes the new `trunkBase`.\n\t */\n\tprivate trunkBase: GraphCommit<TChangeset>;\n\n\t/**\n\t * The list of commits (from oldest to most recent) that are on the local branch but not on the trunk.\n\t * When a local commit is sequenced, the first commit in this list shifted onto the tip of the trunk.\n\t */\n\tprivate readonly localCommits: GraphCommit<TChangeset>[] = [];\n\n\t/**\n\t * @param changeFamily - the change family of changes on the trunk and local branch\n\t * @param localSessionId - the id of the local session that will be used for local commits\n\t */\n\tpublic constructor(\n\t\tpublic readonly changeFamily: TChangeFamily,\n\t\tpublic readonly localSessionId: SessionId,\n\t\tprivate readonly mintRevisionTag: () => RevisionTag,\n\t) {\n\t\tthis.trunkBase = {\n\t\t\trevision: \"root\",\n\t\t\tchange: changeFamily.rebaser.compose([]),\n\t\t};\n\t\tthis.sequenceMap.set(minimumPossibleSequenceId, this.trunkBase);\n\t\tthis.trunk = new SharedTreeBranch(this.trunkBase, changeFamily, mintRevisionTag);\n\t\tthis.localBranch = new SharedTreeBranch(\n\t\t\tthis.trunk.getHead(),\n\t\t\tchangeFamily,\n\t\t\tmintRevisionTag,\n\t\t);\n\n\t\tthis.localBranch.on(\"afterChange\", (event) => {\n\t\t\tif (event.type === \"append\") {\n\t\t\t\tfor (const commit of event.newCommits) {\n\t\t\t\t\tthis.localCommits.push(commit);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.localCommits.length = 0;\n\t\t\t\tfindCommonAncestor(\n\t\t\t\t\t[this.localBranch.getHead(), this.localCommits],\n\t\t\t\t\tthis.trunk.getHead(),\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\t// Track all forks of the local branch for purposes of trunk eviction. Unlike the local branch, they have\n\t\t// an unknown lifetime and rebase frequency, so we can not make any assumptions about which trunk commits\n\t\t// they require and therefore we monitor them explicitly.\n\t\tonForkTransitive(this.localBranch, (fork) => this.registerBranch(fork));\n\t}\n\n\t/**\n\t * Make the given branch known to the `EditManager`. The `EditManager` will ensure that all registered\n\t * branches remain usable even as the minimum sequence number advances.\n\t *\n\t * TODO#AB6926: Refactor local branch management into a separate class that encapsulates `trunkBranches` and everything\n\t * that touches it.\n\t * TODO#AB6925: Maintain the divergence point between each branch and the trunk so that we don't have to recompute\n\t * it so often.\n\t */\n\tprivate registerBranch(branch: SharedTreeBranch<TEditor, TChangeset>): void {\n\t\tthis.trackBranch(branch);\n\t\t// Whenever the branch is rebased, update our record of its base trunk commit\n\t\tconst offBeforeRebase = branch.on(\"beforeChange\", (args) => {\n\t\t\tif (args.type === \"replace\" && getChangeReplaceType(args) === \"rebase\") {\n\t\t\t\tthis.untrackBranch(branch);\n\t\t\t}\n\t\t});\n\t\tconst offAfterRebase = branch.on(\"afterChange\", (args) => {\n\t\t\tif (args.type === \"replace\" && getChangeReplaceType(args) === \"rebase\") {\n\t\t\t\tthis.trackBranch(branch);\n\t\t\t\tthis.trimTrunk();\n\t\t\t}\n\t\t});\n\t\t// When the branch is disposed, update our branch set and trim the trunk\n\t\tconst offDispose = branch.on(\"dispose\", () => {\n\t\t\tthis.untrackBranch(branch);\n\t\t\tthis.trimTrunk();\n\t\t\toffBeforeRebase();\n\t\t\toffAfterRebase();\n\t\t\toffDispose();\n\t\t});\n\t}\n\n\tprivate trackBranch(b: SharedTreeBranch<TEditor, TChangeset>): void {\n\t\tconst trunkCommit =\n\t\t\tfindCommonAncestor(this.trunk.getHead(), b.getHead()) ??\n\t\t\tfail(\"Expected branch to be related to trunk\");\n\t\tconst sequenceId = this.getCommitSequenceId(trunkCommit);\n\t\tconst branches = getOrCreate(this.trunkBranches, sequenceId, () => new Set());\n\n\t\tassert(!branches.has(b), 0x670 /* Branch was registered more than once */);\n\t\tbranches.add(b);\n\t}\n\n\tprivate untrackBranch(b: SharedTreeBranch<TEditor, TChangeset>): void {\n\t\tconst trunkCommit =\n\t\t\tfindCommonAncestor(this.trunk.getHead(), b.getHead()) ??\n\t\t\tfail(\"Expected branch to be related to trunk\");\n\t\tconst sequenceId = this.getCommitSequenceId(trunkCommit);\n\t\tconst branches =\n\t\t\tthis.trunkBranches.get(sequenceId) ?? fail(\"Expected branch to be tracked\");\n\n\t\tassert(branches.delete(b), 0x671 /* Expected branch to be tracked */);\n\t\tif (branches.size === 0) {\n\t\t\tthis.trunkBranches.delete(sequenceId);\n\t\t}\n\t}\n\n\t/**\n\t * Updates the `trunkBranches` map to reflect the fact that a new local commit was fast-forwarded to the trunk.\n\t * @param priorTrunkCommit - The trunk head prior to the fast-forward.\n\t * @param newId - The ID of the new trunk head.\n\t */\n\tprivate fastForwardBranches(\n\t\tpriorTrunkCommit: GraphCommit<TChangeset>,\n\t\tnewId: SequenceId,\n\t): void {\n\t\tconst currentId = this.getCommitSequenceId(priorTrunkCommit);\n\t\tconst currentBranches = this.trunkBranches.get(currentId);\n\t\tif (currentBranches !== undefined) {\n\t\t\tconst newBranches = getOrCreate(this.trunkBranches, newId, () => new Set());\n\t\t\tfor (const branch of currentBranches) {\n\t\t\t\tif (branch.getHead() !== priorTrunkCommit) {\n\t\t\t\t\tnewBranches.add(branch);\n\t\t\t\t\tcurrentBranches.delete(branch);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentBranches.size === 0) {\n\t\t\t\tthis.trunkBranches.delete(currentId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Advances the minimum sequence number, and removes all commits from the trunk which lie outside the collaboration window,\n\t * if they are not retained by revertibles or local branches.\n\t * @param minimumSequenceNumber - the sequence number of the newest commit that all peers (including this one) have received and applied to their trunks.\n\t *\n\t * @remarks If there are more than one commit with the same sequence number we assume this refers to the last commit in the batch.\n\t */\n\tpublic advanceMinimumSequenceNumber(minimumSequenceNumber: SeqNumber): void {\n\t\tif (minimumSequenceNumber === this.minimumSequenceNumber) {\n\t\t\treturn;\n\t\t}\n\n\t\tassert(\n\t\t\tminimumSequenceNumber > this.minimumSequenceNumber,\n\t\t\t0x476 /* number must be larger or equal to current minimumSequenceNumber. */,\n\t\t);\n\n\t\tthis.minimumSequenceNumber = minimumSequenceNumber;\n\t\tthis.trimTrunk();\n\t}\n\n\t/**\n\t * Examines the latest known minimum sequence number and the trunk bases of any registered branches to determine\n\t * if any commits on the trunk are unreferenced and unneeded for future computation; those found are evicted from the trunk.\n\t * @returns the number of commits that were removed from the trunk\n\t */\n\tprivate trimTrunk(): void {\n\t\t/** The sequence id of the oldest commit on the trunk that will be retained */\n\t\tlet trunkTailSequenceId: SequenceId = {\n\t\t\tsequenceNumber: this.minimumSequenceNumber,\n\t\t\tindexInBatch: Number.POSITIVE_INFINITY,\n\t\t};\n\t\t// If there are any outstanding registered branches, get the one that is the oldest (has the \"most behind\" trunk base)\n\t\tconst minimumBranchBaseSequenceId = this.trunkBranches.minKey();\n\t\tif (minimumBranchBaseSequenceId !== undefined) {\n\t\t\t// If that branch is behind the minimum sequence id, we only want to evict commits older than it,\n\t\t\t// even if those commits are behind the minimum sequence id\n\t\t\tconst sequenceIdBeforeMinimumBranchBase = decrementSequenceId(\n\t\t\t\tminimumBranchBaseSequenceId,\n\t\t\t);\n\t\t\ttrunkTailSequenceId = minSequenceId(\n\t\t\t\ttrunkTailSequenceId,\n\t\t\t\tsequenceIdBeforeMinimumBranchBase,\n\t\t\t);\n\t\t}\n\n\t\tconst [sequenceId, latestEvicted] = this.getClosestTrunkCommit(\n\t\t\tmaxSequenceId(\n\t\t\t\ttrunkTailSequenceId,\n\t\t\t\tthis.sequenceMap.minKey() ?? minimumPossibleSequenceId,\n\t\t\t),\n\t\t);\n\n\t\t// Don't do any work if the commit found by the search is already the tail of the trunk\n\t\tif (latestEvicted !== this.trunkBase) {\n\t\t\t// The minimum sequence number informs us that all peer branches are at least caught up to the tail commit,\n\t\t\t// so rebase them accordingly. This is necessary to prevent peer branches from referencing any evicted commits.\n\t\t\tfor (const [, branch] of this.peerLocalBranches) {\n\t\t\t\tbranch.rebaseOnto(this.trunk, latestEvicted);\n\t\t\t}\n\n\t\t\t// This mutation is a performance hack. If commits are truly immutable, then changing the trunk's tail requires\n\t\t\t// regenerating the entire commit graph. Instead, we can simply chop off the tail like this if we're certain\n\t\t\t// that there are no outstanding references to any of the commits being removed (other than the references via\n\t\t\t// the trunk). The peer branches have been rebased to the head of the trunk, the local branch is already rebased\n\t\t\t// to the head of the trunk, and all other branches are tracked by `trunkBranches` and known to be ahead of or at\n\t\t\t// `newTrunkBase`. Therefore, no branches should have unique references to any of the commits being evicted here.\n\t\t\t// We mutate the most recent of the evicted commits to become the new trunk base. That way, any other commits that\n\t\t\t// have parent pointers to the latest evicted commit will stay linked, even though that it is no longer part of the trunk.\n\t\t\tconst newTrunkBase = latestEvicted as Mutable<typeof latestEvicted>;\n\t\t\t// The metadata for new trunk base revision needs to be deleted before modifying it.\n\t\t\tthis.trunkMetadata.delete(newTrunkBase.revision);\n\t\t\t// Copying the revision of the old trunk base into the new trunk base means we don't need to write out the original\n\t\t\t// revision to summaries. All clients agree that the trunk base always has the same hardcoded revision.\n\t\t\tnewTrunkBase.revision = this.trunkBase.revision;\n\t\t\t// Overwriting the change is not strictly necessary, but done here for consistency (so all trunk bases are deeply equal).\n\t\t\tnewTrunkBase.change = this.trunkBase.change;\n\t\t\t// Dropping the parent field removes (transitively) all references to the evicted commits so they can be garbage collected.\n\t\t\tdelete newTrunkBase.parent;\n\t\t\tthis.trunkBase = newTrunkBase;\n\n\t\t\t// Update any state that is derived from trunk commits\n\t\t\tthis.sequenceMap.editRange(\n\t\t\t\tminimumPossibleSequenceId,\n\t\t\t\tsequenceId,\n\t\t\t\ttrue,\n\t\t\t\t(s, { revision }) => {\n\t\t\t\t\t// Cleanup look-aside data for each evicted commit\n\t\t\t\t\tthis.trunkMetadata.delete(revision);\n\t\t\t\t\t// Delete all evicted commits from `sequenceMap` except for the latest one, which is the new `trunkBase`\n\t\t\t\t\tif (equalSequenceIds(s, sequenceId)) {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\trevision === newTrunkBase.revision,\n\t\t\t\t\t\t\t0x729 /* Expected last evicted commit to be new trunk base */,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn { delete: true };\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tconst trunkSize = getPathFromBase(this.trunk.getHead(), this.trunkBase).length;\n\t\t\tassert(\n\t\t\t\tthis.sequenceMap.size === trunkSize + 1,\n\t\t\t\t0x744 /* The size of the sequenceMap must have one element more than the trunk */,\n\t\t\t);\n\t\t\tassert(\n\t\t\t\tthis.trunkMetadata.size === trunkSize,\n\t\t\t\t0x745 /* The size of the trunkMetadata must be the same as the trunk */,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn (\n\t\t\tthis.trunk.getHead() === this.trunkBase &&\n\t\t\tthis.peerLocalBranches.size === 0 &&\n\t\t\tthis.localBranch.getHead() === this.trunk.getHead() &&\n\t\t\tthis.minimumSequenceNumber === minimumPossibleSequenceNumber\n\t\t);\n\t}\n\n\tpublic getSummaryData(): SummaryData<TChangeset> {\n\t\t// The assert below is acceptable at present because summarization only ever occurs on a client with no\n\t\t// local/in-flight changes.\n\t\t// In the future we may wish to relax this constraint. For that to work, the current implementation of\n\t\t// `EditManager` would have to be amended in one of two ways:\n\t\t// A) Changes made by the local session should be represented by a branch in `EditManager.branches`.\n\t\t// B) The contents of such a branch should be computed on demand based on the trunk.\n\t\t// Note that option (A) would be a simple change to `addSequencedChange` whereas (B) would likely require\n\t\t// rebasing trunk changes over the inverse of trunk changes.\n\t\tassert(\n\t\t\tthis.localBranch.getHead() === this.trunk.getHead(),\n\t\t\t0x428 /* Clients with local changes cannot be used to generate summaries */,\n\t\t);\n\n\t\tlet oldestCommitInCollabWindow = this.getClosestTrunkCommit(this.minimumSequenceNumber)[1];\n\t\tassert(\n\t\t\toldestCommitInCollabWindow.parent !== undefined ||\n\t\t\t\toldestCommitInCollabWindow === this.trunkBase,\n\t\t\t0x8c7 /* Expected oldest commit in collab window to have a parent or be the trunk base */,\n\t\t);\n\n\t\t// Path construction is exclusive, so we need to use the parent of the oldest commit in the window if it exists\n\t\toldestCommitInCollabWindow =\n\t\t\toldestCommitInCollabWindow.parent ?? oldestCommitInCollabWindow;\n\n\t\tconst trunk = getPathFromBase(this.trunk.getHead(), oldestCommitInCollabWindow).map((c) => {\n\t\t\tconst metadata =\n\t\t\t\tthis.trunkMetadata.get(c.revision) ?? fail(\"Expected metadata for trunk commit\");\n\t\t\tconst commit: SequencedCommit<TChangeset> = {\n\t\t\t\tchange: c.change,\n\t\t\t\trevision: c.revision,\n\t\t\t\tsequenceNumber: metadata.sequenceId.sequenceNumber,\n\t\t\t\tsessionId: metadata.sessionId,\n\t\t\t};\n\t\t\tif (metadata.sequenceId.indexInBatch !== undefined) {\n\t\t\t\tcommit.indexInBatch = metadata.sequenceId.indexInBatch;\n\t\t\t}\n\t\t\treturn commit;\n\t\t});\n\n\t\tconst peerLocalBranches = new Map<SessionId, SummarySessionBranch<TChangeset>>(\n\t\t\tmapIterable(this.peerLocalBranches.entries(), ([sessionId, branch]) => {\n\t\t\t\tconst branchPath: GraphCommit<TChangeset>[] = [];\n\t\t\t\tconst ancestor =\n\t\t\t\t\tfindCommonAncestor([branch.getHead(), branchPath], this.trunk.getHead()) ??\n\t\t\t\t\tfail(\"Expected branch to be based on trunk\");\n\n\t\t\t\treturn [\n\t\t\t\t\tsessionId,\n\t\t\t\t\t{\n\t\t\t\t\t\tbase: ancestor.revision,\n\t\t\t\t\t\tcommits: branchPath.map((c) => {\n\t\t\t\t\t\t\tconst commit: Commit<TChangeset> = {\n\t\t\t\t\t\t\t\tchange: c.change,\n\t\t\t\t\t\t\t\trevision: c.revision,\n\t\t\t\t\t\t\t\tsessionId,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\treturn commit;\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t}),\n\t\t);\n\n\t\treturn { trunk, peerLocalBranches };\n\t}\n\n\tpublic loadSummaryData(data: SummaryData<TChangeset>): void {\n\t\tassert(\n\t\t\tthis.isEmpty(),\n\t\t\t0x68a /* Attempted to load from summary after edit manager was already mutated */,\n\t\t);\n\t\t// Record the tags of each trunk commit as we generate the trunk so they can be looked up quickly\n\t\t// when hydrating the peer branches below\n\t\tconst trunkRevisionCache = new Map<RevisionTag, GraphCommit<TChangeset>>();\n\t\ttrunkRevisionCache.set(this.trunkBase.revision, this.trunkBase);\n\t\tthis.trunk.setHead(\n\t\t\tdata.trunk.reduce((base, c) => {\n\t\t\t\tconst sequenceId: SequenceId =\n\t\t\t\t\tc.indexInBatch === undefined\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tsequenceNumber: c.sequenceNumber,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tsequenceNumber: c.sequenceNumber,\n\t\t\t\t\t\t\t\tindexInBatch: c.indexInBatch,\n\t\t\t\t\t\t };\n\t\t\t\tconst commit = mintCommit(base, c);\n\t\t\t\tthis.sequenceMap.set(sequenceId, commit);\n\t\t\t\tthis.trunkMetadata.set(c.revision, {\n\t\t\t\t\tsequenceId,\n\t\t\t\t\tsessionId: c.sessionId,\n\t\t\t\t});\n\t\t\t\ttrunkRevisionCache.set(c.revision, commit);\n\t\t\t\treturn commit;\n\t\t\t}, this.trunkBase),\n\t\t);\n\n\t\tthis.localBranch.setHead(this.trunk.getHead());\n\n\t\tfor (const [sessionId, branch] of data.peerLocalBranches) {\n\t\t\tconst commit =\n\t\t\t\ttrunkRevisionCache.get(branch.base) ??\n\t\t\t\tfail(\"Expected summary branch to be based off of a revision in the trunk\");\n\n\t\t\tthis.peerLocalBranches.set(\n\t\t\t\tsessionId,\n\t\t\t\tnew SharedTreeBranch(\n\t\t\t\t\tbranch.commits.reduce(mintCommit, commit),\n\t\t\t\t\tthis.changeFamily,\n\t\t\t\t\tthis.mintRevisionTag,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate getCommitSequenceId(commit: GraphCommit<TChangeset>): SequenceId {\n\t\treturn this.trunkMetadata.get(commit.revision)?.sequenceId ?? minimumPossibleSequenceId;\n\t}\n\n\tpublic getTrunkChanges(): readonly RecursiveReadonly<TChangeset>[] {\n\t\treturn this.getTrunkCommits().map((c) => c.change);\n\t}\n\n\tpublic getTrunkCommits(): readonly RecursiveReadonly<GraphCommit<TChangeset>>[] {\n\t\treturn getPathFromBase(this.trunk.getHead(), this.trunkBase);\n\t}\n\n\tpublic getTrunkHead(): GraphCommit<TChangeset> {\n\t\treturn this.trunk.getHead();\n\t}\n\n\tpublic getLocalChanges(): readonly RecursiveReadonly<TChangeset>[] {\n\t\treturn this.getLocalCommits().map((c) => c.change);\n\t}\n\n\tpublic getLocalCommits(): readonly RecursiveReadonly<GraphCommit<TChangeset>>[] {\n\t\treturn this.localCommits;\n\t}\n\n\t/**\n\t * @returns The length of the longest branch maintained by this EditManager.\n\t * This may be the length of a peer branch or the local branch.\n\t * The length is counted from the lowest common ancestor with the trunk such that a fully sequenced branch would\n\t * have length zero.\n\t */\n\tpublic getLongestBranchLength(): number {\n\t\tlet max = 0;\n\t\tconst trunkHead = this.trunk.getHead();\n\t\tfor (const branch of this.peerLocalBranches.values()) {\n\t\t\tconst branchPath = getPathFromBase(branch.getHead(), trunkHead);\n\t\t\tif (branchPath.length > max) {\n\t\t\t\tmax = branchPath.length;\n\t\t\t}\n\t\t}\n\t\tconst localPath = getPathFromBase(this.localBranch.getHead(), trunkHead);\n\t\treturn Math.max(max, localPath.length);\n\t}\n\n\tpublic addSequencedChange(\n\t\tnewCommit: Commit<TChangeset>,\n\t\tsequenceNumber: SeqNumber,\n\t\treferenceSequenceNumber: SeqNumber,\n\t): void {\n\t\tassert(\n\t\t\tsequenceNumber > this.minimumSequenceNumber,\n\t\t\t0x713 /* Expected change sequence number to exceed the last known minimum sequence number */,\n\t\t);\n\n\t\tconst commitsSequenceNumber = this.getBatch(sequenceNumber);\n\t\tconst sequenceId: SequenceId =\n\t\t\tcommitsSequenceNumber.length === 0\n\t\t\t\t? {\n\t\t\t\t\t\tsequenceNumber,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tsequenceNumber,\n\t\t\t\t\t\tindexInBatch: commitsSequenceNumber.length,\n\t\t\t\t };\n\n\t\tif (newCommit.sessionId === this.localSessionId) {\n\t\t\tconst headTrunkCommit = this.trunk.getHead();\n\t\t\tconst firstLocalCommit = this.localCommits.shift();\n\t\t\tassert(\n\t\t\t\tfirstLocalCommit !== undefined,\n\t\t\t\t0x6b5 /* Received a sequenced change from the local session despite having no local changes */,\n\t\t\t);\n\n\t\t\t// The first local branch commit is already rebased over the trunk, so we can push it directly to the trunk.\n\t\t\tthis.pushGraphCommitToTrunk(sequenceId, firstLocalCommit, this.localSessionId);\n\t\t\tthis.fastForwardBranches(headTrunkCommit, sequenceId);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the revision that the remote change is based on\n\t\tconst [, baseRevisionInTrunk] = this.getClosestTrunkCommit(referenceSequenceNumber);\n\t\t// Rebase that branch over the part of the trunk up to the base revision\n\t\t// This will be a no-op if the sending client has not advanced since the last time we received an edit from it\n\t\tconst peerLocalBranch = getOrCreate(\n\t\t\tthis.peerLocalBranches,\n\t\t\tnewCommit.sessionId,\n\t\t\t() =>\n\t\t\t\tnew SharedTreeBranch(baseRevisionInTrunk, this.changeFamily, this.mintRevisionTag),\n\t\t);\n\t\tpeerLocalBranch.rebaseOnto(this.trunk, baseRevisionInTrunk);\n\n\t\tif (peerLocalBranch.getHead() === this.trunk.getHead()) {\n\t\t\t// If the branch is fully caught up and empty after being rebased, then push to the trunk directly\n\t\t\tthis.pushCommitToTrunk(sequenceId, newCommit);\n\t\t\tpeerLocalBranch.setHead(this.trunk.getHead());\n\t\t} else {\n\t\t\t// Otherwise, rebase the change over the trunk and append it, and append the original change to the peer branch.\n\t\t\tconst newChangeFullyRebased = rebaseChange(\n\t\t\t\tthis.changeFamily.rebaser,\n\t\t\t\tnewCommit.change,\n\t\t\t\tpeerLocalBranch.getHead(),\n\t\t\t\tthis.trunk.getHead(),\n\t\t\t\tthis.mintRevisionTag,\n\t\t\t);\n\n\t\t\tpeerLocalBranch.apply(newCommit.change, newCommit.revision);\n\t\t\tthis.pushCommitToTrunk(sequenceId, {\n\t\t\t\t...newCommit,\n\t\t\t\tchange: newChangeFullyRebased,\n\t\t\t});\n\t\t}\n\n\t\tthis.localBranch.rebaseOnto(this.trunk);\n\t}\n\n\tpublic findLocalCommit(\n\t\trevision: RevisionTag,\n\t): [commit: GraphCommit<TChangeset>, commitsAfter: GraphCommit<TChangeset>[]] {\n\t\tconst commits: GraphCommit<TChangeset>[] = [];\n\t\tconst commit = findAncestor(\n\t\t\t[this.localBranch.getHead(), commits],\n\t\t\t(c) => c.revision === revision,\n\t\t);\n\t\tassert(commit !== undefined, 0x599 /* Expected local branch to contain revision */);\n\t\treturn [commit, commits];\n\t}\n\n\tprivate pushCommitToTrunk(\n\t\tsequenceId: SequenceId,\n\t\tcommit: Commit<TChangeset>,\n\t\tlocal = false,\n\t): void {\n\t\tconst mintedCommit = mintCommit(this.trunk.getHead(), commit);\n\t\tthis.pushGraphCommitToTrunk(sequenceId, mintedCommit, commit.sessionId);\n\t}\n\n\tprivate pushGraphCommitToTrunk(\n\t\tsequenceId: SequenceId,\n\t\tgraphCommit: GraphCommit<TChangeset>,\n\t\tsessionId: SessionId,\n\t): void {\n\t\tthis.trunk.setHead(graphCommit);\n\t\tconst trunkHead = this.trunk.getHead();\n\t\tthis.sequenceMap.set(sequenceId, trunkHead);\n\t\tthis.trunkMetadata.set(trunkHead.revision, { sequenceId, sessionId });\n\t}\n\n\t/**\n\t * Finds the most recent trunk commit that was sequenced at or before the given point.\n\t * @param searchBy - the sequence number or the sequence id to search for\n\t * @remarks Fails if there is no eligible commit.\n\t * @returns the closest commit and its sequence id\n\t */\n\tprivate getClosestTrunkCommit(searchBy: SeqNumber): [SequenceId, GraphCommit<TChangeset>];\n\tprivate getClosestTrunkCommit(searchBy: SequenceId): [SequenceId, GraphCommit<TChangeset>];\n\tprivate getClosestTrunkCommit(\n\t\tsearchBy: SeqNumber | SequenceId,\n\t): [SequenceId, GraphCommit<TChangeset>] {\n\t\tconst sequenceId: SequenceId =\n\t\t\ttypeof searchBy === \"number\"\n\t\t\t\t? {\n\t\t\t\t\t\t// This is to make sure that the correct commit is selected in this 2 scenarios:\n\t\t\t\t\t\t// 1) The commit is unique for that sequence number\n\t\t\t\t\t\t// 2) There are more than one commit for the same sequence number, in this case we need to select the last one.\n\t\t\t\t\t\tsequenceNumber: searchBy,\n\t\t\t\t\t\tindexInBatch: Number.POSITIVE_INFINITY,\n\t\t\t\t }\n\t\t\t\t: searchBy;\n\n\t\tconst commit = this.sequenceMap.getPairOrNextLower(sequenceId);\n\t\tassert(commit !== undefined, 0x746 /* sequence id has been evicted */);\n\t\treturn commit;\n\t}\n\n\tprivate getBatch(sequenceNumber: SeqNumber): [SequenceId, GraphCommit<TChangeset>][] {\n\t\tconst startSequenceId: SequenceId = {\n\t\t\tsequenceNumber,\n\t\t};\n\t\tconst endSequenceId: SequenceId = {\n\t\t\tsequenceNumber: brand((sequenceNumber as number) + 1),\n\t\t};\n\n\t\treturn this.sequenceMap.getRange(startSequenceId, endSequenceId, false);\n\t}\n}\n\n/**\n * The in-memory data that summaries contain\n */\nexport interface SummaryData<TChangeset> {\n\treadonly trunk: readonly SequencedCommit<TChangeset>[];\n\treadonly peerLocalBranches: ReadonlyMap<SessionId, SummarySessionBranch<TChangeset>>;\n}\n\n/**\n * @returns the path from the base of a branch to its head\n */\nfunction getPathFromBase<TCommit extends { parent?: TCommit }>(\n\tbranchHead: TCommit,\n\tbaseBranchHead: TCommit,\n): TCommit[] {\n\tconst path: TCommit[] = [];\n\tassert(\n\t\tfindCommonAncestor([branchHead, path], baseBranchHead) !== undefined,\n\t\t0x573 /* Expected branches to be related */,\n\t);\n\treturn path;\n}\n"]}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ICodecOptions, IJsonCodec
|
|
6
|
-
import { ChangeEncodingContext, EncodedRevisionTag, RevisionTag } from "../core/index.js";
|
|
7
|
-
import { SchemaAndPolicy } from "../feature-libraries/index.js";
|
|
5
|
+
import { type ICodecFamily, ICodecOptions, IJsonCodec } from "../codec/index.js";
|
|
6
|
+
import { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
|
|
8
7
|
import { JsonCompatibleReadOnly } from "../util/index.js";
|
|
9
8
|
import { SummaryData } from "./editManager.js";
|
|
10
9
|
export interface EditManagerEncodingContext {
|
|
11
10
|
readonly schema?: SchemaAndPolicy;
|
|
12
11
|
}
|
|
13
|
-
export declare function makeEditManagerCodec<TChangeset>(
|
|
12
|
+
export declare function makeEditManagerCodec<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, writeVersion: number): IJsonCodec<SummaryData<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, EditManagerEncodingContext>;
|
|
13
|
+
export declare function makeEditManagerCodecs<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions): ICodecFamily<SummaryData<TChangeset>, EditManagerEncodingContext>;
|
|
14
14
|
//# sourceMappingURL=editManagerCodecs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,aAAa,EACb,UAAU,
|
|
1
|
+
{"version":3,"file":"editManagerCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,YAAY,EACjB,aAAa,EACb,UAAU,EAIV,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,sBAAsB,EAGtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAC9C,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,qBAAqB,CAAC,EAC7D,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,MAAM,GAClB,UAAU,CACZ,WAAW,CAAC,UAAU,CAAC,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,CAC1B,CAGA;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAC/C,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,qBAAqB,CAAC,EAC7D,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,aAAa,GACpB,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC,CAKnE"}
|
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { makeCodecFamily, withSchemaValidation, } from "../codec/index.js";
|
|
6
|
+
import { makeVersionDispatchingCodec } from "../codec/index.js";
|
|
6
7
|
import { JsonCompatibleReadOnlySchema, mapIterable, } from "../util/index.js";
|
|
7
|
-
import { EncodedEditManager
|
|
8
|
-
export function makeEditManagerCodec(
|
|
8
|
+
import { EncodedEditManager } from "./editManagerFormat.js";
|
|
9
|
+
export function makeEditManagerCodec(changeCodecs, revisionTagCodec, options, writeVersion) {
|
|
10
|
+
const family = makeEditManagerCodecs(changeCodecs, revisionTagCodec, options);
|
|
11
|
+
return makeVersionDispatchingCodec(family, { ...options, writeVersion });
|
|
12
|
+
}
|
|
13
|
+
export function makeEditManagerCodecs(changeCodecs, revisionTagCodec, options) {
|
|
14
|
+
return makeCodecFamily([
|
|
15
|
+
[1, makeV1CodecWithVersion(changeCodecs.resolve(1), revisionTagCodec, options, 1)],
|
|
16
|
+
[2, makeV1CodecWithVersion(changeCodecs.resolve(2), revisionTagCodec, options, 2)],
|
|
17
|
+
]);
|
|
18
|
+
}
|
|
19
|
+
function makeV1CodecWithVersion(changeCodec, revisionTagCodec, options, version) {
|
|
9
20
|
const format = EncodedEditManager(changeCodec.json.encodedSchema ?? JsonCompatibleReadOnlySchema);
|
|
10
21
|
const encodeCommit = (commit, context) => ({
|
|
11
22
|
...commit,
|
|
@@ -17,7 +28,7 @@ export function makeEditManagerCodec(changeCodec, revisionTagCodec, options) {
|
|
|
17
28
|
revision: revisionTagCodec.decode(commit.revision, { originatorId: commit.sessionId }),
|
|
18
29
|
change: changeCodec.json.decode(commit.change, context),
|
|
19
30
|
});
|
|
20
|
-
const codec =
|
|
31
|
+
const codec = withSchemaValidation(format, {
|
|
21
32
|
encode: (data, context) => {
|
|
22
33
|
const json = {
|
|
23
34
|
trunk: data.trunk.map((commit) => encodeCommit(commit, {
|
|
@@ -53,7 +64,9 @@ export function makeEditManagerCodec(changeCodec, revisionTagCodec, options) {
|
|
|
53
64
|
peerLocalBranches: new Map(mapIterable(json.branches, ([sessionId, branch]) => [
|
|
54
65
|
sessionId,
|
|
55
66
|
{
|
|
56
|
-
base: revisionTagCodec.decode(branch.base, {
|
|
67
|
+
base: revisionTagCodec.decode(branch.base, {
|
|
68
|
+
originatorId: sessionId,
|
|
69
|
+
}),
|
|
57
70
|
commits: branch.commits.map((commit) =>
|
|
58
71
|
// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.
|
|
59
72
|
decodeCommit(commit, {
|
|
@@ -63,7 +76,7 @@ export function makeEditManagerCodec(changeCodec, revisionTagCodec, options) {
|
|
|
63
76
|
])),
|
|
64
77
|
};
|
|
65
78
|
},
|
|
66
|
-
});
|
|
79
|
+
}, options.jsonValidator);
|
|
67
80
|
// TODO: makeVersionedValidatedCodec and withSchemaValidation should allow the codec to decode JsonCompatibleReadOnly, or Versioned or something like that,
|
|
68
81
|
// and not leak the internal encoded format in the API surface.
|
|
69
82
|
// Fixing that would remove the need for this cast.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"editManagerCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKN,eAAe,EACf,oBAAoB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAOhE,OAAO,EAEN,4BAA4B,EAC5B,WAAW,GACX,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAyB,kBAAkB,EAAmB,MAAM,wBAAwB,CAAC;AAMpG,MAAM,UAAU,oBAAoB,CACnC,YAA6D,EAC7D,gBAKC,EACD,OAAsB,EACtB,YAAoB;IAOpB,MAAM,MAAM,GAAG,qBAAqB,CAAC,YAAY,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC9E,OAAO,2BAA2B,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,qBAAqB,CACpC,YAA6D,EAC7D,gBAKC,EACD,OAAsB;IAEtB,OAAO,eAAe,CAAC;QACtB,CAAC,CAAC,EAAE,sBAAsB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;QAClF,CAAC,CAAC,EAAE,sBAAsB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;KAClF,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAC9B,WAKC,EACD,gBAKC,EACD,OAAsB,EACtB,OAAkD;IAOlD,MAAM,MAAM,GAAG,kBAAkB,CAChC,WAAW,CAAC,IAAI,CAAC,aAAa,IAAI,4BAA4B,CAC9D,CAAC;IAEF,MAAM,YA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,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACtC,YAAY,CAAC,MAAM,EAAE;4BACpB,YAAY,EAAE,MAAM,CAAC,SAAS;4BAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;yBACtB,CAAC,CACF;qBACD;iBACD,CACD;gBACD,OAAO;aACP,CAAC;YACF,OAAO,IAAI,CAAC;QACb,CAAC;QACD,MAAM,EAAE,CAAC,IAAoC,EAA2B,EAAE;YACzE,kFAAkF;YAClF,MAAM,KAAK,GAAmB,IAAI,CAAC,KAAK,CAAC;YACzC,OAAO;gBACN,KAAK,EAAE,KAAK,CAAC,GAAG,CACf,CAAC,MAAM,EAA+B,EAAE;gBACvC,iFAAiF;gBACjF,+DAA+D;gBAC/D,YAAY,CAAC,MAAM,EAAE;oBACpB,YAAY,EAAE,MAAM,CAAC,SAAS;iBAC9B,CAAC,CACH;gBACD,iBAAiB,EAAE,IAAI,GAAG,CACzB,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;oBACnD,SAAS;oBACT;wBACC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;4BAC1C,YAAY,EAAE,SAAS;yBACvB,CAAC;wBACF,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;wBACtC,iFAAiF;wBACjF,YAAY,CAAC,MAA+C,EAAE;4BAC7D,YAAY,EAAE,MAAM,CAAC,SAAS;yBAC9B,CAAC,CACF;qBACD;iBACD,CAAC,CACF;aACD,CAAC;QACH,CAAC;KACD,EACD,OAAO,CAAC,aAAa,CACrB,CAAC;IACF,2JAA2J;IAC3J,+DAA+D;IAC/D,mDAAmD;IACnD,OAAO,KAKN,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype ICodecFamily,\n\tICodecOptions,\n\tIJsonCodec,\n\tIMultiFormatCodec,\n\tmakeCodecFamily,\n\twithSchemaValidation,\n} from \"../codec/index.js\";\nimport { makeVersionDispatchingCodec } from \"../codec/index.js\";\nimport {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlySchema,\n\tmapIterable,\n} from \"../util/index.js\";\n\nimport { SummaryData } from \"./editManager.js\";\nimport { Commit, EncodedCommit, EncodedEditManager, SequencedCommit } from \"./editManagerFormat.js\";\n\nexport interface EditManagerEncodingContext {\n\treadonly schema?: SchemaAndPolicy;\n}\n\nexport function makeEditManagerCodec<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n\twriteVersion: number,\n): IJsonCodec<\n\tSummaryData<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tEditManagerEncodingContext\n> {\n\tconst family = makeEditManagerCodecs(changeCodecs, revisionTagCodec, options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\nexport function makeEditManagerCodecs<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n): ICodecFamily<SummaryData<TChangeset>, EditManagerEncodingContext> {\n\treturn makeCodecFamily([\n\t\t[1, makeV1CodecWithVersion(changeCodecs.resolve(1), revisionTagCodec, options, 1)],\n\t\t[2, makeV1CodecWithVersion(changeCodecs.resolve(2), revisionTagCodec, options, 2)],\n\t]);\n}\n\nfunction makeV1CodecWithVersion<TChangeset>(\n\tchangeCodec: IMultiFormatCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n\tversion: EncodedEditManager<TChangeset>[\"version\"],\n): IJsonCodec<\n\tSummaryData<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tEditManagerEncodingContext\n> {\n\tconst format = EncodedEditManager(\n\t\tchangeCodec.json.encodedSchema ?? JsonCompatibleReadOnlySchema,\n\t);\n\n\tconst encodeCommit = <T extends Commit<TChangeset>>(\n\t\tcommit: T,\n\t\tcontext: ChangeEncodingContext,\n\t) => ({\n\t\t...commit,\n\t\trevision: revisionTagCodec.encode(commit.revision, { originatorId: commit.sessionId }),\n\t\tchange: changeCodec.json.encode(commit.change, context),\n\t});\n\n\tconst decodeCommit = <T extends EncodedCommit<JsonCompatibleReadOnly>>(\n\t\tcommit: T,\n\t\tcontext: ChangeEncodingContext,\n\t) => ({\n\t\t...commit,\n\t\trevision: revisionTagCodec.decode(commit.revision, { originatorId: commit.sessionId }),\n\t\tchange: changeCodec.json.decode(commit.change, context),\n\t});\n\n\tconst codec: IJsonCodec<\n\t\tSummaryData<TChangeset>,\n\t\tEncodedEditManager<TChangeset>,\n\t\tEncodedEditManager<TChangeset>,\n\t\tEditManagerEncodingContext\n\t> = withSchemaValidation(\n\t\tformat,\n\t\t{\n\t\t\tencode: (data, context: EditManagerEncodingContext) => {\n\t\t\t\tconst json: EncodedEditManager<TChangeset> = {\n\t\t\t\t\ttrunk: data.trunk.map((commit) =>\n\t\t\t\t\t\tencodeCommit(commit, {\n\t\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t\tbranches: Array.from(\n\t\t\t\t\t\tdata.peerLocalBranches.entries(),\n\t\t\t\t\t\t([sessionId, branch]) => [\n\t\t\t\t\t\t\tsessionId,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbase: revisionTagCodec.encode(branch.base, {\n\t\t\t\t\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\t\t\t\t\tencodeCommit(commit, {\n\t\t\t\t\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t),\n\t\t\t\t\tversion,\n\t\t\t\t};\n\t\t\t\treturn json;\n\t\t\t},\n\t\t\tdecode: (json: EncodedEditManager<TChangeset>): SummaryData<TChangeset> => {\n\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `any`.\n\t\t\t\tconst trunk: readonly any[] = json.trunk;\n\t\t\t\treturn {\n\t\t\t\t\ttrunk: trunk.map(\n\t\t\t\t\t\t(commit): SequencedCommit<TChangeset> =>\n\t\t\t\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\t\t\t\t\tdecodeCommit(commit, {\n\t\t\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t\tpeerLocalBranches: new Map(\n\t\t\t\t\t\tmapIterable(json.branches, ([sessionId, branch]) => [\n\t\t\t\t\t\t\tsessionId,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbase: revisionTagCodec.decode(branch.base, {\n\t\t\t\t\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\t\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\t\t\t\t\t\tdecodeCommit(commit as EncodedCommit<JsonCompatibleReadOnly>, {\n\t\t\t\t\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]),\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\toptions.jsonValidator,\n\t);\n\t// TODO: makeVersionedValidatedCodec and withSchemaValidation should allow the codec to decode JsonCompatibleReadOnly, or Versioned or something like that,\n\t// and not leak the internal encoded format in the API surface.\n\t// Fixing that would remove the need for this cast.\n\treturn codec as unknown as IJsonCodec<\n\t\tSummaryData<TChangeset>,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tEditManagerEncodingContext\n\t>;\n}\n"]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { TSchema, Static } from "@sinclair/typebox";
|
|
6
5
|
import { SessionId } from "@fluidframework/id-compressor";
|
|
6
|
+
import { Static, TSchema } from "@sinclair/typebox";
|
|
7
|
+
import { EncodedRevisionTag, RevisionTag } from "../core/index.js";
|
|
7
8
|
import { Brand } from "../util/index.js";
|
|
8
|
-
import { RevisionTag, EncodedRevisionTag } from "../core/index.js";
|
|
9
9
|
/**
|
|
10
10
|
* Contains a single change to the `SharedTree` and associated metadata.
|
|
11
11
|
*
|
|
@@ -51,11 +51,10 @@ export interface EncodedSummarySessionBranch<TChangeset> {
|
|
|
51
51
|
export interface EncodedEditManager<TChangeset> {
|
|
52
52
|
readonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];
|
|
53
53
|
readonly branches: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];
|
|
54
|
-
readonly version:
|
|
54
|
+
readonly version: 1 | 2;
|
|
55
55
|
}
|
|
56
|
-
export declare const version = 1;
|
|
57
56
|
export declare const EncodedEditManager: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
|
|
58
|
-
version: import("@sinclair/typebox").TLiteral<1>;
|
|
57
|
+
version: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<1>, import("@sinclair/typebox").TLiteral<2>]>;
|
|
59
58
|
trunk: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<import("@sinclair/typebox").TCompositeReduce<[import("@sinclair/typebox").TObject<{
|
|
60
59
|
revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
|
|
61
60
|
change: ChangeSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerFormat.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"editManagerFormat.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAiB,MAAM,EAAE,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EACN,kBAAkB,EAClB,WAAW,EAGX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAqB,MAAM,kBAAkB,CAAC;AAE5D;;;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AC,CAAC,CAAC,EAAE,CAAC;IAC7F,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;CACxB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAQ7B,CAAC"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
|
+
import { RevisionTagSchema, SessionIdSchema, } from "../core/index.js";
|
|
6
7
|
import { brandedNumberType } from "../util/index.js";
|
|
7
|
-
import { SessionIdSchema, RevisionTagSchema, } from "../core/index.js";
|
|
8
8
|
const noAdditionalProps = { additionalProperties: false };
|
|
9
9
|
const CommitBase = (tChange) => Type.Object({
|
|
10
10
|
revision: RevisionTagSchema,
|
|
@@ -26,9 +26,8 @@ const SummarySessionBranch = (tChange) => Type.Object({
|
|
|
26
26
|
base: RevisionTagSchema,
|
|
27
27
|
commits: Type.Array(Commit(tChange)),
|
|
28
28
|
}, noAdditionalProps);
|
|
29
|
-
export const version = 1.0;
|
|
30
29
|
export const EncodedEditManager = (tChange) => Type.Object({
|
|
31
|
-
version: Type.Literal(
|
|
30
|
+
version: Type.Union([Type.Literal(1), Type.Literal(2)]),
|
|
32
31
|
trunk: Type.Array(SequencedCommit(tChange)),
|
|
33
32
|
branches: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),
|
|
34
33
|
}, noAdditionalProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerFormat.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"editManagerFormat.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAkC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAGN,iBAAiB,EACjB,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,IAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAClF,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SessionId } from \"@fluidframework/id-compressor\";\nimport { ObjectOptions, Static, TSchema, Type } from \"@sinclair/typebox\";\n\nimport {\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tRevisionTagSchema,\n\tSessionIdSchema,\n} from \"../core/index.js\";\nimport { Brand, brandedNumberType } from \"../util/index.js\";\n\n/**\n * Contains a single change to the `SharedTree` and associated metadata.\n *\n * TODO: if this type is not used in the encoded format, move it out of this file, and stop using it in EncodedEditManager.\n * If this is an encoded format, clarify the difference between it and EncodedCommit.\n */\nexport interface Commit<TChangeset> {\n\treadonly revision: RevisionTag;\n\treadonly change: TChangeset;\n\t/** An identifier representing the session/user/client that made this commit */\n\treadonly sessionId: SessionId;\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type EncodedCommit<TChangeset> = {\n\treadonly revision: EncodedRevisionTag;\n\treadonly change: TChangeset;\n\treadonly sessionId: SessionId;\n};\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nconst CommitBase = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: RevisionTagSchema,\n\t\tchange: tChange,\n\t\tsessionId: SessionIdSchema,\n\t});\n/**\n * @privateRemarks Commits are generally encoded from `GraphCommit`s, which often contain extra data.\n * This `noAdditionalProps` is especially important in that light.\n */\nconst Commit = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Composite([CommitBase(tChange)], noAdditionalProps);\n\nexport type SeqNumber = Brand<number, \"edit-manager.SeqNumber\">;\nconst SeqNumber = brandedNumberType<SeqNumber>({ multipleOf: 1 });\n\nconst SequenceId = Type.Object({\n\tsequenceNumber: SeqNumber,\n\tindexInBatch: Type.Optional(Type.Number({ multipleOf: 1, minimum: 0 })),\n});\n\nexport type SequenceId = Static<typeof SequenceId>;\n\n/**\n * A commit with a sequence number but no parentage; used for serializing the `EditManager` into a summary\n */\nexport interface SequencedCommit<TChangeset> extends Commit<TChangeset>, SequenceId {}\n\nconst SequencedCommit = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Composite([CommitBase(tChange), SequenceId], noAdditionalProps);\n\n/**\n * A branch off of the trunk for use in summaries.\n *\n * TODO: if this type is not used in the encoded format, move it out of this file, and stop using it in EncodedEditManager.\n * If this is an encoded format, use EncodedCommit instead of Commit or clarify that Commit is also an encoded format.\n */\nexport interface SummarySessionBranch<TChangeset> {\n\treadonly base: RevisionTag;\n\treadonly commits: Commit<TChangeset>[];\n}\n\nexport interface EncodedSummarySessionBranch<TChangeset> {\n\treadonly base: EncodedRevisionTag;\n\treadonly commits: Commit<TChangeset>[];\n}\nconst SummarySessionBranch = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tbase: RevisionTagSchema,\n\t\t\tcommits: Type.Array(Commit(tChange)),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\nexport interface EncodedEditManager<TChangeset> {\n\treadonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];\n\treadonly branches: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];\n\treadonly version: 1 | 2;\n}\n\nexport const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tversion: Type.Union([Type.Literal(1), Type.Literal(2)]),\n\t\t\ttrunk: Type.Array(SequencedCommit(tChange)),\n\t\t\tbranches: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n"]}
|
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { IChannelStorageService } from "@fluidframework/datastore-definitions";
|
|
6
6
|
import { IGarbageCollectionData, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { IJsonCodec } from "../codec/index.js";
|
|
8
|
+
import { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from "../core/index.js";
|
|
9
|
+
import { JsonCompatibleReadOnly } from "../util/index.js";
|
|
10
|
+
import { EditManager, SummaryData } from "./editManager.js";
|
|
11
|
+
import { EditManagerEncodingContext } from "./editManagerCodecs.js";
|
|
10
12
|
import { Summarizable, SummaryElementParser, SummaryElementStringifier } from "./sharedTreeCore.js";
|
|
11
|
-
import { EditManager } from "./editManager.js";
|
|
12
13
|
/**
|
|
13
14
|
* Provides methods for summarizing and loading an `EditManager`
|
|
14
15
|
*/
|
|
15
16
|
export declare class EditManagerSummarizer<TChangeset> implements Summarizable {
|
|
16
17
|
private readonly editManager;
|
|
18
|
+
private readonly codec;
|
|
17
19
|
private readonly schemaAndPolicy?;
|
|
18
20
|
readonly key = "EditManager";
|
|
19
|
-
|
|
20
|
-
constructor(editManager: EditManager<ChangeFamilyEditor, TChangeset, ChangeFamily<ChangeFamilyEditor, TChangeset>>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, schemaAndPolicy?: SchemaAndPolicy | undefined);
|
|
21
|
+
constructor(editManager: EditManager<ChangeFamilyEditor, TChangeset, ChangeFamily<ChangeFamilyEditor, TChangeset>>, codec: IJsonCodec<SummaryData<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, EditManagerEncodingContext>, schemaAndPolicy?: SchemaAndPolicy | undefined);
|
|
21
22
|
getAttachSummary(stringify: SummaryElementStringifier, fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
22
23
|
summarize(stringify: SummaryElementStringifier, fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
|
|
23
24
|
private summarizeCore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerSummarizer.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EACN,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"editManagerSummarizer.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EACN,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAIpG;;GAEG;AACH,qBAAa,qBAAqB,CAAC,UAAU,CAAE,YAAW,YAAY;IAIpE,OAAO,CAAC,QAAQ,CAAC,WAAW;IAK5B,OAAO,CAAC,QAAQ,CAAC,KAAK;IAMtB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;IAdlC,SAAgB,GAAG,iBAAiB;gBAGlB,WAAW,EAAE,WAAW,CACxC,kBAAkB,EAClB,UAAU,EACV,YAAY,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAC5C,EACgB,KAAK,EAAE,UAAU,CACjC,WAAW,CAAC,UAAU,CAAC,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,CAC1B,EACgB,eAAe,CAAC,6BAAiB;IAG5C,gBAAgB,CACtB,SAAS,EAAE,yBAAyB,EACpC,QAAQ,CAAC,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,OAAO,EACpB,gBAAgB,CAAC,EAAE,iBAAiB,GAClC,qBAAqB;IAIX,SAAS,CACrB,SAAS,EAAE,yBAAyB,EACpC,QAAQ,CAAC,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,OAAO,EACpB,gBAAgB,CAAC,EAAE,iBAAiB,GAClC,OAAO,CAAC,qBAAqB,CAAC;IAIjC,OAAO,CAAC,aAAa;IAQd,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,sBAAsB;IAU7C,IAAI,CAChB,QAAQ,EAAE,sBAAsB,EAChC,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,IAAI,CAAC;CAehB"}
|
|
@@ -3,21 +3,18 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { bufferToString } from "@fluid-internal/client-utils";
|
|
6
|
-
import { assert } from "@fluidframework/core-utils";
|
|
7
|
-
import { createSingleBlobSummary } from "@fluidframework/shared-object-base";
|
|
8
|
-
import { makeEditManagerCodec } from "./editManagerCodecs.js";
|
|
6
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import { createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";
|
|
9
8
|
const stringKey = "String";
|
|
10
|
-
const formatVersion = 0;
|
|
11
9
|
/**
|
|
12
10
|
* Provides methods for summarizing and loading an `EditManager`
|
|
13
11
|
*/
|
|
14
12
|
export class EditManagerSummarizer {
|
|
15
|
-
constructor(editManager,
|
|
13
|
+
constructor(editManager, codec, schemaAndPolicy) {
|
|
16
14
|
this.editManager = editManager;
|
|
15
|
+
this.codec = codec;
|
|
17
16
|
this.schemaAndPolicy = schemaAndPolicy;
|
|
18
17
|
this.key = "EditManager";
|
|
19
|
-
const changesetCodec = this.editManager.changeFamily.codecs.resolve(formatVersion);
|
|
20
|
-
this.codec = makeEditManagerCodec(changesetCodec, revisionTagCodec, options);
|
|
21
18
|
}
|
|
22
19
|
getAttachSummary(stringify, fullTree, trackState, telemetryContext) {
|
|
23
20
|
return this.summarizeCore(stringify);
|