@fluidframework/tree 2.3.1 → 2.4.0-297027
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/api-report/tree.alpha.api.md +77 -38
- package/api-report/tree.beta.api.md +50 -30
- package/api-report/tree.legacy.alpha.api.md +50 -30
- package/api-report/tree.legacy.public.api.md +50 -30
- package/api-report/tree.public.api.md +50 -30
- package/dist/alpha.d.ts +7 -0
- package/dist/beta.d.ts +4 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +2 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +1 -0
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +8 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +7 -0
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +9 -0
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +1 -2
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +2 -2
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +13 -2
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.d.ts +3 -230
- package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.js +1 -539
- package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +7 -14
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +3 -3
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -16
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +2 -3
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.js +1 -2
- package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +10 -15
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +18 -20
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts +4 -5
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +13 -23
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.js +1 -1
- package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +4 -7
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +5 -31
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +7 -0
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +61 -17
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +3 -0
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV1.d.ts +18 -18
- package/dist/feature-libraries/sequence-field/formatV2.d.ts +18 -18
- package/dist/feature-libraries/sequence-field/formatV3.d.ts +27 -27
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +1 -4
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/feature-libraries/typed-schema/flexList.d.ts +1 -46
- package/dist/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/flexList.js +1 -13
- package/dist/feature-libraries/typed-schema/flexList.js.map +1 -1
- package/dist/feature-libraries/typed-schema/index.d.ts +2 -4
- package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/index.js +1 -19
- package/dist/feature-libraries/typed-schema/index.js.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +0 -212
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js +0 -266
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/internalTypes.d.ts +1 -1
- package/dist/internalTypes.d.ts.map +1 -1
- package/dist/internalTypes.js.map +1 -1
- package/dist/legacy.d.ts +4 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +4 -0
- package/dist/shared-tree/checkoutFlexTreeView.d.ts +3 -3
- package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
- package/dist/shared-tree/checkoutFlexTreeView.js +1 -1
- package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +3 -3
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +2 -3
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +1 -40
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +2 -11
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +9 -7
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +19 -8
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +19 -2
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +10 -2
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +71 -41
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +116 -84
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +8 -11
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +12 -15
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +1 -1
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +11 -13
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts +3 -3
- package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.js +1 -1
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.d.ts +2 -2
- package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +2 -1
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +3 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/jsonSchema.d.ts +13 -14
- package/dist/simple-tree/api/jsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/jsonSchema.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +14 -8
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +21 -2
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +3 -3
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/simpleSchema.d.ts +18 -10
- 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.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +30 -17
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +16 -6
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js +4 -4
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +8 -6
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +6 -10
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/{lib/feature-libraries/typed-schema → dist/simple-tree/api}/view.d.ts +4 -11
- package/dist/simple-tree/api/view.d.ts.map +1 -0
- package/dist/{feature-libraries/typed-schema → simple-tree/api}/view.js +9 -9
- package/dist/simple-tree/api/view.js.map +1 -0
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +2 -2
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +11 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +147 -14
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +32 -20
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/core/context.d.ts +55 -0
- package/dist/simple-tree/core/context.d.ts.map +1 -0
- package/dist/simple-tree/core/context.js +60 -0
- package/dist/simple-tree/core/context.js.map +1 -0
- package/dist/simple-tree/core/getOrCreateNode.d.ts +15 -0
- package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -0
- package/dist/simple-tree/core/getOrCreateNode.js +36 -0
- package/dist/simple-tree/core/getOrCreateNode.js.map +1 -0
- package/dist/simple-tree/core/index.d.ts +7 -3
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +16 -7
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/schemaCaching.d.ts +5 -13
- package/dist/simple-tree/core/schemaCaching.d.ts.map +1 -1
- package/dist/simple-tree/core/schemaCaching.js +16 -45
- package/dist/simple-tree/core/schemaCaching.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +29 -7
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +94 -58
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +24 -0
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/types.d.ts +0 -5
- package/dist/simple-tree/core/types.d.ts.map +1 -1
- package/dist/simple-tree/core/types.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +139 -0
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -0
- package/dist/{feature-libraries/flex-map-tree/mapTreeNode.js → simple-tree/core/unhydratedFlexTree.js} +112 -132
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -0
- package/dist/simple-tree/{walkSchema.d.ts → core/walkSchema.d.ts} +8 -4
- package/dist/simple-tree/core/walkSchema.d.ts.map +1 -0
- package/dist/simple-tree/core/walkSchema.js +34 -0
- package/dist/simple-tree/core/walkSchema.js.map +1 -0
- package/dist/simple-tree/createContext.d.ts +11 -0
- package/dist/simple-tree/createContext.d.ts.map +1 -0
- package/dist/simple-tree/createContext.js +25 -0
- package/dist/simple-tree/createContext.js.map +1 -0
- package/dist/simple-tree/index.d.ts +4 -5
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +7 -7
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +1 -0
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +1 -2
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/mapNode.d.ts +4 -4
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js +9 -5
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +8 -8
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +33 -14
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/objectNodeTypes.d.ts +7 -3
- package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/proxies.d.ts +1 -2
- package/dist/simple-tree/proxies.d.ts.map +1 -1
- package/dist/simple-tree/proxies.js +6 -22
- package/dist/simple-tree/proxies.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +44 -4
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +10 -0
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/toFlexSchema.d.ts +6 -36
- package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/dist/simple-tree/toFlexSchema.js +58 -142
- package/dist/simple-tree/toFlexSchema.js.map +1 -1
- package/dist/simple-tree/toMapTree.d.ts.map +1 -1
- package/dist/simple-tree/toMapTree.js +2 -2
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/simple-tree/treeNodeValid.d.ts +13 -5
- package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/treeNodeValid.js +19 -10
- package/dist/simple-tree/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/typesUnsafe.d.ts +4 -4
- package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/walkFieldSchema.d.ts +11 -0
- package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -0
- package/dist/simple-tree/walkFieldSchema.js +17 -0
- package/dist/simple-tree/walkFieldSchema.js.map +1 -0
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/typeUtils.d.ts +14 -45
- package/dist/util/typeUtils.d.ts.map +1 -1
- package/dist/util/typeUtils.js.map +1 -1
- package/lib/alpha.d.ts +7 -0
- package/lib/beta.d.ts +4 -0
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +1 -0
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +6 -0
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +7 -0
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +9 -0
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts +1 -2
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +2 -2
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +13 -2
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.d.ts +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/lib/feature-libraries/editableTreeBinder.d.ts +3 -230
- package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
- package/lib/feature-libraries/editableTreeBinder.js +1 -532
- package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +7 -14
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +3 -3
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -16
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +2 -3
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.js +1 -2
- package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +10 -15
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +18 -20
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts +4 -5
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +13 -23
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.js +1 -1
- package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +4 -7
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +4 -6
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +7 -0
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +62 -18
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +3 -0
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV1.d.ts +18 -18
- package/lib/feature-libraries/sequence-field/formatV2.d.ts +18 -18
- package/lib/feature-libraries/sequence-field/formatV3.d.ts +27 -27
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +2 -5
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/feature-libraries/typed-schema/flexList.d.ts +1 -46
- package/lib/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/flexList.js +0 -11
- package/lib/feature-libraries/typed-schema/flexList.js.map +1 -1
- package/lib/feature-libraries/typed-schema/index.d.ts +2 -4
- package/lib/feature-libraries/typed-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/index.js +0 -3
- package/lib/feature-libraries/typed-schema/index.js.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +0 -212
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js +1 -253
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/internalTypes.d.ts +1 -1
- package/lib/internalTypes.d.ts.map +1 -1
- package/lib/internalTypes.js.map +1 -1
- package/lib/legacy.d.ts +4 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +4 -0
- package/lib/shared-tree/checkoutFlexTreeView.d.ts +3 -3
- package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
- package/lib/shared-tree/checkoutFlexTreeView.js +1 -1
- package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +3 -3
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -2
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +1 -40
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +1 -9
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +9 -7
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +22 -11
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +19 -2
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +10 -3
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +71 -41
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +118 -86
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +8 -11
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +12 -15
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +1 -1
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +14 -16
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts +3 -3
- package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.js +1 -1
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/getSimpleSchema.d.ts +2 -2
- package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +2 -1
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -0
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/jsonSchema.d.ts +13 -14
- package/lib/simple-tree/api/jsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/jsonSchema.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +14 -8
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +21 -2
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +3 -3
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/simpleSchema.d.ts +18 -10
- 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.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +31 -18
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +16 -6
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js +4 -4
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +10 -8
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +6 -10
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/{dist/feature-libraries/typed-schema → lib/simple-tree/api}/view.d.ts +4 -11
- package/lib/simple-tree/api/view.d.ts.map +1 -0
- package/lib/{feature-libraries/typed-schema → simple-tree/api}/view.js +9 -9
- package/lib/simple-tree/api/view.js.map +1 -0
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +2 -2
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +11 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts +147 -14
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +37 -25
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/core/context.d.ts +55 -0
- package/lib/simple-tree/core/context.d.ts.map +1 -0
- package/lib/simple-tree/core/context.js +55 -0
- package/lib/simple-tree/core/context.js.map +1 -0
- package/lib/simple-tree/core/getOrCreateNode.d.ts +15 -0
- package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -0
- package/lib/simple-tree/core/getOrCreateNode.js +32 -0
- package/lib/simple-tree/core/getOrCreateNode.js.map +1 -0
- package/lib/simple-tree/core/index.d.ts +7 -3
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +6 -2
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/schemaCaching.d.ts +5 -13
- package/lib/simple-tree/core/schemaCaching.d.ts.map +1 -1
- package/lib/simple-tree/core/schemaCaching.js +13 -39
- package/lib/simple-tree/core/schemaCaching.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +29 -7
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +89 -54
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +24 -0
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/types.d.ts +0 -5
- package/lib/simple-tree/core/types.d.ts.map +1 -1
- package/lib/simple-tree/core/types.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +139 -0
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -0
- package/lib/{feature-libraries/flex-map-tree/mapTreeNode.js → simple-tree/core/unhydratedFlexTree.js} +110 -128
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -0
- package/lib/simple-tree/{walkSchema.d.ts → core/walkSchema.d.ts} +8 -4
- package/lib/simple-tree/core/walkSchema.d.ts.map +1 -0
- package/lib/simple-tree/core/walkSchema.js +29 -0
- package/lib/simple-tree/core/walkSchema.js.map +1 -0
- package/lib/simple-tree/createContext.d.ts +11 -0
- package/lib/simple-tree/createContext.d.ts.map +1 -0
- package/lib/simple-tree/createContext.js +21 -0
- package/lib/simple-tree/createContext.js.map +1 -0
- package/lib/simple-tree/index.d.ts +4 -5
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +3 -4
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +1 -0
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +3 -4
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/mapNode.d.ts +4 -4
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js +12 -8
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts +8 -8
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +36 -17
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/objectNodeTypes.d.ts +7 -3
- package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/objectNodeTypes.js.map +1 -1
- package/lib/simple-tree/proxies.d.ts +1 -2
- package/lib/simple-tree/proxies.d.ts.map +1 -1
- package/lib/simple-tree/proxies.js +7 -22
- package/lib/simple-tree/proxies.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +44 -4
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +10 -0
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/toFlexSchema.d.ts +6 -36
- package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/lib/simple-tree/toFlexSchema.js +61 -142
- package/lib/simple-tree/toFlexSchema.js.map +1 -1
- package/lib/simple-tree/toMapTree.d.ts.map +1 -1
- package/lib/simple-tree/toMapTree.js +4 -4
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/simple-tree/treeNodeValid.d.ts +13 -5
- package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/treeNodeValid.js +21 -12
- package/lib/simple-tree/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/typesUnsafe.d.ts +4 -4
- package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/walkFieldSchema.d.ts +11 -0
- package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -0
- package/lib/simple-tree/walkFieldSchema.js +13 -0
- package/lib/simple-tree/walkFieldSchema.js.map +1 -0
- package/lib/util/index.d.ts +1 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/typeUtils.d.ts +14 -45
- package/lib/util/typeUtils.d.ts.map +1 -1
- package/lib/util/typeUtils.js.map +1 -1
- package/package.json +41 -22
- package/src/core/index.ts +1 -0
- package/src/core/rebase/index.ts +1 -0
- package/src/core/rebase/types.ts +11 -0
- package/src/core/schema-stored/schema.ts +18 -0
- package/src/core/tree/anchorSet.ts +3 -4
- package/src/core/tree/detachedFieldIndex.ts +14 -3
- package/src/core/tree/detachedFieldIndexTypes.ts +1 -1
- package/src/feature-libraries/editableTreeBinder.ts +2 -915
- package/src/feature-libraries/flex-tree/context.ts +7 -20
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +2 -18
- package/src/feature-libraries/flex-tree/lazyEntity.ts +1 -4
- package/src/feature-libraries/flex-tree/lazyField.ts +22 -78
- package/src/feature-libraries/flex-tree/lazyNode.ts +24 -39
- package/src/feature-libraries/flex-tree/utilities.ts +1 -1
- package/src/feature-libraries/index.ts +3 -71
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +97 -10
- package/src/feature-libraries/sequence-field/compose.ts +3 -0
- package/src/feature-libraries/sequence-field/utils.ts +2 -4
- package/src/feature-libraries/typed-schema/flexList.ts +3 -84
- package/src/feature-libraries/typed-schema/index.ts +1 -33
- package/src/feature-libraries/typed-schema/typedTreeSchema.ts +0 -458
- package/src/index.ts +7 -0
- package/src/internalTypes.ts +0 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/checkoutFlexTreeView.ts +3 -3
- package/src/shared-tree/index.ts +4 -8
- package/src/shared-tree/schematizeTree.ts +2 -56
- package/src/shared-tree/schematizingTreeView.ts +38 -15
- package/src/shared-tree/sharedTree.ts +36 -8
- package/src/shared-tree/treeCheckout.ts +225 -128
- package/src/shared-tree-core/branch.ts +15 -26
- package/src/simple-tree/api/create.ts +18 -20
- package/src/simple-tree/api/getJsonSchema.ts +3 -3
- package/src/simple-tree/api/getSimpleSchema.ts +2 -2
- package/src/simple-tree/api/index.ts +2 -0
- package/src/simple-tree/api/jsonSchema.ts +19 -17
- package/src/simple-tree/api/schemaFactory.ts +53 -18
- package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -6
- package/src/simple-tree/api/simpleSchema.ts +20 -10
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +40 -19
- package/src/simple-tree/api/tree.ts +20 -9
- package/src/simple-tree/api/treeNodeApi.ts +12 -10
- package/src/simple-tree/api/verboseTree.ts +6 -12
- package/src/{feature-libraries/typed-schema → simple-tree/api}/view.ts +9 -22
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +18 -4
- package/src/simple-tree/arrayNode.ts +202 -53
- package/src/simple-tree/core/context.ts +78 -0
- package/src/simple-tree/core/getOrCreateNode.ts +38 -0
- package/src/simple-tree/core/index.ts +11 -7
- package/src/simple-tree/core/schemaCaching.ts +13 -50
- package/src/simple-tree/core/treeNodeKernel.ts +117 -78
- package/src/simple-tree/core/treeNodeSchema.ts +35 -1
- package/src/simple-tree/core/types.ts +0 -5
- package/src/{feature-libraries/flex-map-tree/mapTreeNode.ts → simple-tree/core/unhydratedFlexTree.ts} +167 -210
- package/src/simple-tree/{walkSchema.ts → core/walkSchema.ts} +12 -34
- package/src/simple-tree/createContext.ts +24 -0
- package/src/simple-tree/index.ts +6 -2
- package/src/simple-tree/leafNodeSchema.ts +3 -9
- package/src/simple-tree/mapNode.ts +20 -17
- package/src/simple-tree/objectNode.ts +63 -38
- package/src/simple-tree/objectNodeTypes.ts +8 -5
- package/src/simple-tree/proxies.ts +8 -26
- package/src/simple-tree/schemaTypes.ts +55 -5
- package/src/simple-tree/toFlexSchema.ts +71 -204
- package/src/simple-tree/toMapTree.ts +5 -5
- package/src/simple-tree/treeNodeValid.ts +28 -22
- package/src/simple-tree/typesUnsafe.ts +4 -4
- package/src/simple-tree/walkFieldSchema.ts +19 -0
- package/src/util/index.ts +1 -5
- package/src/util/typeUtils.ts +14 -56
- package/dist/feature-libraries/fieldGenerator.d.ts +0 -43
- package/dist/feature-libraries/fieldGenerator.d.ts.map +0 -1
- package/dist/feature-libraries/fieldGenerator.js +0 -13
- package/dist/feature-libraries/fieldGenerator.js.map +0 -1
- package/dist/feature-libraries/flex-map-tree/index.d.ts +0 -6
- package/dist/feature-libraries/flex-map-tree/index.d.ts.map +0 -1
- package/dist/feature-libraries/flex-map-tree/index.js +0 -14
- package/dist/feature-libraries/flex-map-tree/index.js.map +0 -1
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +0 -157
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +0 -1
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +0 -1
- package/dist/feature-libraries/storedToViewSchema.d.ts +0 -17
- package/dist/feature-libraries/storedToViewSchema.d.ts.map +0 -1
- package/dist/feature-libraries/storedToViewSchema.js +0 -67
- package/dist/feature-libraries/storedToViewSchema.js.map +0 -1
- package/dist/feature-libraries/typed-schema/schemaCollection.d.ts +0 -58
- package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +0 -1
- package/dist/feature-libraries/typed-schema/schemaCollection.js +0 -160
- package/dist/feature-libraries/typed-schema/schemaCollection.js.map +0 -1
- package/dist/feature-libraries/typed-schema/typeUtils.d.ts +0 -15
- package/dist/feature-libraries/typed-schema/typeUtils.d.ts.map +0 -1
- package/dist/feature-libraries/typed-schema/typeUtils.js +0 -14
- package/dist/feature-libraries/typed-schema/typeUtils.js.map +0 -1
- package/dist/feature-libraries/typed-schema/view.d.ts.map +0 -1
- package/dist/feature-libraries/typed-schema/view.js.map +0 -1
- package/dist/simple-tree/getSimpleFieldSchema.d.ts +0 -14
- package/dist/simple-tree/getSimpleFieldSchema.d.ts.map +0 -1
- package/dist/simple-tree/getSimpleFieldSchema.js +0 -29
- package/dist/simple-tree/getSimpleFieldSchema.js.map +0 -1
- package/dist/simple-tree/walkSchema.d.ts.map +0 -1
- package/dist/simple-tree/walkSchema.js +0 -49
- package/dist/simple-tree/walkSchema.js.map +0 -1
- package/lib/feature-libraries/fieldGenerator.d.ts +0 -43
- package/lib/feature-libraries/fieldGenerator.d.ts.map +0 -1
- package/lib/feature-libraries/fieldGenerator.js +0 -12
- package/lib/feature-libraries/fieldGenerator.js.map +0 -1
- package/lib/feature-libraries/flex-map-tree/index.d.ts +0 -6
- package/lib/feature-libraries/flex-map-tree/index.d.ts.map +0 -1
- package/lib/feature-libraries/flex-map-tree/index.js +0 -6
- package/lib/feature-libraries/flex-map-tree/index.js.map +0 -1
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +0 -157
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +0 -1
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +0 -1
- package/lib/feature-libraries/storedToViewSchema.d.ts +0 -17
- package/lib/feature-libraries/storedToViewSchema.d.ts.map +0 -1
- package/lib/feature-libraries/storedToViewSchema.js +0 -62
- package/lib/feature-libraries/storedToViewSchema.js.map +0 -1
- package/lib/feature-libraries/typed-schema/schemaCollection.d.ts +0 -58
- package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +0 -1
- package/lib/feature-libraries/typed-schema/schemaCollection.js +0 -153
- package/lib/feature-libraries/typed-schema/schemaCollection.js.map +0 -1
- package/lib/feature-libraries/typed-schema/typeUtils.d.ts +0 -15
- package/lib/feature-libraries/typed-schema/typeUtils.d.ts.map +0 -1
- package/lib/feature-libraries/typed-schema/typeUtils.js +0 -10
- package/lib/feature-libraries/typed-schema/typeUtils.js.map +0 -1
- package/lib/feature-libraries/typed-schema/view.d.ts.map +0 -1
- package/lib/feature-libraries/typed-schema/view.js.map +0 -1
- package/lib/simple-tree/getSimpleFieldSchema.d.ts +0 -14
- package/lib/simple-tree/getSimpleFieldSchema.d.ts.map +0 -1
- package/lib/simple-tree/getSimpleFieldSchema.js +0 -25
- package/lib/simple-tree/getSimpleFieldSchema.js.map +0 -1
- package/lib/simple-tree/walkSchema.d.ts.map +0 -1
- package/lib/simple-tree/walkSchema.js +0 -43
- package/lib/simple-tree/walkSchema.js.map +0 -1
- package/src/feature-libraries/fieldGenerator.ts +0 -47
- package/src/feature-libraries/flex-map-tree/index.ts +0 -14
- package/src/feature-libraries/storedToViewSchema.ts +0 -100
- package/src/feature-libraries/typed-schema/schemaCollection.ts +0 -254
- package/src/feature-libraries/typed-schema/typeUtils.ts +0 -29
- package/src/simple-tree/getSimpleFieldSchema.ts +0 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/compose.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,KAAK,sBAAsB,EAG3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,WAAW,EAAQ,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACN,KAAK,iBAAiB,EAEtB,KAAK,kBAAkB,EAEvB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAEN,KAAK,eAAe,EAQpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEN,KAAK,SAAS,EAEd,KAAK,IAAI,EAMT,MAAM,YAAY,CAAC;AA6BpB;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CACtB,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,SAAS,EAClB,YAAY,EAAE,kBAAkB,EAChC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,iBAAiB,EAC1B,gBAAgB,EAAE,sBAAsB,GACtC,SAAS,CAQX;AA+YD,qBAAa,YAAY;IASvB,OAAO,C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IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAY;IACrC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAuC;IAC5E,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAuC;gBAG1E,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,EACF,WAAW,EAAE,eAAe,EAC5B,gBAAgB,EAAE,sBAAsB;IAQnD,OAAO,IAAI,OAAO;IAIlB,GAAG,IAAI,YAAY;IAqD1B,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,aAAa;CAUrB;AAED,UAAU,YAAY;IACrB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,IAAI,CAAC;CACf"}
|
|
@@ -308,6 +308,9 @@ export class ComposeQueue {
|
|
|
308
308
|
dequeueBase(length = Infinity) {
|
|
309
309
|
const baseMark = this.baseMarks.dequeueUpTo(length);
|
|
310
310
|
const movedChanges = getMovedChangesFromMark(this.moveEffects, baseMark);
|
|
311
|
+
if (movedChanges !== undefined) {
|
|
312
|
+
this.moveEffects.onMoveIn(movedChanges);
|
|
313
|
+
}
|
|
311
314
|
const newMark = createNoopMark(baseMark.count, movedChanges, getOutputCellId(baseMark));
|
|
312
315
|
return { baseMark, newMark };
|
|
313
316
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/compose.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE9E,OAAO,EAIN,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAoB,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAEN,gBAAgB,GAGhB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE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KAAK,EAAE,yBAAyB,CAAC;AAChD,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 {\n\ttype ChangeAtomId,\n\ttype RevisionMetadataSource,\n\ttype RevisionTag,\n\toffsetChangeAtomId,\n} from \"../../core/index.js\";\nimport { type IdAllocator, fail } from \"../../util/index.js\";\nimport {\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\ttype NodeChangeComposer,\n\ttype NodeId,\n} from \"../modular-schema/index.js\";\n\nimport type { MoveMarkEffect } from \"./helperTypes.js\";\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport { MarkQueue } from \"./markQueue.js\";\nimport {\n\ttype MoveEffect,\n\ttype MoveEffectTable,\n\tgetCrossFieldTargetFromMove,\n\tgetMoveEffect,\n\tgetMoveIn,\n\tisMoveIn,\n\tisMoveMark,\n\tisMoveOut,\n\tsetMoveEffect,\n} from \"./moveEffectTable.js\";\nimport {\n\ttype CellMark,\n\ttype Changeset,\n\ttype Detach,\n\ttype Mark,\n\ttype MarkEffect,\n\ttype MarkList,\n\ttype MoveId,\n\ttype NoopMark,\n\tNoopMarkType,\n} from \"./types.js\";\nimport {\n\tCellOrder,\n\tareEqualCellIds,\n\tareInputCellsEmpty,\n\tareOutputCellsEmpty,\n\tasAttachAndDetach,\n\tcellSourcesFromMarks,\n\tcompareCellPositionsUsingTombstones,\n\textractMarkEffect,\n\tgetEndpoint,\n\tgetInputCellId,\n\tgetOutputCellId,\n\tisAttach,\n\tisAttachAndDetachEffect,\n\tisDetach,\n\tisImpactfulCellRename,\n\tisNewAttach,\n\tisNoopMark,\n\tisRename,\n\tmarkEmptiesCells,\n\tmarkFillsCells,\n\tmarkHasCellEffect,\n\tnormalizeCellRename,\n\tsettleMark,\n\twithNodeChange,\n\twithRevision,\n} from \"./utils.js\";\n\n/**\n * Composes a sequence of changesets into a single changeset.\n * @param changes - The changesets to be applied.\n * Parts of the input may be reused in the output, but the input is not mutated.\n * Each changeset in the list is assumed to be applicable after the previous one.\n * @returns A changeset that is equivalent to applying each of the given `changes` in order.\n *\n * WARNING! This implementation is incomplete:\n * - Tombstone information is ignored.\n * - Support for moves is not implemented.\n * - Support for slices is not implemented.\n */\nexport function compose(\n\tchange1: Changeset,\n\tchange2: Changeset,\n\tcomposeChild: NodeChangeComposer,\n\t_genId: IdAllocator,\n\tmanager: CrossFieldManager,\n\trevisionMetadata: RevisionMetadataSource,\n): Changeset {\n\treturn composeMarkLists(\n\t\tchange1,\n\t\tchange2,\n\t\tcomposeChild,\n\t\tmanager as MoveEffectTable,\n\t\trevisionMetadata,\n\t);\n}\n\nfunction composeMarkLists(\n\tbaseMarkList: MarkList,\n\tnewMarkList: MarkList,\n\tcomposeChild: NodeChangeComposer,\n\tmoveEffects: MoveEffectTable,\n\trevisionMetadata: RevisionMetadataSource,\n): MarkList {\n\tconst factory = new MarkListFactory();\n\tconst queue = new ComposeQueue(baseMarkList, newMarkList, moveEffects, revisionMetadata);\n\twhile (!queue.isEmpty()) {\n\t\tconst { baseMark, newMark } = queue.pop();\n\t\tif (newMark === undefined) {\n\t\t\tassert(\n\t\t\t\tbaseMark !== undefined,\n\t\t\t\t0x4db /* Non-empty queue should not return two undefined marks */,\n\t\t\t);\n\t\t\tfactory.push(\n\t\t\t\tcomposeMark(baseMark, moveEffects, (node: NodeId) =>\n\t\t\t\t\tcomposeChildChanges(node, undefined, composeChild),\n\t\t\t\t),\n\t\t\t);\n\t\t} else {\n\t\t\t// We only compose changesets that will not be further rebased.\n\t\t\t// It is therefore safe to remove any intentions that have no impact in the context they apply to.\n\t\t\tconst settledNewMark = settleMark(newMark);\n\t\t\tif (baseMark === undefined) {\n\t\t\t\tfactory.push(\n\t\t\t\t\tcomposeMark(settledNewMark, moveEffects, (node: NodeId) =>\n\t\t\t\t\t\tcomposeChildChanges(undefined, node, composeChild),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// Past this point, we are guaranteed that `settledNewMark` and `baseMark` have the same length and\n\t\t\t\t// start at the same location in the revision after the base changes.\n\t\t\t\t// They therefore refer to the same range for that revision.\n\t\t\t\tconst settledBaseMark = settleMark(baseMark);\n\t\t\t\tconst composedMark = composeMarks(\n\t\t\t\t\tsettledBaseMark,\n\t\t\t\t\tsettledNewMark,\n\t\t\t\t\tcomposeChild,\n\t\t\t\t\tmoveEffects,\n\t\t\t\t);\n\t\t\t\tfactory.push(composedMark);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn factory.list;\n}\n\n/**\n * Composes two marks where `newMark` is based on the state produced by `baseMark`.\n * @param baseMark - The mark to compose with `newMark`.\n * Its output range should be the same as `newMark`'s input range.\n * @param newRev - The revision the new mark is part of.\n * @param newMark - The mark to compose with `baseMark`.\n * Its input range should be the same as `baseMark`'s output range.\n * @returns A mark that is equivalent to applying both `baseMark` and `newMark` successively.\n */\nfunction composeMarks(\n\tbaseMark: Mark,\n\tnewMark: Mark,\n\tcomposeChild: NodeChangeComposer,\n\tmoveEffects: MoveEffectTable,\n): Mark {\n\tconst nodeChange = handleNodeChanges(baseMark, newMark, composeChild, moveEffects);\n\n\treturn withUpdatedEndpoint(\n\t\twithNodeChange(composeMarksIgnoreChild(baseMark, newMark, moveEffects), nodeChange),\n\t\tbaseMark.count,\n\t\tmoveEffects,\n\t);\n}\n\nfunction composeMarksIgnoreChild(\n\tbaseMark: Mark,\n\tnewMark: Mark,\n\tmoveEffects: MoveEffectTable,\n): Mark {\n\tif (isNoopMark(baseMark)) {\n\t\treturn newMark;\n\t} else if (isNoopMark(newMark)) {\n\t\treturn baseMark;\n\t}\n\n\tif (isRename(baseMark) && isRename(newMark)) {\n\t\treturn { ...baseMark, idOverride: newMark.idOverride };\n\t} else if (isRename(baseMark)) {\n\t\tassert(\n\t\t\tisAttach(newMark) || isAttachAndDetachEffect(newMark),\n\t\t\t0x9f1 /* Unexpected mark type */,\n\t\t);\n\t\treturn { ...newMark, cellId: baseMark.cellId };\n\t} else if (isRename(newMark)) {\n\t\tassert(\n\t\t\tisDetach(baseMark) || isAttachAndDetachEffect(baseMark),\n\t\t\t0x9f2 /* Unexpected mark type */,\n\t\t);\n\t\treturn isDetach(baseMark)\n\t\t\t? { ...baseMark, idOverride: newMark.idOverride }\n\t\t\t: { ...baseMark, detach: { ...baseMark.detach, idOverride: newMark.idOverride } };\n\t}\n\n\tif (isImpactfulCellRename(newMark)) {\n\t\tconst newAttachAndDetach = asAttachAndDetach(newMark);\n\t\tassert(\n\t\t\tnewAttachAndDetach.cellId !== undefined,\n\t\t\t0x9f3 /* Impactful cell rename must target empty cell */,\n\t\t);\n\t\tconst newDetachRevision = newAttachAndDetach.detach.revision;\n\t\tif (markEmptiesCells(baseMark)) {\n\t\t\t// baseMark is a detach which cancels with the attach portion of the AttachAndDetach,\n\t\t\t// so we are just left with the detach portion of the AttachAndDetach.\n\t\t\tconst newDetach: CellMark<Detach> = {\n\t\t\t\t...newAttachAndDetach.detach,\n\t\t\t\tcount: baseMark.count,\n\t\t\t};\n\n\t\t\tif (isMoveIn(newAttachAndDetach.attach) && isMoveOut(newAttachAndDetach.detach)) {\n\t\t\t\tassert(isMoveOut(baseMark), 0x808 /* Unexpected mark type */);\n\n\t\t\t\t// The base changeset and new changeset both move these nodes.\n\t\t\t\t// Call the original position of the nodes A, the position after the base changeset is applied B,\n\t\t\t\t// and the position after the new changeset is applied C.\n\t\t\t\t// The new changeset moves the nodes from B, temporarily returns them to A, and then moves them to C.\n\t\t\t\t// The composition of the base and new changesets will be a move directly from A to C,\n\t\t\t\t// since the move from A to B cancels out with the return from B to A.\n\t\t\t\t// This if-block is handling marks at A.\n\t\t\t\t// When we compose the marks at B we will link the start of the base move (A to B)\n\t\t\t\t// with the end of the new move (B to C).\n\t\t\t\t// Because we are replacing the mark representing the start of the move with the new changeset's\n\t\t\t\t// move-out from A, we update the base move-in at B to consider that its start point.\n\t\t\t\tconst newDetachId = {\n\t\t\t\t\trevision: newDetachRevision,\n\t\t\t\t\tlocalId: newAttachAndDetach.detach.id,\n\t\t\t\t};\n\n\t\t\t\tsetTruncatedEndpointForInner(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tgetEndpoint(baseMark),\n\t\t\t\t\tbaseMark.count,\n\t\t\t\t\tnewDetachId,\n\t\t\t\t);\n\n\t\t\t\tconst newEndpoint = getComposedEndpoint(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\t\tbaseMark.revision,\n\t\t\t\t\tbaseMark.id,\n\t\t\t\t\tbaseMark.count,\n\t\t\t\t);\n\n\t\t\t\tif (newEndpoint !== undefined) {\n\t\t\t\t\tchangeFinalEndpoint(newDetach as MoveMarkEffect, newEndpoint);\n\t\t\t\t\tsetTruncatedEndpoint(\n\t\t\t\t\t\tmoveEffects,\n\t\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\t\tnewEndpoint,\n\t\t\t\t\t\tbaseMark.count,\n\t\t\t\t\t\tnewDetachId,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn newDetach;\n\t\t}\n\n\t\tif (isImpactfulCellRename(baseMark)) {\n\t\t\tassert(\n\t\t\t\tbaseMark.cellId !== undefined,\n\t\t\t\t0x9f4 /* Impactful cell rename must target empty cell */,\n\t\t\t);\n\t\t\tconst baseAttachAndDetach = asAttachAndDetach(baseMark);\n\t\t\tconst newOutputId = getOutputCellId(newAttachAndDetach);\n\n\t\t\tif (areEqualCellIds(newOutputId, baseAttachAndDetach.cellId)) {\n\t\t\t\treturn { count: baseAttachAndDetach.count, cellId: baseAttachAndDetach.cellId };\n\t\t\t}\n\n\t\t\t// `newMark`'s attach portion cancels with `baseMark`'s detach portion.\n\t\t\tconst originalAttach = { ...baseAttachAndDetach.attach };\n\t\t\tconst finalDetach = { ...newAttachAndDetach.detach };\n\t\t\tconst detachRevision = finalDetach.revision;\n\t\t\tif (detachRevision !== undefined) {\n\t\t\t\tfinalDetach.revision = detachRevision;\n\t\t\t}\n\n\t\t\treturn normalizeCellRename(baseMark.cellId, baseMark.count, originalAttach, finalDetach);\n\t\t}\n\n\t\treturn normalizeCellRename(\n\t\t\tnewAttachAndDetach.cellId,\n\t\t\tnewAttachAndDetach.count,\n\t\t\tnewAttachAndDetach.attach,\n\t\t\tnewAttachAndDetach.detach,\n\t\t);\n\t}\n\tif (isImpactfulCellRename(baseMark)) {\n\t\tconst baseAttachAndDetach = asAttachAndDetach(baseMark);\n\t\tif (markFillsCells(newMark)) {\n\t\t\tconst originalAttach = withRevision(\n\t\t\t\t{\n\t\t\t\t\t...baseAttachAndDetach.attach,\n\t\t\t\t\tcellId: baseAttachAndDetach.cellId,\n\t\t\t\t\tcount: baseAttachAndDetach.count,\n\t\t\t\t},\n\t\t\t\tbaseAttachAndDetach.attach.revision,\n\t\t\t);\n\n\t\t\tif (isMoveIn(baseAttachAndDetach.attach) && isMoveOut(baseAttachAndDetach.detach)) {\n\t\t\t\tassert(isMoveIn(newMark), 0x809 /* Unexpected mark type */);\n\n\t\t\t\tconst originalAttachId = {\n\t\t\t\t\trevision: baseAttachAndDetach.attach.revision,\n\t\t\t\t\tlocalId: baseAttachAndDetach.attach.id,\n\t\t\t\t};\n\n\t\t\t\tsetTruncatedEndpointForInner(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\t\tgetEndpoint(newMark),\n\t\t\t\t\tbaseAttachAndDetach.count,\n\t\t\t\t\toriginalAttachId,\n\t\t\t\t);\n\n\t\t\t\tconst newEndpoint = getComposedEndpoint(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tnewMark.revision,\n\t\t\t\t\tnewMark.id,\n\t\t\t\t\tnewMark.count,\n\t\t\t\t);\n\n\t\t\t\tif (newEndpoint !== undefined) {\n\t\t\t\t\tchangeFinalEndpoint(originalAttach as MoveMarkEffect, newEndpoint);\n\t\t\t\t\tsetTruncatedEndpoint(\n\t\t\t\t\t\tmoveEffects,\n\t\t\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\t\t\tnewEndpoint,\n\t\t\t\t\t\tbaseMark.count,\n\t\t\t\t\t\toriginalAttachId,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn originalAttach;\n\t\t} else {\n\t\t\t// Other mark types have been handled by previous conditional branches.\n\t\t\tassert(newMark.type === NoopMarkType, 0x80a /* Unexpected mark type */);\n\t\t\treturn baseMark;\n\t\t}\n\t}\n\n\tif (!markHasCellEffect(baseMark) && !markHasCellEffect(newMark)) {\n\t\treturn createNoopMark(newMark.count, undefined, getInputCellId(baseMark));\n\t} else if (!markHasCellEffect(baseMark)) {\n\t\treturn newMark;\n\t} else if (!markHasCellEffect(newMark)) {\n\t\treturn baseMark;\n\t} else if (areInputCellsEmpty(baseMark)) {\n\t\tassert(isDetach(newMark), 0x71c /* Unexpected mark type */);\n\t\tassert(isAttach(baseMark), 0x71d /* Expected generative mark */);\n\n\t\tconst attach = extractMarkEffect(baseMark);\n\t\tconst detach = extractMarkEffect(newMark);\n\n\t\tif (isMoveIn(attach) && isMoveOut(detach)) {\n\t\t\tconst finalSource = getEndpoint(attach);\n\t\t\tconst finalDest = getEndpoint(detach);\n\n\t\t\tsetEndpoint(\n\t\t\t\tmoveEffects,\n\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\tfinalSource,\n\t\t\t\tbaseMark.count,\n\t\t\t\tfinalDest,\n\t\t\t);\n\n\t\t\tconst truncatedEndpoint1 = getTruncatedEndpointForInner(\n\t\t\t\tmoveEffects,\n\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\tattach.revision,\n\t\t\t\tattach.id,\n\t\t\t\tbaseMark.count,\n\t\t\t);\n\n\t\t\tif (truncatedEndpoint1 !== undefined) {\n\t\t\t\tsetTruncatedEndpoint(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tfinalDest,\n\t\t\t\t\tbaseMark.count,\n\t\t\t\t\ttruncatedEndpoint1,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tsetEndpoint(\n\t\t\t\tmoveEffects,\n\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\tfinalDest,\n\t\t\t\tbaseMark.count,\n\t\t\t\tfinalSource,\n\t\t\t);\n\n\t\t\tconst truncatedEndpoint2 = getTruncatedEndpointForInner(\n\t\t\t\tmoveEffects,\n\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\tdetach.revision,\n\t\t\t\tdetach.id,\n\t\t\t\tbaseMark.count,\n\t\t\t);\n\n\t\t\tif (truncatedEndpoint2 !== undefined) {\n\t\t\t\tsetTruncatedEndpoint(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\t\tfinalSource,\n\t\t\t\t\tbaseMark.count,\n\t\t\t\t\ttruncatedEndpoint2,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// The `finalEndpoint` field of AttachAndDetach move effect pairs is not used,\n\t\t\t// so we remove it as a normalization.\n\t\t\tdelete attach.finalEndpoint;\n\t\t\tdelete detach.finalEndpoint;\n\t\t}\n\n\t\tif (areEqualCellIds(getOutputCellId(newMark), baseMark.cellId)) {\n\t\t\t// The output and input cell IDs are the same, so this mark has no effect.\n\t\t\treturn { count: baseMark.count, cellId: baseMark.cellId };\n\t\t}\n\t\treturn normalizeCellRename(baseMark.cellId, baseMark.count, attach, detach);\n\t} else {\n\t\tconst length = baseMark.count;\n\t\treturn createNoopMark(length, undefined);\n\t}\n}\n\nfunction createNoopMark(\n\tlength: number,\n\tnodeChange: NodeId | undefined,\n\tcellId?: ChangeAtomId,\n): Mark {\n\tconst mark: CellMark<NoopMark> = { count: length };\n\tif (nodeChange !== undefined) {\n\t\tassert(length === 1, 0x692 /* A mark with a node change must have length one */);\n\t\tmark.changes = nodeChange;\n\t}\n\tif (cellId !== undefined) {\n\t\tmark.cellId = cellId;\n\t}\n\treturn mark;\n}\n\nfunction handleNodeChanges(\n\tbaseMark: Mark,\n\tnewMark: Mark,\n\tcomposeChild: NodeChangeComposer,\n\tmoveEffects: MoveEffectTable,\n): NodeId | undefined {\n\tif (newMark.changes !== undefined) {\n\t\tconst baseSource = getMoveIn(baseMark);\n\n\t\t// TODO: Make sure composeChild is not called twice on the node changes.\n\t\tif (baseSource !== undefined) {\n\t\t\tsetModifyAfter(moveEffects, getEndpoint(baseSource), newMark.changes);\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\treturn composeChildChanges(baseMark.changes, newMark.changes, composeChild);\n}\n\nfunction composeChildChanges(\n\tbaseChange: NodeId | undefined,\n\tnewChange: NodeId | undefined,\n\tcomposeChild: NodeChangeComposer,\n): NodeId | undefined {\n\tif (baseChange === undefined && newChange === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn composeChild(baseChange, newChange);\n}\n\nfunction composeMark<TMark extends Mark>(\n\tmark: TMark,\n\tmoveEffects: MoveEffectTable,\n\tcomposeChild: (node: NodeId) => NodeId | undefined,\n): TMark {\n\tconst nodeChanges = mark.changes !== undefined ? composeChild(mark.changes) : undefined;\n\tconst updatedMark = withUpdatedEndpoint(mark, mark.count, moveEffects);\n\treturn withNodeChange(updatedMark, nodeChanges);\n}\n\nexport class ComposeQueue {\n\tprivate readonly baseMarks: MarkQueue;\n\tprivate readonly newMarks: MarkQueue;\n\tprivate readonly baseMarksCellSources: ReadonlySet<RevisionTag | undefined>;\n\tprivate readonly newMarksCellSources: ReadonlySet<RevisionTag | undefined>;\n\n\tpublic constructor(\n\t\tbaseMarks: Changeset,\n\t\tnewMarks: Changeset,\n\t\tprivate readonly moveEffects: MoveEffectTable,\n\t\tprivate readonly revisionMetadata: RevisionMetadataSource,\n\t) {\n\t\tthis.baseMarks = new MarkQueue(baseMarks, moveEffects);\n\t\tthis.newMarks = new MarkQueue(newMarks, moveEffects);\n\t\tthis.baseMarksCellSources = cellSourcesFromMarks(baseMarks, getOutputCellId);\n\t\tthis.newMarksCellSources = cellSourcesFromMarks(newMarks, getInputCellId);\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn this.baseMarks.isEmpty() && this.newMarks.isEmpty();\n\t}\n\n\tpublic pop(): ComposeMarks {\n\t\tconst baseMark = this.baseMarks.peek();\n\t\tconst newMark = this.newMarks.peek();\n\t\tif (baseMark === undefined && newMark === undefined) {\n\t\t\treturn {};\n\t\t} else if (baseMark === undefined) {\n\t\t\treturn this.dequeueNew();\n\t\t} else if (newMark === undefined) {\n\t\t\treturn this.dequeueBase();\n\t\t} else if (areOutputCellsEmpty(baseMark) && areInputCellsEmpty(newMark)) {\n\t\t\tconst baseCellId: ChangeAtomId =\n\t\t\t\tgetOutputCellId(baseMark) ?? fail(\"Expected defined output ID\");\n\n\t\t\tif (markEmptiesCells(baseMark) && baseCellId.revision === undefined) {\n\t\t\t\t// The base revision should always be defined except when squashing changes into a transaction.\n\t\t\t\t// In the future, we want to support reattaches in the new change here.\n\t\t\t\t// We will need to be able to order the base mark relative to the new mark\n\t\t\t\t// (which requires the local changes to have a revision tag))\n\t\t\t\tassert(\n\t\t\t\t\tisNewAttach(newMark),\n\t\t\t\t\t0x695 /* TODO: Assign revision tags to each change in a transaction */,\n\t\t\t\t);\n\t\t\t\treturn this.dequeueNew();\n\t\t\t}\n\n\t\t\tconst newCellId = getInputCellId(newMark);\n\t\t\tassert(newCellId !== undefined, 0x89d /* Both marks should have cell IDs */);\n\t\t\tconst comparison = compareCellPositionsUsingTombstones(\n\t\t\t\tbaseCellId,\n\t\t\t\tnewCellId,\n\t\t\t\tthis.baseMarksCellSources,\n\t\t\t\tthis.newMarksCellSources,\n\t\t\t\tthis.revisionMetadata,\n\t\t\t);\n\t\t\tswitch (comparison) {\n\t\t\t\tcase CellOrder.SameCell:\n\t\t\t\t\treturn this.dequeueBoth();\n\t\t\t\tcase CellOrder.OldThenNew:\n\t\t\t\t\treturn this.dequeueBase();\n\t\t\t\tcase CellOrder.NewThenOld:\n\t\t\t\t\treturn this.dequeueNew();\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(comparison);\n\t\t\t}\n\t\t} else if (areOutputCellsEmpty(baseMark)) {\n\t\t\treturn this.dequeueBase();\n\t\t} else if (areInputCellsEmpty(newMark)) {\n\t\t\treturn this.dequeueNew();\n\t\t} else {\n\t\t\treturn this.dequeueBoth();\n\t\t}\n\t}\n\n\tprivate dequeueBase(length: number = Infinity): ComposeMarks {\n\t\tconst baseMark = this.baseMarks.dequeueUpTo(length);\n\t\tconst movedChanges = getMovedChangesFromMark(this.moveEffects, baseMark);\n\n\t\tconst newMark = createNoopMark(baseMark.count, movedChanges, getOutputCellId(baseMark));\n\t\treturn { baseMark, newMark };\n\t}\n\n\tprivate dequeueNew(length: number = Infinity): ComposeMarks {\n\t\tconst newMark = this.newMarks.dequeueUpTo(length);\n\t\tconst baseMark = createNoopMark(newMark.count, undefined, getInputCellId(newMark));\n\n\t\treturn {\n\t\t\tbaseMark,\n\t\t\tnewMark,\n\t\t};\n\t}\n\n\tprivate dequeueBoth(): ComposeMarks {\n\t\tconst length = this.peekMinLength();\n\t\tconst baseMark = this.baseMarks.dequeueUpTo(length);\n\t\tlet newMark = this.newMarks.dequeueUpTo(length);\n\t\tconst movedChanges = getMovedChangesFromMark(this.moveEffects, baseMark);\n\n\t\tif (movedChanges !== undefined) {\n\t\t\tassert(newMark.changes === undefined, 0x8da /* Unexpected node changeset collision */);\n\t\t\tnewMark = withNodeChange(newMark, movedChanges);\n\t\t}\n\n\t\treturn {\n\t\t\tbaseMark,\n\t\t\tnewMark,\n\t\t};\n\t}\n\n\tprivate peekMinLength(): number {\n\t\tconst baseMark = this.baseMarks.peek();\n\t\tconst newMark = this.newMarks.peek();\n\t\tassert(\n\t\t\tbaseMark !== undefined && newMark !== undefined,\n\t\t\t0x8db /* Cannot peek length unless both mark queues are non-empty */,\n\t\t);\n\n\t\treturn Math.min(newMark.count, baseMark.count);\n\t}\n}\n\ninterface ComposeMarks {\n\tbaseMark?: Mark;\n\tnewMark?: Mark;\n}\n\nfunction getMovedChangesFromMark(\n\tmoveEffects: MoveEffectTable,\n\tmarkEffect: MarkEffect,\n): NodeId | undefined {\n\tif (isAttachAndDetachEffect(markEffect)) {\n\t\treturn getMovedChangesFromMark(moveEffects, markEffect.detach);\n\t}\n\tif (!isMoveOut(markEffect)) {\n\t\treturn undefined;\n\t}\n\n\treturn getModifyAfter(moveEffects, markEffect.revision, markEffect.id);\n}\n\n// It is expected that the range from `id` to `id + count - 1` has the same move effect.\n// The call sites to this function are making queries about a mark which has already been split by a `MarkQueue`\n// to match the ranges in `moveEffects`.\n// TODO: Reduce the duplication between this and other MoveEffect helpers\nfunction getModifyAfter(\n\tmoveEffects: MoveEffectTable,\n\trevision: RevisionTag | undefined,\n\tid: MoveId,\n): NodeId | undefined {\n\tconst target = CrossFieldTarget.Source;\n\tconst effect = getMoveEffect(moveEffects, target, revision, id, 1);\n\n\tif (effect.value?.modifyAfter !== undefined) {\n\t\treturn effect.value.modifyAfter;\n\t}\n\n\treturn undefined;\n}\n\n// TODO: Reduce the duplication between this and other MoveEffect helpers\nfunction setModifyAfter(\n\tmoveEffects: MoveEffectTable,\n\t{ revision, localId: id }: ChangeAtomId,\n\tmodifyAfter: NodeId,\n): void {\n\tconst target = CrossFieldTarget.Source;\n\tconst count = 1;\n\tconst effect = getMoveEffect(moveEffects, target, revision, id, count, false);\n\tconst newEffect: MoveEffect =\n\t\teffect.value !== undefined ? { ...effect.value, modifyAfter } : { modifyAfter };\n\tsetMoveEffect(moveEffects, target, revision, id, count, newEffect);\n}\n\nfunction setEndpoint(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\tid: ChangeAtomId,\n\tcount: number,\n\tendpoint: ChangeAtomId,\n): void {\n\tconst effect = getMoveEffect(moveEffects, target, id.revision, id.localId, count, false);\n\tconst newEffect = effect.value !== undefined ? { ...effect.value, endpoint } : { endpoint };\n\tsetMoveEffect(moveEffects, target, id.revision, id.localId, effect.length, newEffect);\n\n\tconst remainingCount = count - effect.length;\n\tif (remainingCount > 0) {\n\t\tsetEndpoint(\n\t\t\tmoveEffects,\n\t\t\ttarget,\n\t\t\toffsetChangeAtomId(id, effect.length),\n\t\t\tremainingCount,\n\t\t\toffsetChangeAtomId(endpoint, effect.length),\n\t\t);\n\t}\n}\n\nfunction setTruncatedEndpoint(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\tid: ChangeAtomId,\n\tcount: number,\n\ttruncatedEndpoint: ChangeAtomId,\n): void {\n\tconst effect = getMoveEffect(moveEffects, target, id.revision, id.localId, count);\n\tconst newEffect =\n\t\teffect.value !== undefined\n\t\t\t? { ...effect.value, truncatedEndpoint }\n\t\t\t: { truncatedEndpoint };\n\n\tsetMoveEffect(moveEffects, target, id.revision, id.localId, effect.length, newEffect);\n\n\tconst remainingCount = count - effect.length;\n\tif (remainingCount > 0) {\n\t\tsetTruncatedEndpoint(\n\t\t\tmoveEffects,\n\t\t\ttarget,\n\t\t\toffsetChangeAtomId(id, effect.length),\n\t\t\tremainingCount,\n\t\t\toffsetChangeAtomId(truncatedEndpoint, effect.length),\n\t\t);\n\t}\n}\n\nfunction setTruncatedEndpointForInner(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\tid: ChangeAtomId,\n\tcount: number,\n\ttruncatedEndpointForInner: ChangeAtomId,\n): void {\n\tconst effect = getMoveEffect(moveEffects, target, id.revision, id.localId, count);\n\tconst newEffect =\n\t\teffect.value !== undefined\n\t\t\t? { ...effect.value, truncatedEndpointForInner }\n\t\t\t: { truncatedEndpointForInner };\n\tsetMoveEffect(moveEffects, target, id.revision, id.localId, effect.length, newEffect);\n\n\tconst remainingCount = count - effect.length;\n\tif (remainingCount > 0) {\n\t\tsetTruncatedEndpointForInner(\n\t\t\tmoveEffects,\n\t\t\ttarget,\n\t\t\toffsetChangeAtomId(id, effect.length),\n\t\t\tremainingCount,\n\t\t\toffsetChangeAtomId(truncatedEndpointForInner, effect.length),\n\t\t);\n\t}\n}\n\nfunction withUpdatedEndpoint<TMark extends MarkEffect>(\n\tmark: TMark,\n\tcount: number,\n\teffects: MoveEffectTable,\n): TMark {\n\tif (isAttachAndDetachEffect(mark)) {\n\t\treturn {\n\t\t\t...mark,\n\t\t\tattach: withUpdatedEndpoint(mark.attach, count, effects),\n\t\t\tdetach: withUpdatedEndpoint(mark.detach, count, effects),\n\t\t};\n\t}\n\n\tif (!isMoveMark(mark)) {\n\t\treturn mark;\n\t}\n\tconst finalDest = getComposedEndpoint(\n\t\teffects,\n\t\tgetCrossFieldTargetFromMove(mark),\n\t\tmark.revision,\n\t\tmark.id,\n\t\tcount,\n\t);\n\n\tif (finalDest === undefined) {\n\t\treturn mark;\n\t}\n\n\tconst output = { ...mark };\n\tchangeFinalEndpoint(output, finalDest);\n\n\treturn output;\n}\n\nfunction changeFinalEndpoint(mark: MoveMarkEffect, endpoint: ChangeAtomId): void {\n\tif (areEqualCellIds(endpoint, { revision: mark.revision, localId: mark.id })) {\n\t\tdelete mark.finalEndpoint;\n\t} else {\n\t\tmark.finalEndpoint = endpoint;\n\t}\n}\n\nfunction getComposedEndpoint(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\trevision: RevisionTag | undefined,\n\tid: MoveId,\n\tcount: number,\n): ChangeAtomId | undefined {\n\tconst effect = getMoveEffect(moveEffects, target, revision, id, count);\n\tassert(effect.length === count, 0x815 /* Expected effect to cover entire mark */);\n\treturn effect.value?.truncatedEndpoint ?? effect.value?.endpoint;\n}\n\nfunction getTruncatedEndpointForInner(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\trevision: RevisionTag | undefined,\n\tid: MoveId,\n\tcount: number,\n): ChangeAtomId | undefined {\n\tconst effect = getMoveEffect(moveEffects, target, revision, id, count);\n\tassert(effect.length === count, 0x934 /* Expected effect to cover entire mark */);\n\treturn effect.value?.truncatedEndpointForInner;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/compose.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE9E,OAAO,EAIN,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAoB,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAEN,gBAAgB,GAGhB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAGN,2BAA2B,EAC3B,aAAa,EACb,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,aAAa,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EASN,YAAY,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mCAAmC,EACnC,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,eAAe,EACf,QAAQ,EACR,uBAAuB,EACvB,QAAQ,EACR,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,YAAY,GACZ,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,OAAO,CACtB,OAAkB,EAClB,OAAkB,EAClB,YAAgC,EAChC,MAAmB,EACnB,OAA0B,EAC1B,gBAAwC;IAExC,OAAO,gBAAgB,CACtB,OAAO,EACP,OAAO,EACP,YAAY,EACZ,OAA0B,EAC1B,gBAAgB,CAChB,CAAC;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,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACvE,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,KAAK,EAAE,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAClF,OAAO,MAAM,CAAC,KAAK,EAAE,iBAAiB,IAAI,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC;AAClE,CAAC;AAED,SAAS,4BAA4B,CACpC,WAA4B,EAC5B,MAAwB,EACxB,QAAiC,EACjC,EAAU,EACV,KAAa;IAEb,MAAM,MAAM,GAAG,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACvE,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,KAAK,EAAE,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAClF,OAAO,MAAM,CAAC,KAAK,EAAE,yBAAyB,CAAC;AAChD,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 {\n\ttype ChangeAtomId,\n\ttype RevisionMetadataSource,\n\ttype RevisionTag,\n\toffsetChangeAtomId,\n} from \"../../core/index.js\";\nimport { type IdAllocator, fail } from \"../../util/index.js\";\nimport {\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\ttype NodeChangeComposer,\n\ttype NodeId,\n} from \"../modular-schema/index.js\";\n\nimport type { MoveMarkEffect } from \"./helperTypes.js\";\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport { MarkQueue } from \"./markQueue.js\";\nimport {\n\ttype MoveEffect,\n\ttype MoveEffectTable,\n\tgetCrossFieldTargetFromMove,\n\tgetMoveEffect,\n\tgetMoveIn,\n\tisMoveIn,\n\tisMoveMark,\n\tisMoveOut,\n\tsetMoveEffect,\n} from \"./moveEffectTable.js\";\nimport {\n\ttype CellMark,\n\ttype Changeset,\n\ttype Detach,\n\ttype Mark,\n\ttype MarkEffect,\n\ttype MarkList,\n\ttype MoveId,\n\ttype NoopMark,\n\tNoopMarkType,\n} from \"./types.js\";\nimport {\n\tCellOrder,\n\tareEqualCellIds,\n\tareInputCellsEmpty,\n\tareOutputCellsEmpty,\n\tasAttachAndDetach,\n\tcellSourcesFromMarks,\n\tcompareCellPositionsUsingTombstones,\n\textractMarkEffect,\n\tgetEndpoint,\n\tgetInputCellId,\n\tgetOutputCellId,\n\tisAttach,\n\tisAttachAndDetachEffect,\n\tisDetach,\n\tisImpactfulCellRename,\n\tisNewAttach,\n\tisNoopMark,\n\tisRename,\n\tmarkEmptiesCells,\n\tmarkFillsCells,\n\tmarkHasCellEffect,\n\tnormalizeCellRename,\n\tsettleMark,\n\twithNodeChange,\n\twithRevision,\n} from \"./utils.js\";\n\n/**\n * Composes a sequence of changesets into a single changeset.\n * @param changes - The changesets to be applied.\n * Parts of the input may be reused in the output, but the input is not mutated.\n * Each changeset in the list is assumed to be applicable after the previous one.\n * @returns A changeset that is equivalent to applying each of the given `changes` in order.\n *\n * WARNING! This implementation is incomplete:\n * - Tombstone information is ignored.\n * - Support for moves is not implemented.\n * - Support for slices is not implemented.\n */\nexport function compose(\n\tchange1: Changeset,\n\tchange2: Changeset,\n\tcomposeChild: NodeChangeComposer,\n\t_genId: IdAllocator,\n\tmanager: CrossFieldManager,\n\trevisionMetadata: RevisionMetadataSource,\n): Changeset {\n\treturn composeMarkLists(\n\t\tchange1,\n\t\tchange2,\n\t\tcomposeChild,\n\t\tmanager as MoveEffectTable,\n\t\trevisionMetadata,\n\t);\n}\n\nfunction composeMarkLists(\n\tbaseMarkList: MarkList,\n\tnewMarkList: MarkList,\n\tcomposeChild: NodeChangeComposer,\n\tmoveEffects: MoveEffectTable,\n\trevisionMetadata: RevisionMetadataSource,\n): MarkList {\n\tconst factory = new MarkListFactory();\n\tconst queue = new ComposeQueue(baseMarkList, newMarkList, moveEffects, revisionMetadata);\n\twhile (!queue.isEmpty()) {\n\t\tconst { baseMark, newMark } = queue.pop();\n\t\tif (newMark === undefined) {\n\t\t\tassert(\n\t\t\t\tbaseMark !== undefined,\n\t\t\t\t0x4db /* Non-empty queue should not return two undefined marks */,\n\t\t\t);\n\t\t\tfactory.push(\n\t\t\t\tcomposeMark(baseMark, moveEffects, (node: NodeId) =>\n\t\t\t\t\tcomposeChildChanges(node, undefined, composeChild),\n\t\t\t\t),\n\t\t\t);\n\t\t} else {\n\t\t\t// We only compose changesets that will not be further rebased.\n\t\t\t// It is therefore safe to remove any intentions that have no impact in the context they apply to.\n\t\t\tconst settledNewMark = settleMark(newMark);\n\t\t\tif (baseMark === undefined) {\n\t\t\t\tfactory.push(\n\t\t\t\t\tcomposeMark(settledNewMark, moveEffects, (node: NodeId) =>\n\t\t\t\t\t\tcomposeChildChanges(undefined, node, composeChild),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// Past this point, we are guaranteed that `settledNewMark` and `baseMark` have the same length and\n\t\t\t\t// start at the same location in the revision after the base changes.\n\t\t\t\t// They therefore refer to the same range for that revision.\n\t\t\t\tconst settledBaseMark = settleMark(baseMark);\n\t\t\t\tconst composedMark = composeMarks(\n\t\t\t\t\tsettledBaseMark,\n\t\t\t\t\tsettledNewMark,\n\t\t\t\t\tcomposeChild,\n\t\t\t\t\tmoveEffects,\n\t\t\t\t);\n\t\t\t\tfactory.push(composedMark);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn factory.list;\n}\n\n/**\n * Composes two marks where `newMark` is based on the state produced by `baseMark`.\n * @param baseMark - The mark to compose with `newMark`.\n * Its output range should be the same as `newMark`'s input range.\n * @param newRev - The revision the new mark is part of.\n * @param newMark - The mark to compose with `baseMark`.\n * Its input range should be the same as `baseMark`'s output range.\n * @returns A mark that is equivalent to applying both `baseMark` and `newMark` successively.\n */\nfunction composeMarks(\n\tbaseMark: Mark,\n\tnewMark: Mark,\n\tcomposeChild: NodeChangeComposer,\n\tmoveEffects: MoveEffectTable,\n): Mark {\n\tconst nodeChange = handleNodeChanges(baseMark, newMark, composeChild, moveEffects);\n\n\treturn withUpdatedEndpoint(\n\t\twithNodeChange(composeMarksIgnoreChild(baseMark, newMark, moveEffects), nodeChange),\n\t\tbaseMark.count,\n\t\tmoveEffects,\n\t);\n}\n\nfunction composeMarksIgnoreChild(\n\tbaseMark: Mark,\n\tnewMark: Mark,\n\tmoveEffects: MoveEffectTable,\n): Mark {\n\tif (isNoopMark(baseMark)) {\n\t\treturn newMark;\n\t} else if (isNoopMark(newMark)) {\n\t\treturn baseMark;\n\t}\n\n\tif (isRename(baseMark) && isRename(newMark)) {\n\t\treturn { ...baseMark, idOverride: newMark.idOverride };\n\t} else if (isRename(baseMark)) {\n\t\tassert(\n\t\t\tisAttach(newMark) || isAttachAndDetachEffect(newMark),\n\t\t\t0x9f1 /* Unexpected mark type */,\n\t\t);\n\t\treturn { ...newMark, cellId: baseMark.cellId };\n\t} else if (isRename(newMark)) {\n\t\tassert(\n\t\t\tisDetach(baseMark) || isAttachAndDetachEffect(baseMark),\n\t\t\t0x9f2 /* Unexpected mark type */,\n\t\t);\n\t\treturn isDetach(baseMark)\n\t\t\t? { ...baseMark, idOverride: newMark.idOverride }\n\t\t\t: { ...baseMark, detach: { ...baseMark.detach, idOverride: newMark.idOverride } };\n\t}\n\n\tif (isImpactfulCellRename(newMark)) {\n\t\tconst newAttachAndDetach = asAttachAndDetach(newMark);\n\t\tassert(\n\t\t\tnewAttachAndDetach.cellId !== undefined,\n\t\t\t0x9f3 /* Impactful cell rename must target empty cell */,\n\t\t);\n\t\tconst newDetachRevision = newAttachAndDetach.detach.revision;\n\t\tif (markEmptiesCells(baseMark)) {\n\t\t\t// baseMark is a detach which cancels with the attach portion of the AttachAndDetach,\n\t\t\t// so we are just left with the detach portion of the AttachAndDetach.\n\t\t\tconst newDetach: CellMark<Detach> = {\n\t\t\t\t...newAttachAndDetach.detach,\n\t\t\t\tcount: baseMark.count,\n\t\t\t};\n\n\t\t\tif (isMoveIn(newAttachAndDetach.attach) && isMoveOut(newAttachAndDetach.detach)) {\n\t\t\t\tassert(isMoveOut(baseMark), 0x808 /* Unexpected mark type */);\n\n\t\t\t\t// The base changeset and new changeset both move these nodes.\n\t\t\t\t// Call the original position of the nodes A, the position after the base changeset is applied B,\n\t\t\t\t// and the position after the new changeset is applied C.\n\t\t\t\t// The new changeset moves the nodes from B, temporarily returns them to A, and then moves them to C.\n\t\t\t\t// The composition of the base and new changesets will be a move directly from A to C,\n\t\t\t\t// since the move from A to B cancels out with the return from B to A.\n\t\t\t\t// This if-block is handling marks at A.\n\t\t\t\t// When we compose the marks at B we will link the start of the base move (A to B)\n\t\t\t\t// with the end of the new move (B to C).\n\t\t\t\t// Because we are replacing the mark representing the start of the move with the new changeset's\n\t\t\t\t// move-out from A, we update the base move-in at B to consider that its start point.\n\t\t\t\tconst newDetachId = {\n\t\t\t\t\trevision: newDetachRevision,\n\t\t\t\t\tlocalId: newAttachAndDetach.detach.id,\n\t\t\t\t};\n\n\t\t\t\tsetTruncatedEndpointForInner(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tgetEndpoint(baseMark),\n\t\t\t\t\tbaseMark.count,\n\t\t\t\t\tnewDetachId,\n\t\t\t\t);\n\n\t\t\t\tconst newEndpoint = getComposedEndpoint(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\t\tbaseMark.revision,\n\t\t\t\t\tbaseMark.id,\n\t\t\t\t\tbaseMark.count,\n\t\t\t\t);\n\n\t\t\t\tif (newEndpoint !== undefined) {\n\t\t\t\t\tchangeFinalEndpoint(newDetach as MoveMarkEffect, newEndpoint);\n\t\t\t\t\tsetTruncatedEndpoint(\n\t\t\t\t\t\tmoveEffects,\n\t\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\t\tnewEndpoint,\n\t\t\t\t\t\tbaseMark.count,\n\t\t\t\t\t\tnewDetachId,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn newDetach;\n\t\t}\n\n\t\tif (isImpactfulCellRename(baseMark)) {\n\t\t\tassert(\n\t\t\t\tbaseMark.cellId !== undefined,\n\t\t\t\t0x9f4 /* Impactful cell rename must target empty cell */,\n\t\t\t);\n\t\t\tconst baseAttachAndDetach = asAttachAndDetach(baseMark);\n\t\t\tconst newOutputId = getOutputCellId(newAttachAndDetach);\n\n\t\t\tif (areEqualCellIds(newOutputId, baseAttachAndDetach.cellId)) {\n\t\t\t\treturn { count: baseAttachAndDetach.count, cellId: baseAttachAndDetach.cellId };\n\t\t\t}\n\n\t\t\t// `newMark`'s attach portion cancels with `baseMark`'s detach portion.\n\t\t\tconst originalAttach = { ...baseAttachAndDetach.attach };\n\t\t\tconst finalDetach = { ...newAttachAndDetach.detach };\n\t\t\tconst detachRevision = finalDetach.revision;\n\t\t\tif (detachRevision !== undefined) {\n\t\t\t\tfinalDetach.revision = detachRevision;\n\t\t\t}\n\n\t\t\treturn normalizeCellRename(baseMark.cellId, baseMark.count, originalAttach, finalDetach);\n\t\t}\n\n\t\treturn normalizeCellRename(\n\t\t\tnewAttachAndDetach.cellId,\n\t\t\tnewAttachAndDetach.count,\n\t\t\tnewAttachAndDetach.attach,\n\t\t\tnewAttachAndDetach.detach,\n\t\t);\n\t}\n\tif (isImpactfulCellRename(baseMark)) {\n\t\tconst baseAttachAndDetach = asAttachAndDetach(baseMark);\n\t\tif (markFillsCells(newMark)) {\n\t\t\tconst originalAttach = withRevision(\n\t\t\t\t{\n\t\t\t\t\t...baseAttachAndDetach.attach,\n\t\t\t\t\tcellId: baseAttachAndDetach.cellId,\n\t\t\t\t\tcount: baseAttachAndDetach.count,\n\t\t\t\t},\n\t\t\t\tbaseAttachAndDetach.attach.revision,\n\t\t\t);\n\n\t\t\tif (isMoveIn(baseAttachAndDetach.attach) && isMoveOut(baseAttachAndDetach.detach)) {\n\t\t\t\tassert(isMoveIn(newMark), 0x809 /* Unexpected mark type */);\n\n\t\t\t\tconst originalAttachId = {\n\t\t\t\t\trevision: baseAttachAndDetach.attach.revision,\n\t\t\t\t\tlocalId: baseAttachAndDetach.attach.id,\n\t\t\t\t};\n\n\t\t\t\tsetTruncatedEndpointForInner(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\t\tgetEndpoint(newMark),\n\t\t\t\t\tbaseAttachAndDetach.count,\n\t\t\t\t\toriginalAttachId,\n\t\t\t\t);\n\n\t\t\t\tconst newEndpoint = getComposedEndpoint(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tnewMark.revision,\n\t\t\t\t\tnewMark.id,\n\t\t\t\t\tnewMark.count,\n\t\t\t\t);\n\n\t\t\t\tif (newEndpoint !== undefined) {\n\t\t\t\t\tchangeFinalEndpoint(originalAttach as MoveMarkEffect, newEndpoint);\n\t\t\t\t\tsetTruncatedEndpoint(\n\t\t\t\t\t\tmoveEffects,\n\t\t\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\t\t\tnewEndpoint,\n\t\t\t\t\t\tbaseMark.count,\n\t\t\t\t\t\toriginalAttachId,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn originalAttach;\n\t\t} else {\n\t\t\t// Other mark types have been handled by previous conditional branches.\n\t\t\tassert(newMark.type === NoopMarkType, 0x80a /* Unexpected mark type */);\n\t\t\treturn baseMark;\n\t\t}\n\t}\n\n\tif (!markHasCellEffect(baseMark) && !markHasCellEffect(newMark)) {\n\t\treturn createNoopMark(newMark.count, undefined, getInputCellId(baseMark));\n\t} else if (!markHasCellEffect(baseMark)) {\n\t\treturn newMark;\n\t} else if (!markHasCellEffect(newMark)) {\n\t\treturn baseMark;\n\t} else if (areInputCellsEmpty(baseMark)) {\n\t\tassert(isDetach(newMark), 0x71c /* Unexpected mark type */);\n\t\tassert(isAttach(baseMark), 0x71d /* Expected generative mark */);\n\n\t\tconst attach = extractMarkEffect(baseMark);\n\t\tconst detach = extractMarkEffect(newMark);\n\n\t\tif (isMoveIn(attach) && isMoveOut(detach)) {\n\t\t\tconst finalSource = getEndpoint(attach);\n\t\t\tconst finalDest = getEndpoint(detach);\n\n\t\t\tsetEndpoint(\n\t\t\t\tmoveEffects,\n\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\tfinalSource,\n\t\t\t\tbaseMark.count,\n\t\t\t\tfinalDest,\n\t\t\t);\n\n\t\t\tconst truncatedEndpoint1 = getTruncatedEndpointForInner(\n\t\t\t\tmoveEffects,\n\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\tattach.revision,\n\t\t\t\tattach.id,\n\t\t\t\tbaseMark.count,\n\t\t\t);\n\n\t\t\tif (truncatedEndpoint1 !== undefined) {\n\t\t\t\tsetTruncatedEndpoint(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tfinalDest,\n\t\t\t\t\tbaseMark.count,\n\t\t\t\t\ttruncatedEndpoint1,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tsetEndpoint(\n\t\t\t\tmoveEffects,\n\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\tfinalDest,\n\t\t\t\tbaseMark.count,\n\t\t\t\tfinalSource,\n\t\t\t);\n\n\t\t\tconst truncatedEndpoint2 = getTruncatedEndpointForInner(\n\t\t\t\tmoveEffects,\n\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\tdetach.revision,\n\t\t\t\tdetach.id,\n\t\t\t\tbaseMark.count,\n\t\t\t);\n\n\t\t\tif (truncatedEndpoint2 !== undefined) {\n\t\t\t\tsetTruncatedEndpoint(\n\t\t\t\t\tmoveEffects,\n\t\t\t\t\tCrossFieldTarget.Source,\n\t\t\t\t\tfinalSource,\n\t\t\t\t\tbaseMark.count,\n\t\t\t\t\ttruncatedEndpoint2,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// The `finalEndpoint` field of AttachAndDetach move effect pairs is not used,\n\t\t\t// so we remove it as a normalization.\n\t\t\tdelete attach.finalEndpoint;\n\t\t\tdelete detach.finalEndpoint;\n\t\t}\n\n\t\tif (areEqualCellIds(getOutputCellId(newMark), baseMark.cellId)) {\n\t\t\t// The output and input cell IDs are the same, so this mark has no effect.\n\t\t\treturn { count: baseMark.count, cellId: baseMark.cellId };\n\t\t}\n\t\treturn normalizeCellRename(baseMark.cellId, baseMark.count, attach, detach);\n\t} else {\n\t\tconst length = baseMark.count;\n\t\treturn createNoopMark(length, undefined);\n\t}\n}\n\nfunction createNoopMark(\n\tlength: number,\n\tnodeChange: NodeId | undefined,\n\tcellId?: ChangeAtomId,\n): Mark {\n\tconst mark: CellMark<NoopMark> = { count: length };\n\tif (nodeChange !== undefined) {\n\t\tassert(length === 1, 0x692 /* A mark with a node change must have length one */);\n\t\tmark.changes = nodeChange;\n\t}\n\tif (cellId !== undefined) {\n\t\tmark.cellId = cellId;\n\t}\n\treturn mark;\n}\n\nfunction handleNodeChanges(\n\tbaseMark: Mark,\n\tnewMark: Mark,\n\tcomposeChild: NodeChangeComposer,\n\tmoveEffects: MoveEffectTable,\n): NodeId | undefined {\n\tif (newMark.changes !== undefined) {\n\t\tconst baseSource = getMoveIn(baseMark);\n\n\t\t// TODO: Make sure composeChild is not called twice on the node changes.\n\t\tif (baseSource !== undefined) {\n\t\t\tsetModifyAfter(moveEffects, getEndpoint(baseSource), newMark.changes);\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\treturn composeChildChanges(baseMark.changes, newMark.changes, composeChild);\n}\n\nfunction composeChildChanges(\n\tbaseChange: NodeId | undefined,\n\tnewChange: NodeId | undefined,\n\tcomposeChild: NodeChangeComposer,\n): NodeId | undefined {\n\tif (baseChange === undefined && newChange === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn composeChild(baseChange, newChange);\n}\n\nfunction composeMark<TMark extends Mark>(\n\tmark: TMark,\n\tmoveEffects: MoveEffectTable,\n\tcomposeChild: (node: NodeId) => NodeId | undefined,\n): TMark {\n\tconst nodeChanges = mark.changes !== undefined ? composeChild(mark.changes) : undefined;\n\tconst updatedMark = withUpdatedEndpoint(mark, mark.count, moveEffects);\n\treturn withNodeChange(updatedMark, nodeChanges);\n}\n\nexport class ComposeQueue {\n\tprivate readonly baseMarks: MarkQueue;\n\tprivate readonly newMarks: MarkQueue;\n\tprivate readonly baseMarksCellSources: ReadonlySet<RevisionTag | undefined>;\n\tprivate readonly newMarksCellSources: ReadonlySet<RevisionTag | undefined>;\n\n\tpublic constructor(\n\t\tbaseMarks: Changeset,\n\t\tnewMarks: Changeset,\n\t\tprivate readonly moveEffects: MoveEffectTable,\n\t\tprivate readonly revisionMetadata: RevisionMetadataSource,\n\t) {\n\t\tthis.baseMarks = new MarkQueue(baseMarks, moveEffects);\n\t\tthis.newMarks = new MarkQueue(newMarks, moveEffects);\n\t\tthis.baseMarksCellSources = cellSourcesFromMarks(baseMarks, getOutputCellId);\n\t\tthis.newMarksCellSources = cellSourcesFromMarks(newMarks, getInputCellId);\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn this.baseMarks.isEmpty() && this.newMarks.isEmpty();\n\t}\n\n\tpublic pop(): ComposeMarks {\n\t\tconst baseMark = this.baseMarks.peek();\n\t\tconst newMark = this.newMarks.peek();\n\t\tif (baseMark === undefined && newMark === undefined) {\n\t\t\treturn {};\n\t\t} else if (baseMark === undefined) {\n\t\t\treturn this.dequeueNew();\n\t\t} else if (newMark === undefined) {\n\t\t\treturn this.dequeueBase();\n\t\t} else if (areOutputCellsEmpty(baseMark) && areInputCellsEmpty(newMark)) {\n\t\t\tconst baseCellId: ChangeAtomId =\n\t\t\t\tgetOutputCellId(baseMark) ?? fail(\"Expected defined output ID\");\n\n\t\t\tif (markEmptiesCells(baseMark) && baseCellId.revision === undefined) {\n\t\t\t\t// The base revision should always be defined except when squashing changes into a transaction.\n\t\t\t\t// In the future, we want to support reattaches in the new change here.\n\t\t\t\t// We will need to be able to order the base mark relative to the new mark\n\t\t\t\t// (which requires the local changes to have a revision tag))\n\t\t\t\tassert(\n\t\t\t\t\tisNewAttach(newMark),\n\t\t\t\t\t0x695 /* TODO: Assign revision tags to each change in a transaction */,\n\t\t\t\t);\n\t\t\t\treturn this.dequeueNew();\n\t\t\t}\n\n\t\t\tconst newCellId = getInputCellId(newMark);\n\t\t\tassert(newCellId !== undefined, 0x89d /* Both marks should have cell IDs */);\n\t\t\tconst comparison = compareCellPositionsUsingTombstones(\n\t\t\t\tbaseCellId,\n\t\t\t\tnewCellId,\n\t\t\t\tthis.baseMarksCellSources,\n\t\t\t\tthis.newMarksCellSources,\n\t\t\t\tthis.revisionMetadata,\n\t\t\t);\n\t\t\tswitch (comparison) {\n\t\t\t\tcase CellOrder.SameCell:\n\t\t\t\t\treturn this.dequeueBoth();\n\t\t\t\tcase CellOrder.OldThenNew:\n\t\t\t\t\treturn this.dequeueBase();\n\t\t\t\tcase CellOrder.NewThenOld:\n\t\t\t\t\treturn this.dequeueNew();\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(comparison);\n\t\t\t}\n\t\t} else if (areOutputCellsEmpty(baseMark)) {\n\t\t\treturn this.dequeueBase();\n\t\t} else if (areInputCellsEmpty(newMark)) {\n\t\t\treturn this.dequeueNew();\n\t\t} else {\n\t\t\treturn this.dequeueBoth();\n\t\t}\n\t}\n\n\tprivate dequeueBase(length: number = Infinity): ComposeMarks {\n\t\tconst baseMark = this.baseMarks.dequeueUpTo(length);\n\t\tconst movedChanges = getMovedChangesFromMark(this.moveEffects, baseMark);\n\t\tif (movedChanges !== undefined) {\n\t\t\tthis.moveEffects.onMoveIn(movedChanges);\n\t\t}\n\n\t\tconst newMark = createNoopMark(baseMark.count, movedChanges, getOutputCellId(baseMark));\n\t\treturn { baseMark, newMark };\n\t}\n\n\tprivate dequeueNew(length: number = Infinity): ComposeMarks {\n\t\tconst newMark = this.newMarks.dequeueUpTo(length);\n\t\tconst baseMark = createNoopMark(newMark.count, undefined, getInputCellId(newMark));\n\n\t\treturn {\n\t\t\tbaseMark,\n\t\t\tnewMark,\n\t\t};\n\t}\n\n\tprivate dequeueBoth(): ComposeMarks {\n\t\tconst length = this.peekMinLength();\n\t\tconst baseMark = this.baseMarks.dequeueUpTo(length);\n\t\tlet newMark = this.newMarks.dequeueUpTo(length);\n\t\tconst movedChanges = getMovedChangesFromMark(this.moveEffects, baseMark);\n\n\t\tif (movedChanges !== undefined) {\n\t\t\tassert(newMark.changes === undefined, 0x8da /* Unexpected node changeset collision */);\n\t\t\tnewMark = withNodeChange(newMark, movedChanges);\n\t\t}\n\n\t\treturn {\n\t\t\tbaseMark,\n\t\t\tnewMark,\n\t\t};\n\t}\n\n\tprivate peekMinLength(): number {\n\t\tconst baseMark = this.baseMarks.peek();\n\t\tconst newMark = this.newMarks.peek();\n\t\tassert(\n\t\t\tbaseMark !== undefined && newMark !== undefined,\n\t\t\t0x8db /* Cannot peek length unless both mark queues are non-empty */,\n\t\t);\n\n\t\treturn Math.min(newMark.count, baseMark.count);\n\t}\n}\n\ninterface ComposeMarks {\n\tbaseMark?: Mark;\n\tnewMark?: Mark;\n}\n\nfunction getMovedChangesFromMark(\n\tmoveEffects: MoveEffectTable,\n\tmarkEffect: MarkEffect,\n): NodeId | undefined {\n\tif (isAttachAndDetachEffect(markEffect)) {\n\t\treturn getMovedChangesFromMark(moveEffects, markEffect.detach);\n\t}\n\tif (!isMoveOut(markEffect)) {\n\t\treturn undefined;\n\t}\n\n\treturn getModifyAfter(moveEffects, markEffect.revision, markEffect.id);\n}\n\n// It is expected that the range from `id` to `id + count - 1` has the same move effect.\n// The call sites to this function are making queries about a mark which has already been split by a `MarkQueue`\n// to match the ranges in `moveEffects`.\n// TODO: Reduce the duplication between this and other MoveEffect helpers\nfunction getModifyAfter(\n\tmoveEffects: MoveEffectTable,\n\trevision: RevisionTag | undefined,\n\tid: MoveId,\n): NodeId | undefined {\n\tconst target = CrossFieldTarget.Source;\n\tconst effect = getMoveEffect(moveEffects, target, revision, id, 1);\n\n\tif (effect.value?.modifyAfter !== undefined) {\n\t\treturn effect.value.modifyAfter;\n\t}\n\n\treturn undefined;\n}\n\n// TODO: Reduce the duplication between this and other MoveEffect helpers\nfunction setModifyAfter(\n\tmoveEffects: MoveEffectTable,\n\t{ revision, localId: id }: ChangeAtomId,\n\tmodifyAfter: NodeId,\n): void {\n\tconst target = CrossFieldTarget.Source;\n\tconst count = 1;\n\tconst effect = getMoveEffect(moveEffects, target, revision, id, count, false);\n\tconst newEffect: MoveEffect =\n\t\teffect.value !== undefined ? { ...effect.value, modifyAfter } : { modifyAfter };\n\tsetMoveEffect(moveEffects, target, revision, id, count, newEffect);\n}\n\nfunction setEndpoint(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\tid: ChangeAtomId,\n\tcount: number,\n\tendpoint: ChangeAtomId,\n): void {\n\tconst effect = getMoveEffect(moveEffects, target, id.revision, id.localId, count, false);\n\tconst newEffect = effect.value !== undefined ? { ...effect.value, endpoint } : { endpoint };\n\tsetMoveEffect(moveEffects, target, id.revision, id.localId, effect.length, newEffect);\n\n\tconst remainingCount = count - effect.length;\n\tif (remainingCount > 0) {\n\t\tsetEndpoint(\n\t\t\tmoveEffects,\n\t\t\ttarget,\n\t\t\toffsetChangeAtomId(id, effect.length),\n\t\t\tremainingCount,\n\t\t\toffsetChangeAtomId(endpoint, effect.length),\n\t\t);\n\t}\n}\n\nfunction setTruncatedEndpoint(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\tid: ChangeAtomId,\n\tcount: number,\n\ttruncatedEndpoint: ChangeAtomId,\n): void {\n\tconst effect = getMoveEffect(moveEffects, target, id.revision, id.localId, count);\n\tconst newEffect =\n\t\teffect.value !== undefined\n\t\t\t? { ...effect.value, truncatedEndpoint }\n\t\t\t: { truncatedEndpoint };\n\n\tsetMoveEffect(moveEffects, target, id.revision, id.localId, effect.length, newEffect);\n\n\tconst remainingCount = count - effect.length;\n\tif (remainingCount > 0) {\n\t\tsetTruncatedEndpoint(\n\t\t\tmoveEffects,\n\t\t\ttarget,\n\t\t\toffsetChangeAtomId(id, effect.length),\n\t\t\tremainingCount,\n\t\t\toffsetChangeAtomId(truncatedEndpoint, effect.length),\n\t\t);\n\t}\n}\n\nfunction setTruncatedEndpointForInner(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\tid: ChangeAtomId,\n\tcount: number,\n\ttruncatedEndpointForInner: ChangeAtomId,\n): void {\n\tconst effect = getMoveEffect(moveEffects, target, id.revision, id.localId, count);\n\tconst newEffect =\n\t\teffect.value !== undefined\n\t\t\t? { ...effect.value, truncatedEndpointForInner }\n\t\t\t: { truncatedEndpointForInner };\n\tsetMoveEffect(moveEffects, target, id.revision, id.localId, effect.length, newEffect);\n\n\tconst remainingCount = count - effect.length;\n\tif (remainingCount > 0) {\n\t\tsetTruncatedEndpointForInner(\n\t\t\tmoveEffects,\n\t\t\ttarget,\n\t\t\toffsetChangeAtomId(id, effect.length),\n\t\t\tremainingCount,\n\t\t\toffsetChangeAtomId(truncatedEndpointForInner, effect.length),\n\t\t);\n\t}\n}\n\nfunction withUpdatedEndpoint<TMark extends MarkEffect>(\n\tmark: TMark,\n\tcount: number,\n\teffects: MoveEffectTable,\n): TMark {\n\tif (isAttachAndDetachEffect(mark)) {\n\t\treturn {\n\t\t\t...mark,\n\t\t\tattach: withUpdatedEndpoint(mark.attach, count, effects),\n\t\t\tdetach: withUpdatedEndpoint(mark.detach, count, effects),\n\t\t};\n\t}\n\n\tif (!isMoveMark(mark)) {\n\t\treturn mark;\n\t}\n\tconst finalDest = getComposedEndpoint(\n\t\teffects,\n\t\tgetCrossFieldTargetFromMove(mark),\n\t\tmark.revision,\n\t\tmark.id,\n\t\tcount,\n\t);\n\n\tif (finalDest === undefined) {\n\t\treturn mark;\n\t}\n\n\tconst output = { ...mark };\n\tchangeFinalEndpoint(output, finalDest);\n\n\treturn output;\n}\n\nfunction changeFinalEndpoint(mark: MoveMarkEffect, endpoint: ChangeAtomId): void {\n\tif (areEqualCellIds(endpoint, { revision: mark.revision, localId: mark.id })) {\n\t\tdelete mark.finalEndpoint;\n\t} else {\n\t\tmark.finalEndpoint = endpoint;\n\t}\n}\n\nfunction getComposedEndpoint(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\trevision: RevisionTag | undefined,\n\tid: MoveId,\n\tcount: number,\n): ChangeAtomId | undefined {\n\tconst effect = getMoveEffect(moveEffects, target, revision, id, count);\n\tassert(effect.length === count, 0x815 /* Expected effect to cover entire mark */);\n\treturn effect.value?.truncatedEndpoint ?? effect.value?.endpoint;\n}\n\nfunction getTruncatedEndpointForInner(\n\tmoveEffects: MoveEffectTable,\n\ttarget: CrossFieldTarget,\n\trevision: RevisionTag | undefined,\n\tid: MoveId,\n\tcount: number,\n): ChangeAtomId | undefined {\n\tconst effect = getMoveEffect(moveEffects, target, revision, id, count);\n\tassert(effect.length === count, 0x934 /* Expected effect to cover entire mark */);\n\treturn effect.value?.truncatedEndpointForInner;\n}\n"]}
|
|
@@ -37,8 +37,8 @@ declare const Insert: import("@sinclair/typebox").TObject<{
|
|
|
37
37
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
38
38
|
}>;
|
|
39
39
|
declare const MoveIn: import("@sinclair/typebox").TObject<{
|
|
40
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
41
40
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
41
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
42
42
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
43
43
|
}>;
|
|
44
44
|
declare const Remove: import("@sinclair/typebox").TObject<{
|
|
@@ -54,8 +54,8 @@ declare const Remove: import("@sinclair/typebox").TObject<{
|
|
|
54
54
|
}>>;
|
|
55
55
|
}>;
|
|
56
56
|
declare const MoveOut: import("@sinclair/typebox").TObject<{
|
|
57
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
58
57
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
58
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
59
59
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
60
60
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
61
61
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|
|
@@ -72,8 +72,8 @@ declare const Attach: import("@sinclair/typebox").TObject<{
|
|
|
72
72
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
73
73
|
}>>;
|
|
74
74
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
75
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
76
75
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
76
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
77
77
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
78
78
|
}>>;
|
|
79
79
|
}>;
|
|
@@ -91,8 +91,8 @@ declare const Detach: import("@sinclair/typebox").TObject<{
|
|
|
91
91
|
}>>;
|
|
92
92
|
}>>;
|
|
93
93
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
94
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
95
94
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
95
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
96
96
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
97
97
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
98
98
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|
|
@@ -111,8 +111,8 @@ declare const AttachAndDetach: import("@sinclair/typebox").TObject<{
|
|
|
111
111
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
112
112
|
}>>;
|
|
113
113
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
114
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
115
114
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
115
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
116
116
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
117
117
|
}>>;
|
|
118
118
|
}>;
|
|
@@ -130,8 +130,8 @@ declare const AttachAndDetach: import("@sinclair/typebox").TObject<{
|
|
|
130
130
|
}>>;
|
|
131
131
|
}>>;
|
|
132
132
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
133
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
134
133
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
134
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
135
135
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
136
136
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
137
137
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|
|
@@ -150,8 +150,8 @@ declare const MarkEffect: import("@sinclair/typebox").TObject<{
|
|
|
150
150
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
151
151
|
}>>;
|
|
152
152
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
153
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
154
153
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
154
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
155
155
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
156
156
|
}>>;
|
|
157
157
|
delete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
@@ -167,8 +167,8 @@ declare const MarkEffect: import("@sinclair/typebox").TObject<{
|
|
|
167
167
|
}>>;
|
|
168
168
|
}>>;
|
|
169
169
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
170
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
171
170
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
171
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
172
172
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
173
173
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
174
174
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|
|
@@ -186,8 +186,8 @@ declare const MarkEffect: import("@sinclair/typebox").TObject<{
|
|
|
186
186
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
187
187
|
}>>;
|
|
188
188
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
189
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
190
189
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
190
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
191
191
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
192
192
|
}>>;
|
|
193
193
|
}>;
|
|
@@ -205,8 +205,8 @@ declare const MarkEffect: import("@sinclair/typebox").TObject<{
|
|
|
205
205
|
}>>;
|
|
206
206
|
}>>;
|
|
207
207
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
208
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
209
208
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
209
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
210
210
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
211
211
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
212
212
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|
|
@@ -237,8 +237,8 @@ declare const Mark: <Schema extends TSchema>(tNodeChange: Schema) => import("@si
|
|
|
237
237
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
238
238
|
}>>;
|
|
239
239
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
240
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
241
240
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
241
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
242
242
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
243
243
|
}>>;
|
|
244
244
|
delete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
@@ -254,8 +254,8 @@ declare const Mark: <Schema extends TSchema>(tNodeChange: Schema) => import("@si
|
|
|
254
254
|
}>>;
|
|
255
255
|
}>>;
|
|
256
256
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
257
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
258
257
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
258
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
259
259
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
260
260
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
261
261
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|
|
@@ -273,8 +273,8 @@ declare const Mark: <Schema extends TSchema>(tNodeChange: Schema) => import("@si
|
|
|
273
273
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
274
274
|
}>>;
|
|
275
275
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
276
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
277
276
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
277
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
278
278
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
279
279
|
}>>;
|
|
280
280
|
}>;
|
|
@@ -292,8 +292,8 @@ declare const Mark: <Schema extends TSchema>(tNodeChange: Schema) => import("@si
|
|
|
292
292
|
}>>;
|
|
293
293
|
}>>;
|
|
294
294
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
295
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
296
295
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
296
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
297
297
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
298
298
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
299
299
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|
|
@@ -322,8 +322,8 @@ export declare const Changeset: <Schema extends TSchema>(tNodeChange: Schema) =>
|
|
|
322
322
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
323
323
|
}>>;
|
|
324
324
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
325
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
326
325
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
326
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
327
327
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
328
328
|
}>>;
|
|
329
329
|
delete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
@@ -339,8 +339,8 @@ export declare const Changeset: <Schema extends TSchema>(tNodeChange: Schema) =>
|
|
|
339
339
|
}>>;
|
|
340
340
|
}>>;
|
|
341
341
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
342
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
343
342
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
343
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
344
344
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
345
345
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
346
346
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|
|
@@ -358,8 +358,8 @@ export declare const Changeset: <Schema extends TSchema>(tNodeChange: Schema) =>
|
|
|
358
358
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
359
359
|
}>>;
|
|
360
360
|
moveIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
361
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
362
361
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
362
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
363
363
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
364
364
|
}>>;
|
|
365
365
|
}>;
|
|
@@ -377,8 +377,8 @@ export declare const Changeset: <Schema extends TSchema>(tNodeChange: Schema) =>
|
|
|
377
377
|
}>>;
|
|
378
378
|
}>>;
|
|
379
379
|
moveOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
380
|
-
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
381
380
|
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
381
|
+
id: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>;
|
|
382
382
|
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("../../index.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
|
|
383
383
|
idOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
384
384
|
type: import("@sinclair/typebox").TEnum<typeof DetachIdOverrideType>;
|