@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeFamily.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAA+B,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAEN,WAAW,EAOX,SAAS,EACT,cAAc,EAId,mBAAmB,EAGnB,8BAA8B,EAE9B,kBAAkB,EAClB,UAAU,EASV,cAAc,GAGd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,EACL,mBAAmB,EACnB,IAAI,EACJ,kBAAkB,EAClB,aAAa,EAGb,oBAAoB,EACpB,oBAAoB,EAEpB,iBAAiB,EACjB,cAAc,EACd,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C,EAAE;QACpD,OAAO,SAAS,CAAC;KACjB;IACD,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7B,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\";\nimport { ICodecFamily, ICodecOptions, makeCodecFamily } from \"../../codec/index.js\";\nimport {\n\tChangeFamily,\n\tEditBuilder,\n\tChangeRebaser,\n\tFieldKindIdentifier,\n\tFieldKey,\n\tUpPath,\n\tTaggedChange,\n\tRevisionTag,\n\ttagChange,\n\tmakeAnonChange,\n\tChangeFamilyEditor,\n\tFieldUpPath,\n\tChangesetLocalId,\n\tisEmptyFieldChanges,\n\tRevisionMetadataSource,\n\tRevisionInfo,\n\trevisionMetadataSourceFromInfo,\n\tChangeAtomIdMap,\n\tmakeDetachedNodeId,\n\temptyDelta,\n\tDeltaFieldMap,\n\tDeltaFieldChanges,\n\tDeltaDetachedNodeBuild,\n\tDeltaDetachedNodeDestruction,\n\tDeltaRoot,\n\tDeltaDetachedNodeId,\n\tChangeEncodingContext,\n\tRevisionTagCodec,\n\tmapCursorField,\n\tITreeCursorSynchronous,\n\tCursorLocationType,\n} from \"../../core/index.js\";\nimport {\n\tbrand,\n\tdeleteFromNestedMap,\n\tfail,\n\tforEachInNestedMap,\n\tgetOrAddInMap,\n\tIdAllocationState,\n\tIdAllocator,\n\tidAllocatorFromMaxId,\n\tidAllocatorFromState,\n\tMutable,\n\tpopulateNestedMap,\n\tsetInNestedMap,\n\ttryGetFromNestedMap,\n} from \"../../util/index.js\";\nimport { MemoizedIdRangeAllocator } from \"../memoizedIdRangeAllocator.js\";\nimport {\n\tTreeChunk,\n\tchunkFieldSingle,\n\tdefaultChunkPolicy,\n\tFieldBatchCodec,\n\tchunkTree,\n} from \"../chunked-forest/index.js\";\nimport { cursorForMapTreeNode, mapTreeFromCursor } from \"../mapTreeCursor.js\";\nimport { TreeCompressionStrategy } from \"../treeCompressionUtils.js\";\nimport {\n\tCrossFieldManager,\n\tCrossFieldMap,\n\tCrossFieldTarget,\n\tgetFirstFromCrossFieldMap,\n\tsetInCrossFieldMap,\n} from \"./crossFieldQueries.js\";\nimport {\n\tFieldChangeHandler,\n\tNodeExistenceState,\n\tRebaseRevisionMetadata,\n} from \"./fieldChangeHandler.js\";\nimport { FlexFieldKind } from \"./fieldKind.js\";\nimport { FieldKindWithEditor, withEditor } from \"./fieldKindWithEditor.js\";\nimport { convertGenericChange, genericFieldKind, newGenericChangeset } from \"./genericFieldKind.js\";\nimport { GenericChangeset } from \"./genericFieldKindTypes.js\";\nimport {\n\tFieldChange,\n\tFieldChangeMap,\n\tFieldChangeset,\n\tModularChangeset,\n\tNodeChangeset,\n} from \"./modularChangeTypes.js\";\nimport { makeV0Codec } from \"./modularChangeCodecs.js\";\n\n/**\n * Implementation of ChangeFamily which delegates work in a given field to the appropriate FieldKind\n * as determined by the schema.\n */\nexport class ModularChangeFamily\n\timplements ChangeFamily<ModularEditBuilder, ModularChangeset>, ChangeRebaser<ModularChangeset>\n{\n\tpublic static readonly emptyChange: ModularChangeset = makeModularChangeset();\n\n\tpublic readonly latestCodec: ReturnType<typeof makeV0Codec>;\n\n\tpublic readonly codecs: ICodecFamily<ModularChangeset, ChangeEncodingContext>;\n\n\tpublic constructor(\n\t\tpublic readonly fieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n\t\trevisionTagCodec: RevisionTagCodec,\n\t\tfieldBatchCodec: FieldBatchCodec,\n\t\tcodecOptions: ICodecOptions,\n\t\tchunkCompressionStrategy?: TreeCompressionStrategy,\n\t) {\n\t\tthis.latestCodec = makeV0Codec(\n\t\t\tfieldKinds,\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\tcodecOptions,\n\t\t\tchunkCompressionStrategy,\n\t\t);\n\t\tthis.codecs = makeCodecFamily([[0, this.latestCodec]]);\n\t}\n\n\tpublic get rebaser(): ChangeRebaser<ModularChangeset> {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Produces an equivalent list of `FieldChangeset`s that all target the same {@link FlexFieldKind}.\n\t * @param changes - The list of `FieldChange`s whose `FieldChangeset`s needs to be normalized.\n\t * @returns An object that contains both the equivalent list of `FieldChangeset`s that all\n\t * target the same {@link FlexFieldKind}, and the `FieldKind` that they target.\n\t * The returned `FieldChangeset`s may be a shallow copy of the input `FieldChange`s.\n\t */\n\tprivate normalizeFieldChanges(\n\t\tchange1: FieldChange | undefined,\n\t\tchange2: FieldChange | undefined,\n\t\tgenId: IdAllocator,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): {\n\t\tfieldKind: FieldKindWithEditor;\n\t\tchange1: FieldChangeset | undefined;\n\t\tchange2: FieldChangeset | undefined;\n\t} {\n\t\t// TODO: Handle the case where changes have conflicting field kinds\n\t\tconst kind =\n\t\t\tchange1 !== undefined && change1.fieldKind !== genericFieldKind.identifier\n\t\t\t\t? change1.fieldKind\n\t\t\t\t: change2?.fieldKind ?? genericFieldKind.identifier;\n\n\t\tif (kind === genericFieldKind.identifier) {\n\t\t\t// All the changes are generic\n\t\t\treturn {\n\t\t\t\tfieldKind: genericFieldKind,\n\t\t\t\tchange1: change1?.change,\n\t\t\t\tchange2: change2?.change,\n\t\t\t};\n\t\t}\n\t\tconst fieldKind = getFieldKind(this.fieldKinds, kind);\n\t\tconst handler = fieldKind.changeHandler;\n\t\tconst normalizedChange1 = this.normalizeFieldChange(\n\t\t\tchange1,\n\t\t\thandler,\n\t\t\tgenId,\n\t\t\trevisionMetadata,\n\t\t);\n\t\tconst normalizedChange2 = this.normalizeFieldChange(\n\t\t\tchange2,\n\t\t\thandler,\n\t\t\tgenId,\n\t\t\trevisionMetadata,\n\t\t);\n\t\treturn { fieldKind, change1: normalizedChange1, change2: normalizedChange2 };\n\t}\n\n\tprivate normalizeFieldChange<T>(\n\t\tfieldChange: FieldChange | undefined,\n\t\thandler: FieldChangeHandler<T>,\n\t\tgenId: IdAllocator,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): FieldChangeset | undefined {\n\t\tif (fieldChange === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (fieldChange.fieldKind !== genericFieldKind.identifier) {\n\t\t\treturn fieldChange.change;\n\t\t}\n\n\t\t// The cast is based on the `fieldKind` check above\n\t\tconst genericChange = fieldChange.change as unknown as GenericChangeset;\n\t\tconst convertedChange = convertGenericChange(\n\t\t\tgenericChange,\n\t\t\thandler,\n\t\t\t(child1, child2) =>\n\t\t\t\tthis.composeNodeChanges(\n\t\t\t\t\tchild1,\n\t\t\t\t\tundefined,\n\t\t\t\t\tchild2,\n\t\t\t\t\tundefined,\n\t\t\t\t\tgenId,\n\t\t\t\t\tnewComposeTable(),\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t),\n\t\t\tgenId,\n\t\t\trevisionMetadata,\n\t\t) as FieldChangeset;\n\n\t\treturn convertedChange;\n\t}\n\n\tpublic compose(changes: TaggedChange<ModularChangeset>[]): ModularChangeset {\n\t\tconst activeChanges = changes.filter(\n\t\t\t(change) => (change.change.constraintViolationCount ?? 0) === 0,\n\t\t);\n\n\t\tconst { revInfos, maxId } = getRevInfoFromTaggedChanges(changes);\n\t\tconst idState: IdAllocationState = { maxId };\n\n\t\treturn activeChanges.reduce(\n\t\t\t(change1, change2) =>\n\t\t\t\tmakeAnonChange(this.composePair(change1, change2, revInfos, idState)),\n\t\t\tmakeAnonChange({ fieldChanges: new Map() }),\n\t\t).change;\n\t}\n\n\tprivate composePair(\n\t\tchange1: TaggedChange<ModularChangeset>,\n\t\tchange2: TaggedChange<ModularChangeset>,\n\t\trevInfos: RevisionInfo[],\n\t\tidState: IdAllocationState,\n\t) {\n\t\tconst genId: IdAllocator = idAllocatorFromState(idState);\n\t\tconst revisionMetadata: RevisionMetadataSource = revisionMetadataSourceFromInfo(revInfos);\n\n\t\tconst crossFieldTable = newComposeTable();\n\n\t\tconst composedFields = this.composeFieldMaps(\n\t\t\tchange1.change.fieldChanges,\n\t\t\tchange1.revision,\n\t\t\tchange2.change.fieldChanges,\n\t\t\tchange2.revision,\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\trevisionMetadata,\n\t\t);\n\n\t\twhile (crossFieldTable.invalidatedFields.size > 0) {\n\t\t\tconst fieldsToUpdate = crossFieldTable.invalidatedFields;\n\t\t\tcrossFieldTable.invalidatedFields = new Set();\n\t\t\tfor (const fieldChange of fieldsToUpdate) {\n\t\t\t\tconst context = crossFieldTable.fieldToContext.get(fieldChange);\n\t\t\t\tassert(\n\t\t\t\t\tcontext !== undefined,\n\t\t\t\t\t0x8cc /* Should have context for every invalidated field */,\n\t\t\t\t);\n\t\t\t\tconst { change1: fieldChange1, change2: fieldChange2, composedChange } = context;\n\n\t\t\t\tconst rebaser = getChangeHandler(this.fieldKinds, fieldChange.fieldKind).rebaser;\n\t\t\t\tconst composeNodes = (\n\t\t\t\t\tnode1: NodeChangeset | undefined,\n\t\t\t\t\tnode2: NodeChangeset | undefined,\n\t\t\t\t): NodeChangeset => {\n\t\t\t\t\tconst key = composeCacheKeyFromNodeChangesets(node1, node2);\n\t\t\t\t\tconst cachedResult = crossFieldTable.nodeCache.get(key);\n\t\t\t\t\tif (cachedResult !== undefined) {\n\t\t\t\t\t\treturn cachedResult;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this.composeNodeChanges(\n\t\t\t\t\t\tnode1,\n\t\t\t\t\t\tfieldChange1.revision,\n\t\t\t\t\t\tnode2,\n\t\t\t\t\t\tfieldChange2.revision,\n\t\t\t\t\t\tgenId,\n\t\t\t\t\t\tcrossFieldTable,\n\t\t\t\t\t\trevisionMetadata,\n\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tconst amendedChange = rebaser.compose(\n\t\t\t\t\tfieldChange1,\n\t\t\t\t\tfieldChange2,\n\t\t\t\t\tcomposeNodes,\n\t\t\t\t\tgenId,\n\t\t\t\t\tnewCrossFieldManager(crossFieldTable, fieldChange, false),\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t);\n\t\t\t\tcomposedChange.change = brand(amendedChange);\n\t\t\t}\n\t\t}\n\n\t\tconst { allBuilds, allDestroys, allRefreshers } = composeBuildsDestroysAndRefreshers([\n\t\t\tchange1,\n\t\t\tchange2,\n\t\t]);\n\n\t\treturn makeModularChangeset(\n\t\t\tthis.pruneFieldMap(composedFields),\n\t\t\tidState.maxId,\n\t\t\trevInfos,\n\t\t\tundefined,\n\t\t\tallBuilds,\n\t\t\tallDestroys,\n\t\t\tallRefreshers,\n\t\t);\n\t}\n\n\tprivate composeFieldMaps(\n\t\tchange1: FieldChangeMap | undefined,\n\t\trevision1: RevisionTag | undefined,\n\t\tchange2: FieldChangeMap | undefined,\n\t\trevision2: RevisionTag | undefined,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: ComposeTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): FieldChangeMap {\n\t\tconst composedFields: FieldChangeMap = new Map();\n\t\tconst fields = new Set<FieldKey>();\n\t\tfor (const field of change1?.keys() ?? []) {\n\t\t\tfields.add(field);\n\t\t}\n\n\t\tfor (const field of change2?.keys() ?? []) {\n\t\t\tfields.add(field);\n\t\t}\n\n\t\tfor (const field of fields) {\n\t\t\tconst fieldChange1 = change1?.get(field);\n\t\t\tconst fieldChange2 = change2?.get(field);\n\n\t\t\tconst {\n\t\t\t\tfieldKind,\n\t\t\t\tchange1: normalizedFieldChange1,\n\t\t\t\tchange2: normalizedFieldChange2,\n\t\t\t} = this.normalizeFieldChanges(fieldChange1, fieldChange2, genId, revisionMetadata);\n\n\t\t\tconst manager = newCrossFieldManager(crossFieldTable, fieldChange1 ?? fieldChange2);\n\t\t\tconst taggedChange1 = tagChange(\n\t\t\t\tnormalizedFieldChange1 ?? fieldKind.changeHandler.createEmpty(),\n\t\t\t\tfieldChange1?.revision ?? revision1,\n\t\t\t);\n\t\t\tconst taggedChange2 = tagChange(\n\t\t\t\tnormalizedFieldChange2 ?? fieldKind.changeHandler.createEmpty(),\n\t\t\t\tfieldChange2?.revision ?? revision2,\n\t\t\t);\n\n\t\t\tconst composedChange = fieldKind.changeHandler.rebaser.compose(\n\t\t\t\ttaggedChange1,\n\t\t\t\ttaggedChange2,\n\t\t\t\t(child1, child2) =>\n\t\t\t\t\tthis.composeNodeChanges(\n\t\t\t\t\t\tchild1,\n\t\t\t\t\t\trevision1,\n\t\t\t\t\t\tchild2,\n\t\t\t\t\t\trevision2,\n\t\t\t\t\t\tgenId,\n\t\t\t\t\t\tcrossFieldTable,\n\t\t\t\t\t\trevisionMetadata,\n\t\t\t\t\t),\n\t\t\t\tgenId,\n\t\t\t\tmanager,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\n\t\t\tconst composedField: FieldChange = {\n\t\t\t\tfieldKind: fieldKind.identifier,\n\t\t\t\tchange: brand(composedChange),\n\t\t\t};\n\n\t\t\tconst fieldKey =\n\t\t\t\tfieldChange1 ?? fieldChange2 ?? fail(\"At least one field should have changes\");\n\n\t\t\tcrossFieldTable.fieldToContext.set(fieldKey, {\n\t\t\t\tchange1: taggedChange1,\n\t\t\t\tchange2: taggedChange2,\n\t\t\t\tcomposedChange: composedField,\n\t\t\t});\n\n\t\t\t// TODO: Could optimize by checking that composedField is non-empty\n\t\t\tcomposedFields.set(field, composedField);\n\t\t}\n\n\t\treturn composedFields;\n\t}\n\n\tprivate composeNodeChanges(\n\t\tchange1: NodeChangeset | undefined,\n\t\trevision1: RevisionTag | undefined,\n\t\tchange2: NodeChangeset | undefined,\n\t\trevision2: RevisionTag | undefined,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: ComposeTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): NodeChangeset {\n\t\tconst nodeExistsConstraint = change1?.nodeExistsConstraint ?? change2?.nodeExistsConstraint;\n\n\t\tconst composedFieldChanges = this.composeFieldMaps(\n\t\t\tchange1?.fieldChanges,\n\t\t\trevision1,\n\t\t\tchange2?.fieldChanges,\n\t\t\trevision2,\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\trevisionMetadata,\n\t\t);\n\t\tconst composedNodeChange: NodeChangeset = {};\n\n\t\tif (composedFieldChanges.size > 0) {\n\t\t\tcomposedNodeChange.fieldChanges = composedFieldChanges;\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tcomposedNodeChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\tconst key = composeCacheKeyFromNodeChangesets(change1, change2);\n\t\tcrossFieldTable.nodeCache.set(key, composedNodeChange);\n\t\treturn composedNodeChange;\n\t}\n\n\t/**\n\t * @param change - The change to invert.\n\t * @param isRollback - Whether the inverted change is meant to rollback a change on a branch as is the case when\n\t * performing a sandwich rebase.\n\t * @param repairStore - The store to query for repair data.\n\t */\n\tpublic invert(change: TaggedChange<ModularChangeset>, isRollback: boolean): ModularChangeset {\n\t\t// Return an empty inverse for changes with constraint violations\n\t\tif ((change.change.constraintViolationCount ?? 0) > 0) {\n\t\t\treturn makeModularChangeset();\n\t\t}\n\n\t\tconst idState: IdAllocationState = { maxId: change.change.maxId ?? -1 };\n\t\t// This idState is used for the whole of the IdAllocator's lifetime, which allows\n\t\t// this function to read the updated idState.maxId after more IDs are allocated.\n\t\t// TODO: add a getMax function to IdAllocator to make for a clearer contract.\n\t\tconst genId: IdAllocator = idAllocatorFromState(idState);\n\t\tconst crossFieldTable: InvertTable = {\n\t\t\t...newCrossFieldTable<FieldChange>(),\n\t\t\toriginalFieldToContext: new Map(),\n\t\t};\n\n\t\tconst { revInfos } = getRevInfoFromTaggedChanges([change]);\n\t\tconst revisionMetadata = revisionMetadataSourceFromInfo(revInfos);\n\n\t\tconst invertedFields = this.invertFieldMap(\n\t\t\ttagChange(change.change.fieldChanges, revisionFromTaggedChange(change)),\n\t\t\tisRollback,\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\trevisionMetadata,\n\t\t);\n\n\t\tif (crossFieldTable.invalidatedFields.size > 0) {\n\t\t\tconst fieldsToUpdate = crossFieldTable.invalidatedFields;\n\t\t\tcrossFieldTable.invalidatedFields = new Set();\n\t\t\tfor (const fieldChange of fieldsToUpdate) {\n\t\t\t\tconst originalFieldChange = fieldChange.change;\n\t\t\t\tconst context = crossFieldTable.originalFieldToContext.get(fieldChange);\n\t\t\t\tassert(\n\t\t\t\t\tcontext !== undefined,\n\t\t\t\t\t0x851 /* Should have context for every invalidated field */,\n\t\t\t\t);\n\t\t\t\tconst { invertedField, revision } = context;\n\n\t\t\t\tconst amendedChange = getChangeHandler(\n\t\t\t\t\tthis.fieldKinds,\n\t\t\t\t\tfieldChange.fieldKind,\n\t\t\t\t).rebaser.invert(\n\t\t\t\t\ttagChange(originalFieldChange, revision),\n\t\t\t\t\t(nodeChangeset) => nodeChangeset,\n\t\t\t\t\tisRollback,\n\t\t\t\t\tgenId,\n\t\t\t\t\tnewCrossFieldManager(crossFieldTable, fieldChange),\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t);\n\t\t\t\tinvertedField.change = brand(amendedChange);\n\t\t\t}\n\t\t}\n\n\t\t// Rollback changesets destroy the nodes created by the change being rolled back.\n\t\tconst destroys = isRollback\n\t\t\t? invertBuilds(change.change.builds, change.revision)\n\t\t\t: undefined;\n\n\t\t// Destroys only occur in rollback changesets, which are never inverted.\n\t\tassert(\n\t\t\tchange.change.destroys === undefined,\n\t\t\t0x89a /* Unexpected destroys in change to invert */,\n\t\t);\n\n\t\tconst revInfo = change.change.revisions;\n\t\treturn makeModularChangeset(\n\t\t\tinvertedFields,\n\t\t\tidState.maxId,\n\t\t\trevInfo === undefined\n\t\t\t\t? undefined\n\t\t\t\t: (isRollback\n\t\t\t\t\t\t? revInfo.map(({ revision }) => ({ revision, rollbackOf: revision }))\n\t\t\t\t\t\t: Array.from(revInfo)\n\t\t\t\t ).reverse(),\n\t\t\tchange.change.constraintViolationCount,\n\t\t\tundefined,\n\t\t\tdestroys,\n\t\t);\n\t}\n\n\tprivate invertFieldMap(\n\t\tchanges: TaggedChange<FieldChangeMap>,\n\t\tisRollback: boolean,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: InvertTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): FieldChangeMap {\n\t\tconst invertedFields: FieldChangeMap = new Map();\n\n\t\tfor (const [field, fieldChange] of changes.change) {\n\t\t\tconst { revision } = fieldChange.revision !== undefined ? fieldChange : changes;\n\n\t\t\tconst manager = newCrossFieldManager(crossFieldTable, fieldChange);\n\t\t\tconst invertedChange = getChangeHandler(\n\t\t\t\tthis.fieldKinds,\n\t\t\t\tfieldChange.fieldKind,\n\t\t\t).rebaser.invert(\n\t\t\t\t{ revision, change: fieldChange.change },\n\t\t\t\t(childChanges) =>\n\t\t\t\t\tthis.invertNodeChange(\n\t\t\t\t\t\t{ revision, change: childChanges },\n\t\t\t\t\t\tisRollback,\n\t\t\t\t\t\tgenId,\n\t\t\t\t\t\tcrossFieldTable,\n\t\t\t\t\t\trevisionMetadata,\n\t\t\t\t\t),\n\t\t\t\tisRollback,\n\t\t\t\tgenId,\n\t\t\t\tmanager,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\n\t\t\tconst invertedFieldChange: FieldChange = {\n\t\t\t\t...fieldChange,\n\t\t\t\tchange: brand(invertedChange),\n\t\t\t};\n\t\t\tinvertedFields.set(field, invertedFieldChange);\n\n\t\t\tcrossFieldTable.originalFieldToContext.set(fieldChange, {\n\t\t\t\tinvertedField: invertedFieldChange,\n\t\t\t\trevision,\n\t\t\t});\n\t\t}\n\n\t\treturn invertedFields;\n\t}\n\n\tprivate invertNodeChange(\n\t\tchange: TaggedChange<NodeChangeset>,\n\t\tisRollback: boolean,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: InvertTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): NodeChangeset {\n\t\tconst inverse: NodeChangeset = {};\n\n\t\tif (change.change.fieldChanges !== undefined) {\n\t\t\tinverse.fieldChanges = this.invertFieldMap(\n\t\t\t\t{ ...change, change: change.change.fieldChanges },\n\t\t\t\tisRollback,\n\t\t\t\tgenId,\n\t\t\t\tcrossFieldTable,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\t\t}\n\n\t\treturn inverse;\n\t}\n\n\tpublic rebase(\n\t\tchange: ModularChangeset,\n\t\tover: TaggedChange<ModularChangeset>,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): ModularChangeset {\n\t\tconst maxId = Math.max(change.maxId ?? -1, over.change.maxId ?? -1);\n\t\tconst idState: IdAllocationState = { maxId };\n\t\tconst genId: IdAllocator = idAllocatorFromState(idState);\n\t\tconst crossFieldTable: RebaseTable = {\n\t\t\t...newCrossFieldTable<FieldChange>(),\n\t\t\tfieldToContext: new Map(),\n\t\t\trebasedNodeCache: new Map(),\n\t\t};\n\n\t\tlet constraintState = newConstraintState(change.constraintViolationCount ?? 0);\n\n\t\tconst getBaseRevisions = () =>\n\t\t\trevisionInfoFromTaggedChange(over).map((info) => info.revision);\n\n\t\tconst rebaseMetadata = {\n\t\t\t...revisionMetadata,\n\t\t\tgetBaseRevisions,\n\t\t};\n\n\t\tconst rebasedFields = this.rebaseFieldMap(\n\t\t\tchange.fieldChanges,\n\t\t\ttagChange(over.change.fieldChanges, revisionFromTaggedChange(over)),\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\t() => true,\n\t\t\trebaseMetadata,\n\t\t\tconstraintState,\n\t\t);\n\n\t\tif (crossFieldTable.invalidatedFields.size > 0) {\n\t\t\tconst fieldsToUpdate = crossFieldTable.invalidatedFields;\n\t\t\tcrossFieldTable.invalidatedFields = new Set();\n\t\t\tconstraintState = newConstraintState(change.constraintViolationCount ?? 0);\n\t\t\tfor (const field of fieldsToUpdate) {\n\t\t\t\t// TODO: Should we copy the context table out before this loop?\n\t\t\t\tconst context = crossFieldTable.fieldToContext.get(field);\n\t\t\t\tassert(context !== undefined, 0x852 /* Every field should have a context */);\n\t\t\t\tconst {\n\t\t\t\t\tfieldKind,\n\t\t\t\t\tchange1: fieldChangeset,\n\t\t\t\t\tchange2: baseChangeset,\n\t\t\t\t} = this.normalizeFieldChanges(\n\t\t\t\t\tcontext.newChange,\n\t\t\t\t\tcontext.baseChange,\n\t\t\t\t\tgenId,\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t);\n\n\t\t\t\tcontext.rebasedChange.change = fieldKind.changeHandler.rebaser.rebase(\n\t\t\t\t\tfieldChangeset,\n\t\t\t\t\ttagChange(baseChangeset, context.baseRevision),\n\t\t\t\t\t(curr, base, existenceState) => {\n\t\t\t\t\t\tconst key = curr ?? base;\n\t\t\t\t\t\tif (key === undefined) {\n\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst prior = crossFieldTable.rebasedNodeCache.get(key);\n\t\t\t\t\t\tif (prior !== undefined) {\n\t\t\t\t\t\t\treturn prior;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// This is needed when the first rebase pass results in node changes from the rebased\n\t\t\t\t\t\t// changeset being moved to a different location.\n\t\t\t\t\t\treturn this.rebaseNodeChange(\n\t\t\t\t\t\t\tcurr,\n\t\t\t\t\t\t\ttagChange(base, context.baseRevision),\n\t\t\t\t\t\t\tgenId,\n\t\t\t\t\t\t\tcrossFieldTable,\n\t\t\t\t\t\t\t() => true,\n\t\t\t\t\t\t\trebaseMetadata,\n\t\t\t\t\t\t\tconstraintState,\n\t\t\t\t\t\t\texistenceState,\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\tgenId,\n\t\t\t\t\tnewCrossFieldManager(crossFieldTable, field),\n\t\t\t\t\trebaseMetadata,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn makeModularChangeset(\n\t\t\tthis.pruneFieldMap(rebasedFields),\n\t\t\tidState.maxId,\n\t\t\tchange.revisions,\n\t\t\tconstraintState.violationCount,\n\t\t\tchange.builds,\n\t\t\tchange.destroys,\n\t\t\tchange.refreshers,\n\t\t);\n\t}\n\n\tprivate rebaseFieldMap(\n\t\tchange: FieldChangeMap,\n\t\tover: TaggedChange<FieldChangeMap>,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: RebaseTable,\n\t\tfieldFilter: (baseChange: FieldChange, newChange: FieldChange | undefined) => boolean,\n\t\trevisionMetadata: RebaseRevisionMetadata,\n\t\tconstraintState: ConstraintState,\n\t\texistenceState: NodeExistenceState = NodeExistenceState.Alive,\n\t): FieldChangeMap {\n\t\tconst rebasedFields: FieldChangeMap = new Map();\n\n\t\t// Rebase fields contained in the base changeset\n\t\tfor (const [field, baseChanges] of over.change) {\n\t\t\tif (!fieldFilter(baseChanges, change.get(field))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst fieldChange: FieldChange = change.get(field) ?? {\n\t\t\t\tfieldKind: genericFieldKind.identifier,\n\t\t\t\tchange: brand(newGenericChangeset()),\n\t\t\t};\n\t\t\tconst {\n\t\t\t\tfieldKind,\n\t\t\t\tchange1: fieldChangeset,\n\t\t\t\tchange2: baseChangeset,\n\t\t\t} = this.normalizeFieldChanges(fieldChange, baseChanges, genId, revisionMetadata);\n\n\t\t\tconst { revision } = over;\n\t\t\tconst taggedBaseChange = { revision, change: baseChangeset };\n\n\t\t\tconst manager = newCrossFieldManager(crossFieldTable, fieldChange);\n\n\t\t\tconst rebaseChild = (\n\t\t\t\tchild: NodeChangeset | undefined,\n\t\t\t\tbaseChild: NodeChangeset | undefined,\n\t\t\t\tstateChange: NodeExistenceState | undefined,\n\t\t\t) =>\n\t\t\t\tthis.rebaseNodeChange(\n\t\t\t\t\tchild,\n\t\t\t\t\t{ revision, change: baseChild },\n\t\t\t\t\tgenId,\n\t\t\t\t\tcrossFieldTable,\n\t\t\t\t\tfieldFilter,\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t\tconstraintState,\n\t\t\t\t\tstateChange,\n\t\t\t\t);\n\n\t\t\tconst rebasedField = fieldKind.changeHandler.rebaser.rebase(\n\t\t\t\tfieldChangeset,\n\t\t\t\ttaggedBaseChange,\n\t\t\t\trebaseChild,\n\t\t\t\tgenId,\n\t\t\t\tmanager,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\n\t\t\tconst rebasedFieldChange: FieldChange = {\n\t\t\t\tfieldKind: fieldKind.identifier,\n\t\t\t\tchange: brand(rebasedField),\n\t\t\t};\n\n\t\t\trebasedFields.set(field, rebasedFieldChange);\n\n\t\t\tcrossFieldTable.fieldToContext.set(fieldChange, {\n\t\t\t\tbaseChange: baseChanges,\n\t\t\t\tbaseRevision: revision,\n\t\t\t\tnewChange: fieldChange,\n\t\t\t\trebasedChange: rebasedFieldChange,\n\t\t\t});\n\t\t}\n\n\t\t// Rebase the fields of the new changeset which don't have a corresponding base field.\n\t\tfor (const [field, fieldChange] of change) {\n\t\t\tif (!over.change?.has(field)) {\n\t\t\t\tconst baseChanges: FieldChange = {\n\t\t\t\t\tfieldKind: genericFieldKind.identifier,\n\t\t\t\t\tchange: brand(newGenericChangeset()),\n\t\t\t\t};\n\n\t\t\t\tconst {\n\t\t\t\t\tfieldKind,\n\t\t\t\t\tchange1: fieldChangeset,\n\t\t\t\t\tchange2: baseChangeset,\n\t\t\t\t} = this.normalizeFieldChanges(fieldChange, baseChanges, genId, revisionMetadata);\n\n\t\t\t\t// TODO: Don't we need to add an entry in the context table?\n\t\t\t\tconst manager = newCrossFieldManager(crossFieldTable, fieldChange);\n\t\t\t\tconst rebasedChangeset = fieldKind.changeHandler.rebaser.rebase(\n\t\t\t\t\tfieldChangeset,\n\t\t\t\t\ttagChange(baseChangeset, over.revision),\n\t\t\t\t\t(child, baseChild) => {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tbaseChild === undefined,\n\t\t\t\t\t\t\t0x5b6 /* This field should not have any base changes */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn this.rebaseNodeChange(\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\ttagChange(undefined, over.revision),\n\t\t\t\t\t\t\tgenId,\n\t\t\t\t\t\t\tcrossFieldTable,\n\t\t\t\t\t\t\tfieldFilter,\n\t\t\t\t\t\t\trevisionMetadata,\n\t\t\t\t\t\t\tconstraintState,\n\t\t\t\t\t\t\texistenceState,\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\tgenId,\n\t\t\t\t\tmanager,\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t\texistenceState,\n\t\t\t\t);\n\t\t\t\tconst rebasedFieldChange: FieldChange = {\n\t\t\t\t\tfieldKind: fieldKind.identifier,\n\t\t\t\t\tchange: brand(rebasedChangeset),\n\t\t\t\t};\n\t\t\t\trebasedFields.set(field, rebasedFieldChange);\n\t\t\t}\n\t\t}\n\n\t\treturn rebasedFields;\n\t}\n\n\tprivate rebaseNodeChange(\n\t\tchange: NodeChangeset | undefined,\n\t\tover: TaggedChange<NodeChangeset | undefined>,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: RebaseTable,\n\t\tfieldFilter: (baseChange: FieldChange, newChange: FieldChange | undefined) => boolean,\n\t\trevisionMetadata: RebaseRevisionMetadata,\n\t\tconstraintState: ConstraintState,\n\t\texistenceState: NodeExistenceState = NodeExistenceState.Alive,\n\t): NodeChangeset | undefined {\n\t\tconst key = change ?? over.change;\n\t\tif (key === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst baseMap: TaggedChange<FieldChangeMap> =\n\t\t\tover.change?.fieldChanges !== undefined\n\t\t\t\t? {\n\t\t\t\t\t\t...over,\n\t\t\t\t\t\tchange: over.change.fieldChanges,\n\t\t\t\t }\n\t\t\t\t: tagChange(new Map(), over.revision);\n\n\t\tconst fieldChanges = this.rebaseFieldMap(\n\t\t\tchange?.fieldChanges ?? new Map(),\n\t\t\tbaseMap,\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\tfieldFilter,\n\t\t\trevisionMetadata,\n\t\t\tconstraintState,\n\t\t\texistenceState,\n\t\t);\n\n\t\tconst rebasedChange: NodeChangeset = {};\n\n\t\tif (fieldChanges.size > 0) {\n\t\t\trebasedChange.fieldChanges = fieldChanges;\n\t\t}\n\n\t\tif (change?.nodeExistsConstraint !== undefined) {\n\t\t\trebasedChange.nodeExistsConstraint = change.nodeExistsConstraint;\n\t\t}\n\n\t\t// If there's a node exists constraint and we removed or revived the node, update constraint state\n\t\tif (rebasedChange.nodeExistsConstraint !== undefined) {\n\t\t\tconst violatedAfter = existenceState === NodeExistenceState.Dead;\n\n\t\t\tif (rebasedChange.nodeExistsConstraint.violated !== violatedAfter) {\n\t\t\t\trebasedChange.nodeExistsConstraint = {\n\t\t\t\t\t...rebasedChange.nodeExistsConstraint,\n\t\t\t\t\tviolated: violatedAfter,\n\t\t\t\t};\n\t\t\t\tconstraintState.violationCount += violatedAfter ? 1 : -1;\n\t\t\t}\n\t\t}\n\n\t\tcrossFieldTable.rebasedNodeCache.set(key, rebasedChange);\n\t\treturn rebasedChange;\n\t}\n\n\tprivate pruneFieldMap(changeset: FieldChangeMap): FieldChangeMap | undefined {\n\t\tconst prunedChangeset: FieldChangeMap = new Map();\n\t\tfor (const [field, fieldChange] of changeset) {\n\t\t\tconst handler = getChangeHandler(this.fieldKinds, fieldChange.fieldKind);\n\n\t\t\tconst prunedFieldChangeset = handler.rebaser.prune(fieldChange.change, (node) =>\n\t\t\t\tthis.pruneNodeChange(node),\n\t\t\t);\n\n\t\t\tif (!handler.isEmpty(prunedFieldChangeset)) {\n\t\t\t\tprunedChangeset.set(field, { ...fieldChange, change: brand(prunedFieldChangeset) });\n\t\t\t}\n\t\t}\n\n\t\treturn prunedChangeset.size > 0 ? prunedChangeset : undefined;\n\t}\n\n\tprivate pruneNodeChange(changeset: NodeChangeset): NodeChangeset | undefined {\n\t\tconst prunedFields =\n\t\t\tchangeset.fieldChanges !== undefined\n\t\t\t\t? this.pruneFieldMap(changeset.fieldChanges)\n\t\t\t\t: undefined;\n\n\t\tconst prunedChange = { ...changeset, fieldChanges: prunedFields };\n\t\tif (prunedChange.fieldChanges === undefined) {\n\t\t\tdelete prunedChange.fieldChanges;\n\t\t}\n\n\t\treturn isEmptyNodeChangeset(prunedChange) ? undefined : prunedChange;\n\t}\n\n\tpublic buildEditor(changeReceiver: (change: ModularChangeset) => void): ModularEditBuilder {\n\t\treturn new ModularEditBuilder(this, changeReceiver);\n\t}\n}\n\nfunction composeBuildsDestroysAndRefreshers(changes: TaggedChange<ModularChangeset>[]) {\n\tconst allBuilds: ChangeAtomIdMap<TreeChunk> = new Map();\n\tconst allDestroys: ChangeAtomIdMap<number> = new Map();\n\tconst allRefreshers: ChangeAtomIdMap<TreeChunk> = new Map();\n\tfor (const taggedChange of changes) {\n\t\tconst revision = revisionFromTaggedChange(taggedChange);\n\t\tconst change = taggedChange.change;\n\t\tif (change.builds) {\n\t\t\tfor (const [revisionKey, innerMap] of change.builds) {\n\t\t\t\tconst setRevisionKey = revisionKey ?? revision;\n\t\t\t\tconst innerDstMap = getOrAddInMap(\n\t\t\t\t\tallBuilds,\n\t\t\t\t\tsetRevisionKey,\n\t\t\t\t\tnew Map<ChangesetLocalId, TreeChunk>(),\n\t\t\t\t);\n\t\t\t\tfor (const [id, chunk] of innerMap) {\n\t\t\t\t\t// Check for duplicate builds and prefer earlier ones.\n\t\t\t\t\t// This can happen in compositions of commits that needed to include repair data refreshers (e.g., undos):\n\t\t\t\t\t// In that case, it's possible for the refreshers to contain different trees because the latter\n\t\t\t\t\t// refresher may already reflect the changes made by the commit that includes the earlier\n\t\t\t\t\t// refresher. This composition includes the changes made by the commit that includes the\n\t\t\t\t\t// earlier refresher, so we need to include the build for the earlier refresher, otherwise\n\t\t\t\t\t// the produced changeset will build a tree one which those changes have already been applied\n\t\t\t\t\t// and also try to apply the changes again, effectively applying them twice.\n\t\t\t\t\t// Note that it would in principle be possible to adopt the later build and exclude from the\n\t\t\t\t\t// composition all the changes already reflected on the tree, but that is not something we\n\t\t\t\t\t// care to support at this time.\n\t\t\t\t\tif (!innerDstMap.has(id)) {\n\t\t\t\t\t\t// Check for earlier destroys that this build might cancel-out with.\n\t\t\t\t\t\tconst destroyCount = tryGetFromNestedMap(allDestroys, setRevisionKey, id);\n\t\t\t\t\t\tif (destroyCount === undefined) {\n\t\t\t\t\t\t\tinnerDstMap.set(id, chunk);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\t\tdestroyCount === chunk.topLevelLength,\n\t\t\t\t\t\t\t\t0x89b /* Expected build and destroy to have the same length */,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tdeleteFromNestedMap(allDestroys, setRevisionKey, id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (innerDstMap.size === 0) {\n\t\t\t\t\tallBuilds.delete(setRevisionKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (change.destroys !== undefined) {\n\t\t\tfor (const [revisionKey, innerMap] of change.destroys) {\n\t\t\t\tconst setRevisionKey = revisionKey ?? revision;\n\t\t\t\tconst innerDstMap = getOrAddInMap(\n\t\t\t\t\tallDestroys,\n\t\t\t\t\tsetRevisionKey,\n\t\t\t\t\tnew Map<ChangesetLocalId, number>(),\n\t\t\t\t);\n\t\t\t\tfor (const [id, count] of innerMap) {\n\t\t\t\t\t// Check for earlier builds that this destroy might cancel-out with.\n\t\t\t\t\tconst chunk = tryGetFromNestedMap(allBuilds, setRevisionKey, id);\n\t\t\t\t\tif (chunk === undefined) {\n\t\t\t\t\t\tinnerDstMap.set(id, count);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tcount === chunk.topLevelLength,\n\t\t\t\t\t\t\t0x89c /* Expected build and destroy to have the same length */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdeleteFromNestedMap(allBuilds, setRevisionKey, id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (innerDstMap.size === 0) {\n\t\t\t\t\tallDestroys.delete(setRevisionKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add all refreshers while preferring earlier ones\n\t\tif (change.refreshers) {\n\t\t\tpopulateNestedMap(change.refreshers, allRefreshers, false);\n\t\t}\n\t}\n\treturn { allBuilds, allDestroys, allRefreshers };\n}\n\nfunction invertBuilds(\n\tbuilds: ChangeAtomIdMap<TreeChunk> | undefined,\n\tfallbackRevision: RevisionTag | undefined,\n): ChangeAtomIdMap<number> | undefined {\n\tif (builds !== undefined) {\n\t\tconst destroys: ChangeAtomIdMap<number> = new Map();\n\t\tfor (const [revision, innerBuildMap] of builds) {\n\t\t\tconst initializedRevision = revision ?? fallbackRevision;\n\t\t\tconst innerDestroyMap: Map<ChangesetLocalId, number> = new Map();\n\t\t\tfor (const [id, chunk] of innerBuildMap) {\n\t\t\t\tinnerDestroyMap.set(id, chunk.topLevelLength);\n\t\t\t}\n\t\t\tdestroys.set(initializedRevision, innerDestroyMap);\n\t\t}\n\t\treturn destroys;\n\t}\n\treturn undefined;\n}\n\n/**\n * Returns the set of removed roots that should be in memory for the given change to be applied.\n * A removed root is relevant if any of the following is true:\n * - It is being inserted\n * - It is being restored\n * - It is being edited\n * - The ID it is associated with is being changed\n *\n * May be conservative by returning more removed roots than strictly necessary.\n *\n * Will never return IDs for non-root trees, even if they are removed.\n *\n * @param change - The change to be applied.\n * @param fieldKinds - The field kinds to delegate to.\n */\nexport function* relevantRemovedRoots(\n\t{ change, revision }: TaggedChange<ModularChangeset>,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): Iterable<DeltaDetachedNodeId> {\n\tyield* relevantRemovedRootsFromFields(change.fieldChanges, revision, fieldKinds);\n}\n\nfunction* relevantRemovedRootsFromFields(\n\tchange: FieldChangeMap,\n\trevision: RevisionTag | undefined,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): Iterable<DeltaDetachedNodeId> {\n\tfor (const [_, fieldChange] of change) {\n\t\tconst fieldRevision = fieldChange.revision ?? revision;\n\t\tconst handler = getChangeHandler(fieldKinds, fieldChange.fieldKind);\n\t\tconst delegate = function* (node: NodeChangeset): Iterable<DeltaDetachedNodeId> {\n\t\t\tif (node.fieldChanges !== undefined) {\n\t\t\t\tyield* relevantRemovedRootsFromFields(node.fieldChanges, fieldRevision, fieldKinds);\n\t\t\t}\n\t\t};\n\t\tyield* handler.relevantRemovedRoots(tagChange(fieldChange.change, fieldRevision), delegate);\n\t}\n}\n\n/**\n * Adds any refreshers missing from the provided change that are relevant to the change and\n * removes any refreshers from the provided change that are not relevant to the change.\n * This function enforces that all relevant removed roots have a corresponding build or refresher.\n *\n * @param change - The change that possibly has missing or superfluous refreshers. Not mutated by this function.\n * @param getDetachedNode - The function to retrieve a tree chunk from the corresponding detached node id.\n * @param removedRoots - The set of removed roots that should be in memory for the given change to be applied.\n * Can be retrieved by calling {@link relevantRemovedRoots}.\n */\nexport function updateRefreshers(\n\tchange: TaggedChange<ModularChangeset>,\n\tgetDetachedNode: (id: DeltaDetachedNodeId) => TreeChunk | undefined,\n\tremovedRoots: Iterable<DeltaDetachedNodeId>,\n): ModularChangeset {\n\tconst refreshers: ChangeAtomIdMap<TreeChunk> = new Map();\n\n\tfor (const root of removedRoots) {\n\t\tif (change.change.builds !== undefined) {\n\t\t\t// if the root exists in the original builds map, it does not need to be added as a refresher\n\t\t\tconst original = tryGetFromNestedMap(change.change.builds, root.major, root.minor);\n\t\t\tif (original !== undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tconst node = getDetachedNode(root);\n\t\tassert(node !== undefined, 0x8cd /* detached node should exist */);\n\t\tsetInNestedMap(refreshers, root.major, root.minor, node);\n\t}\n\n\tconst { fieldChanges, maxId, revisions, constraintViolationCount, builds, destroys } =\n\t\tchange.change;\n\treturn makeModularChangeset(\n\t\tfieldChanges,\n\t\tmaxId,\n\t\trevisions,\n\t\tconstraintViolationCount,\n\t\tbuilds,\n\t\tdestroys,\n\t\trefreshers,\n\t);\n}\n\n/**\n * @param change - The change to convert into a delta.\n * @param fieldKinds - The field kinds to delegate to.\n */\nexport function intoDelta(\n\ttaggedChange: TaggedChange<ModularChangeset>,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): DeltaRoot {\n\tconst change = taggedChange.change;\n\t// Return an empty delta for changes with constraint violations\n\tif ((change.constraintViolationCount ?? 0) > 0) {\n\t\treturn emptyDelta;\n\t}\n\n\tconst revision = revisionFromTaggedChange(taggedChange);\n\tconst idAllocator = MemoizedIdRangeAllocator.fromNextId();\n\tconst rootDelta: Mutable<DeltaRoot> = {};\n\tconst fieldDeltas = intoDeltaImpl(change.fieldChanges, revision, idAllocator, fieldKinds);\n\tif (fieldDeltas.size > 0) {\n\t\trootDelta.fields = fieldDeltas;\n\t}\n\tif (change.builds && change.builds.size > 0) {\n\t\trootDelta.build = copyDetachedNodes(change.builds, revision);\n\t}\n\tif (change.destroys !== undefined && change.destroys.size > 0) {\n\t\tconst destroys: DeltaDetachedNodeDestruction[] = [];\n\t\tforEachInNestedMap(change.destroys, (count, major, minor) => {\n\t\t\tdestroys.push({\n\t\t\t\tid: makeDetachedNodeId(major ?? revision, minor),\n\t\t\t\tcount,\n\t\t\t});\n\t\t});\n\t\trootDelta.destroy = destroys;\n\t}\n\tif (change.refreshers && change.refreshers.size > 0) {\n\t\trootDelta.refreshers = copyDetachedNodes(change.refreshers, revision);\n\t}\n\treturn rootDelta;\n}\n\nfunction copyDetachedNodes(detachedNodes: ChangeAtomIdMap<TreeChunk>, revision?: RevisionTag) {\n\tconst copiedDetachedNodes: DeltaDetachedNodeBuild[] = [];\n\tforEachInNestedMap(detachedNodes, (chunk, major, minor) => {\n\t\tif (chunk.topLevelLength > 0) {\n\t\t\tconst trees = mapCursorField(chunk.cursor(), (c) =>\n\t\t\t\tcursorForMapTreeNode(mapTreeFromCursor(c)),\n\t\t\t);\n\t\t\tcopiedDetachedNodes.push({\n\t\t\t\tid: makeDetachedNodeId(major ?? revision, minor),\n\t\t\t\ttrees,\n\t\t\t});\n\t\t}\n\t});\n\treturn copiedDetachedNodes.length > 0 ? copiedDetachedNodes : undefined;\n}\n\n/**\n * @param change - The change to convert into a delta.\n * @param repairStore - The store to query for repair data.\n * @param path - The path of the node being altered by the change as defined by the input context.\n * Undefined for the root and for nodes that do not exist in the input context.\n */\nfunction intoDeltaImpl(\n\tchange: FieldChangeMap,\n\trevision: RevisionTag | undefined,\n\tidAllocator: MemoizedIdRangeAllocator,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): Map<FieldKey, DeltaFieldChanges> {\n\tconst delta: Map<FieldKey, DeltaFieldChanges> = new Map();\n\tfor (const [field, fieldChange] of change) {\n\t\tconst fieldRevision = fieldChange.revision ?? revision;\n\t\tconst deltaField = getChangeHandler(fieldKinds, fieldChange.fieldKind).intoDelta(\n\t\t\ttagChange(fieldChange.change, fieldRevision),\n\t\t\t(childChange): DeltaFieldMap =>\n\t\t\t\tdeltaFromNodeChange(tagChange(childChange, fieldRevision), idAllocator, fieldKinds),\n\t\t\tidAllocator,\n\t\t);\n\t\tif (!isEmptyFieldChanges(deltaField)) {\n\t\t\tdelta.set(field, deltaField);\n\t\t}\n\t}\n\treturn delta;\n}\n\nfunction deltaFromNodeChange(\n\t{ change, revision }: TaggedChange<NodeChangeset>,\n\tidAllocator: MemoizedIdRangeAllocator,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): DeltaFieldMap {\n\tif (change.fieldChanges !== undefined) {\n\t\treturn intoDeltaImpl(change.fieldChanges, revision, idAllocator, fieldKinds);\n\t}\n\t// TODO: update the API to allow undefined to be returned here\n\treturn new Map();\n}\n\n/**\n * @internal\n * @param revInfos - This should describe all revisions in the rebase path, even if not part of the current base changeset.\n * For example, when rebasing change B from a local branch [A, B, C] over a branch [X, Y], the `revInfos` must include\n * the changes [A⁻¹ X, Y, A'] for each rebase step of B.\n * @param baseRevisions - The set of revisions in the changeset being rebased over.\n * For example, when rebasing change B from a local branch [A, B, C] over a branch [X, Y], the `baseRevisions` must include\n * revisions [A⁻¹ X, Y, A'] if rebasing over the composition of all those changes, or\n * revision [A⁻¹] for the first rebase, then [X], etc. if rebasing over edits individually.\n * @returns - RebaseRevisionMetadata to be passed to `FieldChangeRebaser.rebase`*\n */\nexport function rebaseRevisionMetadataFromInfo(\n\trevInfos: readonly RevisionInfo[],\n\tbaseRevisions: (RevisionTag | undefined)[],\n): RebaseRevisionMetadata {\n\tconst filteredRevisions: RevisionTag[] = [];\n\tfor (const revision of baseRevisions) {\n\t\tif (revision !== undefined) {\n\t\t\tfilteredRevisions.push(revision);\n\t\t}\n\t}\n\n\tconst getBaseRevisions = () => filteredRevisions;\n\treturn {\n\t\t...revisionMetadataSourceFromInfo(revInfos),\n\t\tgetBaseRevisions,\n\t};\n}\n\nfunction isEmptyNodeChangeset(change: NodeChangeset): boolean {\n\treturn change.fieldChanges === undefined && change.nodeExistsConstraint === undefined;\n}\n\nexport function getFieldKind(\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FlexFieldKind>,\n\tkind: FieldKindIdentifier,\n): FieldKindWithEditor {\n\tif (kind === genericFieldKind.identifier) {\n\t\treturn genericFieldKind;\n\t}\n\tconst fieldKind = fieldKinds.get(kind);\n\tassert(fieldKind !== undefined, 0x3ad /* Unknown field kind */);\n\treturn withEditor(fieldKind);\n}\n\nexport function getChangeHandler(\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FlexFieldKind>,\n\tkind: FieldKindIdentifier,\n): FieldChangeHandler<unknown> {\n\treturn getFieldKind(fieldKinds, kind).changeHandler;\n}\n\n// TODO: TFieldData could instead just be a numeric ID generated by the CrossFieldTable\n// The CrossFieldTable could have a generic field ID to context table\ninterface CrossFieldTable<TFieldData> {\n\tsrcTable: CrossFieldMap<unknown>;\n\tdstTable: CrossFieldMap<unknown>;\n\tsrcDependents: CrossFieldMap<TFieldData>;\n\tdstDependents: CrossFieldMap<TFieldData>;\n\tinvalidatedFields: Set<TFieldData>;\n}\n\ninterface InvertTable extends CrossFieldTable<FieldChange> {\n\toriginalFieldToContext: Map<FieldChange, InvertContext>;\n}\n\ninterface InvertContext {\n\tinvertedField: FieldChange;\n\trevision: RevisionTag | undefined;\n}\n\ninterface RebaseTable extends CrossFieldTable<FieldChange> {\n\t/**\n\t * Maps from the FieldChange key used for the CrossFieldTable (which is the FieldChange being rebased)\n\t * to context for the field.\n\t */\n\tfieldToContext: Map<FieldChange, RebaseFieldContext>;\n\t/**\n\t * This map caches the output of a prior rebasing computation for a node, keyed on that computation's input.\n\t * The input for such a computation is characterized by a pair of node changesets:\n\t * - The node changeset from the input changeset being rebased\n\t * - The corresponding node changeset from the changeset being rebased over.\n\t *\n\t * Either of these may be undefined so we adopt the following convention:\n\t * - If the node changeset from the changeset being rebased is defined, then we use that as the key\n\t * - Otherwise, if the node changeset from the changeset being rebased over is defined, then we use that as the key\n\t * - Otherwise, we don't cache the output (which will be undefined anyway).\n\t *\n\t * This map is needed once we switch from the initial pass (which generates a new changeset) to the second pass which\n\t * performs surgery on the changeset generated in the first pass: we don't want to re-run the rebasing of nested\n\t * changes. Instead we want to keep using the objects generated in the first pass and mutate them where needed.\n\t */\n\trebasedNodeCache: Map<NodeChangeset, NodeChangeset>;\n}\n\ninterface RebaseFieldContext {\n\tbaseChange: FieldChange;\n\tbaseRevision: RevisionTag | undefined;\n\tnewChange: FieldChange;\n\trebasedChange: FieldChange;\n}\n\nfunction newComposeTable(): ComposeTable {\n\treturn {\n\t\t...newCrossFieldTable<FieldChange>(),\n\t\tfieldToContext: new Map(),\n\t\tnodeCache: new Map(),\n\t};\n}\n\ninterface ComposeTable extends CrossFieldTable<FieldChange> {\n\t/**\n\t * Maps from an input changeset for a field (from change1 if it has one, from change2 otherwise) to the context for that field.\n\t */\n\tfieldToContext: Map<FieldChange, ComposeFieldContext>;\n\n\t/**\n\t * Maps from an input changeset for a node (from change2 if it has one) to the cached composition of the changesets for that node.\n\t */\n\tnodeCache: Map<NodeChangeset, NodeChangeset>;\n}\n\ninterface ComposeFieldContext {\n\tchange1: TaggedChange<FieldChangeset>;\n\tchange2: TaggedChange<FieldChangeset>;\n\tcomposedChange: FieldChange;\n}\n\nfunction newCrossFieldTable<T>(): CrossFieldTable<T> {\n\treturn {\n\t\tsrcTable: new Map(),\n\t\tdstTable: new Map(),\n\t\tsrcDependents: new Map(),\n\t\tdstDependents: new Map(),\n\t\tinvalidatedFields: new Set(),\n\t};\n}\n\nfunction composeCacheKeyFromNodeChangesets(\n\tchange1: NodeChangeset | undefined,\n\tchange2: NodeChangeset | undefined,\n): NodeChangeset {\n\t// Note that it is important that the key is `change2 ?? change1` and not `change1 ?? change2`.\n\t// If the first changeset moves this node, the change handler may not have seen the second changeset's\n\t// changes for this node on its first pass.\n\t// In that case we will have cached an entry the call to `compose(change1, undefined)`, and we must make sure\n\t// not to reuse the cached entry if a subsequent pass calls `compose(change1, change2)`.\n\treturn change2 ?? change1 ?? fail(\"Should not compose two undefined changesets\");\n}\n\n/**\n * @internal\n */\ninterface ConstraintState {\n\tviolationCount: number;\n}\n\nfunction newConstraintState(violationCount: number): ConstraintState {\n\treturn {\n\t\tviolationCount,\n\t};\n}\n\ninterface CrossFieldManagerI<T> extends CrossFieldManager {\n\ttable: CrossFieldTable<T>;\n}\n\nfunction newCrossFieldManager<T>(\n\tcrossFieldTable: CrossFieldTable<T>,\n\tcurrentFieldKey: T,\n\tallowInval = true,\n): CrossFieldManagerI<T> {\n\tconst getMap = (target: CrossFieldTarget) =>\n\t\ttarget === CrossFieldTarget.Source ? crossFieldTable.srcTable : crossFieldTable.dstTable;\n\n\tconst getDependents = (target: CrossFieldTarget) =>\n\t\ttarget === CrossFieldTarget.Source\n\t\t\t? crossFieldTable.srcDependents\n\t\t\t: crossFieldTable.dstDependents;\n\n\tconst manager = {\n\t\ttable: crossFieldTable,\n\n\t\tset: (\n\t\t\ttarget: CrossFieldTarget,\n\t\t\trevision: RevisionTag | undefined,\n\t\t\tid: ChangesetLocalId,\n\t\t\tcount: number,\n\t\t\tnewValue: unknown,\n\t\t\tinvalidateDependents: boolean,\n\t\t) => {\n\t\t\tif (invalidateDependents && allowInval) {\n\t\t\t\tconst lastChangedId = (id as number) + count - 1;\n\t\t\t\tlet firstId = id;\n\t\t\t\twhile (firstId <= lastChangedId) {\n\t\t\t\t\tconst dependentEntry = getFirstFromCrossFieldMap(\n\t\t\t\t\t\tgetDependents(target),\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\tfirstId,\n\t\t\t\t\t\tlastChangedId - firstId + 1,\n\t\t\t\t\t);\n\t\t\t\t\tif (dependentEntry.value !== undefined) {\n\t\t\t\t\t\tcrossFieldTable.invalidatedFields.add(dependentEntry.value);\n\t\t\t\t\t}\n\n\t\t\t\t\tfirstId = brand(firstId + dependentEntry.length);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetInCrossFieldMap(getMap(target), revision, id, count, newValue);\n\t\t},\n\n\t\tget: (\n\t\t\ttarget: CrossFieldTarget,\n\t\t\trevision: RevisionTag | undefined,\n\t\t\tid: ChangesetLocalId,\n\t\t\tcount: number,\n\t\t\taddDependency: boolean,\n\t\t) => {\n\t\t\tif (addDependency) {\n\t\t\t\t// We assume that if there is already an entry for this ID it is because\n\t\t\t\t// a field handler has called compose on the same node multiple times.\n\t\t\t\t// In this case we only want to update the latest version, so we overwrite the dependency.\n\t\t\t\tsetInCrossFieldMap(getDependents(target), revision, id, count, currentFieldKey);\n\t\t\t}\n\t\t\treturn getFirstFromCrossFieldMap(getMap(target), revision, id, count);\n\t\t},\n\t};\n\n\treturn manager;\n}\n\nfunction makeModularChangeset(\n\tchanges: FieldChangeMap | undefined = undefined,\n\tmaxId: number = -1,\n\trevisions: readonly RevisionInfo[] | undefined = undefined,\n\tconstraintViolationCount: number | undefined = undefined,\n\tbuilds?: ChangeAtomIdMap<TreeChunk>,\n\tdestroys?: ChangeAtomIdMap<number>,\n\trefreshers?: ChangeAtomIdMap<TreeChunk>,\n): ModularChangeset {\n\tconst changeset: Mutable<ModularChangeset> = { fieldChanges: changes ?? new Map() };\n\tif (revisions !== undefined && revisions.length > 0) {\n\t\tchangeset.revisions = revisions;\n\t}\n\tif (maxId >= 0) {\n\t\tchangeset.maxId = brand(maxId);\n\t}\n\tif (constraintViolationCount !== undefined && constraintViolationCount > 0) {\n\t\tchangeset.constraintViolationCount = constraintViolationCount;\n\t}\n\tif (builds !== undefined && builds.size > 0) {\n\t\tchangeset.builds = builds;\n\t}\n\tif (destroys !== undefined && destroys.size > 0) {\n\t\tchangeset.destroys = destroys;\n\t}\n\tif (refreshers !== undefined && refreshers.size > 0) {\n\t\tchangeset.refreshers = refreshers;\n\t}\n\treturn changeset;\n}\n\nexport class ModularEditBuilder extends EditBuilder<ModularChangeset> {\n\tprivate transactionDepth: number = 0;\n\tprivate idAllocator: IdAllocator;\n\n\tpublic constructor(\n\t\tfamily: ChangeFamily<ChangeFamilyEditor, ModularChangeset>,\n\t\tchangeReceiver: (change: ModularChangeset) => void,\n\t) {\n\t\tsuper(family, changeReceiver);\n\t\tthis.idAllocator = idAllocatorFromMaxId();\n\t}\n\n\tpublic override enterTransaction(): void {\n\t\tthis.transactionDepth += 1;\n\t\tif (this.transactionDepth === 1) {\n\t\t\tthis.idAllocator = idAllocatorFromMaxId();\n\t\t}\n\t}\n\n\tpublic override exitTransaction(): void {\n\t\tassert(this.transactionDepth > 0, 0x5b9 /* Cannot exit inexistent transaction */);\n\t\tthis.transactionDepth -= 1;\n\t\tif (this.transactionDepth === 0) {\n\t\t\tthis.idAllocator = idAllocatorFromMaxId();\n\t\t}\n\t}\n\n\t/**\n\t * @param firstId - The ID to associate with the first node\n\t * @param content - The node(s) to build. Can be in either Field or Node mode.\n\t * @returns A description of the edit that can be passed to `submitChanges`.\n\t */\n\tpublic buildTrees(\n\t\tfirstId: ChangesetLocalId,\n\t\tcontent: ITreeCursorSynchronous,\n\t): GlobalEditDescription {\n\t\tif (content.mode === CursorLocationType.Fields && content.getFieldLength() === 0) {\n\t\t\treturn { type: \"global\" };\n\t\t}\n\t\tconst builds: ChangeAtomIdMap<TreeChunk> = new Map();\n\t\tconst innerMap = new Map();\n\t\tbuilds.set(undefined, innerMap);\n\t\tconst chunk =\n\t\t\tcontent.mode === CursorLocationType.Fields\n\t\t\t\t? chunkFieldSingle(content, defaultChunkPolicy)\n\t\t\t\t: chunkTree(content, defaultChunkPolicy);\n\t\tinnerMap.set(firstId, chunk);\n\n\t\treturn {\n\t\t\ttype: \"global\",\n\t\t\tbuilds,\n\t\t};\n\t}\n\n\t/**\n\t * Adds a change to the edit builder\n\t * @param field - the field which is being edited\n\t * @param fieldKind - the kind of the field\n\t * @param change - the change to the field\n\t * @param maxId - the highest `ChangesetLocalId` used in this change\n\t */\n\tpublic submitChange(\n\t\tfield: FieldUpPath,\n\t\tfieldKind: FieldKindIdentifier,\n\t\tchange: FieldChangeset,\n\t\tmaxId: ChangesetLocalId = brand(-1),\n\t): void {\n\t\tconst modularChange = this.buildChange(field, fieldKind, change, maxId);\n\t\tthis.applyChange(modularChange);\n\t}\n\n\t/**\n\t * Adds a change to the edit builder\n\t * @param field - the field which is being edited\n\t * @param fieldKind - the kind of the field\n\t * @param change - the change to the field\n\t * @param maxId - the highest `ChangesetLocalId` used in this change\n\t */\n\tpublic buildChange(\n\t\tfield: FieldUpPath,\n\t\tfieldKind: FieldKindIdentifier,\n\t\tchange: FieldChangeset,\n\t\tmaxId: ChangesetLocalId = brand(-1),\n\t): ModularChangeset {\n\t\tconst changeMap = this.buildChangeMap(field, fieldKind, change);\n\t\treturn makeModularChangeset(changeMap, maxId);\n\t}\n\n\tpublic submitChanges(changes: EditDescription[], maxId: ChangesetLocalId = brand(-1)) {\n\t\tconst modularChange = this.buildChanges(changes, maxId);\n\t\tthis.applyChange(modularChange);\n\t}\n\n\tpublic buildChanges(\n\t\tchanges: EditDescription[],\n\t\tmaxId: ChangesetLocalId = brand(-1),\n\t): ModularChangeset {\n\t\tconst changeMaps = changes.map((change) =>\n\t\t\tmakeAnonChange(\n\t\t\t\tchange.type === \"global\"\n\t\t\t\t\t? makeModularChangeset(\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tchange.builds,\n\t\t\t\t\t )\n\t\t\t\t\t: makeModularChangeset(\n\t\t\t\t\t\t\tthis.buildChangeMap(change.field, change.fieldKind, change.change),\n\t\t\t\t\t ),\n\t\t\t),\n\t\t);\n\t\tconst composedChange = this.changeFamily.rebaser.compose(changeMaps);\n\t\tif (maxId >= 0) {\n\t\t\tcomposedChange.maxId = maxId;\n\t\t}\n\t\treturn composedChange;\n\t}\n\n\tpublic generateId(count?: number): ChangesetLocalId {\n\t\treturn brand(this.idAllocator.allocate(count));\n\t}\n\n\tprivate buildChangeMap(\n\t\tfield: FieldUpPath,\n\t\tfieldKind: FieldKindIdentifier,\n\t\tchange: FieldChangeset,\n\t): FieldChangeMap {\n\t\tlet fieldChangeMap: FieldChangeMap = new Map([[field.field, { fieldKind, change }]]);\n\n\t\tlet remainingPath = field.parent;\n\t\twhile (remainingPath !== undefined) {\n\t\t\tconst nodeChange: NodeChangeset = { fieldChanges: fieldChangeMap };\n\t\t\tconst fieldChange = genericFieldKind.changeHandler.editor.buildChildChange(\n\t\t\t\tremainingPath.parentIndex,\n\t\t\t\tnodeChange,\n\t\t\t);\n\t\t\tfieldChangeMap = new Map([\n\t\t\t\t[\n\t\t\t\t\tremainingPath.parentField,\n\t\t\t\t\t{ fieldKind: genericFieldKind.identifier, change: brand(fieldChange) },\n\t\t\t\t],\n\t\t\t]);\n\t\t\tremainingPath = remainingPath.parent;\n\t\t}\n\n\t\treturn fieldChangeMap;\n\t}\n\n\tpublic addNodeExistsConstraint(path: UpPath): void {\n\t\tconst nodeChange: NodeChangeset = {\n\t\t\tnodeExistsConstraint: { violated: false },\n\t\t};\n\t\tconst fieldChange = genericFieldKind.changeHandler.editor.buildChildChange(\n\t\t\tpath.parentIndex,\n\t\t\tnodeChange,\n\t\t);\n\t\tthis.submitChange(\n\t\t\t{ parent: path.parent, field: path.parentField },\n\t\t\tgenericFieldKind.identifier,\n\t\t\tbrand(fieldChange),\n\t\t);\n\t}\n}\n\n/**\n * @internal\n */\nexport interface FieldEditDescription {\n\ttype: \"field\";\n\tfield: FieldUpPath;\n\tfieldKind: FieldKindIdentifier;\n\tchange: FieldChangeset;\n}\n\n/**\n * @internal\n */\nexport interface GlobalEditDescription {\n\ttype: \"global\";\n\tbuilds?: ChangeAtomIdMap<TreeChunk>;\n}\n\n/**\n * @internal\n */\nexport type EditDescription = FieldEditDescription | GlobalEditDescription;\n\nfunction getRevInfoFromTaggedChanges(changes: TaggedChange<ModularChangeset>[]): {\n\trevInfos: RevisionInfo[];\n\tmaxId: ChangesetLocalId;\n} {\n\tlet maxId = -1;\n\tconst revInfos: RevisionInfo[] = [];\n\tfor (const taggedChange of changes) {\n\t\tconst change = taggedChange.change;\n\t\tmaxId = Math.max(change.maxId ?? -1, maxId);\n\t\trevInfos.push(...revisionInfoFromTaggedChange(taggedChange));\n\t}\n\n\tconst revisions = new Set<RevisionTag>();\n\tconst rolledBackRevisions: RevisionTag[] = [];\n\tfor (const info of revInfos) {\n\t\trevisions.add(info.revision);\n\t\tif (info.rollbackOf !== undefined) {\n\t\t\trolledBackRevisions.push(info.rollbackOf);\n\t\t}\n\t}\n\n\trolledBackRevisions.reverse();\n\tfor (const revision of rolledBackRevisions) {\n\t\tif (!revisions.has(revision)) {\n\t\t\trevInfos.push({ revision });\n\t\t}\n\t}\n\n\treturn { maxId: brand(maxId), revInfos };\n}\n\nfunction revisionInfoFromTaggedChange(\n\ttaggedChange: TaggedChange<ModularChangeset>,\n): RevisionInfo[] {\n\tconst revInfos: RevisionInfo[] = [];\n\tif (taggedChange.change.revisions !== undefined) {\n\t\trevInfos.push(...taggedChange.change.revisions);\n\t} else if (taggedChange.revision !== undefined) {\n\t\tconst info: Mutable<RevisionInfo> = { revision: taggedChange.revision };\n\t\tif (taggedChange.rollbackOf !== undefined) {\n\t\t\tinfo.rollbackOf = taggedChange.rollbackOf;\n\t\t}\n\t\trevInfos.push(info);\n\t}\n\treturn revInfos;\n}\n\nfunction revisionFromTaggedChange(change: TaggedChange<ModularChangeset>): RevisionTag | undefined {\n\treturn change.revision ?? revisionFromRevInfos(change.change.revisions);\n}\n\nfunction revisionFromRevInfos(\n\trevInfos: undefined | readonly RevisionInfo[],\n): RevisionTag | undefined {\n\tif (revInfos === undefined || revInfos.length !== 1) {\n\t\treturn undefined;\n\t}\n\treturn revInfos[0].revision;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"modularChangeFamily.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGlD,OAAO,EAcN,WAAW,EAUX,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,8BAA8B,EAC9B,SAAS,EACT,YAAY,EACZ,eAAe,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKN,cAAc,EACd,KAAK,EACL,mBAAmB,EACnB,IAAI,EACJ,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,gBAAgB,EAChB,SAAS,EACT,kBAAkB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAGN,gBAAgB,EAChB,yBAAyB,EACzB,kBAA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I,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACpD,OAAO,SAAS,CAAC;KACjB;IACD,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7B,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 { BTree } from \"@tylerbu/sorted-btree-es6\";\n\nimport { ICodecFamily } from \"../../codec/index.js\";\nimport {\n\tChangeAtomIdMap,\n\tChangeEncodingContext,\n\tChangeFamily,\n\tChangeFamilyEditor,\n\tChangeRebaser,\n\tChangesetLocalId,\n\tCursorLocationType,\n\tDeltaDetachedNodeBuild,\n\tDeltaDetachedNodeDestruction,\n\tDeltaDetachedNodeId,\n\tDeltaFieldChanges,\n\tDeltaFieldMap,\n\tDeltaRoot,\n\tEditBuilder,\n\tFieldKey,\n\tFieldKindIdentifier,\n\tFieldUpPath,\n\tITreeCursorSynchronous,\n\tRevisionInfo,\n\tRevisionMetadataSource,\n\tRevisionTag,\n\tTaggedChange,\n\tUpPath,\n\temptyDelta,\n\tisEmptyFieldChanges,\n\tmakeAnonChange,\n\tmakeDetachedNodeId,\n\tmapCursorField,\n\trevisionMetadataSourceFromInfo,\n\ttagChange,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n} from \"../../core/index.js\";\nimport {\n\tIdAllocationState,\n\tIdAllocator,\n\tMutable,\n\tNestedSet,\n\taddToNestedSet,\n\tbrand,\n\tdeleteFromNestedMap,\n\tfail,\n\tforEachInNestedMap,\n\tgetOrAddInMap,\n\tidAllocatorFromMaxId,\n\tidAllocatorFromState,\n\tnestedSetContains,\n\tpopulateNestedMap,\n\tsetInNestedMap,\n\ttryGetFromNestedMap,\n} from \"../../util/index.js\";\nimport {\n\tTreeChunk,\n\tchunkFieldSingle,\n\tchunkTree,\n\tdefaultChunkPolicy,\n} from \"../chunked-forest/index.js\";\nimport { cursorForMapTreeNode, mapTreeFromCursor } from \"../mapTreeCursor.js\";\nimport { MemoizedIdRangeAllocator } from \"../memoizedIdRangeAllocator.js\";\n\nimport {\n\tCrossFieldManager,\n\tCrossFieldMap,\n\tCrossFieldTarget,\n\tgetFirstFromCrossFieldMap,\n\tsetInCrossFieldMap,\n} from \"./crossFieldQueries.js\";\nimport {\n\tFieldChangeHandler,\n\tNodeExistenceState,\n\tRebaseRevisionMetadata,\n} from \"./fieldChangeHandler.js\";\nimport { FieldKindWithEditor, withEditor } from \"./fieldKindWithEditor.js\";\nimport { convertGenericChange, genericFieldKind, newGenericChangeset } from \"./genericFieldKind.js\";\nimport { GenericChangeset } from \"./genericFieldKindTypes.js\";\nimport {\n\tFieldChange,\n\tFieldChangeMap,\n\tFieldChangeset,\n\tModularChangeset,\n\tNodeChangeset,\n\tNodeId,\n} from \"./modularChangeTypes.js\";\n\n/**\n * Implementation of ChangeFamily which delegates work in a given field to the appropriate FieldKind\n * as determined by the schema.\n */\nexport class ModularChangeFamily\n\timplements ChangeFamily<ModularEditBuilder, ModularChangeset>, ChangeRebaser<ModularChangeset>\n{\n\tpublic static readonly emptyChange: ModularChangeset = makeModularChangeset();\n\n\tpublic readonly fieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>;\n\n\tpublic constructor(\n\t\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n\t\tpublic readonly codecs: ICodecFamily<ModularChangeset, ChangeEncodingContext>,\n\t) {\n\t\tthis.fieldKinds = fieldKinds;\n\t}\n\n\tpublic get rebaser(): ChangeRebaser<ModularChangeset> {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Produces an equivalent list of `FieldChangeset`s that all target the same {@link FlexFieldKind}.\n\t * @param changes - The list of `FieldChange`s whose `FieldChangeset`s needs to be normalized.\n\t * @returns An object that contains both the equivalent list of `FieldChangeset`s that all\n\t * target the same {@link FlexFieldKind}, and the `FieldKind` that they target.\n\t * The returned `FieldChangeset`s may be a shallow copy of the input `FieldChange`s.\n\t */\n\tprivate normalizeFieldChanges(\n\t\tchange1: FieldChange | undefined,\n\t\tchange2: FieldChange | undefined,\n\t\tgenId: IdAllocator,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): {\n\t\tfieldKind: FieldKindWithEditor;\n\t\tchange1: FieldChangeset | undefined;\n\t\tchange2: FieldChangeset | undefined;\n\t} {\n\t\t// TODO: Handle the case where changes have conflicting field kinds\n\t\tconst kind =\n\t\t\tchange1 !== undefined && change1.fieldKind !== genericFieldKind.identifier\n\t\t\t\t? change1.fieldKind\n\t\t\t\t: change2?.fieldKind ?? genericFieldKind.identifier;\n\n\t\tif (kind === genericFieldKind.identifier) {\n\t\t\t// All the changes are generic\n\t\t\treturn {\n\t\t\t\tfieldKind: genericFieldKind,\n\t\t\t\tchange1: change1?.change,\n\t\t\t\tchange2: change2?.change,\n\t\t\t};\n\t\t}\n\t\tconst fieldKind = getFieldKind(this.fieldKinds, kind);\n\t\tconst handler = fieldKind.changeHandler;\n\t\tconst normalizedChange1 = this.normalizeFieldChange(\n\t\t\tchange1,\n\t\t\thandler,\n\t\t\tgenId,\n\t\t\trevisionMetadata,\n\t\t);\n\t\tconst normalizedChange2 = this.normalizeFieldChange(\n\t\t\tchange2,\n\t\t\thandler,\n\t\t\tgenId,\n\t\t\trevisionMetadata,\n\t\t);\n\t\treturn { fieldKind, change1: normalizedChange1, change2: normalizedChange2 };\n\t}\n\n\tprivate normalizeFieldChange<T>(\n\t\tfieldChange: FieldChange | undefined,\n\t\thandler: FieldChangeHandler<T>,\n\t\tgenId: IdAllocator,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): FieldChangeset | undefined {\n\t\tif (fieldChange === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (fieldChange.fieldKind !== genericFieldKind.identifier) {\n\t\t\treturn fieldChange.change;\n\t\t}\n\n\t\t// The cast is based on the `fieldKind` check above\n\t\tconst genericChange = fieldChange.change as unknown as GenericChangeset;\n\t\tconst convertedChange = convertGenericChange(\n\t\t\tgenericChange,\n\t\t\thandler,\n\t\t\t(child1, child2) => {\n\t\t\t\tassert(\n\t\t\t\t\tchild1 === undefined || child2 === undefined,\n\t\t\t\t\t0x92f /* Should not have two changesets to compose */,\n\t\t\t\t);\n\n\t\t\t\treturn child1 ?? child2 ?? fail(\"Should not compose two undefined node IDs\");\n\t\t\t},\n\t\t\tgenId,\n\t\t\trevisionMetadata,\n\t\t) as FieldChangeset;\n\n\t\treturn convertedChange;\n\t}\n\n\tpublic compose(changes: TaggedChange<ModularChangeset>[]): ModularChangeset {\n\t\tconst activeChanges = changes.filter(\n\t\t\t(change) => (change.change.constraintViolationCount ?? 0) === 0,\n\t\t);\n\n\t\tconst { revInfos, maxId } = getRevInfoFromTaggedChanges(changes);\n\t\tconst idState: IdAllocationState = { maxId };\n\n\t\treturn activeChanges.reduce(\n\t\t\t(change1, change2) =>\n\t\t\t\tmakeAnonChange(this.composePair(change1, change2, revInfos, idState)),\n\t\t\tmakeAnonChange({ fieldChanges: new Map(), nodeChanges: new Map() }),\n\t\t).change;\n\t}\n\n\tprivate composePair(\n\t\tchange1: TaggedChange<ModularChangeset>,\n\t\tchange2: TaggedChange<ModularChangeset>,\n\t\trevInfos: RevisionInfo[],\n\t\tidState: IdAllocationState,\n\t): ModularChangeset {\n\t\tconst genId: IdAllocator = idAllocatorFromState(idState);\n\t\tconst revisionMetadata: RevisionMetadataSource = revisionMetadataSourceFromInfo(revInfos);\n\n\t\tconst crossFieldTable = newComposeTable();\n\n\t\tconst composedFields = this.composeFieldMaps(\n\t\t\tchange1.change.fieldChanges,\n\t\t\tchange1.revision,\n\t\t\tchange2.change.fieldChanges,\n\t\t\tchange2.revision,\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\trevisionMetadata,\n\t\t);\n\n\t\tconst composedNodeChanges: ChangeAtomIdMap<NodeChangeset> = new Map();\n\t\tfor (const [taggedId1, taggedId2] of crossFieldTable.nodeIdPairs) {\n\t\t\tthis.composeNodesById(\n\t\t\t\tchange1.change.nodeChanges,\n\t\t\t\tchange2.change.nodeChanges,\n\t\t\t\tcomposedNodeChanges,\n\t\t\t\ttaggedId1?.change,\n\t\t\t\ttaggedId1?.revision,\n\t\t\t\ttaggedId2?.change,\n\t\t\t\ttaggedId2?.revision,\n\t\t\t\tgenId,\n\t\t\t\tcrossFieldTable,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\t\t}\n\n\t\tcrossFieldTable.nodeIdPairs.length = 0;\n\n\t\twhile (crossFieldTable.invalidatedFields.size > 0) {\n\t\t\tconst fieldsToUpdate = crossFieldTable.invalidatedFields;\n\t\t\tcrossFieldTable.invalidatedFields = new Set();\n\t\t\tfor (const fieldChange of fieldsToUpdate) {\n\t\t\t\tconst context = crossFieldTable.fieldToContext.get(fieldChange);\n\t\t\t\tassert(\n\t\t\t\t\tcontext !== undefined,\n\t\t\t\t\t0x8cc /* Should have context for every invalidated field */,\n\t\t\t\t);\n\t\t\t\tconst { change1: fieldChange1, change2: fieldChange2, composedChange } = context;\n\n\t\t\t\tconst rebaser = getChangeHandler(this.fieldKinds, fieldChange.fieldKind).rebaser;\n\t\t\t\tconst composeNodes = (\n\t\t\t\t\tchild1: NodeId | undefined,\n\t\t\t\t\tchild2: NodeId | undefined,\n\t\t\t\t): NodeId => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tchild2 !== undefined &&\n\t\t\t\t\t\t!nestedSetContains(crossFieldTable.nodeIds, child2.revision, child2.localId)\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst taggedId1 =\n\t\t\t\t\t\t\tchild1 !== undefined\n\t\t\t\t\t\t\t\t? tagChange(child1, fieldChange1.revision)\n\t\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\t\tconst taggedId2 =\n\t\t\t\t\t\t\tchild2 !== undefined\n\t\t\t\t\t\t\t\t? tagChange(child2, fieldChange2.revision)\n\t\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\t\tcrossFieldTable.nodeIdPairs.push([taggedId1, taggedId2]);\n\t\t\t\t\t\tif (child1 !== undefined && child2 !== undefined) {\n\t\t\t\t\t\t\taddToNestedSet(\n\t\t\t\t\t\t\t\tcrossFieldTable.nodeIds,\n\t\t\t\t\t\t\t\tchild2.revision,\n\t\t\t\t\t\t\t\tchild2.localId,\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\treturn (\n\t\t\t\t\t\ttaggedOptAtomId(child1, fieldChange1.revision) ??\n\t\t\t\t\t\ttaggedOptAtomId(child2, fieldChange2.revision) ??\n\t\t\t\t\t\tfail(\"Should not compose two undefined nodes\")\n\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tconst amendedChange = rebaser.compose(\n\t\t\t\t\tfieldChange1,\n\t\t\t\t\tfieldChange2,\n\t\t\t\t\tcomposeNodes,\n\t\t\t\t\tgenId,\n\t\t\t\t\tnewCrossFieldManager(crossFieldTable, fieldChange, false),\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t);\n\t\t\t\tcomposedChange.change = brand(amendedChange);\n\n\t\t\t\t// Process any newly discovered nodes.\n\t\t\t\tfor (const [taggedId1, taggedId2] of crossFieldTable.nodeIdPairs) {\n\t\t\t\t\tthis.composeNodesById(\n\t\t\t\t\t\tchange1.change.nodeChanges,\n\t\t\t\t\t\tchange2.change.nodeChanges,\n\t\t\t\t\t\tcomposedNodeChanges,\n\t\t\t\t\t\ttaggedId1?.change,\n\t\t\t\t\t\ttaggedId1?.revision,\n\t\t\t\t\t\ttaggedId2?.change,\n\t\t\t\t\t\ttaggedId2?.revision,\n\t\t\t\t\t\tgenId,\n\t\t\t\t\t\tcrossFieldTable,\n\t\t\t\t\t\trevisionMetadata,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tcrossFieldTable.nodeIdPairs.length = 0;\n\t\t\t}\n\t\t}\n\n\t\tconst { allBuilds, allDestroys, allRefreshers } = composeBuildsDestroysAndRefreshers([\n\t\t\tchange1,\n\t\t\tchange2,\n\t\t]);\n\n\t\treturn makeModularChangeset(\n\t\t\tthis.pruneFieldMap(composedFields, composedNodeChanges),\n\t\t\tcomposedNodeChanges,\n\t\t\tidState.maxId,\n\t\t\trevInfos,\n\t\t\tundefined,\n\t\t\tallBuilds,\n\t\t\tallDestroys,\n\t\t\tallRefreshers,\n\t\t);\n\t}\n\n\tprivate composeFieldMaps(\n\t\tchange1: FieldChangeMap | undefined,\n\t\trevision1: RevisionTag | undefined,\n\t\tchange2: FieldChangeMap | undefined,\n\t\trevision2: RevisionTag | undefined,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: ComposeTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): FieldChangeMap {\n\t\tconst composedFields: FieldChangeMap = new Map();\n\t\tconst fields = new Set<FieldKey>();\n\t\tfor (const field of change1?.keys() ?? []) {\n\t\t\tfields.add(field);\n\t\t}\n\n\t\tfor (const field of change2?.keys() ?? []) {\n\t\t\tfields.add(field);\n\t\t}\n\n\t\tfor (const field of fields) {\n\t\t\tconst fieldChange1 = change1?.get(field);\n\t\t\tconst fieldChange2 = change2?.get(field);\n\n\t\t\tconst {\n\t\t\t\tfieldKind,\n\t\t\t\tchange1: normalizedFieldChange1,\n\t\t\t\tchange2: normalizedFieldChange2,\n\t\t\t} = this.normalizeFieldChanges(fieldChange1, fieldChange2, genId, revisionMetadata);\n\n\t\t\tconst manager = newCrossFieldManager(crossFieldTable, fieldChange1 ?? fieldChange2);\n\t\t\tconst taggedChange1 = tagChange(\n\t\t\t\tnormalizedFieldChange1 ?? fieldKind.changeHandler.createEmpty(),\n\t\t\t\tfieldChange1?.revision ?? revision1,\n\t\t\t);\n\t\t\tconst taggedChange2 = tagChange(\n\t\t\t\tnormalizedFieldChange2 ?? fieldKind.changeHandler.createEmpty(),\n\t\t\t\tfieldChange2?.revision ?? revision2,\n\t\t\t);\n\n\t\t\tconst composedChange = fieldKind.changeHandler.rebaser.compose(\n\t\t\t\ttaggedChange1,\n\t\t\t\ttaggedChange2,\n\t\t\t\t(child1, child2) => {\n\t\t\t\t\tconst taggedId1 =\n\t\t\t\t\t\tchild1 !== undefined\n\t\t\t\t\t\t\t? tagChange(child1, taggedChange1.revision)\n\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\tconst taggedId2 =\n\t\t\t\t\t\tchild2 !== undefined\n\t\t\t\t\t\t\t? tagChange(child2, taggedChange2.revision)\n\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\tcrossFieldTable.nodeIdPairs.push([taggedId1, taggedId2]);\n\t\t\t\t\tif (child2 !== undefined) {\n\t\t\t\t\t\taddToNestedSet(crossFieldTable.nodeIds, child2.revision, child2.localId);\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\ttaggedOptAtomId(child1, revision1) ??\n\t\t\t\t\t\ttaggedOptAtomId(child2, revision2) ??\n\t\t\t\t\t\tfail(\"Should not compose two undefined nodes\")\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tgenId,\n\t\t\t\tmanager,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\n\t\t\tconst composedField: FieldChange = {\n\t\t\t\tfieldKind: fieldKind.identifier,\n\t\t\t\tchange: brand(composedChange),\n\t\t\t};\n\n\t\t\tconst fieldKey =\n\t\t\t\tfieldChange1 ?? fieldChange2 ?? fail(\"At least one field should have changes\");\n\n\t\t\tcrossFieldTable.fieldToContext.set(fieldKey, {\n\t\t\t\tchange1: taggedChange1,\n\t\t\t\tchange2: taggedChange2,\n\t\t\t\tcomposedChange: composedField,\n\t\t\t});\n\n\t\t\t// TODO: Could optimize by checking that composedField is non-empty\n\t\t\tcomposedFields.set(field, composedField);\n\t\t}\n\n\t\treturn composedFields;\n\t}\n\n\tprivate composeNodesById(\n\t\tnodeChanges1: ChangeAtomIdMap<NodeChangeset>,\n\t\tnodeChanges2: ChangeAtomIdMap<NodeChangeset>,\n\t\tcomposedNodeChanges: ChangeAtomIdMap<NodeChangeset>,\n\t\tid1: NodeId | undefined,\n\t\trevision1: RevisionTag | undefined,\n\t\tid2: NodeId | undefined,\n\t\trevision2: RevisionTag | undefined,\n\t\tidAllocator: IdAllocator,\n\t\tcrossFieldTable: ComposeTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): void {\n\t\tconst nodeChangeset1 =\n\t\t\tid1 !== undefined\n\t\t\t\t? tryGetFromNestedMap(nodeChanges1, id1.revision, id1.localId) ??\n\t\t\t\t fail(\"Unknown node ID\")\n\t\t\t\t: {};\n\n\t\tconst nodeChangeset2 =\n\t\t\tid2 !== undefined\n\t\t\t\t? tryGetFromNestedMap(nodeChanges2, id2.revision, id2.localId) ??\n\t\t\t\t fail(\"Unknown node ID\")\n\t\t\t\t: {};\n\n\t\tconst composedNodeChangeset = this.composeNodeChanges(\n\t\t\tnodeChangeset1,\n\t\t\trevision1,\n\t\t\tnodeChangeset2,\n\t\t\trevision2,\n\t\t\tidAllocator,\n\t\t\tcrossFieldTable,\n\t\t\trevisionMetadata,\n\t\t);\n\n\t\tconst nodeId =\n\t\t\ttaggedOptAtomId(id1, revision1) ??\n\t\t\ttaggedOptAtomId(id2, revision2) ??\n\t\t\tfail(\"Should not compose two undefined node IDs\");\n\t\tsetInNestedMap(composedNodeChanges, nodeId.revision, nodeId.localId, composedNodeChangeset);\n\t}\n\n\tprivate composeNodeChanges(\n\t\tchange1: NodeChangeset | undefined,\n\t\trevision1: RevisionTag | undefined,\n\t\tchange2: NodeChangeset | undefined,\n\t\trevision2: RevisionTag | undefined,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: ComposeTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): NodeChangeset {\n\t\tconst nodeExistsConstraint = change1?.nodeExistsConstraint ?? change2?.nodeExistsConstraint;\n\n\t\tconst composedFieldChanges = this.composeFieldMaps(\n\t\t\tchange1?.fieldChanges,\n\t\t\trevision1,\n\t\t\tchange2?.fieldChanges,\n\t\t\trevision2,\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\trevisionMetadata,\n\t\t);\n\t\tconst composedNodeChange: NodeChangeset = {};\n\n\t\tif (composedFieldChanges.size > 0) {\n\t\t\tcomposedNodeChange.fieldChanges = composedFieldChanges;\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tcomposedNodeChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn composedNodeChange;\n\t}\n\n\t/**\n\t * @param change - The change to invert.\n\t * @param isRollback - Whether the inverted change is meant to rollback a change on a branch as is the case when\n\t * performing a sandwich rebase.\n\t * @param repairStore - The store to query for repair data.\n\t */\n\tpublic invert(change: TaggedChange<ModularChangeset>, isRollback: boolean): ModularChangeset {\n\t\t// Return an empty inverse for changes with constraint violations\n\t\tif ((change.change.constraintViolationCount ?? 0) > 0) {\n\t\t\treturn makeModularChangeset();\n\t\t}\n\n\t\tconst idState: IdAllocationState = { maxId: change.change.maxId ?? -1 };\n\t\t// This idState is used for the whole of the IdAllocator's lifetime, which allows\n\t\t// this function to read the updated idState.maxId after more IDs are allocated.\n\t\t// TODO: add a getMax function to IdAllocator to make for a clearer contract.\n\t\tconst genId: IdAllocator = idAllocatorFromState(idState);\n\t\tconst crossFieldTable: InvertTable = {\n\t\t\t...newCrossFieldTable<FieldChange>(),\n\t\t\toriginalFieldToContext: new Map(),\n\t\t};\n\n\t\tconst { revInfos } = getRevInfoFromTaggedChanges([change]);\n\t\tconst revisionMetadata = revisionMetadataSourceFromInfo(revInfos);\n\n\t\tconst invertedFields = this.invertFieldMap(\n\t\t\ttagChange(change.change.fieldChanges, revisionFromTaggedChange(change)),\n\t\t\tisRollback,\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\trevisionMetadata,\n\t\t);\n\n\t\tconst invertedNodes: ChangeAtomIdMap<NodeChangeset> = new Map();\n\t\tforEachInNestedMap(change.change.nodeChanges, (nodeChangeset, revision, localId) => {\n\t\t\tsetInNestedMap(\n\t\t\t\tinvertedNodes,\n\t\t\t\trevision,\n\t\t\t\tlocalId,\n\t\t\t\tthis.invertNodeChange(\n\t\t\t\t\t// TODO: This does not allow inheriting revision from parent\n\t\t\t\t\ttagChange(nodeChangeset, change.revision),\n\t\t\t\t\tisRollback,\n\t\t\t\t\tgenId,\n\t\t\t\t\tcrossFieldTable,\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t),\n\t\t\t);\n\t\t});\n\n\t\tif (crossFieldTable.invalidatedFields.size > 0) {\n\t\t\tconst fieldsToUpdate = crossFieldTable.invalidatedFields;\n\t\t\tcrossFieldTable.invalidatedFields = new Set();\n\t\t\tfor (const fieldChange of fieldsToUpdate) {\n\t\t\t\tconst originalFieldChange = fieldChange.change;\n\t\t\t\tconst context = crossFieldTable.originalFieldToContext.get(fieldChange);\n\t\t\t\tassert(\n\t\t\t\t\tcontext !== undefined,\n\t\t\t\t\t0x851 /* Should have context for every invalidated field */,\n\t\t\t\t);\n\t\t\t\tconst { invertedField, revision } = context;\n\n\t\t\t\tconst amendedChange = getChangeHandler(\n\t\t\t\t\tthis.fieldKinds,\n\t\t\t\t\tfieldChange.fieldKind,\n\t\t\t\t).rebaser.invert(\n\t\t\t\t\ttagChange(originalFieldChange, revision),\n\t\t\t\t\tisRollback,\n\t\t\t\t\tgenId,\n\t\t\t\t\tnewCrossFieldManager(crossFieldTable, fieldChange),\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t);\n\t\t\t\tinvertedField.change = brand(amendedChange);\n\t\t\t}\n\t\t}\n\n\t\t// Rollback changesets destroy the nodes created by the change being rolled back.\n\t\tconst destroys = isRollback\n\t\t\t? invertBuilds(change.change.builds, change.revision)\n\t\t\t: undefined;\n\n\t\t// Destroys only occur in rollback changesets, which are never inverted.\n\t\tassert(\n\t\t\tchange.change.destroys === undefined,\n\t\t\t0x89a /* Unexpected destroys in change to invert */,\n\t\t);\n\n\t\tconst revInfo = change.change.revisions;\n\t\treturn makeModularChangeset(\n\t\t\tinvertedFields,\n\t\t\tinvertedNodes,\n\t\t\tidState.maxId,\n\t\t\trevInfo === undefined\n\t\t\t\t? undefined\n\t\t\t\t: (isRollback\n\t\t\t\t\t\t? revInfo.map(({ revision }) => ({ revision, rollbackOf: revision }))\n\t\t\t\t\t\t: Array.from(revInfo)\n\t\t\t\t ).reverse(),\n\t\t\tchange.change.constraintViolationCount,\n\t\t\tundefined,\n\t\t\tdestroys,\n\t\t);\n\t}\n\n\tprivate invertFieldMap(\n\t\tchanges: TaggedChange<FieldChangeMap>,\n\t\tisRollback: boolean,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: InvertTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): FieldChangeMap {\n\t\tconst invertedFields: FieldChangeMap = new Map();\n\n\t\tfor (const [field, fieldChange] of changes.change) {\n\t\t\tconst { revision } = fieldChange.revision !== undefined ? fieldChange : changes;\n\n\t\t\tconst manager = newCrossFieldManager(crossFieldTable, fieldChange);\n\t\t\tconst invertedChange = getChangeHandler(\n\t\t\t\tthis.fieldKinds,\n\t\t\t\tfieldChange.fieldKind,\n\t\t\t).rebaser.invert(\n\t\t\t\t{ revision, change: fieldChange.change },\n\t\t\t\tisRollback,\n\t\t\t\tgenId,\n\t\t\t\tmanager,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\n\t\t\tconst invertedFieldChange: FieldChange = {\n\t\t\t\t...fieldChange,\n\t\t\t\tchange: brand(invertedChange),\n\t\t\t};\n\t\t\tinvertedFields.set(field, invertedFieldChange);\n\n\t\t\tcrossFieldTable.originalFieldToContext.set(fieldChange, {\n\t\t\t\tinvertedField: invertedFieldChange,\n\t\t\t\trevision,\n\t\t\t});\n\t\t}\n\n\t\treturn invertedFields;\n\t}\n\n\tprivate invertNodeChange(\n\t\tchange: TaggedChange<NodeChangeset>,\n\t\tisRollback: boolean,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: InvertTable,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): NodeChangeset {\n\t\tconst inverse: NodeChangeset = {};\n\n\t\tif (change.change.fieldChanges !== undefined) {\n\t\t\tinverse.fieldChanges = this.invertFieldMap(\n\t\t\t\t{ ...change, change: change.change.fieldChanges },\n\t\t\t\tisRollback,\n\t\t\t\tgenId,\n\t\t\t\tcrossFieldTable,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\t\t}\n\n\t\treturn inverse;\n\t}\n\n\tpublic rebase(\n\t\tchange: ModularChangeset,\n\t\tover: TaggedChange<ModularChangeset>,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): ModularChangeset {\n\t\tconst maxId = Math.max(change.maxId ?? -1, over.change.maxId ?? -1);\n\t\tconst idState: IdAllocationState = { maxId };\n\t\tconst genId: IdAllocator = idAllocatorFromState(idState);\n\t\tconst crossFieldTable: RebaseTable = {\n\t\t\t...newCrossFieldTable<FieldChange>(),\n\t\t\tfieldToContext: new Map(),\n\t\t\trebasedNodeCache: new Map(),\n\t\t\tnodeIdPairs: [],\n\t\t};\n\n\t\tlet constraintState = newConstraintState(change.constraintViolationCount ?? 0);\n\n\t\tconst getBaseRevisions = () =>\n\t\t\trevisionInfoFromTaggedChange(over).map((info) => info.revision);\n\n\t\tconst rebaseMetadata = {\n\t\t\t...revisionMetadata,\n\t\t\tgetBaseRevisions,\n\t\t};\n\n\t\tconst rebasedFields = this.rebaseFieldMap(\n\t\t\tchange.fieldChanges,\n\t\t\ttagChange(over.change.fieldChanges, revisionFromTaggedChange(over)),\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\t() => true,\n\t\t\trebaseMetadata,\n\t\t\tconstraintState,\n\t\t);\n\n\t\tconst rebasedNodes: ChangeAtomIdMap<NodeChangeset> = new Map();\n\t\tfor (const [newId, taggedBaseId, existenceState] of crossFieldTable.nodeIdPairs) {\n\t\t\tconst newNodeChange =\n\t\t\t\tnewId !== undefined\n\t\t\t\t\t? tryGetFromNestedMap(change.nodeChanges, newId.revision, newId.localId)\n\t\t\t\t\t: undefined;\n\n\t\t\tconst taggedBaseNodeChange =\n\t\t\t\ttaggedBaseId !== undefined\n\t\t\t\t\t? tagChange(\n\t\t\t\t\t\t\ttryGetFromNestedMap(\n\t\t\t\t\t\t\t\tover.change.nodeChanges,\n\t\t\t\t\t\t\t\ttaggedBaseId.change.revision,\n\t\t\t\t\t\t\t\ttaggedBaseId.change.localId,\n\t\t\t\t\t\t\t) ?? fail(\"Unknown node ID\"),\n\t\t\t\t\t\t\ttaggedBaseId.revision,\n\t\t\t\t\t )\n\t\t\t\t\t: makeAnonChange({});\n\n\t\t\tconst rebasedNode = this.rebaseNodeChange(\n\t\t\t\tnewNodeChange,\n\t\t\t\ttaggedBaseNodeChange,\n\t\t\t\tgenId,\n\t\t\t\tcrossFieldTable,\n\t\t\t\t() => true,\n\t\t\t\trebaseMetadata,\n\t\t\t\tconstraintState,\n\t\t\t\texistenceState,\n\t\t\t);\n\n\t\t\tif (rebasedNode !== undefined) {\n\t\t\t\tconst nodeId =\n\t\t\t\t\tnewId ??\n\t\t\t\t\ttaggedAtomId(\n\t\t\t\t\t\ttaggedBaseId?.change ?? fail(\"Should not have two undefined IDs\"),\n\t\t\t\t\t\ttaggedBaseId?.revision,\n\t\t\t\t\t);\n\n\t\t\t\tsetInNestedMap(rebasedNodes, nodeId.revision, nodeId.localId, rebasedNode);\n\t\t\t}\n\t\t}\n\n\t\tif (crossFieldTable.invalidatedFields.size > 0) {\n\t\t\tconst fieldsToUpdate = crossFieldTable.invalidatedFields;\n\t\t\tcrossFieldTable.invalidatedFields = new Set();\n\t\t\tconstraintState = newConstraintState(change.constraintViolationCount ?? 0);\n\t\t\tfor (const field of fieldsToUpdate) {\n\t\t\t\t// TODO: Should we copy the context table out before this loop?\n\t\t\t\tconst context = crossFieldTable.fieldToContext.get(field);\n\t\t\t\tassert(context !== undefined, 0x852 /* Every field should have a context */);\n\t\t\t\tconst {\n\t\t\t\t\tfieldKind,\n\t\t\t\t\tchange1: fieldChangeset,\n\t\t\t\t\tchange2: baseChangeset,\n\t\t\t\t} = this.normalizeFieldChanges(\n\t\t\t\t\tcontext.newChange,\n\t\t\t\t\tcontext.baseChange,\n\t\t\t\t\tgenId,\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t);\n\n\t\t\t\tcontext.rebasedChange.change = fieldKind.changeHandler.rebaser.rebase(\n\t\t\t\t\tfieldChangeset,\n\t\t\t\t\ttagChange(baseChangeset, context.baseRevision),\n\t\t\t\t\t(curr, base, existenceState) => curr,\n\t\t\t\t\tgenId,\n\t\t\t\t\tnewCrossFieldManager(crossFieldTable, field),\n\t\t\t\t\trebaseMetadata,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn makeModularChangeset(\n\t\t\tthis.pruneFieldMap(rebasedFields, rebasedNodes),\n\t\t\trebasedNodes,\n\t\t\tidState.maxId,\n\t\t\tchange.revisions,\n\t\t\tconstraintState.violationCount,\n\t\t\tchange.builds,\n\t\t\tchange.destroys,\n\t\t\tchange.refreshers,\n\t\t);\n\t}\n\n\tprivate rebaseFieldMap(\n\t\tchange: FieldChangeMap,\n\t\tover: TaggedChange<FieldChangeMap>,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: RebaseTable,\n\t\tfieldFilter: (baseChange: FieldChange, newChange: FieldChange | undefined) => boolean,\n\t\trevisionMetadata: RebaseRevisionMetadata,\n\t\tconstraintState: ConstraintState,\n\t\texistenceState: NodeExistenceState = NodeExistenceState.Alive,\n\t): FieldChangeMap {\n\t\tconst rebasedFields: FieldChangeMap = new Map();\n\n\t\t// Rebase fields contained in the base changeset\n\t\tfor (const [field, baseChanges] of over.change) {\n\t\t\tif (!fieldFilter(baseChanges, change.get(field))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst fieldChange: FieldChange = change.get(field) ?? {\n\t\t\t\tfieldKind: genericFieldKind.identifier,\n\t\t\t\tchange: brand(newGenericChangeset()),\n\t\t\t};\n\t\t\tconst {\n\t\t\t\tfieldKind,\n\t\t\t\tchange1: fieldChangeset,\n\t\t\t\tchange2: baseChangeset,\n\t\t\t} = this.normalizeFieldChanges(fieldChange, baseChanges, genId, revisionMetadata);\n\n\t\t\tconst { revision } = over;\n\t\t\tconst taggedBaseChange = { revision, change: baseChangeset };\n\n\t\t\tconst manager = newCrossFieldManager(crossFieldTable, fieldChange);\n\n\t\t\tconst rebaseChild = (\n\t\t\t\tchild: NodeId | undefined,\n\t\t\t\tbaseChild: NodeId | undefined,\n\t\t\t\tstateChange: NodeExistenceState | undefined,\n\t\t\t) => {\n\t\t\t\tconst taggedBase =\n\t\t\t\t\tbaseChild !== undefined ? tagChange(baseChild, over.revision) : undefined;\n\n\t\t\t\tcrossFieldTable.nodeIdPairs.push([child, taggedBase, stateChange]);\n\t\t\t\treturn (\n\t\t\t\t\tchild ??\n\t\t\t\t\t// The fact `child` is undefined means that the changeset to rebase does not include changes for\n\t\t\t\t\t// this node or its descendants. However, it's possible that it will after rebasing.\n\t\t\t\t\t// In that case, we will need a NodeId to represent these changes under in the rebased changeset.\n\t\t\t\t\t// We adopt `baseChild` for this purpose.\n\t\t\t\t\ttaggedAtomId(\n\t\t\t\t\t\tbaseChild ?? fail(\"Should not have two undefined node IDs\"),\n\t\t\t\t\t\tover.revision,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tconst rebasedField = fieldKind.changeHandler.rebaser.rebase(\n\t\t\t\tfieldChangeset,\n\t\t\t\ttaggedBaseChange,\n\t\t\t\trebaseChild,\n\t\t\t\tgenId,\n\t\t\t\tmanager,\n\t\t\t\trevisionMetadata,\n\t\t\t);\n\n\t\t\tconst rebasedFieldChange: FieldChange = {\n\t\t\t\tfieldKind: fieldKind.identifier,\n\t\t\t\tchange: brand(rebasedField),\n\t\t\t};\n\n\t\t\trebasedFields.set(field, rebasedFieldChange);\n\n\t\t\tcrossFieldTable.fieldToContext.set(fieldChange, {\n\t\t\t\tbaseChange: baseChanges,\n\t\t\t\tbaseRevision: revision,\n\t\t\t\tnewChange: fieldChange,\n\t\t\t\trebasedChange: rebasedFieldChange,\n\t\t\t});\n\t\t}\n\n\t\t// Rebase the fields of the new changeset which don't have a corresponding base field.\n\t\tfor (const [field, fieldChange] of change) {\n\t\t\tif (!over.change?.has(field)) {\n\t\t\t\tconst baseChanges: FieldChange = {\n\t\t\t\t\tfieldKind: genericFieldKind.identifier,\n\t\t\t\t\tchange: brand(newGenericChangeset()),\n\t\t\t\t};\n\n\t\t\t\tconst {\n\t\t\t\t\tfieldKind,\n\t\t\t\t\tchange1: fieldChangeset,\n\t\t\t\t\tchange2: baseChangeset,\n\t\t\t\t} = this.normalizeFieldChanges(fieldChange, baseChanges, genId, revisionMetadata);\n\n\t\t\t\t// TODO: Don't we need to add an entry in the context table?\n\t\t\t\tconst manager = newCrossFieldManager(crossFieldTable, fieldChange);\n\t\t\t\tconst rebasedChangeset = fieldKind.changeHandler.rebaser.rebase(\n\t\t\t\t\tfieldChangeset,\n\t\t\t\t\ttagChange(baseChangeset, over.revision),\n\t\t\t\t\t(child, baseChild) => {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tbaseChild === undefined,\n\t\t\t\t\t\t\t0x5b6 /* This field should not have any base changes */,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tcrossFieldTable.nodeIdPairs.push([child, undefined, existenceState]);\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t},\n\t\t\t\t\tgenId,\n\t\t\t\t\tmanager,\n\t\t\t\t\trevisionMetadata,\n\t\t\t\t\texistenceState,\n\t\t\t\t);\n\t\t\t\tconst rebasedFieldChange: FieldChange = {\n\t\t\t\t\tfieldKind: fieldKind.identifier,\n\t\t\t\t\tchange: brand(rebasedChangeset),\n\t\t\t\t};\n\t\t\t\trebasedFields.set(field, rebasedFieldChange);\n\t\t\t}\n\t\t}\n\n\t\treturn rebasedFields;\n\t}\n\n\tprivate rebaseNodeChange(\n\t\tchange: NodeChangeset | undefined,\n\t\tover: TaggedChange<NodeChangeset | undefined>,\n\t\tgenId: IdAllocator,\n\t\tcrossFieldTable: RebaseTable,\n\t\tfieldFilter: (baseChange: FieldChange, newChange: FieldChange | undefined) => boolean,\n\t\trevisionMetadata: RebaseRevisionMetadata,\n\t\tconstraintState: ConstraintState,\n\t\texistenceState: NodeExistenceState = NodeExistenceState.Alive,\n\t): NodeChangeset | undefined {\n\t\tconst key = change ?? over.change;\n\t\tif (key === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst baseMap: TaggedChange<FieldChangeMap> =\n\t\t\tover.change?.fieldChanges !== undefined\n\t\t\t\t? {\n\t\t\t\t\t\t...over,\n\t\t\t\t\t\tchange: over.change.fieldChanges,\n\t\t\t\t }\n\t\t\t\t: tagChange(new Map(), over.revision);\n\n\t\tconst fieldChanges = this.rebaseFieldMap(\n\t\t\tchange?.fieldChanges ?? new Map(),\n\t\t\tbaseMap,\n\t\t\tgenId,\n\t\t\tcrossFieldTable,\n\t\t\tfieldFilter,\n\t\t\trevisionMetadata,\n\t\t\tconstraintState,\n\t\t\texistenceState,\n\t\t);\n\n\t\tconst rebasedChange: NodeChangeset = {};\n\n\t\tif (fieldChanges.size > 0) {\n\t\t\trebasedChange.fieldChanges = fieldChanges;\n\t\t}\n\n\t\tif (change?.nodeExistsConstraint !== undefined) {\n\t\t\trebasedChange.nodeExistsConstraint = change.nodeExistsConstraint;\n\t\t}\n\n\t\t// If there's a node exists constraint and we removed or revived the node, update constraint state\n\t\tif (rebasedChange.nodeExistsConstraint !== undefined) {\n\t\t\tconst violatedAfter = existenceState === NodeExistenceState.Dead;\n\n\t\t\tif (rebasedChange.nodeExistsConstraint.violated !== violatedAfter) {\n\t\t\t\trebasedChange.nodeExistsConstraint = {\n\t\t\t\t\t...rebasedChange.nodeExistsConstraint,\n\t\t\t\t\tviolated: violatedAfter,\n\t\t\t\t};\n\t\t\t\tconstraintState.violationCount += violatedAfter ? 1 : -1;\n\t\t\t}\n\t\t}\n\n\t\tcrossFieldTable.rebasedNodeCache.set(key, rebasedChange);\n\t\treturn rebasedChange;\n\t}\n\n\tprivate pruneFieldMap(\n\t\tchangeset: FieldChangeMap,\n\t\tnodeMap: ChangeAtomIdMap<NodeChangeset>,\n\t): FieldChangeMap | undefined {\n\t\tconst prunedChangeset: FieldChangeMap = new Map();\n\t\tfor (const [field, fieldChange] of changeset) {\n\t\t\tconst handler = getChangeHandler(this.fieldKinds, fieldChange.fieldKind);\n\n\t\t\tconst prunedFieldChangeset = handler.rebaser.prune(fieldChange.change, (nodeId) =>\n\t\t\t\tthis.pruneNodeChange(nodeId, nodeMap),\n\t\t\t);\n\n\t\t\tif (!handler.isEmpty(prunedFieldChangeset)) {\n\t\t\t\tprunedChangeset.set(field, { ...fieldChange, change: brand(prunedFieldChangeset) });\n\t\t\t}\n\t\t}\n\n\t\treturn prunedChangeset.size > 0 ? prunedChangeset : undefined;\n\t}\n\n\tprivate pruneNodeChange(\n\t\tnodeId: NodeId,\n\t\tnodeMap: ChangeAtomIdMap<NodeChangeset>,\n\t): NodeId | undefined {\n\t\tconst changeset = tryGetFromNestedMap(nodeMap, nodeId.revision, nodeId.localId);\n\t\tassert(changeset !== undefined, 0x930 /* Unknown node ID */);\n\n\t\tconst prunedFields =\n\t\t\tchangeset.fieldChanges !== undefined\n\t\t\t\t? this.pruneFieldMap(changeset.fieldChanges, nodeMap)\n\t\t\t\t: undefined;\n\n\t\tconst prunedChange = { ...changeset, fieldChanges: prunedFields };\n\t\tif (prunedChange.fieldChanges === undefined) {\n\t\t\tdelete prunedChange.fieldChanges;\n\t\t}\n\n\t\tif (isEmptyNodeChangeset(prunedChange)) {\n\t\t\tdeleteFromNestedMap(nodeMap, nodeId.revision, nodeId.localId);\n\t\t\treturn undefined;\n\t\t} else {\n\t\t\tsetInNestedMap(nodeMap, nodeId.revision, nodeId.localId, prunedChange);\n\t\t\treturn nodeId;\n\t\t}\n\t}\n\n\tpublic buildEditor(changeReceiver: (change: ModularChangeset) => void): ModularEditBuilder {\n\t\treturn new ModularEditBuilder(this, changeReceiver);\n\t}\n}\n\nfunction composeBuildsDestroysAndRefreshers(changes: TaggedChange<ModularChangeset>[]) {\n\tconst allBuilds: ChangeAtomIdMap<TreeChunk> = new Map();\n\tconst allDestroys: ChangeAtomIdMap<number> = new Map();\n\tconst allRefreshers: ChangeAtomIdMap<TreeChunk> = new Map();\n\tfor (const taggedChange of changes) {\n\t\tconst revision = revisionFromTaggedChange(taggedChange);\n\t\tconst change = taggedChange.change;\n\t\tif (change.builds) {\n\t\t\tfor (const [revisionKey, innerMap] of change.builds) {\n\t\t\t\tconst setRevisionKey = revisionKey ?? revision;\n\t\t\t\tconst innerDstMap = getOrAddInMap(\n\t\t\t\t\tallBuilds,\n\t\t\t\t\tsetRevisionKey,\n\t\t\t\t\tnew Map<ChangesetLocalId, TreeChunk>(),\n\t\t\t\t);\n\t\t\t\tfor (const [id, chunk] of innerMap) {\n\t\t\t\t\t// Check for duplicate builds and prefer earlier ones.\n\t\t\t\t\t// This can happen in compositions of commits that needed to include repair data refreshers (e.g., undos):\n\t\t\t\t\t// In that case, it's possible for the refreshers to contain different trees because the latter\n\t\t\t\t\t// refresher may already reflect the changes made by the commit that includes the earlier\n\t\t\t\t\t// refresher. This composition includes the changes made by the commit that includes the\n\t\t\t\t\t// earlier refresher, so we need to include the build for the earlier refresher, otherwise\n\t\t\t\t\t// the produced changeset will build a tree one which those changes have already been applied\n\t\t\t\t\t// and also try to apply the changes again, effectively applying them twice.\n\t\t\t\t\t// Note that it would in principle be possible to adopt the later build and exclude from the\n\t\t\t\t\t// composition all the changes already reflected on the tree, but that is not something we\n\t\t\t\t\t// care to support at this time.\n\t\t\t\t\tif (!innerDstMap.has(id)) {\n\t\t\t\t\t\t// Check for earlier destroys that this build might cancel-out with.\n\t\t\t\t\t\tconst destroyCount = tryGetFromNestedMap(allDestroys, setRevisionKey, id);\n\t\t\t\t\t\tif (destroyCount === undefined) {\n\t\t\t\t\t\t\tinnerDstMap.set(id, chunk);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\t\tdestroyCount === chunk.topLevelLength,\n\t\t\t\t\t\t\t\t0x89b /* Expected build and destroy to have the same length */,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tdeleteFromNestedMap(allDestroys, setRevisionKey, id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (innerDstMap.size === 0) {\n\t\t\t\t\tallBuilds.delete(setRevisionKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (change.destroys !== undefined) {\n\t\t\tfor (const [revisionKey, innerMap] of change.destroys) {\n\t\t\t\tconst setRevisionKey = revisionKey ?? revision;\n\t\t\t\tconst innerDstMap = getOrAddInMap(\n\t\t\t\t\tallDestroys,\n\t\t\t\t\tsetRevisionKey,\n\t\t\t\t\tnew Map<ChangesetLocalId, number>(),\n\t\t\t\t);\n\t\t\t\tfor (const [id, count] of innerMap) {\n\t\t\t\t\t// Check for earlier builds that this destroy might cancel-out with.\n\t\t\t\t\tconst chunk = tryGetFromNestedMap(allBuilds, setRevisionKey, id);\n\t\t\t\t\tif (chunk === undefined) {\n\t\t\t\t\t\tinnerDstMap.set(id, count);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tcount === chunk.topLevelLength,\n\t\t\t\t\t\t\t0x89c /* Expected build and destroy to have the same length */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdeleteFromNestedMap(allBuilds, setRevisionKey, id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (innerDstMap.size === 0) {\n\t\t\t\t\tallDestroys.delete(setRevisionKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add all refreshers while preferring earlier ones\n\t\tif (change.refreshers) {\n\t\t\tpopulateNestedMap(change.refreshers, allRefreshers, false);\n\t\t}\n\t}\n\treturn { allBuilds, allDestroys, allRefreshers };\n}\n\nfunction invertBuilds(\n\tbuilds: ChangeAtomIdMap<TreeChunk> | undefined,\n\tfallbackRevision: RevisionTag | undefined,\n): ChangeAtomIdMap<number> | undefined {\n\tif (builds !== undefined) {\n\t\tconst destroys: ChangeAtomIdMap<number> = new Map();\n\t\tfor (const [revision, innerBuildMap] of builds) {\n\t\t\tconst initializedRevision = revision ?? fallbackRevision;\n\t\t\tconst innerDestroyMap: Map<ChangesetLocalId, number> = new Map();\n\t\t\tfor (const [id, chunk] of innerBuildMap) {\n\t\t\t\tinnerDestroyMap.set(id, chunk.topLevelLength);\n\t\t\t}\n\t\t\tdestroys.set(initializedRevision, innerDestroyMap);\n\t\t}\n\t\treturn destroys;\n\t}\n\treturn undefined;\n}\n\n/**\n * Returns the set of removed roots that should be in memory for the given change to be applied.\n * A removed root is relevant if any of the following is true:\n * - It is being inserted\n * - It is being restored\n * - It is being edited\n * - The ID it is associated with is being changed\n *\n * May be conservative by returning more removed roots than strictly necessary.\n *\n * Will never return IDs for non-root trees, even if they are removed.\n *\n * @param change - The change to be applied.\n * @param fieldKinds - The field kinds to delegate to.\n */\nexport function* relevantRemovedRoots(\n\t{ change, revision }: TaggedChange<ModularChangeset>,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): Iterable<DeltaDetachedNodeId> {\n\tyield* relevantRemovedRootsFromFields(\n\t\tchange.fieldChanges,\n\t\trevision,\n\t\tchange.nodeChanges,\n\t\tfieldKinds,\n\t);\n}\n\nfunction* relevantRemovedRootsFromFields(\n\tchange: FieldChangeMap,\n\trevision: RevisionTag | undefined,\n\tnodeChanges: ChangeAtomIdMap<NodeChangeset>,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): Iterable<DeltaDetachedNodeId> {\n\tfor (const [_, fieldChange] of change) {\n\t\tconst fieldRevision = fieldChange.revision ?? revision;\n\t\tconst handler = getChangeHandler(fieldKinds, fieldChange.fieldKind);\n\t\tconst delegate = function* (node: NodeId): Iterable<DeltaDetachedNodeId> {\n\t\t\tconst nodeChangeset = tryGetFromNestedMap(nodeChanges, node.revision, node.localId);\n\t\t\tassert(nodeChangeset !== undefined, 0x931 /* Unknown node ID */);\n\t\t\tif (nodeChangeset.fieldChanges !== undefined) {\n\t\t\t\tyield* relevantRemovedRootsFromFields(\n\t\t\t\t\tnodeChangeset.fieldChanges,\n\t\t\t\t\tfieldRevision,\n\t\t\t\t\tnodeChanges,\n\t\t\t\t\tfieldKinds,\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t\tyield* handler.relevantRemovedRoots(tagChange(fieldChange.change, fieldRevision), delegate);\n\t}\n}\n\n/**\n * Adds any refreshers missing from the provided change that are relevant to the change and\n * removes any refreshers from the provided change that are not relevant to the change.\n * This function enforces that all relevant removed roots have a corresponding build or refresher.\n *\n * @param change - The change that possibly has missing or superfluous refreshers. Not mutated by this function.\n * @param getDetachedNode - The function to retrieve a tree chunk from the corresponding detached node id.\n * @param removedRoots - The set of removed roots that should be in memory for the given change to be applied.\n * Can be retrieved by calling {@link relevantRemovedRoots}.\n */\nexport function updateRefreshers(\n\t{ change, revision }: TaggedChange<ModularChangeset>,\n\tgetDetachedNode: (id: DeltaDetachedNodeId) => TreeChunk | undefined,\n\tremovedRoots: Iterable<DeltaDetachedNodeId>,\n): ModularChangeset {\n\tconst refreshers: ChangeAtomIdMap<TreeChunk> = new Map();\n\tconst chunkLengths: Map<RevisionTag | undefined, BTree<number, number>> = new Map();\n\n\tif (change.builds !== undefined) {\n\t\tfor (const [major, buildsMap] of change.builds) {\n\t\t\tconst lengthTree = getOrAddInMap(chunkLengths, major, new BTree());\n\t\t\tfor (const [id, chunk] of buildsMap) {\n\t\t\t\tlengthTree.set(id, chunk.topLevelLength);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const root of removedRoots) {\n\t\tif (change.builds !== undefined) {\n\t\t\tconst major = root.major === revision ? undefined : root.major;\n\t\t\tconst lengthTree = chunkLengths.get(major);\n\n\t\t\tif (lengthTree !== undefined) {\n\t\t\t\tconst lengthPair = lengthTree.getPairOrNextLower(root.minor);\n\t\t\t\tif (lengthPair !== undefined) {\n\t\t\t\t\tconst [firstMinor, length] = lengthPair;\n\n\t\t\t\t\t// if the root minor is within the length of the minor of the retrieved pair\n\t\t\t\t\t// then there's no need to check for the detached node\n\t\t\t\t\tif (root.minor < firstMinor + length) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst node = getDetachedNode(root);\n\t\tassert(node !== undefined, 0x8cd /* detached node should exist */);\n\t\tsetInNestedMap(refreshers, root.major, root.minor, node);\n\t}\n\n\tconst {\n\t\tfieldChanges,\n\t\tnodeChanges,\n\t\tmaxId,\n\t\trevisions,\n\t\tconstraintViolationCount,\n\t\tbuilds,\n\t\tdestroys,\n\t} = change;\n\n\treturn makeModularChangeset(\n\t\tfieldChanges,\n\t\tnodeChanges,\n\t\tmaxId,\n\t\trevisions,\n\t\tconstraintViolationCount,\n\t\tbuilds,\n\t\tdestroys,\n\t\trefreshers,\n\t);\n}\n\n/**\n * @param change - The change to convert into a delta.\n * @param fieldKinds - The field kinds to delegate to.\n */\nexport function intoDelta(\n\ttaggedChange: TaggedChange<ModularChangeset>,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): DeltaRoot {\n\tconst change = taggedChange.change;\n\t// Return an empty delta for changes with constraint violations\n\tif ((change.constraintViolationCount ?? 0) > 0) {\n\t\treturn emptyDelta;\n\t}\n\n\tconst revision = revisionFromTaggedChange(taggedChange);\n\tconst idAllocator = MemoizedIdRangeAllocator.fromNextId();\n\tconst rootDelta: Mutable<DeltaRoot> = {};\n\tconst fieldDeltas = intoDeltaImpl(\n\t\tchange.fieldChanges,\n\t\trevision,\n\t\tchange.nodeChanges,\n\t\tidAllocator,\n\t\tfieldKinds,\n\t);\n\tif (fieldDeltas.size > 0) {\n\t\trootDelta.fields = fieldDeltas;\n\t}\n\tif (change.builds && change.builds.size > 0) {\n\t\trootDelta.build = copyDetachedNodes(change.builds, revision);\n\t}\n\tif (change.destroys !== undefined && change.destroys.size > 0) {\n\t\tconst destroys: DeltaDetachedNodeDestruction[] = [];\n\t\tforEachInNestedMap(change.destroys, (count, major, minor) => {\n\t\t\tdestroys.push({\n\t\t\t\tid: makeDetachedNodeId(major ?? revision, minor),\n\t\t\t\tcount,\n\t\t\t});\n\t\t});\n\t\trootDelta.destroy = destroys;\n\t}\n\tif (change.refreshers && change.refreshers.size > 0) {\n\t\trootDelta.refreshers = copyDetachedNodes(change.refreshers, revision);\n\t}\n\treturn rootDelta;\n}\n\nfunction copyDetachedNodes(detachedNodes: ChangeAtomIdMap<TreeChunk>, revision?: RevisionTag) {\n\tconst copiedDetachedNodes: DeltaDetachedNodeBuild[] = [];\n\tforEachInNestedMap(detachedNodes, (chunk, major, minor) => {\n\t\tif (chunk.topLevelLength > 0) {\n\t\t\tconst trees = mapCursorField(chunk.cursor(), (c) =>\n\t\t\t\tcursorForMapTreeNode(mapTreeFromCursor(c)),\n\t\t\t);\n\t\t\tcopiedDetachedNodes.push({\n\t\t\t\tid: makeDetachedNodeId(major ?? revision, minor),\n\t\t\t\ttrees,\n\t\t\t});\n\t\t}\n\t});\n\treturn copiedDetachedNodes.length > 0 ? copiedDetachedNodes : undefined;\n}\n\n/**\n * @param change - The change to convert into a delta.\n * @param repairStore - The store to query for repair data.\n * @param path - The path of the node being altered by the change as defined by the input context.\n * Undefined for the root and for nodes that do not exist in the input context.\n */\nfunction intoDeltaImpl(\n\tchange: FieldChangeMap,\n\trevision: RevisionTag | undefined,\n\tnodeChanges: ChangeAtomIdMap<NodeChangeset>,\n\tidAllocator: MemoizedIdRangeAllocator,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): Map<FieldKey, DeltaFieldChanges> {\n\tconst delta: Map<FieldKey, DeltaFieldChanges> = new Map();\n\tfor (const [field, fieldChange] of change) {\n\t\tconst fieldRevision = fieldChange.revision ?? revision;\n\t\tconst deltaField = getChangeHandler(fieldKinds, fieldChange.fieldKind).intoDelta(\n\t\t\ttagChange(fieldChange.change, fieldRevision),\n\t\t\t(childChange): DeltaFieldMap => {\n\t\t\t\tconst nodeChange = tryGetFromNestedMap(\n\t\t\t\t\tnodeChanges,\n\t\t\t\t\tchildChange.revision,\n\t\t\t\t\tchildChange.localId,\n\t\t\t\t);\n\n\t\t\t\tassert(nodeChange !== undefined, 0x932 /* Unknown node ID */);\n\t\t\t\treturn deltaFromNodeChange(\n\t\t\t\t\ttagChange(nodeChange, fieldRevision),\n\t\t\t\t\tnodeChanges,\n\t\t\t\t\tidAllocator,\n\t\t\t\t\tfieldKinds,\n\t\t\t\t);\n\t\t\t},\n\t\t\tidAllocator,\n\t\t);\n\t\tif (!isEmptyFieldChanges(deltaField)) {\n\t\t\tdelta.set(field, deltaField);\n\t\t}\n\t}\n\treturn delta;\n}\n\nfunction deltaFromNodeChange(\n\t{ change, revision }: TaggedChange<NodeChangeset>,\n\tnodeChanges: ChangeAtomIdMap<NodeChangeset>,\n\tidAllocator: MemoizedIdRangeAllocator,\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n): DeltaFieldMap {\n\tif (change.fieldChanges !== undefined) {\n\t\treturn intoDeltaImpl(change.fieldChanges, revision, nodeChanges, idAllocator, fieldKinds);\n\t}\n\t// TODO: update the API to allow undefined to be returned here\n\treturn new Map();\n}\n\n/**\n * @internal\n * @param revInfos - This should describe all revisions in the rebase path, even if not part of the current base changeset.\n * For example, when rebasing change B from a local branch [A, B, C] over a branch [X, Y], the `revInfos` must include\n * the changes [A⁻¹ X, Y, A'] for each rebase step of B.\n * @param baseRevisions - The set of revisions in the changeset being rebased over.\n * For example, when rebasing change B from a local branch [A, B, C] over a branch [X, Y], the `baseRevisions` must include\n * revisions [A⁻¹ X, Y, A'] if rebasing over the composition of all those changes, or\n * revision [A⁻¹] for the first rebase, then [X], etc. if rebasing over edits individually.\n * @returns - RebaseRevisionMetadata to be passed to `FieldChangeRebaser.rebase`*\n */\nexport function rebaseRevisionMetadataFromInfo(\n\trevInfos: readonly RevisionInfo[],\n\tbaseRevisions: (RevisionTag | undefined)[],\n): RebaseRevisionMetadata {\n\tconst filteredRevisions: RevisionTag[] = [];\n\tfor (const revision of baseRevisions) {\n\t\tif (revision !== undefined) {\n\t\t\tfilteredRevisions.push(revision);\n\t\t}\n\t}\n\n\tconst getBaseRevisions = () => filteredRevisions;\n\treturn {\n\t\t...revisionMetadataSourceFromInfo(revInfos),\n\t\tgetBaseRevisions,\n\t};\n}\n\nfunction isEmptyNodeChangeset(change: NodeChangeset): boolean {\n\treturn change.fieldChanges === undefined && change.nodeExistsConstraint === undefined;\n}\n\nexport function getFieldKind(\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n\tkind: FieldKindIdentifier,\n): FieldKindWithEditor {\n\tif (kind === genericFieldKind.identifier) {\n\t\treturn genericFieldKind;\n\t}\n\tconst fieldKind = fieldKinds.get(kind);\n\tassert(fieldKind !== undefined, 0x3ad /* Unknown field kind */);\n\treturn withEditor(fieldKind);\n}\n\nexport function getChangeHandler(\n\tfieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>,\n\tkind: FieldKindIdentifier,\n): FieldChangeHandler<unknown> {\n\treturn getFieldKind(fieldKinds, kind).changeHandler;\n}\n\n// TODO: TFieldData could instead just be a numeric ID generated by the CrossFieldTable\n// The CrossFieldTable could have a generic field ID to context table\ninterface CrossFieldTable<TFieldData> {\n\tsrcTable: CrossFieldMap<unknown>;\n\tdstTable: CrossFieldMap<unknown>;\n\tsrcDependents: CrossFieldMap<TFieldData>;\n\tdstDependents: CrossFieldMap<TFieldData>;\n\tinvalidatedFields: Set<TFieldData>;\n}\n\ninterface InvertTable extends CrossFieldTable<FieldChange> {\n\toriginalFieldToContext: Map<FieldChange, InvertContext>;\n}\n\ninterface InvertContext {\n\tinvertedField: FieldChange;\n\trevision: RevisionTag | undefined;\n}\n\ninterface RebaseTable extends CrossFieldTable<FieldChange> {\n\t/**\n\t * Maps from the FieldChange key used for the CrossFieldTable (which is the FieldChange being rebased)\n\t * to context for the field.\n\t */\n\tfieldToContext: Map<FieldChange, RebaseFieldContext>;\n\t/**\n\t * This map caches the output of a prior rebasing computation for a node, keyed on that computation's input.\n\t * The input for such a computation is characterized by a pair of node changesets:\n\t * - The node changeset from the input changeset being rebased\n\t * - The corresponding node changeset from the changeset being rebased over.\n\t *\n\t * Either of these may be undefined so we adopt the following convention:\n\t * - If the node changeset from the changeset being rebased is defined, then we use that as the key\n\t * - Otherwise, if the node changeset from the changeset being rebased over is defined, then we use that as the key\n\t * - Otherwise, we don't cache the output (which will be undefined anyway).\n\t *\n\t * This map is needed once we switch from the initial pass (which generates a new changeset) to the second pass which\n\t * performs surgery on the changeset generated in the first pass: we don't want to re-run the rebasing of nested\n\t * changes. Instead we want to keep using the objects generated in the first pass and mutate them where needed.\n\t */\n\trebasedNodeCache: Map<NodeChangeset, NodeChangeset>;\n\n\t/**\n\t * List of (newId, baseId) pairs encountered so far.\n\t */\n\tnodeIdPairs: [\n\t\tNodeId | undefined,\n\t\tTaggedChange<NodeId> | undefined,\n\t\tNodeExistenceState | undefined,\n\t][];\n}\n\ninterface RebaseFieldContext {\n\tbaseChange: FieldChange;\n\tbaseRevision: RevisionTag | undefined;\n\tnewChange: FieldChange;\n\trebasedChange: FieldChange;\n}\n\nfunction newComposeTable(): ComposeTable {\n\treturn {\n\t\t...newCrossFieldTable<FieldChange>(),\n\t\tfieldToContext: new Map(),\n\t\tnodeIds: new Map(),\n\t\tnodeIdPairs: [],\n\t};\n}\n\ninterface ComposeTable extends CrossFieldTable<FieldChange> {\n\t/**\n\t * Maps from an input changeset for a field (from change1 if it has one, from change2 otherwise) to the context for that field.\n\t */\n\tfieldToContext: Map<FieldChange, ComposeFieldContext>;\n\n\t/**\n\t * The set of node IDs from the second changeset which have been encountered.\n\t */\n\tnodeIds: NestedSet<RevisionTag, ChangesetLocalId>;\n\n\tnodeIdPairs: [TaggedChange<NodeId> | undefined, TaggedChange<NodeId> | undefined][];\n}\n\ninterface ComposeFieldContext {\n\tchange1: TaggedChange<FieldChangeset>;\n\tchange2: TaggedChange<FieldChangeset>;\n\tcomposedChange: FieldChange;\n}\n\nfunction newCrossFieldTable<T>(): CrossFieldTable<T> {\n\treturn {\n\t\tsrcTable: new Map(),\n\t\tdstTable: new Map(),\n\t\tsrcDependents: new Map(),\n\t\tdstDependents: new Map(),\n\t\tinvalidatedFields: new Set(),\n\t};\n}\n\n/**\n * @internal\n */\ninterface ConstraintState {\n\tviolationCount: number;\n}\n\nfunction newConstraintState(violationCount: number): ConstraintState {\n\treturn {\n\t\tviolationCount,\n\t};\n}\n\ninterface CrossFieldManagerI<T> extends CrossFieldManager {\n\ttable: CrossFieldTable<T>;\n}\n\nfunction newCrossFieldManager<T>(\n\tcrossFieldTable: CrossFieldTable<T>,\n\tcurrentFieldKey: T,\n\tallowInval = true,\n): CrossFieldManagerI<T> {\n\tconst getMap = (target: CrossFieldTarget) =>\n\t\ttarget === CrossFieldTarget.Source ? crossFieldTable.srcTable : crossFieldTable.dstTable;\n\n\tconst getDependents = (target: CrossFieldTarget) =>\n\t\ttarget === CrossFieldTarget.Source\n\t\t\t? crossFieldTable.srcDependents\n\t\t\t: crossFieldTable.dstDependents;\n\n\tconst manager = {\n\t\ttable: crossFieldTable,\n\n\t\tset: (\n\t\t\ttarget: CrossFieldTarget,\n\t\t\trevision: RevisionTag | undefined,\n\t\t\tid: ChangesetLocalId,\n\t\t\tcount: number,\n\t\t\tnewValue: unknown,\n\t\t\tinvalidateDependents: boolean,\n\t\t) => {\n\t\t\tif (invalidateDependents && allowInval) {\n\t\t\t\tconst lastChangedId = (id as number) + count - 1;\n\t\t\t\tlet firstId = id;\n\t\t\t\twhile (firstId <= lastChangedId) {\n\t\t\t\t\tconst dependentEntry = getFirstFromCrossFieldMap(\n\t\t\t\t\t\tgetDependents(target),\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\tfirstId,\n\t\t\t\t\t\tlastChangedId - firstId + 1,\n\t\t\t\t\t);\n\t\t\t\t\tif (dependentEntry.value !== undefined) {\n\t\t\t\t\t\tcrossFieldTable.invalidatedFields.add(dependentEntry.value);\n\t\t\t\t\t}\n\n\t\t\t\t\tfirstId = brand(firstId + dependentEntry.length);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetInCrossFieldMap(getMap(target), revision, id, count, newValue);\n\t\t},\n\n\t\tget: (\n\t\t\ttarget: CrossFieldTarget,\n\t\t\trevision: RevisionTag | undefined,\n\t\t\tid: ChangesetLocalId,\n\t\t\tcount: number,\n\t\t\taddDependency: boolean,\n\t\t) => {\n\t\t\tif (addDependency) {\n\t\t\t\t// We assume that if there is already an entry for this ID it is because\n\t\t\t\t// a field handler has called compose on the same node multiple times.\n\t\t\t\t// In this case we only want to update the latest version, so we overwrite the dependency.\n\t\t\t\tsetInCrossFieldMap(getDependents(target), revision, id, count, currentFieldKey);\n\t\t\t}\n\t\t\treturn getFirstFromCrossFieldMap(getMap(target), revision, id, count);\n\t\t},\n\t};\n\n\treturn manager;\n}\n\nfunction makeModularChangeset(\n\tfieldChanges: FieldChangeMap | undefined = undefined,\n\tnodeChanges: ChangeAtomIdMap<NodeChangeset> | undefined = undefined,\n\tmaxId: number = -1,\n\trevisions: readonly RevisionInfo[] | undefined = undefined,\n\tconstraintViolationCount: number | undefined = undefined,\n\tbuilds?: ChangeAtomIdMap<TreeChunk>,\n\tdestroys?: ChangeAtomIdMap<number>,\n\trefreshers?: ChangeAtomIdMap<TreeChunk>,\n): ModularChangeset {\n\tconst changeset: Mutable<ModularChangeset> = {\n\t\tfieldChanges: fieldChanges ?? new Map(),\n\t\tnodeChanges: nodeChanges ?? new Map(),\n\t};\n\tif (revisions !== undefined && revisions.length > 0) {\n\t\tchangeset.revisions = revisions;\n\t}\n\tif (maxId >= 0) {\n\t\tchangeset.maxId = brand(maxId);\n\t}\n\tif (constraintViolationCount !== undefined && constraintViolationCount > 0) {\n\t\tchangeset.constraintViolationCount = constraintViolationCount;\n\t}\n\tif (builds !== undefined && builds.size > 0) {\n\t\tchangeset.builds = builds;\n\t}\n\tif (destroys !== undefined && destroys.size > 0) {\n\t\tchangeset.destroys = destroys;\n\t}\n\tif (refreshers !== undefined && refreshers.size > 0) {\n\t\tchangeset.refreshers = refreshers;\n\t}\n\treturn changeset;\n}\n\nexport class ModularEditBuilder extends EditBuilder<ModularChangeset> {\n\tprivate transactionDepth: number = 0;\n\tprivate idAllocator: IdAllocator;\n\n\tpublic constructor(\n\t\tfamily: ChangeFamily<ChangeFamilyEditor, ModularChangeset>,\n\t\tchangeReceiver: (change: ModularChangeset) => void,\n\t) {\n\t\tsuper(family, changeReceiver);\n\t\tthis.idAllocator = idAllocatorFromMaxId();\n\t}\n\n\tpublic override enterTransaction(): void {\n\t\tthis.transactionDepth += 1;\n\t\tif (this.transactionDepth === 1) {\n\t\t\tthis.idAllocator = idAllocatorFromMaxId();\n\t\t}\n\t}\n\n\tpublic override exitTransaction(): void {\n\t\tassert(this.transactionDepth > 0, 0x5b9 /* Cannot exit inexistent transaction */);\n\t\tthis.transactionDepth -= 1;\n\t\tif (this.transactionDepth === 0) {\n\t\t\tthis.idAllocator = idAllocatorFromMaxId();\n\t\t}\n\t}\n\n\t/**\n\t * @param firstId - The ID to associate with the first node\n\t * @param content - The node(s) to build. Can be in either Field or Node mode.\n\t * @returns A description of the edit that can be passed to `submitChanges`.\n\t */\n\tpublic buildTrees(\n\t\tfirstId: ChangesetLocalId,\n\t\tcontent: ITreeCursorSynchronous,\n\t): GlobalEditDescription {\n\t\tif (content.mode === CursorLocationType.Fields && content.getFieldLength() === 0) {\n\t\t\treturn { type: \"global\" };\n\t\t}\n\t\tconst builds: ChangeAtomIdMap<TreeChunk> = new Map();\n\t\tconst innerMap = new Map();\n\t\tbuilds.set(undefined, innerMap);\n\t\tconst chunk =\n\t\t\tcontent.mode === CursorLocationType.Fields\n\t\t\t\t? chunkFieldSingle(content, defaultChunkPolicy)\n\t\t\t\t: chunkTree(content, defaultChunkPolicy);\n\t\tinnerMap.set(firstId, chunk);\n\n\t\treturn {\n\t\t\ttype: \"global\",\n\t\t\tbuilds,\n\t\t};\n\t}\n\n\t/**\n\t * Adds a change to the edit builder\n\t * @param field - the field which is being edited\n\t * @param fieldKind - the kind of the field\n\t * @param change - the change to the field\n\t * @param maxId - the highest `ChangesetLocalId` used in this change\n\t */\n\tpublic submitChange(\n\t\tfield: FieldUpPath,\n\t\tfieldKind: FieldKindIdentifier,\n\t\tchange: FieldChangeset,\n\t): void {\n\t\tconst modularChange = buildModularChangesetFromField(\n\t\t\tfield,\n\t\t\t{ fieldKind, change },\n\t\t\tnew Map(),\n\t\t\tthis.idAllocator,\n\t\t);\n\t\tthis.applyChange(modularChange);\n\t}\n\n\tpublic submitChanges(changes: EditDescription[]) {\n\t\tconst modularChange = this.buildChanges(changes);\n\t\tthis.applyChange(modularChange);\n\t}\n\n\tpublic buildChanges(changes: EditDescription[]): ModularChangeset {\n\t\tconst changeMaps = changes.map((change) =>\n\t\t\tmakeAnonChange(\n\t\t\t\tchange.type === \"global\"\n\t\t\t\t\t? makeModularChangeset(\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tthis.idAllocator.getMaxId(),\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tchange.builds,\n\t\t\t\t\t )\n\t\t\t\t\t: buildModularChangesetFromField(\n\t\t\t\t\t\t\tchange.field,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfieldKind: change.fieldKind,\n\t\t\t\t\t\t\t\tchange: change.change,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnew Map(),\n\t\t\t\t\t\t\tthis.idAllocator,\n\t\t\t\t\t ),\n\t\t\t),\n\t\t);\n\t\tconst composedChange: Mutable<ModularChangeset> =\n\t\t\tthis.changeFamily.rebaser.compose(changeMaps);\n\n\t\tconst maxId: ChangesetLocalId = brand(this.idAllocator.getMaxId());\n\t\tif (maxId >= 0) {\n\t\t\tcomposedChange.maxId = maxId;\n\t\t}\n\t\treturn composedChange;\n\t}\n\n\tpublic generateId(count?: number): ChangesetLocalId {\n\t\treturn brand(this.idAllocator.allocate(count));\n\t}\n\n\tpublic addNodeExistsConstraint(path: UpPath): void {\n\t\tconst nodeChange: NodeChangeset = {\n\t\t\tnodeExistsConstraint: { violated: false },\n\t\t};\n\n\t\tthis.applyChange(\n\t\t\tbuildModularChangesetFromNode(path, nodeChange, new Map(), this.idAllocator),\n\t\t);\n\t}\n}\n\nfunction buildModularChangesetFromField(\n\tpath: FieldUpPath,\n\tfieldChange: FieldChange,\n\tnodeChanges: ChangeAtomIdMap<NodeChangeset>,\n\tidAllocator: IdAllocator = idAllocatorFromMaxId(),\n): ModularChangeset {\n\tconst fieldChanges: FieldChangeMap = new Map([[path.field, fieldChange]]);\n\n\tif (path.parent === undefined) {\n\t\treturn makeModularChangeset(fieldChanges, nodeChanges, idAllocator.getMaxId());\n\t}\n\n\tconst nodeChangeset: NodeChangeset = {\n\t\tfieldChanges,\n\t};\n\n\treturn buildModularChangesetFromNode(path.parent, nodeChangeset, nodeChanges, idAllocator);\n}\n\nfunction buildModularChangesetFromNode(\n\tpath: UpPath,\n\tnodeChange: NodeChangeset,\n\tnodeChanges: ChangeAtomIdMap<NodeChangeset>,\n\tidAllocator: IdAllocator,\n): ModularChangeset {\n\tconst nodeId: NodeId = { localId: brand(idAllocator.allocate()) };\n\tsetInNestedMap(nodeChanges, nodeId.revision, nodeId.localId, nodeChange);\n\tconst fieldChangeset = genericFieldKind.changeHandler.editor.buildChildChange(\n\t\tpath.parentIndex,\n\t\tnodeId,\n\t);\n\n\tconst fieldChange: FieldChange = {\n\t\tfieldKind: genericFieldKind.identifier,\n\t\tchange: fieldChangeset,\n\t};\n\n\treturn buildModularChangesetFromField(\n\t\t{ parent: path.parent, field: path.parentField },\n\t\tfieldChange,\n\t\tnodeChanges,\n\t\tidAllocator,\n\t);\n}\n\n/**\n * @internal\n */\nexport interface FieldEditDescription {\n\ttype: \"field\";\n\tfield: FieldUpPath;\n\tfieldKind: FieldKindIdentifier;\n\tchange: FieldChangeset;\n}\n\n/**\n * @internal\n */\nexport interface GlobalEditDescription {\n\ttype: \"global\";\n\tbuilds?: ChangeAtomIdMap<TreeChunk>;\n}\n\n/**\n * @internal\n */\nexport type EditDescription = FieldEditDescription | GlobalEditDescription;\n\nfunction getRevInfoFromTaggedChanges(changes: TaggedChange<ModularChangeset>[]): {\n\trevInfos: RevisionInfo[];\n\tmaxId: ChangesetLocalId;\n} {\n\tlet maxId = -1;\n\tconst revInfos: RevisionInfo[] = [];\n\tfor (const taggedChange of changes) {\n\t\tconst change = taggedChange.change;\n\t\tmaxId = Math.max(change.maxId ?? -1, maxId);\n\t\trevInfos.push(...revisionInfoFromTaggedChange(taggedChange));\n\t}\n\n\tconst revisions = new Set<RevisionTag>();\n\tconst rolledBackRevisions: RevisionTag[] = [];\n\tfor (const info of revInfos) {\n\t\trevisions.add(info.revision);\n\t\tif (info.rollbackOf !== undefined) {\n\t\t\trolledBackRevisions.push(info.rollbackOf);\n\t\t}\n\t}\n\n\trolledBackRevisions.reverse();\n\tfor (const revision of rolledBackRevisions) {\n\t\tif (!revisions.has(revision)) {\n\t\t\trevInfos.push({ revision });\n\t\t}\n\t}\n\n\treturn { maxId: brand(maxId), revInfos };\n}\n\nfunction revisionInfoFromTaggedChange(\n\ttaggedChange: TaggedChange<ModularChangeset>,\n): RevisionInfo[] {\n\tconst revInfos: RevisionInfo[] = [];\n\tif (taggedChange.change.revisions !== undefined) {\n\t\trevInfos.push(...taggedChange.change.revisions);\n\t} else if (taggedChange.revision !== undefined) {\n\t\tconst info: Mutable<RevisionInfo> = { revision: taggedChange.revision };\n\t\tif (taggedChange.rollbackOf !== undefined) {\n\t\t\tinfo.rollbackOf = taggedChange.rollbackOf;\n\t\t}\n\t\trevInfos.push(info);\n\t}\n\treturn revInfos;\n}\n\nfunction revisionFromTaggedChange(change: TaggedChange<ModularChangeset>): RevisionTag | undefined {\n\treturn change.revision ?? revisionFromRevInfos(change.change.revisions);\n}\n\nfunction revisionFromRevInfos(\n\trevInfos: undefined | readonly RevisionInfo[],\n): RevisionTag | undefined {\n\tif (revInfos === undefined || revInfos.length !== 1) {\n\t\treturn undefined;\n\t}\n\treturn revInfos[0].revision;\n}\n"]}
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { Static } from "@sinclair/typebox";
|
|
6
|
-
import {
|
|
6
|
+
import { ChangesetLocalId, schemaFormat } from "../../core/index.js";
|
|
7
7
|
import { JsonCompatibleReadOnly } from "../../util/index.js";
|
|
8
8
|
export declare const ChangesetLocalIdSchema: import("@sinclair/typebox").TUnsafe<ChangesetLocalId>;
|
|
9
9
|
export declare const EncodedChangeAtomId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<ChangesetLocalId>]>;
|
|
10
|
+
export type EncodedChangeAtomId = Static<typeof EncodedChangeAtomId>;
|
|
10
11
|
declare const EncodedFieldChange: import("@sinclair/typebox").TObject<{
|
|
11
12
|
fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKey>;
|
|
12
13
|
fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKindIdentifier>;
|
|
@@ -32,19 +33,11 @@ declare const EncodedFieldChangeMap: import("@sinclair/typebox").TArray<import("
|
|
|
32
33
|
*/
|
|
33
34
|
export type EncodedFieldChangeMap = Static<typeof EncodedFieldChangeMap>;
|
|
34
35
|
export declare const EncodedNodeChangeset: import("@sinclair/typebox").TObject<{
|
|
35
|
-
valueChange: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
36
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
37
|
-
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
38
|
-
}>>;
|
|
39
36
|
fieldChanges: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
40
37
|
fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKey>;
|
|
41
38
|
fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKindIdentifier>;
|
|
42
39
|
change: import("@sinclair/typebox").TAny;
|
|
43
40
|
}>>>;
|
|
44
|
-
valueConstraint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
45
|
-
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
46
|
-
violated: import("@sinclair/typebox").TBoolean;
|
|
47
|
-
}>>;
|
|
48
41
|
nodeExistsConstraint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
49
42
|
violated: import("@sinclair/typebox").TBoolean;
|
|
50
43
|
}>>;
|
|
@@ -73,8 +66,8 @@ export declare const EncodedBuilds: import("@sinclair/typebox").TObject<{
|
|
|
73
66
|
* TODO: Strongly typing this here may result in redundant schema validation of this data.
|
|
74
67
|
*/
|
|
75
68
|
trees: import("@sinclair/typebox").TObject<{
|
|
76
|
-
version: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TLiteral<number>]>;
|
|
77
69
|
data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>>;
|
|
70
|
+
version: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TLiteral<number>]>;
|
|
78
71
|
identifiers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
79
72
|
shapes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
80
73
|
a: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -111,8 +104,8 @@ export declare const EncodedModularChangeset: import("@sinclair/typebox").TObjec
|
|
|
111
104
|
* TODO: Strongly typing this here may result in redundant schema validation of this data.
|
|
112
105
|
*/
|
|
113
106
|
trees: import("@sinclair/typebox").TObject<{
|
|
114
|
-
version: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TLiteral<number>]>;
|
|
115
107
|
data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>>;
|
|
108
|
+
version: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TLiteral<number>]>;
|
|
116
109
|
identifiers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
117
110
|
shapes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
118
111
|
a: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -137,8 +130,8 @@ export declare const EncodedModularChangeset: import("@sinclair/typebox").TObjec
|
|
|
137
130
|
* TODO: Strongly typing this here may result in redundant schema validation of this data.
|
|
138
131
|
*/
|
|
139
132
|
trees: import("@sinclair/typebox").TObject<{
|
|
140
|
-
version: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TLiteral<number>]>;
|
|
141
133
|
data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>>;
|
|
134
|
+
version: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TLiteral<number>]>;
|
|
142
135
|
identifiers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
143
136
|
shapes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
144
137
|
a: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeFormat.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,MAAM,EAAQ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"modularChangeFormat.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAqB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EACN,sBAAsB,EAGtB,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,sBAAsB,uDAEjC,CAAC;AAEH,eAAO,MAAM,mBAAmB,2aAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAErE,QAAA,MAAM,kBAAkB;;;;EAUvB,CAAC;AAEF,MAAM,WAAW,kBAAmB,SAAQ,MAAM,CAAC,OAAO,kBAAkB,CAAC;IAC5E;;OAEG;IACH,MAAM,EAAE,sBAAsB,CAAC;CAC/B;AAED,QAAA,MAAM,qBAAqB;;;;GAAiC,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAUzE,eAAO,MAAM,oBAAoB;;;;;;;;;EAMhC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEvE,eAAO,MAAM,mBAAmB;;;EAM/B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,gBAAgB,qCAA6C,CAAC;AAE3E,eAAO,MAAM,YAAY,sKAOxB,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,YAAY,CAAC,CAAC;AAEvD,eAAO,MAAM,kBAAkB,mtBAM9B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE,eAAO,MAAM,aAAa;;IAGxB;;;OAGG;;;;;;;;;;;;;;;;;;;;EAIJ,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAEzD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;QAXlC;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;QAHH;;;WAGG;;;;;;;;;;;;;;;;;;;;;EAiBJ,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { RevisionTagSchema, schemaFormat } from "../../core/index.js";
|
|
7
|
+
import { JsonCompatibleReadOnlySchema, brandedNumberType, } from "../../util/index.js";
|
|
8
8
|
import { EncodedFieldBatch } from "../chunked-forest/index.js";
|
|
9
9
|
const noAdditionalProps = { additionalProperties: false };
|
|
10
10
|
export const ChangesetLocalIdSchema = brandedNumberType({
|
|
@@ -14,14 +14,6 @@ export const EncodedChangeAtomId = Type.Union([
|
|
|
14
14
|
Type.Tuple([ChangesetLocalIdSchema, RevisionTagSchema]),
|
|
15
15
|
ChangesetLocalIdSchema,
|
|
16
16
|
]);
|
|
17
|
-
const EncodedValueChange = Type.Object({
|
|
18
|
-
revision: Type.Optional(RevisionTagSchema),
|
|
19
|
-
value: Type.Optional(JsonCompatibleReadOnlySchema),
|
|
20
|
-
}, noAdditionalProps);
|
|
21
|
-
const EncodedValueConstraint = Type.Object({
|
|
22
|
-
value: Type.Optional(JsonCompatibleReadOnlySchema),
|
|
23
|
-
violated: Type.Boolean(),
|
|
24
|
-
}, noAdditionalProps);
|
|
25
17
|
const EncodedFieldChange = Type.Object({
|
|
26
18
|
fieldKey: schemaFormat.FieldKeySchema,
|
|
27
19
|
fieldKind: schemaFormat.FieldKindIdentifierSchema,
|
|
@@ -35,9 +27,7 @@ const EncodedNodeExistsConstraint = Type.Object({
|
|
|
35
27
|
violated: Type.Boolean(),
|
|
36
28
|
}, noAdditionalProps);
|
|
37
29
|
export const EncodedNodeChangeset = Type.Object({
|
|
38
|
-
valueChange: Type.Optional(EncodedValueChange),
|
|
39
30
|
fieldChanges: Type.Optional(EncodedFieldChangeMap),
|
|
40
|
-
valueConstraint: Type.Optional(EncodedValueConstraint),
|
|
41
31
|
nodeExistsConstraint: Type.Optional(EncodedNodeExistsConstraint),
|
|
42
32
|
}, noAdditionalProps);
|
|
43
33
|
export const EncodedRevisionInfo = Type.Object({
|