@fluidframework/tree 2.10.0 → 2.12.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/CHANGELOG.md +29 -0
- package/api-report/tree.alpha.api.md +49 -18
- package/api-report/tree.beta.api.md +6 -15
- package/api-report/tree.legacy.alpha.api.md +6 -15
- package/api-report/tree.legacy.public.api.md +6 -15
- package/api-report/tree.public.api.md +6 -15
- package/dist/alpha.d.ts +9 -0
- package/dist/core/forest/forest.d.ts +10 -2
- package/dist/core/forest/forest.d.ts.map +1 -1
- 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/utils.d.ts +1 -1
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +13 -17
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/revertible.d.ts +30 -1
- package/dist/core/revertible.d.ts.map +1 -1
- package/dist/core/revertible.js.map +1 -1
- package/dist/core/schema-stored/format.d.ts +0 -3
- 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/schema.d.ts +12 -10
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +3 -5
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +2 -2
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js +5 -5
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/schema-view/index.d.ts +1 -1
- package/dist/core/schema-view/index.d.ts.map +1 -1
- package/dist/core/schema-view/index.js +1 -2
- package/dist/core/schema-view/index.js.map +1 -1
- package/dist/core/schema-view/view.d.ts +0 -7
- package/dist/core/schema-view/view.d.ts.map +1 -1
- package/dist/core/schema-view/view.js +1 -12
- package/dist/core/schema-view/view.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +2 -2
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +21 -21
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/{lib/feature-libraries/chunked-forest → dist/core/tree}/chunk.d.ts +2 -1
- package/dist/core/tree/chunk.d.ts.map +1 -0
- package/dist/{feature-libraries/chunked-forest → core/tree}/chunk.js +2 -2
- package/dist/core/tree/chunk.js.map +1 -0
- package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.js +3 -2
- package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/dist/core/tree/index.d.ts +2 -1
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +6 -1
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/treeTextFormat.d.ts +0 -5
- 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 +0 -5
- package/dist/core/tree/types.d.ts.map +1 -1
- package/dist/core/tree/types.js +0 -1
- package/dist/core/tree/types.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts +25 -1
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +29 -1
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +1 -2
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +14 -14
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -2
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +2 -3
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +5 -3
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +24 -14
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +1 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.js +2 -3
- 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 +5 -5
- 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 +2 -2
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +1 -2
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +14 -14
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.js +1 -0
- package/dist/feature-libraries/default-schema/defaultSchema.js.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.js +2 -1
- package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +2 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +9 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +139 -0
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -0
- package/dist/feature-libraries/indexing/anchorTreeIndex.js +387 -0
- package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -0
- package/dist/feature-libraries/indexing/index.d.ts +7 -0
- package/dist/feature-libraries/indexing/index.d.ts.map +1 -0
- package/dist/feature-libraries/indexing/index.js +11 -0
- package/dist/feature-libraries/indexing/index.js.map +1 -0
- package/dist/feature-libraries/indexing/types.d.ts +32 -0
- package/dist/feature-libraries/indexing/types.d.ts.map +1 -0
- package/dist/{events/interop.js → feature-libraries/indexing/types.js} +1 -1
- package/dist/feature-libraries/indexing/types.js.map +1 -0
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts +84 -24
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/discrepancies.js +32 -33
- package/dist/feature-libraries/modular-schema/discrepancies.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +5 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +0 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.js +0 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts +5 -2
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +21 -11
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +6 -6
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +7 -7
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +12 -12
- package/dist/feature-libraries/sequence-field/formatV1.d.ts +99 -99
- package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.d.ts +76 -76
- package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV3.d.ts +54 -54
- package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +2 -2
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +3 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +0 -1
- 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/index.d.ts +6 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -13
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/index.d.ts +2 -2
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +1 -2
- 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 +6 -6
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +7 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +35 -38
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +27 -6
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +146 -21
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +3 -3
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +59 -72
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +243 -188
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +29 -107
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +51 -195
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.d.ts +24 -32
- package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.js +70 -53
- package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js +2 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +4 -4
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +3 -3
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +5 -4
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +3 -10
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +14 -67
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/transaction.d.ts +146 -0
- package/dist/shared-tree-core/transaction.d.ts.map +1 -0
- package/dist/shared-tree-core/transaction.js +211 -0
- package/dist/shared-tree-core/transaction.js.map +1 -0
- package/dist/shared-tree-core/transactionEnricher.d.ts +8 -13
- package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/transactionEnricher.js +41 -21
- package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
- package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/conciseTree.js +1 -1
- package/dist/simple-tree/api/conciseTree.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +5 -1
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/customTree.d.ts +14 -2
- package/dist/simple-tree/api/customTree.d.ts.map +1 -1
- package/dist/simple-tree/api/customTree.js +53 -3
- package/dist/simple-tree/api/customTree.js.map +1 -1
- package/dist/simple-tree/api/identifierIndex.d.ts +21 -0
- package/dist/simple-tree/api/identifierIndex.d.ts.map +1 -0
- package/dist/simple-tree/api/identifierIndex.js +45 -0
- package/dist/simple-tree/api/identifierIndex.js.map +1 -0
- package/dist/simple-tree/api/index.d.ts +4 -2
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +8 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +48 -0
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +5 -2
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/simpleSchema.d.ts +3 -1
- package/dist/simple-tree/api/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchema.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +9 -7
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts +65 -0
- package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -0
- package/dist/simple-tree/api/simpleTreeIndex.js +93 -0
- package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -0
- package/dist/simple-tree/api/storedSchema.d.ts +4 -4
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +8 -21
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +5 -5
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +1 -1
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/api/view.d.ts +14 -9
- package/dist/simple-tree/api/view.d.ts.map +1 -1
- package/dist/simple-tree/api/view.js +129 -40
- package/dist/simple-tree/api/view.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +1 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +2 -1
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +6 -2
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +53 -22
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +2 -2
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +7 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +0 -15
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +0 -15
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +15 -5
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +18 -2
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/objectNodeTypes.d.ts +4 -0
- package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +4 -2
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/toMapTree.js +3 -3
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +18 -13
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/util/brand.d.ts +0 -2
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js +0 -1
- package/dist/util/brand.js.map +1 -1
- package/dist/util/index.d.ts +1 -2
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +6 -4
- package/dist/util/index.js.map +1 -1
- package/dist/util/typeCheck.d.ts +6 -3
- package/dist/util/typeCheck.d.ts.map +1 -1
- package/dist/util/typeCheck.js.map +1 -1
- package/dist/util/typeCheckTests.d.ts +14 -2
- package/dist/util/typeCheckTests.d.ts.map +1 -1
- package/dist/util/typeCheckTests.js.map +1 -1
- package/dist/util/utils.d.ts +42 -0
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +35 -1
- package/dist/util/utils.js.map +1 -1
- package/lib/alpha.d.ts +9 -0
- package/lib/core/forest/forest.d.ts +10 -2
- package/lib/core/forest/forest.d.ts.map +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/utils.d.ts +1 -1
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +13 -17
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/revertible.d.ts +30 -1
- package/lib/core/revertible.d.ts.map +1 -1
- package/lib/core/revertible.js.map +1 -1
- package/lib/core/schema-stored/format.d.ts +0 -3
- 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/schema.d.ts +12 -10
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +3 -5
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +2 -2
- package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/schema-view/index.d.ts +1 -1
- package/lib/core/schema-view/index.d.ts.map +1 -1
- package/lib/core/schema-view/index.js +1 -1
- package/lib/core/schema-view/index.js.map +1 -1
- package/lib/core/schema-view/view.d.ts +0 -7
- package/lib/core/schema-view/view.d.ts.map +1 -1
- package/lib/core/schema-view/view.js +0 -11
- package/lib/core/schema-view/view.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts +2 -2
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +1 -1
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/{dist/feature-libraries/chunked-forest → lib/core/tree}/chunk.d.ts +2 -1
- package/lib/core/tree/chunk.d.ts.map +1 -0
- package/lib/{feature-libraries/chunked-forest → core/tree}/chunk.js +1 -1
- package/lib/core/tree/chunk.js.map +1 -0
- package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.js +4 -3
- package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/lib/core/tree/index.d.ts +2 -1
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +2 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/treeTextFormat.d.ts +0 -5
- 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 +0 -5
- package/lib/core/tree/types.d.ts.map +1 -1
- package/lib/core/tree/types.js +0 -1
- package/lib/core/tree/types.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts +25 -1
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js +27 -0
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +1 -2
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -2
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -2
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +5 -3
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +18 -8
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +1 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +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 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.js +1 -2
- 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 +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 +1 -2
- 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/default-schema/defaultSchema.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultSchema.js +1 -0
- package/lib/feature-libraries/default-schema/defaultSchema.js.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.js +2 -1
- package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +2 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +139 -0
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -0
- package/lib/feature-libraries/indexing/anchorTreeIndex.js +382 -0
- package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -0
- package/lib/feature-libraries/indexing/index.d.ts +7 -0
- package/lib/feature-libraries/indexing/index.d.ts.map +1 -0
- package/lib/{events → feature-libraries/indexing}/index.js +1 -1
- package/lib/feature-libraries/indexing/index.js.map +1 -0
- package/lib/feature-libraries/indexing/types.d.ts +32 -0
- package/lib/feature-libraries/indexing/types.d.ts.map +1 -0
- package/lib/{events/interop.js → feature-libraries/indexing/types.js} +1 -1
- package/lib/feature-libraries/indexing/types.js.map +1 -0
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts +84 -24
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/discrepancies.js +25 -28
- package/lib/feature-libraries/modular-schema/discrepancies.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +0 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.js +0 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts +5 -2
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +15 -5
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +6 -6
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +7 -7
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +12 -12
- package/lib/feature-libraries/sequence-field/formatV1.d.ts +99 -99
- package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.d.ts +76 -76
- package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.d.ts +54 -54
- package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +4 -4
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +4 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +0 -1
- 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/index.d.ts +6 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -4
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/index.d.ts +2 -2
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -1
- 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 +7 -7
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +7 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +12 -16
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +27 -6
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +135 -10
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +5 -5
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +59 -72
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +233 -177
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +29 -107
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +50 -193
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.d.ts +24 -32
- package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.js +71 -54
- package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js +3 -2
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +4 -4
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +3 -3
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +2 -2
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +3 -10
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +15 -68
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/transaction.d.ts +146 -0
- package/lib/shared-tree-core/transaction.d.ts.map +1 -0
- package/lib/shared-tree-core/transaction.js +206 -0
- package/lib/shared-tree-core/transaction.js.map +1 -0
- package/lib/shared-tree-core/transactionEnricher.d.ts +8 -13
- package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/transactionEnricher.js +41 -21
- package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
- package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/conciseTree.js +2 -2
- package/lib/simple-tree/api/conciseTree.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +5 -1
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/customTree.d.ts +14 -2
- package/lib/simple-tree/api/customTree.d.ts.map +1 -1
- package/lib/simple-tree/api/customTree.js +50 -2
- package/lib/simple-tree/api/customTree.js.map +1 -1
- package/lib/simple-tree/api/identifierIndex.d.ts +21 -0
- package/lib/simple-tree/api/identifierIndex.d.ts.map +1 -0
- package/lib/simple-tree/api/identifierIndex.js +41 -0
- package/lib/simple-tree/api/identifierIndex.js.map +1 -0
- package/lib/simple-tree/api/index.d.ts +4 -2
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +4 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +48 -0
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +4 -1
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/simpleSchema.d.ts +3 -1
- package/lib/simple-tree/api/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchema.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +11 -9
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts +65 -0
- package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -0
- package/lib/simple-tree/api/simpleTreeIndex.js +89 -0
- package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -0
- package/lib/simple-tree/api/storedSchema.d.ts +4 -4
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +5 -18
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +5 -5
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +2 -2
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/api/view.d.ts +14 -9
- package/lib/simple-tree/api/view.d.ts.map +1 -1
- package/lib/simple-tree/api/view.js +131 -42
- package/lib/simple-tree/api/view.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +1 -1
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -1
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +6 -2
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +31 -1
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/index.d.ts +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +2 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +0 -15
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +0 -15
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts +15 -5
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +16 -1
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/objectNodeTypes.d.ts +4 -0
- package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/objectNodeTypes.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +4 -2
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/toMapTree.js +5 -5
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +19 -14
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/util/brand.d.ts +0 -2
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js +0 -1
- package/lib/util/brand.js.map +1 -1
- package/lib/util/index.d.ts +1 -2
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +1 -2
- package/lib/util/index.js.map +1 -1
- package/lib/util/typeCheck.d.ts +6 -3
- package/lib/util/typeCheck.d.ts.map +1 -1
- package/lib/util/typeCheck.js.map +1 -1
- package/lib/util/typeCheckTests.d.ts +14 -2
- package/lib/util/typeCheckTests.d.ts.map +1 -1
- package/lib/util/typeCheckTests.js.map +1 -1
- package/lib/util/utils.d.ts +42 -0
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +30 -0
- package/lib/util/utils.js.map +1 -1
- package/package.json +23 -23
- package/src/core/forest/forest.ts +12 -1
- package/src/core/index.ts +13 -2
- package/src/core/rebase/utils.ts +28 -29
- package/src/core/revertible.ts +35 -1
- package/src/core/schema-stored/format.ts +0 -3
- package/src/core/schema-stored/schema.ts +13 -10
- package/src/core/schema-stored/storedSchemaRepository.ts +2 -1
- package/src/core/schema-view/index.ts +0 -1
- package/src/core/schema-view/view.ts +0 -11
- package/src/core/tree/anchorSet.ts +2 -1
- package/src/{feature-libraries/chunked-forest → core/tree}/chunk.ts +4 -4
- package/src/core/tree/detachedFieldIndexCodec.ts +4 -3
- package/src/core/tree/index.ts +9 -0
- package/src/core/tree/treeTextFormat.ts +0 -5
- package/src/core/tree/types.ts +0 -5
- package/src/core/tree/visitorUtils.ts +56 -1
- package/src/feature-libraries/chunked-forest/basicChunk.ts +4 -2
- package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -1
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +35 -8
- package/src/feature-libraries/chunked-forest/codec/chunkCodecUtilities.ts +1 -2
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +6 -2
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/emptyChunk.ts +4 -2
- package/src/feature-libraries/chunked-forest/index.ts +1 -1
- package/src/feature-libraries/chunked-forest/sequenceChunk.ts +1 -1
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +7 -4
- package/src/feature-libraries/default-schema/defaultSchema.ts +1 -0
- package/src/feature-libraries/default-schema/schemaChecker.ts +4 -1
- package/src/feature-libraries/flex-tree/context.ts +1 -1
- package/src/feature-libraries/index.ts +22 -0
- package/src/feature-libraries/indexing/anchorTreeIndex.ts +482 -0
- package/src/feature-libraries/indexing/index.ts +11 -0
- package/src/feature-libraries/indexing/types.ts +37 -0
- package/src/feature-libraries/modular-schema/discrepancies.ts +76 -38
- package/src/feature-libraries/modular-schema/index.ts +13 -0
- package/src/feature-libraries/modular-schema/isNeverTree.ts +0 -2
- package/src/feature-libraries/object-forest/objectForest.ts +22 -4
- package/src/feature-libraries/sequence-field/invert.ts +4 -4
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +4 -4
- package/src/feature-libraries/sequence-field/types.ts +0 -1
- package/src/index.ts +17 -35
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/index.ts +1 -2
- package/src/shared-tree/schematizeTree.ts +6 -10
- package/src/shared-tree/schematizingTreeView.ts +18 -28
- package/src/shared-tree/sharedTree.ts +216 -30
- package/src/shared-tree/sharedTreeChangeFamily.ts +5 -4
- package/src/shared-tree/treeCheckout.ts +341 -299
- package/src/shared-tree-core/branch.ts +80 -300
- package/src/shared-tree-core/branchCommitEnricher.ts +66 -62
- package/src/shared-tree-core/defaultResubmitMachine.ts +3 -2
- package/src/shared-tree-core/editManager.ts +4 -9
- package/src/shared-tree-core/index.ts +11 -3
- package/src/shared-tree-core/sharedTreeCore.ts +23 -79
- package/src/shared-tree-core/transaction.ts +310 -0
- package/src/shared-tree-core/transactionEnricher.ts +30 -24
- package/src/simple-tree/api/conciseTree.ts +2 -2
- package/src/simple-tree/api/create.ts +5 -1
- package/src/simple-tree/api/customTree.ts +69 -1
- package/src/simple-tree/api/identifierIndex.ts +64 -0
- package/src/simple-tree/api/index.ts +17 -2
- package/src/simple-tree/api/schemaFactory.ts +62 -1
- package/src/simple-tree/api/simpleSchema.ts +3 -1
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +17 -18
- package/src/simple-tree/api/simpleTreeIndex.ts +233 -0
- package/src/simple-tree/api/storedSchema.ts +7 -22
- package/src/simple-tree/api/tree.ts +14 -5
- package/src/simple-tree/api/treeNodeApi.ts +1 -1
- package/src/simple-tree/api/verboseTree.ts +2 -2
- package/src/simple-tree/api/view.ts +197 -51
- package/src/simple-tree/core/index.ts +1 -0
- package/src/simple-tree/core/treeNodeKernel.ts +37 -2
- package/src/simple-tree/core/unhydratedFlexTree.ts +2 -1
- package/src/simple-tree/index.ts +10 -0
- package/src/simple-tree/leafNodeSchema.ts +0 -19
- package/src/simple-tree/objectNode.ts +45 -14
- package/src/simple-tree/objectNodeTypes.ts +5 -0
- package/src/simple-tree/schemaTypes.ts +7 -2
- package/src/simple-tree/toMapTree.ts +5 -5
- package/src/simple-tree/toStoredSchema.ts +25 -19
- package/src/util/brand.ts +0 -2
- package/src/util/index.ts +4 -1
- package/src/util/typeCheck.ts +6 -3
- package/src/util/typeCheckTests.ts +11 -1
- package/src/util/utils.ts +64 -0
- package/dist/events/emitter.d.ts +0 -139
- package/dist/events/emitter.d.ts.map +0 -1
- package/dist/events/emitter.js +0 -165
- package/dist/events/emitter.js.map +0 -1
- package/dist/events/index.d.ts +0 -7
- package/dist/events/index.d.ts.map +0 -1
- package/dist/events/index.js +0 -11
- package/dist/events/index.js.map +0 -1
- package/dist/events/interop.d.ts +0 -30
- package/dist/events/interop.d.ts.map +0 -1
- package/dist/events/interop.js.map +0 -1
- package/dist/events/listeners.d.ts +0 -76
- package/dist/events/listeners.d.ts.map +0 -1
- package/dist/events/listeners.js +0 -7
- package/dist/events/listeners.js.map +0 -1
- package/dist/feature-libraries/chunked-forest/chunk.d.ts.map +0 -1
- package/dist/feature-libraries/chunked-forest/chunk.js.map +0 -1
- package/dist/shared-tree-core/transactionStack.d.ts +0 -29
- package/dist/shared-tree-core/transactionStack.d.ts.map +0 -1
- package/dist/shared-tree-core/transactionStack.js +0 -41
- package/dist/shared-tree-core/transactionStack.js.map +0 -1
- package/dist/util/transactionResult.d.ts +0 -19
- package/dist/util/transactionResult.d.ts.map +0 -1
- package/dist/util/transactionResult.js +0 -23
- package/dist/util/transactionResult.js.map +0 -1
- package/lib/events/emitter.d.ts +0 -139
- package/lib/events/emitter.d.ts.map +0 -1
- package/lib/events/emitter.js +0 -160
- package/lib/events/emitter.js.map +0 -1
- package/lib/events/index.d.ts +0 -7
- package/lib/events/index.d.ts.map +0 -1
- package/lib/events/index.js.map +0 -1
- package/lib/events/interop.d.ts +0 -30
- package/lib/events/interop.d.ts.map +0 -1
- package/lib/events/interop.js.map +0 -1
- package/lib/events/listeners.d.ts +0 -76
- package/lib/events/listeners.d.ts.map +0 -1
- package/lib/events/listeners.js +0 -6
- package/lib/events/listeners.js.map +0 -1
- package/lib/feature-libraries/chunked-forest/chunk.d.ts.map +0 -1
- package/lib/feature-libraries/chunked-forest/chunk.js.map +0 -1
- package/lib/shared-tree-core/transactionStack.d.ts +0 -29
- package/lib/shared-tree-core/transactionStack.d.ts.map +0 -1
- package/lib/shared-tree-core/transactionStack.js +0 -37
- package/lib/shared-tree-core/transactionStack.js.map +0 -1
- package/lib/util/transactionResult.d.ts +0 -19
- package/lib/util/transactionResult.d.ts.map +0 -1
- package/lib/util/transactionResult.js +0 -20
- package/lib/util/transactionResult.js.map +0 -1
- package/src/events/README.md +0 -3
- package/src/events/emitter.ts +0 -256
- package/src/events/index.ts +0 -19
- package/src/events/interop.ts +0 -38
- package/src/events/listeners.ts +0 -80
- package/src/shared-tree-core/transactionStack.ts +0 -45
- package/src/util/transactionResult.ts +0 -19
|
@@ -5,112 +5,112 @@
|
|
|
5
5
|
import { type Static, type TSchema } from "@sinclair/typebox";
|
|
6
6
|
import { type Encoded as EncodedV2 } from "./formatV2.js";
|
|
7
7
|
declare const Rename: import("@sinclair/typebox").TObject<{
|
|
8
|
-
idOverride: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
8
|
+
idOverride: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>;
|
|
9
9
|
}>;
|
|
10
10
|
declare const MarkEffect: import("@sinclair/typebox").TObject<{
|
|
11
11
|
remove: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
12
12
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
13
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
14
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
13
|
+
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">>]>>;
|
|
14
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
15
15
|
}>>;
|
|
16
16
|
insert: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
17
17
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
18
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
18
|
+
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">>]>>;
|
|
19
19
|
}>>;
|
|
20
20
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
21
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
21
|
+
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">>]>>;
|
|
22
22
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
23
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
23
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
24
24
|
}>>;
|
|
25
25
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
26
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
26
|
+
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">>]>>;
|
|
27
27
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
28
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
29
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
28
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
29
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
30
30
|
}>>;
|
|
31
31
|
attachAndDetach: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
32
32
|
attach: import("@sinclair/typebox").TObject<{
|
|
33
33
|
insert: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
34
34
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
35
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
35
|
+
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">>]>>;
|
|
36
36
|
}>>;
|
|
37
37
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
38
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
38
|
+
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">>]>>;
|
|
39
39
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
40
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
40
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
41
41
|
}>>;
|
|
42
42
|
}>;
|
|
43
43
|
detach: import("@sinclair/typebox").TObject<{
|
|
44
44
|
remove: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
45
45
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
46
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
47
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
46
|
+
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">>]>>;
|
|
47
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
48
48
|
}>>;
|
|
49
49
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
50
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
50
|
+
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">>]>>;
|
|
51
51
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
52
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
53
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
52
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
53
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
54
54
|
}>>;
|
|
55
55
|
}>;
|
|
56
56
|
}>>;
|
|
57
57
|
rename: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
58
|
-
idOverride: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
58
|
+
idOverride: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>;
|
|
59
59
|
}>>;
|
|
60
60
|
}>;
|
|
61
61
|
declare const Mark: <Schema extends TSchema>(tNodeChange: Schema) => import("@sinclair/typebox").TObject<{
|
|
62
62
|
effect: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
63
63
|
remove: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
64
64
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
65
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
66
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
65
|
+
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">>]>>;
|
|
66
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
67
67
|
}>>;
|
|
68
68
|
insert: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
69
69
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
70
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
70
|
+
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">>]>>;
|
|
71
71
|
}>>;
|
|
72
72
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
73
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
73
|
+
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">>]>>;
|
|
74
74
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
75
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
75
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
76
76
|
}>>;
|
|
77
77
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
78
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
78
|
+
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">>]>>;
|
|
79
79
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
80
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
81
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
80
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
81
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
82
82
|
}>>;
|
|
83
83
|
attachAndDetach: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
84
84
|
attach: import("@sinclair/typebox").TObject<{
|
|
85
85
|
insert: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
86
86
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
87
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
87
|
+
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">>]>>;
|
|
88
88
|
}>>;
|
|
89
89
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
90
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
90
|
+
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">>]>>;
|
|
91
91
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
92
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
92
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
93
93
|
}>>;
|
|
94
94
|
}>;
|
|
95
95
|
detach: import("@sinclair/typebox").TObject<{
|
|
96
96
|
remove: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
97
97
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
98
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
99
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
98
|
+
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">>]>>;
|
|
99
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
100
100
|
}>>;
|
|
101
101
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
102
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
102
|
+
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">>]>>;
|
|
103
103
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
104
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
105
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
104
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
105
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
106
106
|
}>>;
|
|
107
107
|
}>;
|
|
108
108
|
}>>;
|
|
109
109
|
rename: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
110
|
-
idOverride: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
110
|
+
idOverride: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>;
|
|
111
111
|
}>>;
|
|
112
112
|
}>>;
|
|
113
|
-
cellId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
113
|
+
cellId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
114
114
|
changes: Schema extends import("@sinclair/typebox").TOptional<infer S extends TSchema> ? import("@sinclair/typebox").TOptional<S> : import("@sinclair/typebox").Ensure<import("@sinclair/typebox").TOptional<Schema>>;
|
|
115
115
|
count: import("@sinclair/typebox").TNumber;
|
|
116
116
|
}>;
|
|
@@ -118,55 +118,55 @@ export declare const Changeset: <Schema extends TSchema>(tNodeChange: Schema) =>
|
|
|
118
118
|
effect: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
119
119
|
remove: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
120
120
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
121
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
122
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
121
|
+
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">>]>>;
|
|
122
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
123
123
|
}>>;
|
|
124
124
|
insert: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
125
125
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
126
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
126
|
+
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">>]>>;
|
|
127
127
|
}>>;
|
|
128
128
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
129
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
129
|
+
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">>]>>;
|
|
130
130
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
131
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
131
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
132
132
|
}>>;
|
|
133
133
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
134
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
134
|
+
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">>]>>;
|
|
135
135
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
136
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
137
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
136
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
137
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
138
138
|
}>>;
|
|
139
139
|
attachAndDetach: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
140
140
|
attach: import("@sinclair/typebox").TObject<{
|
|
141
141
|
insert: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
142
142
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
143
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
143
|
+
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">>]>>;
|
|
144
144
|
}>>;
|
|
145
145
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
146
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
146
|
+
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">>]>>;
|
|
147
147
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
148
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
148
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
149
149
|
}>>;
|
|
150
150
|
}>;
|
|
151
151
|
detach: import("@sinclair/typebox").TObject<{
|
|
152
152
|
remove: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
153
153
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
154
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
155
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
154
|
+
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">>]>>;
|
|
155
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
156
156
|
}>>;
|
|
157
157
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
158
|
-
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
158
|
+
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">>]>>;
|
|
159
159
|
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
160
|
-
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
161
|
-
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
160
|
+
finalEndpoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
161
|
+
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
162
162
|
}>>;
|
|
163
163
|
}>;
|
|
164
164
|
}>>;
|
|
165
165
|
rename: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
166
|
-
idOverride: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
166
|
+
idOverride: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>;
|
|
167
167
|
}>>;
|
|
168
168
|
}>>;
|
|
169
|
-
cellId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../
|
|
169
|
+
cellId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").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<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
170
170
|
changes: Schema extends import("@sinclair/typebox").TOptional<infer S extends TSchema> ? import("@sinclair/typebox").TOptional<S> : import("@sinclair/typebox").Ensure<import("@sinclair/typebox").TOptional<Schema>>;
|
|
171
171
|
count: import("@sinclair/typebox").TNumber;
|
|
172
172
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invert.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"invert.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,WAAW,EAAiC,MAAM,qBAAqB,CAAC;AACtF,OAAO,EACN,KAAK,iBAAiB,EAGtB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAGN,KAAK,SAAS,EAWd,MAAM,YAAY,CAAC;AAepB;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CACrB,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,OAAO,EACnB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,WAAW,GAAG,SAAS,EACjC,iBAAiB,EAAE,iBAAiB,GAClC,SAAS,CAOX"}
|
|
@@ -183,8 +183,8 @@ function invertMark(mark, isRollback, crossFieldManager, revision) {
|
|
|
183
183
|
if (detachInverses.length === 0) {
|
|
184
184
|
return attachInverses;
|
|
185
185
|
}
|
|
186
|
-
(0, internal_1.assert)(detachInverses
|
|
187
|
-
let detachInverse = detachInverses[0]
|
|
186
|
+
(0, internal_1.assert)((0, index_js_1.hasSingle)(detachInverses), 0x80d /* Only expected MoveIn marks to be split when inverting */);
|
|
187
|
+
let detachInverse = detachInverses[0];
|
|
188
188
|
(0, internal_1.assert)((0, utils_js_1.isAttach)(detachInverse), 0x80e /* Inverse of a detach should be an attach */);
|
|
189
189
|
const inverses = [];
|
|
190
190
|
for (const attachInverse of attachInverses) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invert.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAmF;AAGnF,kDAA2E;AAC3E,yDAIoC;AAEpC,6DAAuD;AACvD,yCAcoB;AACpB,yCAYoB;AAEpB;;;;;;;;;;;GAWG;AACH,SAAgB,MAAM,CACrB,MAAiB,EACjB,UAAmB,EACnB,KAAkB,EAClB,QAAiC,EACjC,iBAAoC;IAEpC,OAAO,cAAc,CACpB,MAAM,EACN,UAAU,EACV,iBAA8C,EAC9C,QAAQ,C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OAA2B,EAC3B,MAAe;IAEf,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC3B,IAAA,iBAAM,EAAC,KAAK,KAAK,CAAC,EAAE,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAC7E,MAAM,IAAI,GAAuB;YAChC,KAAK;YACL,OAAO;SACP,CAAC;QACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAC;AAClB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase, oob } from \"@fluidframework/core-utils/internal\";\n\nimport type { RevisionTag } from \"../../core/index.js\";\nimport { type IdAllocator, type Mutable, fail } from \"../../util/index.js\";\nimport {\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\ttype NodeId,\n} from \"../modular-schema/index.js\";\n\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport {\n\ttype CellId,\n\ttype CellMark,\n\ttype Changeset,\n\ttype Detach,\n\ttype Mark,\n\ttype MarkEffect,\n\ttype MarkList,\n\ttype MoveIn,\n\ttype MoveOut,\n\ttype NoopMark,\n\tNoopMarkType,\n\ttype Remove,\n\ttype Rename,\n} from \"./types.js\";\nimport {\n\textractMarkEffect,\n\tgetDetachOutputCellId,\n\tgetEndpoint,\n\tgetInputCellId,\n\tgetOutputCellId,\n\tisAttach,\n\tisDetach,\n\tisImpactful,\n\tnormalizeCellRename,\n\tsplitMark,\n\twithNodeChange,\n} from \"./utils.js\";\n\n/**\n * Inverts a given changeset.\n * @param change - The changeset to produce the inverse of.\n * @param isRollback - Whether the inverse is being produced for a rollback.\n * @param genId - The ID allocator to use for generating new IDs.\n * @param revision - The revision to use for the inverse changeset.\n * @param crossFieldManager - The cross-field manager to use for tracking cross-field changes.\n * @returns The inverse of the given `change` such that the inverse can be applied after `change`.\n *\n * WARNING! This implementation is incomplete:\n * - Support for slices is not implemented.\n */\nexport function invert(\n\tchange: Changeset,\n\tisRollback: boolean,\n\tgenId: IdAllocator,\n\trevision: RevisionTag | undefined,\n\tcrossFieldManager: CrossFieldManager,\n): Changeset {\n\treturn invertMarkList(\n\t\tchange,\n\t\tisRollback,\n\t\tcrossFieldManager as CrossFieldManager<NodeId>,\n\t\trevision,\n\t);\n}\n\nfunction invertMarkList(\n\tmarkList: MarkList,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): MarkList {\n\tconst inverseMarkList = new MarkListFactory();\n\n\tfor (const mark of markList) {\n\t\tconst inverseMarks = invertMark(mark, isRollback, crossFieldManager, revision);\n\t\tinverseMarkList.push(...inverseMarks);\n\t}\n\n\treturn inverseMarkList.list;\n}\n\nfunction invertMark(\n\tmark: Mark,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): Mark[] {\n\tif (!isImpactful(mark)) {\n\t\tconst inputId = getInputCellId(mark);\n\t\treturn [invertNodeChangeOrSkip(mark.count, mark.changes, inputId)];\n\t}\n\tconst type = mark.type;\n\tswitch (type) {\n\t\tcase NoopMarkType: {\n\t\t\treturn [mark];\n\t\t}\n\t\tcase \"Rename\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x9f5 /* Rename mark must have cell ID */);\n\t\t\tconst inverse: Mutable<CellMark<Rename>> = {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.idOverride,\n\t\t\t\t// Unlike a remove or move-out, which follow a node, there is no way for this mark to assign the original input cell ID to another cell.\n\t\t\t\t// This means it should be safe to always restore the input cell ID (as opposed to only doing it on rollbacks).\n\t\t\t\t// Despite that, we still only do it on rollback for the sake of consistency: once a cell has been assigned an ID,\n\t\t\t\t// the only way for that cell to be assigned that ID again is if it is rolled back to that state.\n\t\t\t\tidOverride: isRollback ? inputId : { localId: inputId.localId },\n\t\t\t};\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Remove\": {\n\t\t\tassert(mark.revision !== undefined, 0x5a1 /* Unable to revert to undefined revision */);\n\t\t\tconst outputId = getOutputCellId(mark);\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tlet inverse: Mutable<Mark>;\n\t\t\tif (inputId === undefined) {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Insert\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tinverse.idOverride = inputId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Insert\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x80c /* Active inserts should target empty cells */);\n\t\t\tconst removeMark: Mutable<CellMark<Remove>> = {\n\t\t\t\ttype: \"Remove\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tid: inputId.localId,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tremoveMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tconst inverse = withNodeChange(removeMark, mark.changes);\n\t\t\treturn [inverse];\n\t\t}\n\t\tcase \"MoveOut\": {\n\t\t\tif (mark.changes !== undefined) {\n\t\t\t\tassert(mark.count === 1, 0x6ed /* Mark with changes can only target a single cell */);\n\n\t\t\t\tconst endpoint = getEndpoint(mark);\n\t\t\t\tcrossFieldManager.set(\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tendpoint.revision,\n\t\t\t\t\tendpoint.localId,\n\t\t\t\t\tmark.count,\n\t\t\t\t\tmark.changes,\n\t\t\t\t\ttrue,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst cellId = getDetachOutputCellId(mark) ?? {\n\t\t\t\trevision: mark.revision ?? fail(\"Revision must be defined\"),\n\t\t\t\tlocalId: mark.id,\n\t\t\t};\n\n\t\t\tconst moveIn: MoveIn = {\n\t\t\t\ttype: \"MoveIn\",\n\t\t\t\tid: mark.id,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (mark.finalEndpoint !== undefined) {\n\t\t\t\tmoveIn.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision: mark.revision,\n\t\t\t\t};\n\t\t\t}\n\t\t\tlet effect: MarkEffect = moveIn;\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tif (inputId !== undefined) {\n\t\t\t\tconst detach: Mutable<Detach> = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tdetach.idOverride = inputId;\n\t\t\t\t}\n\t\t\t\teffect = {\n\t\t\t\t\ttype: \"AttachAndDetach\",\n\t\t\t\t\tattach: moveIn,\n\t\t\t\t\tdetach,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn [{ ...effect, count: mark.count, cellId }];\n\t\t}\n\t\tcase \"MoveIn\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x89e /* Active move-ins should target empty cells */);\n\t\t\tconst invertedMark: Mutable<CellMark<MoveOut>> = {\n\t\t\t\ttype: \"MoveOut\",\n\t\t\t\tid: mark.id,\n\t\t\t\tcount: mark.count,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tinvertedMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tif (mark.finalEndpoint) {\n\t\t\t\tinvertedMark.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision: mark.revision,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn applyMovedChanges(invertedMark, mark.revision, crossFieldManager);\n\t\t}\n\t\tcase \"AttachAndDetach\": {\n\t\t\tconst attach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.cellId,\n\t\t\t\t...mark.attach,\n\t\t\t};\n\t\t\tconst idAfterAttach = getOutputCellId(attach);\n\n\t\t\t// We put `mark.changes` on the detach so that if it is a move source\n\t\t\t// the changes can be sent to the endpoint.\n\t\t\tconst detach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: idAfterAttach,\n\t\t\t\tchanges: mark.changes,\n\t\t\t\t...mark.detach,\n\t\t\t};\n\t\t\tconst attachInverses = invertMark(attach, isRollback, crossFieldManager, revision);\n\t\t\tconst detachInverses = invertMark(detach, isRollback, crossFieldManager, revision);\n\n\t\t\tif (detachInverses.length === 0) {\n\t\t\t\treturn attachInverses;\n\t\t\t}\n\n\t\t\tassert(\n\t\t\t\tdetachInverses.length === 1,\n\t\t\t\t0x80d /* Only expected MoveIn marks to be split when inverting */,\n\t\t\t);\n\n\t\t\tlet detachInverse = detachInverses[0] ?? oob();\n\t\t\tassert(isAttach(detachInverse), 0x80e /* Inverse of a detach should be an attach */);\n\n\t\t\tconst inverses: Mark[] = [];\n\t\t\tfor (const attachInverse of attachInverses) {\n\t\t\t\tlet detachInverseCurr: Mark = detachInverse;\n\t\t\t\tif (attachInverse.count !== detachInverse.count) {\n\t\t\t\t\t[detachInverseCurr, detachInverse] = splitMark(detachInverse, attachInverse.count);\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.type === NoopMarkType) {\n\t\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tdetachInverseCurr.changes === undefined,\n\t\t\t\t\t\t\t0x80f /* Unexpected node changes */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdetachInverseCurr.changes = attachInverse.changes;\n\t\t\t\t\t}\n\t\t\t\t\tinverses.push(detachInverseCurr);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tassert(isDetach(attachInverse), 0x810 /* Inverse of an attach should be a detach */);\n\t\t\t\tassert(detachInverseCurr.cellId !== undefined, 0x9f6 /* Expected empty cell */);\n\t\t\t\tconst inverted = normalizeCellRename(\n\t\t\t\t\tdetachInverseCurr.cellId,\n\t\t\t\t\tattachInverse.count,\n\t\t\t\t\textractMarkEffect(detachInverseCurr),\n\t\t\t\t\textractMarkEffect(attachInverse),\n\t\t\t\t);\n\t\t\t\tif (detachInverse.changes !== undefined) {\n\t\t\t\t\tinverted.changes = detachInverse.changes;\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\tassert(inverted.changes === undefined, 0x811 /* Unexpected node changes */);\n\t\t\t\t\tinverted.changes = attachInverse.changes;\n\t\t\t\t}\n\t\t\t\tinverses.push(inverted);\n\t\t\t}\n\n\t\t\treturn inverses;\n\t\t}\n\t\tdefault:\n\t\t\tunreachableCase(type);\n\t}\n}\n\nfunction applyMovedChanges(\n\tmark: CellMark<MoveOut>,\n\trevision: RevisionTag | undefined,\n\tmanager: CrossFieldManager<NodeId>,\n): Mark[] {\n\t// Although this is a source mark, we query the destination because this was a destination mark during the original invert pass.\n\tconst entry = manager.get(CrossFieldTarget.Destination, revision, mark.id, mark.count, true);\n\n\tif (entry.length < mark.count) {\n\t\tconst [mark1, mark2] = splitMark(mark, entry.length);\n\t\tconst mark1WithChanges =\n\t\t\tentry.value !== undefined\n\t\t\t\t? withNodeChange<CellMark<MoveOut>, MoveOut>(mark1, entry.value)\n\t\t\t\t: mark1;\n\n\t\treturn [mark1WithChanges, ...applyMovedChanges(mark2, revision, manager)];\n\t}\n\n\tif (entry.value !== undefined) {\n\t\tmanager.onMoveIn(entry.value);\n\t\treturn [withNodeChange<CellMark<MoveOut>, MoveOut>(mark, entry.value)];\n\t}\n\n\treturn [mark];\n}\n\nfunction invertNodeChangeOrSkip(\n\tcount: number,\n\tchanges: NodeId | undefined,\n\tcellId?: CellId,\n): Mark {\n\tif (changes !== undefined) {\n\t\tassert(count === 1, 0x66c /* A modify mark must have length equal to one */);\n\t\tconst noop: CellMark<NoopMark> = {\n\t\t\tcount,\n\t\t\tchanges,\n\t\t};\n\t\tif (cellId !== undefined) {\n\t\t\tnoop.cellId = cellId;\n\t\t}\n\t\treturn noop;\n\t}\n\n\tif (cellId !== undefined) {\n\t\treturn { count, cellId };\n\t}\n\treturn { count };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"invert.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAG9E,kDAAsF;AACtF,yDAIoC;AAEpC,6DAAuD;AACvD,yCAcoB;AACpB,yCAYoB;AAEpB;;;;;;;;;;;GAWG;AACH,SAAgB,MAAM,CACrB,MAAiB,EACjB,UAAmB,EACnB,KAAkB,EAClB,QAAiC,EACjC,iBAAoC;IAEpC,OAAO,cAAc,CACpB,MAAM,EACN,UAAU,EACV,iBAA8C,EAC9C,QAAQ,CACR,CAAC;AACH,CAAC;AAbD,wBAaC;AAED,SAAS,cAAc,CACtB,QAAkB,EAClB,UAAmB,EACnB,iBAA4C,EAC5C,QAAiC;IAEjC,MAAM,eAAe,GAAG,IAAI,oCAAe,EAAE,CAAC;IAE9C,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC7B,MAAM,YAAY,GAAG,UAAU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AC,MAAM,GAAG,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAC;AAClB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport type { RevisionTag } from \"../../core/index.js\";\nimport { type IdAllocator, type Mutable, fail, hasSingle } from \"../../util/index.js\";\nimport {\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\ttype NodeId,\n} from \"../modular-schema/index.js\";\n\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport {\n\ttype CellId,\n\ttype CellMark,\n\ttype Changeset,\n\ttype Detach,\n\ttype Mark,\n\ttype MarkEffect,\n\ttype MarkList,\n\ttype MoveIn,\n\ttype MoveOut,\n\ttype NoopMark,\n\tNoopMarkType,\n\ttype Remove,\n\ttype Rename,\n} from \"./types.js\";\nimport {\n\textractMarkEffect,\n\tgetDetachOutputCellId,\n\tgetEndpoint,\n\tgetInputCellId,\n\tgetOutputCellId,\n\tisAttach,\n\tisDetach,\n\tisImpactful,\n\tnormalizeCellRename,\n\tsplitMark,\n\twithNodeChange,\n} from \"./utils.js\";\n\n/**\n * Inverts a given changeset.\n * @param change - The changeset to produce the inverse of.\n * @param isRollback - Whether the inverse is being produced for a rollback.\n * @param genId - The ID allocator to use for generating new IDs.\n * @param revision - The revision to use for the inverse changeset.\n * @param crossFieldManager - The cross-field manager to use for tracking cross-field changes.\n * @returns The inverse of the given `change` such that the inverse can be applied after `change`.\n *\n * WARNING! This implementation is incomplete:\n * - Support for slices is not implemented.\n */\nexport function invert(\n\tchange: Changeset,\n\tisRollback: boolean,\n\tgenId: IdAllocator,\n\trevision: RevisionTag | undefined,\n\tcrossFieldManager: CrossFieldManager,\n): Changeset {\n\treturn invertMarkList(\n\t\tchange,\n\t\tisRollback,\n\t\tcrossFieldManager as CrossFieldManager<NodeId>,\n\t\trevision,\n\t);\n}\n\nfunction invertMarkList(\n\tmarkList: MarkList,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): MarkList {\n\tconst inverseMarkList = new MarkListFactory();\n\n\tfor (const mark of markList) {\n\t\tconst inverseMarks = invertMark(mark, isRollback, crossFieldManager, revision);\n\t\tinverseMarkList.push(...inverseMarks);\n\t}\n\n\treturn inverseMarkList.list;\n}\n\nfunction invertMark(\n\tmark: Mark,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): Mark[] {\n\tif (!isImpactful(mark)) {\n\t\tconst inputId = getInputCellId(mark);\n\t\treturn [invertNodeChangeOrSkip(mark.count, mark.changes, inputId)];\n\t}\n\tconst type = mark.type;\n\tswitch (type) {\n\t\tcase NoopMarkType: {\n\t\t\treturn [mark];\n\t\t}\n\t\tcase \"Rename\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x9f5 /* Rename mark must have cell ID */);\n\t\t\tconst inverse: Mutable<CellMark<Rename>> = {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.idOverride,\n\t\t\t\t// Unlike a remove or move-out, which follow a node, there is no way for this mark to assign the original input cell ID to another cell.\n\t\t\t\t// This means it should be safe to always restore the input cell ID (as opposed to only doing it on rollbacks).\n\t\t\t\t// Despite that, we still only do it on rollback for the sake of consistency: once a cell has been assigned an ID,\n\t\t\t\t// the only way for that cell to be assigned that ID again is if it is rolled back to that state.\n\t\t\t\tidOverride: isRollback ? inputId : { localId: inputId.localId },\n\t\t\t};\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Remove\": {\n\t\t\tassert(mark.revision !== undefined, 0x5a1 /* Unable to revert to undefined revision */);\n\t\t\tconst outputId = getOutputCellId(mark);\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tlet inverse: Mutable<Mark>;\n\t\t\tif (inputId === undefined) {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Insert\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tinverse.idOverride = inputId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Insert\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x80c /* Active inserts should target empty cells */);\n\t\t\tconst removeMark: Mutable<CellMark<Remove>> = {\n\t\t\t\ttype: \"Remove\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tid: inputId.localId,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tremoveMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tconst inverse = withNodeChange(removeMark, mark.changes);\n\t\t\treturn [inverse];\n\t\t}\n\t\tcase \"MoveOut\": {\n\t\t\tif (mark.changes !== undefined) {\n\t\t\t\tassert(mark.count === 1, 0x6ed /* Mark with changes can only target a single cell */);\n\n\t\t\t\tconst endpoint = getEndpoint(mark);\n\t\t\t\tcrossFieldManager.set(\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tendpoint.revision,\n\t\t\t\t\tendpoint.localId,\n\t\t\t\t\tmark.count,\n\t\t\t\t\tmark.changes,\n\t\t\t\t\ttrue,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst cellId = getDetachOutputCellId(mark) ?? {\n\t\t\t\trevision: mark.revision ?? fail(\"Revision must be defined\"),\n\t\t\t\tlocalId: mark.id,\n\t\t\t};\n\n\t\t\tconst moveIn: MoveIn = {\n\t\t\t\ttype: \"MoveIn\",\n\t\t\t\tid: mark.id,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (mark.finalEndpoint !== undefined) {\n\t\t\t\tmoveIn.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision: mark.revision,\n\t\t\t\t};\n\t\t\t}\n\t\t\tlet effect: MarkEffect = moveIn;\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tif (inputId !== undefined) {\n\t\t\t\tconst detach: Mutable<Detach> = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tdetach.idOverride = inputId;\n\t\t\t\t}\n\t\t\t\teffect = {\n\t\t\t\t\ttype: \"AttachAndDetach\",\n\t\t\t\t\tattach: moveIn,\n\t\t\t\t\tdetach,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn [{ ...effect, count: mark.count, cellId }];\n\t\t}\n\t\tcase \"MoveIn\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x89e /* Active move-ins should target empty cells */);\n\t\t\tconst invertedMark: Mutable<CellMark<MoveOut>> = {\n\t\t\t\ttype: \"MoveOut\",\n\t\t\t\tid: mark.id,\n\t\t\t\tcount: mark.count,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tinvertedMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tif (mark.finalEndpoint) {\n\t\t\t\tinvertedMark.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision: mark.revision,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn applyMovedChanges(invertedMark, mark.revision, crossFieldManager);\n\t\t}\n\t\tcase \"AttachAndDetach\": {\n\t\t\tconst attach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.cellId,\n\t\t\t\t...mark.attach,\n\t\t\t};\n\t\t\tconst idAfterAttach = getOutputCellId(attach);\n\n\t\t\t// We put `mark.changes` on the detach so that if it is a move source\n\t\t\t// the changes can be sent to the endpoint.\n\t\t\tconst detach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: idAfterAttach,\n\t\t\t\tchanges: mark.changes,\n\t\t\t\t...mark.detach,\n\t\t\t};\n\t\t\tconst attachInverses = invertMark(attach, isRollback, crossFieldManager, revision);\n\t\t\tconst detachInverses = invertMark(detach, isRollback, crossFieldManager, revision);\n\n\t\t\tif (detachInverses.length === 0) {\n\t\t\t\treturn attachInverses;\n\t\t\t}\n\n\t\t\tassert(\n\t\t\t\thasSingle(detachInverses),\n\t\t\t\t0x80d /* Only expected MoveIn marks to be split when inverting */,\n\t\t\t);\n\n\t\t\tlet detachInverse = detachInverses[0];\n\t\t\tassert(isAttach(detachInverse), 0x80e /* Inverse of a detach should be an attach */);\n\n\t\t\tconst inverses: Mark[] = [];\n\t\t\tfor (const attachInverse of attachInverses) {\n\t\t\t\tlet detachInverseCurr: Mark = detachInverse;\n\t\t\t\tif (attachInverse.count !== detachInverse.count) {\n\t\t\t\t\t[detachInverseCurr, detachInverse] = splitMark(detachInverse, attachInverse.count);\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.type === NoopMarkType) {\n\t\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tdetachInverseCurr.changes === undefined,\n\t\t\t\t\t\t\t0x80f /* Unexpected node changes */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdetachInverseCurr.changes = attachInverse.changes;\n\t\t\t\t\t}\n\t\t\t\t\tinverses.push(detachInverseCurr);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tassert(isDetach(attachInverse), 0x810 /* Inverse of an attach should be a detach */);\n\t\t\t\tassert(detachInverseCurr.cellId !== undefined, 0x9f6 /* Expected empty cell */);\n\t\t\t\tconst inverted = normalizeCellRename(\n\t\t\t\t\tdetachInverseCurr.cellId,\n\t\t\t\t\tattachInverse.count,\n\t\t\t\t\textractMarkEffect(detachInverseCurr),\n\t\t\t\t\textractMarkEffect(attachInverse),\n\t\t\t\t);\n\t\t\t\tif (detachInverse.changes !== undefined) {\n\t\t\t\t\tinverted.changes = detachInverse.changes;\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\tassert(inverted.changes === undefined, 0x811 /* Unexpected node changes */);\n\t\t\t\t\tinverted.changes = attachInverse.changes;\n\t\t\t\t}\n\t\t\t\tinverses.push(inverted);\n\t\t\t}\n\n\t\t\treturn inverses;\n\t\t}\n\t\tdefault:\n\t\t\tunreachableCase(type);\n\t}\n}\n\nfunction applyMovedChanges(\n\tmark: CellMark<MoveOut>,\n\trevision: RevisionTag | undefined,\n\tmanager: CrossFieldManager<NodeId>,\n): Mark[] {\n\t// Although this is a source mark, we query the destination because this was a destination mark during the original invert pass.\n\tconst entry = manager.get(CrossFieldTarget.Destination, revision, mark.id, mark.count, true);\n\n\tif (entry.length < mark.count) {\n\t\tconst [mark1, mark2] = splitMark(mark, entry.length);\n\t\tconst mark1WithChanges =\n\t\t\tentry.value !== undefined\n\t\t\t\t? withNodeChange<CellMark<MoveOut>, MoveOut>(mark1, entry.value)\n\t\t\t\t: mark1;\n\n\t\treturn [mark1WithChanges, ...applyMovedChanges(mark2, revision, manager)];\n\t}\n\n\tif (entry.value !== undefined) {\n\t\tmanager.onMoveIn(entry.value);\n\t\treturn [withNodeChange<CellMark<MoveOut>, MoveOut>(mark, entry.value)];\n\t}\n\n\treturn [mark];\n}\n\nfunction invertNodeChangeOrSkip(\n\tcount: number,\n\tchanges: NodeId | undefined,\n\tcellId?: CellId,\n): Mark {\n\tif (changes !== undefined) {\n\t\tassert(count === 1, 0x66c /* A modify mark must have length equal to one */);\n\t\tconst noop: CellMark<NoopMark> = {\n\t\t\tcount,\n\t\t\tchanges,\n\t\t};\n\t\tif (cellId !== undefined) {\n\t\t\tnoop.cellId = cellId;\n\t\t}\n\t\treturn noop;\n\t}\n\n\tif (cellId !== undefined) {\n\t\treturn { count, cellId };\n\t}\n\treturn { count };\n}\n"]}
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.sequenceFieldToDelta = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const index_js_1 = require("../../core/index.js");
|
|
10
|
+
const index_js_2 = require("../../util/index.js");
|
|
10
11
|
const deltaUtils_js_1 = require("../deltaUtils.js");
|
|
11
12
|
const moveEffectTable_js_1 = require("./moveEffectTable.js");
|
|
12
13
|
const types_js_1 = require("./types.js");
|
|
@@ -143,8 +144,8 @@ function sequenceFieldToDelta(change, deltaFromChild) {
|
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
// Remove trailing no-op marks
|
|
146
|
-
while (
|
|
147
|
-
const lastMark =
|
|
147
|
+
while ((0, index_js_2.hasSome)(local)) {
|
|
148
|
+
const lastMark = (0, index_js_2.getLast)(local);
|
|
148
149
|
if (lastMark.attach !== undefined ||
|
|
149
150
|
lastMark.detach !== undefined ||
|
|
150
151
|
lastMark.fields !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceFieldToDelta.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldToDelta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAmF;AAEnF,kDAM6B;AAE7B,oDAAwD;AAExD,6DAA2D;AAC3D,yCAAyD;AACzD,yCAOo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,MAAM,KAAK,SAAS;YAC7B,QAAQ,CAAC,MAAM,KAAK,SAAS;YAC7B,QAAQ,CAAC,MAAM,KAAK,SAAS,EAC5B,CAAC;YACF,MAAM;QACP,CAAC;QACD,KAAK,CAAC,GAAG,EAAE,CAAC;IACb,CAAC;IACD,MAAM,KAAK,GAA+B,EAAE,CAAC;IAC7C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AA3KD,oDA2KC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase, oob } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype DeltaMark,\n\tareEqualChangeAtomIds,\n} from \"../../core/index.js\";\nimport type { Mutable } from \"../../util/index.js\";\nimport { nodeIdFromChangeAtom } from \"../deltaUtils.js\";\n\nimport { isMoveIn, isMoveOut } from \"./moveEffectTable.js\";\nimport { type MarkList, NoopMarkType } from \"./types.js\";\nimport {\n\tareInputCellsEmpty,\n\tareOutputCellsEmpty,\n\tgetDetachedNodeId,\n\tgetEndpoint,\n\tgetInputCellId,\n\tisAttachAndDetachEffect,\n} from \"./utils.js\";\nimport type { ToDelta } from \"../modular-schema/index.js\";\n\nexport function sequenceFieldToDelta(\n\tchange: MarkList,\n\tdeltaFromChild: ToDelta,\n): DeltaFieldChanges {\n\tconst local: DeltaMark[] = [];\n\tconst global: DeltaDetachedNodeChanges[] = [];\n\tconst rename: DeltaDetachedNodeRename[] = [];\n\n\tfor (const mark of change) {\n\t\tconst deltaMark: Mutable<DeltaMark> = { count: mark.count };\n\t\tconst inputCellId = getInputCellId(mark);\n\t\tconst changes = mark.changes;\n\t\tif (changes !== undefined) {\n\t\t\tconst nestedDelta = deltaFromChild(changes);\n\t\t\tif (nestedDelta.size > 0) {\n\t\t\t\tif (inputCellId === undefined) {\n\t\t\t\t\tdeltaMark.fields = nestedDelta;\n\t\t\t\t} else {\n\t\t\t\t\tglobal.push({\n\t\t\t\t\t\tid: nodeIdFromChangeAtom(inputCellId),\n\t\t\t\t\t\tfields: nestedDelta,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!areInputCellsEmpty(mark) && !areOutputCellsEmpty(mark)) {\n\t\t\t// Since each cell is associated with exactly one node,\n\t\t\t// the cell starting end ending populated means the cell content has not changed.\n\t\t\tlocal.push(deltaMark);\n\t\t} else if (isAttachAndDetachEffect(mark)) {\n\t\t\tassert(\n\t\t\t\tinputCellId !== undefined,\n\t\t\t\t0x81e /* AttachAndDetach mark should have defined input cell ID */,\n\t\t\t);\n\t\t\t// The cell starting and ending empty means the cell content has not changed,\n\t\t\t// unless transient content was inserted/attached.\n\t\t\tif (isMoveIn(mark.attach) && isMoveOut(mark.detach)) {\n\t\t\t\tassert(\n\t\t\t\t\tmark.changes === undefined,\n\t\t\t\t\t0x81f /* AttachAndDetach moves should not have changes */,\n\t\t\t\t);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst outputId = getDetachedNodeId(mark.detach);\n\t\t\tassert(\n\t\t\t\toutputId !== undefined,\n\t\t\t\t0x820 /* AttachAndDetach mark should have defined output cell ID */,\n\t\t\t);\n\t\t\tconst oldId = nodeIdFromChangeAtom(\n\t\t\t\tisMoveIn(mark.attach) ? getEndpoint(mark.attach) : inputCellId,\n\t\t\t);\n\t\t\tif (!areEqualChangeAtomIds(inputCellId, outputId)) {\n\t\t\t\trename.push({\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\toldId,\n\t\t\t\t\tnewId: nodeIdFromChangeAtom(outputId),\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (deltaMark.fields) {\n\t\t\t\tglobal.push({\n\t\t\t\t\tid: oldId,\n\t\t\t\t\tfields: deltaMark.fields,\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tconst type = mark.type;\n\t\t\t// Inline into `switch(mark.type)` once we upgrade to TS 4.7\n\t\t\tswitch (type) {\n\t\t\t\tcase \"MoveIn\": {\n\t\t\t\t\tlocal.push({\n\t\t\t\t\t\tattach: nodeIdFromChangeAtom(getEndpoint(mark)),\n\t\t\t\t\t\tcount: mark.count,\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"Remove\": {\n\t\t\t\t\tconst newDetachId = getDetachedNodeId(mark);\n\t\t\t\t\tif (inputCellId === undefined) {\n\t\t\t\t\t\tdeltaMark.detach = nodeIdFromChangeAtom(newDetachId);\n\t\t\t\t\t\tlocal.push(deltaMark);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst oldId = nodeIdFromChangeAtom(inputCellId);\n\t\t\t\t\t\t// Removal of already removed content is only a no-op if the detach IDs are different.\n\t\t\t\t\t\tif (!areEqualChangeAtomIds(inputCellId, newDetachId)) {\n\t\t\t\t\t\t\trename.push({\n\t\t\t\t\t\t\t\tcount: mark.count,\n\t\t\t\t\t\t\t\toldId,\n\t\t\t\t\t\t\t\tnewId: nodeIdFromChangeAtom(newDetachId),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// In all cases, the nested changes apply\n\t\t\t\t\t\tif (deltaMark.fields) {\n\t\t\t\t\t\t\tglobal.push({\n\t\t\t\t\t\t\t\tid: oldId,\n\t\t\t\t\t\t\t\tfields: deltaMark.fields,\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\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"MoveOut\": {\n\t\t\t\t\t// The move destination will look for the detach ID of the source, so we can ignore `finalEndpoint`.\n\t\t\t\t\tconst detachId = nodeIdFromChangeAtom(getDetachedNodeId(mark));\n\t\t\t\t\tif (inputCellId === undefined) {\n\t\t\t\t\t\tdeltaMark.detach = detachId;\n\t\t\t\t\t\tlocal.push(deltaMark);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Move sources implicitly restore their content\n\t\t\t\t\t\trename.push({\n\t\t\t\t\t\t\tcount: mark.count,\n\t\t\t\t\t\t\toldId: nodeIdFromChangeAtom(inputCellId),\n\t\t\t\t\t\t\tnewId: detachId,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"Insert\": {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tinputCellId !== undefined,\n\t\t\t\t\t\t0x821 /* Active Insert marks must have a CellId */,\n\t\t\t\t\t);\n\t\t\t\t\tconst buildId = nodeIdFromChangeAtom(inputCellId);\n\t\t\t\t\tdeltaMark.attach = buildId;\n\t\t\t\t\tif (deltaMark.fields) {\n\t\t\t\t\t\t// Nested changes are represented on the node in its starting location\n\t\t\t\t\t\tglobal.push({ id: buildId, fields: deltaMark.fields });\n\t\t\t\t\t\tdelete deltaMark.fields;\n\t\t\t\t\t}\n\t\t\t\t\tlocal.push(deltaMark);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase NoopMarkType:\n\t\t\t\t\tif (inputCellId === undefined) {\n\t\t\t\t\t\tlocal.push(deltaMark);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Rename\":\n\t\t\t\t\tassert(\n\t\t\t\t\t\tmark.cellId !== undefined,\n\t\t\t\t\t\t0x9f9 /* Renames should only target empty cells */,\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(type);\n\t\t\t}\n\t\t}\n\t}\n\t// Remove trailing no-op marks\n\twhile (local.length > 0) {\n\t\tconst lastMark = local[local.length - 1] ?? oob();\n\t\tif (\n\t\t\tlastMark.attach !== undefined ||\n\t\t\tlastMark.detach !== undefined ||\n\t\t\tlastMark.fields !== undefined\n\t\t) {\n\t\t\tbreak;\n\t\t}\n\t\tlocal.pop();\n\t}\n\tconst delta: Mutable<DeltaFieldChanges> = {};\n\tif (local.length > 0) {\n\t\tdelta.local = local;\n\t}\n\tif (global.length > 0) {\n\t\tdelta.global = global;\n\t}\n\tif (rename.length > 0) {\n\t\tdelta.rename = rename;\n\t}\n\treturn delta;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sequenceFieldToDelta.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldToDelta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAE9E,kDAM6B;AAC7B,kDAAqE;AACrE,oDAAwD;AAExD,6DAA2D;AAC3D,yCAAyD;AACzD,yCAOoB;AAGpB,SAAgB,oBAAoB,CACnC,MAAgB,EAChB,cAAuB;IAEvB,MAAM,KAAK,GAAgB,EAAE,CAAC;IAC9B,MAAM,MAAM,GAA+B,EAAE,CAAC;IAC9C,MAAM,MAAM,GAA8B,EAAE,CAAC;IAE7C,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAuB,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QAC5D,MAAM,WAAW,GAAG,IAAA,yBAAc,EAAC,IAAI,CAAC,CAAC;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,WAAW,CAAC,IAAI,GAAG,CAAC,EAAE,C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Content":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype DeltaMark,\n\tareEqualChangeAtomIds,\n} from \"../../core/index.js\";\nimport { getLast, hasSome, type Mutable } from \"../../util/index.js\";\nimport { nodeIdFromChangeAtom } from \"../deltaUtils.js\";\n\nimport { isMoveIn, isMoveOut } from \"./moveEffectTable.js\";\nimport { type MarkList, NoopMarkType } from \"./types.js\";\nimport {\n\tareInputCellsEmpty,\n\tareOutputCellsEmpty,\n\tgetDetachedNodeId,\n\tgetEndpoint,\n\tgetInputCellId,\n\tisAttachAndDetachEffect,\n} from \"./utils.js\";\nimport type { ToDelta } from \"../modular-schema/index.js\";\n\nexport function sequenceFieldToDelta(\n\tchange: MarkList,\n\tdeltaFromChild: ToDelta,\n): DeltaFieldChanges {\n\tconst local: DeltaMark[] = [];\n\tconst global: DeltaDetachedNodeChanges[] = [];\n\tconst rename: DeltaDetachedNodeRename[] = [];\n\n\tfor (const mark of change) {\n\t\tconst deltaMark: Mutable<DeltaMark> = { count: mark.count };\n\t\tconst inputCellId = getInputCellId(mark);\n\t\tconst changes = mark.changes;\n\t\tif (changes !== undefined) {\n\t\t\tconst nestedDelta = deltaFromChild(changes);\n\t\t\tif (nestedDelta.size > 0) {\n\t\t\t\tif (inputCellId === undefined) {\n\t\t\t\t\tdeltaMark.fields = nestedDelta;\n\t\t\t\t} else {\n\t\t\t\t\tglobal.push({\n\t\t\t\t\t\tid: nodeIdFromChangeAtom(inputCellId),\n\t\t\t\t\t\tfields: nestedDelta,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!areInputCellsEmpty(mark) && !areOutputCellsEmpty(mark)) {\n\t\t\t// Since each cell is associated with exactly one node,\n\t\t\t// the cell starting end ending populated means the cell content has not changed.\n\t\t\tlocal.push(deltaMark);\n\t\t} else if (isAttachAndDetachEffect(mark)) {\n\t\t\tassert(\n\t\t\t\tinputCellId !== undefined,\n\t\t\t\t0x81e /* AttachAndDetach mark should have defined input cell ID */,\n\t\t\t);\n\t\t\t// The cell starting and ending empty means the cell content has not changed,\n\t\t\t// unless transient content was inserted/attached.\n\t\t\tif (isMoveIn(mark.attach) && isMoveOut(mark.detach)) {\n\t\t\t\tassert(\n\t\t\t\t\tmark.changes === undefined,\n\t\t\t\t\t0x81f /* AttachAndDetach moves should not have changes */,\n\t\t\t\t);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst outputId = getDetachedNodeId(mark.detach);\n\t\t\tassert(\n\t\t\t\toutputId !== undefined,\n\t\t\t\t0x820 /* AttachAndDetach mark should have defined output cell ID */,\n\t\t\t);\n\t\t\tconst oldId = nodeIdFromChangeAtom(\n\t\t\t\tisMoveIn(mark.attach) ? getEndpoint(mark.attach) : inputCellId,\n\t\t\t);\n\t\t\tif (!areEqualChangeAtomIds(inputCellId, outputId)) {\n\t\t\t\trename.push({\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\toldId,\n\t\t\t\t\tnewId: nodeIdFromChangeAtom(outputId),\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (deltaMark.fields) {\n\t\t\t\tglobal.push({\n\t\t\t\t\tid: oldId,\n\t\t\t\t\tfields: deltaMark.fields,\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tconst type = mark.type;\n\t\t\t// Inline into `switch(mark.type)` once we upgrade to TS 4.7\n\t\t\tswitch (type) {\n\t\t\t\tcase \"MoveIn\": {\n\t\t\t\t\tlocal.push({\n\t\t\t\t\t\tattach: nodeIdFromChangeAtom(getEndpoint(mark)),\n\t\t\t\t\t\tcount: mark.count,\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"Remove\": {\n\t\t\t\t\tconst newDetachId = getDetachedNodeId(mark);\n\t\t\t\t\tif (inputCellId === undefined) {\n\t\t\t\t\t\tdeltaMark.detach = nodeIdFromChangeAtom(newDetachId);\n\t\t\t\t\t\tlocal.push(deltaMark);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst oldId = nodeIdFromChangeAtom(inputCellId);\n\t\t\t\t\t\t// Removal of already removed content is only a no-op if the detach IDs are different.\n\t\t\t\t\t\tif (!areEqualChangeAtomIds(inputCellId, newDetachId)) {\n\t\t\t\t\t\t\trename.push({\n\t\t\t\t\t\t\t\tcount: mark.count,\n\t\t\t\t\t\t\t\toldId,\n\t\t\t\t\t\t\t\tnewId: nodeIdFromChangeAtom(newDetachId),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// In all cases, the nested changes apply\n\t\t\t\t\t\tif (deltaMark.fields) {\n\t\t\t\t\t\t\tglobal.push({\n\t\t\t\t\t\t\t\tid: oldId,\n\t\t\t\t\t\t\t\tfields: deltaMark.fields,\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\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"MoveOut\": {\n\t\t\t\t\t// The move destination will look for the detach ID of the source, so we can ignore `finalEndpoint`.\n\t\t\t\t\tconst detachId = nodeIdFromChangeAtom(getDetachedNodeId(mark));\n\t\t\t\t\tif (inputCellId === undefined) {\n\t\t\t\t\t\tdeltaMark.detach = detachId;\n\t\t\t\t\t\tlocal.push(deltaMark);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Move sources implicitly restore their content\n\t\t\t\t\t\trename.push({\n\t\t\t\t\t\t\tcount: mark.count,\n\t\t\t\t\t\t\toldId: nodeIdFromChangeAtom(inputCellId),\n\t\t\t\t\t\t\tnewId: detachId,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"Insert\": {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tinputCellId !== undefined,\n\t\t\t\t\t\t0x821 /* Active Insert marks must have a CellId */,\n\t\t\t\t\t);\n\t\t\t\t\tconst buildId = nodeIdFromChangeAtom(inputCellId);\n\t\t\t\t\tdeltaMark.attach = buildId;\n\t\t\t\t\tif (deltaMark.fields) {\n\t\t\t\t\t\t// Nested changes are represented on the node in its starting location\n\t\t\t\t\t\tglobal.push({ id: buildId, fields: deltaMark.fields });\n\t\t\t\t\t\tdelete deltaMark.fields;\n\t\t\t\t\t}\n\t\t\t\t\tlocal.push(deltaMark);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase NoopMarkType:\n\t\t\t\t\tif (inputCellId === undefined) {\n\t\t\t\t\t\tlocal.push(deltaMark);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Rename\":\n\t\t\t\t\tassert(\n\t\t\t\t\t\tmark.cellId !== undefined,\n\t\t\t\t\t\t0x9f9 /* Renames should only target empty cells */,\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(type);\n\t\t\t}\n\t\t}\n\t}\n\t// Remove trailing no-op marks\n\twhile (hasSome(local)) {\n\t\tconst lastMark = getLast(local);\n\t\tif (\n\t\t\tlastMark.attach !== undefined ||\n\t\t\tlastMark.detach !== undefined ||\n\t\t\tlastMark.fields !== undefined\n\t\t) {\n\t\t\tbreak;\n\t\t}\n\t\tlocal.pop();\n\t}\n\tconst delta: Mutable<DeltaFieldChanges> = {};\n\tif (local.length > 0) {\n\t\tdelta.local = local;\n\t}\n\tif (global.length > 0) {\n\t\tdelta.global = global;\n\t}\n\tif (rename.length > 0) {\n\t\tdelta.rename = rename;\n\t}\n\treturn delta;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA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