@fluidframework/tree 2.23.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1636 -1466
- package/api-extractor/api-extractor.current.json +0 -3
- package/api-report/tree.alpha.api.md +261 -100
- package/api-report/tree.beta.api.md +86 -61
- package/api-report/tree.legacy.alpha.api.md +86 -61
- package/api-report/tree.legacy.public.api.md +86 -61
- package/api-report/tree.public.api.md +86 -61
- package/dist/alpha.d.ts +32 -1
- package/dist/beta.d.ts +5 -1
- package/dist/codec/codec.d.ts +1 -1
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +3 -4
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/discriminatedUnions.d.ts.map +1 -1
- package/dist/codec/discriminatedUnions.js +1 -1
- package/dist/codec/discriminatedUnions.js.map +1 -1
- package/dist/core/forest/editableForest.d.ts +1 -14
- package/dist/core/forest/editableForest.d.ts.map +1 -1
- package/dist/core/forest/editableForest.js +1 -28
- package/dist/core/forest/editableForest.js.map +1 -1
- package/dist/core/forest/forest.d.ts +16 -3
- package/dist/core/forest/forest.d.ts.map +1 -1
- package/dist/core/forest/forest.js +4 -1
- package/dist/core/forest/forest.js.map +1 -1
- package/dist/core/forest/index.d.ts +1 -1
- package/dist/core/forest/index.d.ts.map +1 -1
- package/dist/core/forest/index.js +1 -2
- package/dist/core/forest/index.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/utils.js +1 -1
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +4 -1
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +8 -4
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +8 -3
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +16 -9
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/delta.d.ts +8 -23
- package/dist/core/tree/delta.d.ts.map +1 -1
- package/dist/core/tree/delta.js.map +1 -1
- package/dist/core/tree/deltaUtil.d.ts +3 -3
- package/dist/core/tree/deltaUtil.d.ts.map +1 -1
- package/dist/core/tree/deltaUtil.js +2 -2
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/index.d.ts +2 -2
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +2 -1
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts +54 -1
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js +8 -1
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/treeTextFormat.js +2 -2
- package/dist/core/tree/treeTextFormat.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +7 -5
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js +19 -9
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts +5 -23
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +8 -5
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +9 -9
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +5 -3
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +12 -9
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -0
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +8 -5
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +4 -4
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.d.ts → schemaBasedEncode.d.ts} +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.js → schemaBasedEncode.js} +4 -5
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.js +15 -15
- package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +3 -2
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +7 -6
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +12 -14
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +5 -6
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +19 -19
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -0
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +3 -1
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +21 -0
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -0
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js +57 -0
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -0
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.js +1 -2
- package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/deltaUtils.js +1 -1
- package/dist/feature-libraries/deltaUtils.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +5 -5
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -2
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +5 -4
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +12 -9
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +4 -4
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +4 -5
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +2 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +9 -7
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.js +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/dist/feature-libraries/initializeForest.d.ts +18 -0
- package/dist/feature-libraries/initializeForest.d.ts.map +1 -0
- package/dist/feature-libraries/initializeForest.js +35 -0
- package/dist/feature-libraries/initializeForest.js.map +1 -0
- package/dist/feature-libraries/modular-schema/comparison.js +4 -4
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.js +2 -3
- package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +4 -4
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +5 -5
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +13 -19
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/node-identifier/index.d.ts +8 -0
- package/dist/feature-libraries/node-identifier/index.d.ts.map +1 -0
- package/dist/feature-libraries/node-identifier/index.js +16 -0
- package/dist/feature-libraries/node-identifier/index.js.map +1 -0
- package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts +22 -0
- package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -0
- package/dist/feature-libraries/{node-key/mockNodeKeyManager.js → node-identifier/mockNodeIdentifierManager.js} +18 -18
- package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -0
- package/dist/feature-libraries/node-identifier/nodeIdentifier.d.ts +38 -0
- package/dist/feature-libraries/node-identifier/nodeIdentifier.d.ts.map +1 -0
- package/dist/feature-libraries/node-identifier/nodeIdentifier.js +26 -0
- package/dist/feature-libraries/node-identifier/nodeIdentifier.js.map +1 -0
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.d.ts +37 -0
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.d.ts.map +1 -0
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js +48 -0
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -0
- package/dist/feature-libraries/object-forest/objectForest.d.ts +2 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +7 -3
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +2 -1
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +16 -17
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +1 -1
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +1 -1
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.js +5 -6
- package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts +15 -16
- package/dist/jsonDomainSchema.d.ts.map +1 -1
- package/dist/jsonDomainSchema.js +10 -5
- package/dist/jsonDomainSchema.js.map +1 -1
- package/dist/legacy.d.ts +5 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +5 -1
- package/dist/serializableDomainSchema.d.ts +8 -14
- package/dist/serializableDomainSchema.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +3 -18
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +1 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +2 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +4 -3
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +4 -4
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +1 -0
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +27 -19
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +1 -2
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +2 -2
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/treeApiAlpha.d.ts +9 -30
- package/dist/shared-tree/treeApiAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeApiAlpha.js +22 -34
- package/dist/shared-tree/treeApiAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +2 -2
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +4 -3
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +2 -2
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +37 -31
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/sharedTreeAttributes.d.ts +18 -0
- package/dist/sharedTreeAttributes.d.ts.map +1 -0
- package/dist/sharedTreeAttributes.js +25 -0
- package/dist/sharedTreeAttributes.js.map +1 -0
- package/dist/simple-tree/api/conciseTree.d.ts +8 -2
- package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/conciseTree.js +10 -1
- package/dist/simple-tree/api/conciseTree.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +3 -3
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/customTree.d.ts +42 -12
- package/dist/simple-tree/api/customTree.d.ts.map +1 -1
- package/dist/simple-tree/api/customTree.js +33 -5
- package/dist/simple-tree/api/customTree.js.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts +10 -0
- package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.js +10 -0
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.d.ts +13 -43
- package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.js +13 -43
- package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +7 -6
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +8 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +2 -2
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +112 -67
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +80 -158
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +38 -23
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +26 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +40 -5
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts +19 -0
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -0
- package/dist/simple-tree/api/schemaFromSimple.js +71 -0
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -0
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +3 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +7 -6
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js +4 -3
- package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/dist/simple-tree/api/testRecursiveDomain.d.ts +10 -10
- package/dist/simple-tree/api/tree.d.ts +12 -6
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js +17 -8
- 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 +5 -20
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +102 -36
- package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.js +0 -1
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/api/verboseTree.d.ts +16 -25
- package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +19 -14
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/api/view.d.ts.map +1 -1
- package/dist/simple-tree/api/view.js +16 -17
- package/dist/simple-tree/api/view.js.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +16 -3
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +70 -147
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +5 -4
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +13 -9
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/arrayNodeTypes.d.ts +46 -0
- package/dist/simple-tree/arrayNodeTypes.d.ts.map +1 -0
- package/dist/simple-tree/arrayNodeTypes.js +30 -0
- package/dist/simple-tree/arrayNodeTypes.js.map +1 -0
- package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.js +1 -11
- package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +1 -2
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +2 -3
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +12 -5
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +36 -20
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +14 -7
- 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/unhydratedFlexTree.d.ts +2 -2
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +5 -5
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/flexList.d.ts +4 -5
- package/dist/simple-tree/flexList.d.ts.map +1 -1
- package/dist/simple-tree/flexList.js +1 -14
- package/dist/simple-tree/flexList.js.map +1 -1
- package/dist/simple-tree/index.d.ts +9 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +15 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +22 -5
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +2 -0
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/mapNode.d.ts +3 -2
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js +5 -1
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/mapNodeTypes.d.ts +46 -0
- package/dist/simple-tree/mapNodeTypes.d.ts.map +1 -0
- package/dist/simple-tree/mapNodeTypes.js +30 -0
- package/dist/simple-tree/mapNodeTypes.js.map +1 -0
- package/dist/simple-tree/objectNode.d.ts +10 -3
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +12 -5
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/objectNodeTypes.d.ts +9 -5
- package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/objectNodeTypes.js +3 -0
- package/dist/simple-tree/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/proxies.js +2 -1
- package/dist/simple-tree/proxies.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +81 -8
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +94 -5
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/{api/simpleSchema.d.ts → simpleSchema.d.ts} +55 -28
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -0
- package/dist/simple-tree/simpleSchema.js.map +1 -0
- package/dist/simple-tree/toMapTree.d.ts +4 -4
- package/dist/simple-tree/toMapTree.d.ts.map +1 -1
- package/dist/simple-tree/toMapTree.js +3 -3
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +2 -6
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/treeNodeValid.d.ts +7 -1
- package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/treeNodeValid.js +17 -10
- package/dist/simple-tree/treeNodeValid.js.map +1 -1
- package/dist/treeFactory.d.ts +0 -12
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +5 -21
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/cloneWithReplacements.d.ts +21 -0
- package/dist/util/cloneWithReplacements.d.ts.map +1 -0
- package/dist/util/cloneWithReplacements.js +38 -0
- package/dist/util/cloneWithReplacements.js.map +1 -0
- package/dist/util/idAllocator.d.ts.map +1 -1
- package/dist/util/idAllocator.js +1 -2
- package/dist/util/idAllocator.js.map +1 -1
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +4 -3
- package/dist/util/index.js.map +1 -1
- package/dist/util/referenceCounting.d.ts +18 -0
- package/dist/util/referenceCounting.d.ts.map +1 -1
- package/dist/util/referenceCounting.js.map +1 -1
- package/dist/util/typeCheck.d.ts +7 -0
- package/dist/util/typeCheck.d.ts.map +1 -1
- package/dist/util/typeCheck.js.map +1 -1
- package/dist/util/utils.d.ts +0 -1
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +1 -4
- package/dist/util/utils.js.map +1 -1
- package/lib/alpha.d.ts +32 -1
- package/lib/beta.d.ts +5 -1
- package/lib/codec/codec.d.ts +1 -1
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +1 -2
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/discriminatedUnions.d.ts.map +1 -1
- package/lib/codec/discriminatedUnions.js +2 -2
- package/lib/codec/discriminatedUnions.js.map +1 -1
- package/lib/core/forest/editableForest.d.ts +1 -14
- package/lib/core/forest/editableForest.d.ts.map +1 -1
- package/lib/core/forest/editableForest.js +0 -26
- package/lib/core/forest/editableForest.js.map +1 -1
- package/lib/core/forest/forest.d.ts +16 -3
- package/lib/core/forest/forest.d.ts.map +1 -1
- package/lib/core/forest/forest.js +4 -1
- package/lib/core/forest/forest.js.map +1 -1
- package/lib/core/forest/index.d.ts +1 -1
- package/lib/core/forest/index.d.ts.map +1 -1
- package/lib/core/forest/index.js +1 -1
- package/lib/core/forest/index.js.map +1 -1
- package/lib/core/index.d.ts +2 -2
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -2
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/utils.js +1 -1
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +4 -1
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +6 -2
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts +8 -3
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +14 -7
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/delta.d.ts +8 -23
- package/lib/core/tree/delta.d.ts.map +1 -1
- package/lib/core/tree/delta.js.map +1 -1
- package/lib/core/tree/deltaUtil.d.ts +3 -3
- package/lib/core/tree/deltaUtil.d.ts.map +1 -1
- package/lib/core/tree/deltaUtil.js +2 -2
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/index.d.ts +2 -2
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts +54 -1
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js +6 -0
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/core/tree/treeTextFormat.js +1 -1
- package/lib/core/tree/treeTextFormat.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +7 -5
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js +19 -9
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts +5 -23
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js +8 -5
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +3 -3
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +5 -3
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +12 -9
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -0
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +8 -5
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +3 -3
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.d.ts → schemaBasedEncode.d.ts} +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.js → schemaBasedEncode.js} +2 -3
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.js +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +3 -2
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +5 -4
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +12 -14
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +5 -6
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -0
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -0
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +21 -0
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -0
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js +53 -0
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -0
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.js +1 -2
- package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/lib/feature-libraries/deltaUtils.js +1 -1
- package/lib/feature-libraries/deltaUtils.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +5 -5
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -2
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +5 -4
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +13 -10
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +2 -2
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +6 -7
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +2 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.js +2 -2
- package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/lib/feature-libraries/initializeForest.d.ts +18 -0
- package/lib/feature-libraries/initializeForest.d.ts.map +1 -0
- package/lib/feature-libraries/initializeForest.js +31 -0
- package/lib/feature-libraries/initializeForest.js.map +1 -0
- package/lib/feature-libraries/modular-schema/comparison.js +2 -2
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.js +1 -2
- package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +5 -5
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +12 -18
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/node-identifier/index.d.ts +8 -0
- package/lib/feature-libraries/node-identifier/index.d.ts.map +1 -0
- package/lib/feature-libraries/node-identifier/index.js +8 -0
- package/lib/feature-libraries/node-identifier/index.js.map +1 -0
- package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts +22 -0
- package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -0
- package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +45 -0
- package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifier.d.ts +38 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifier.d.ts.map +1 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifier.js +22 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifier.js.map +1 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.d.ts +37 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.d.ts.map +1 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js +43 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -0
- package/lib/feature-libraries/object-forest/objectForest.d.ts +2 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +8 -4
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +2 -1
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +1 -2
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +2 -2
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +2 -2
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.js +2 -3
- package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
- package/lib/index.d.ts +5 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -3
- package/lib/index.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts +15 -16
- package/lib/jsonDomainSchema.d.ts.map +1 -1
- package/lib/jsonDomainSchema.js +11 -6
- package/lib/jsonDomainSchema.js.map +1 -1
- package/lib/legacy.d.ts +5 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +5 -1
- package/lib/serializableDomainSchema.d.ts +8 -14
- package/lib/serializableDomainSchema.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +5 -20
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +1 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +5 -4
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +4 -4
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +1 -0
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +23 -16
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +1 -2
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +2 -2
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/treeApiAlpha.d.ts +9 -30
- package/lib/shared-tree/treeApiAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeApiAlpha.js +12 -24
- package/lib/shared-tree/treeApiAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +4 -4
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +4 -3
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +2 -2
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +35 -29
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/sharedTreeAttributes.d.ts +18 -0
- package/lib/sharedTreeAttributes.d.ts.map +1 -0
- package/lib/sharedTreeAttributes.js +22 -0
- package/lib/sharedTreeAttributes.js.map +1 -0
- package/lib/simple-tree/api/conciseTree.d.ts +8 -2
- package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/conciseTree.js +9 -1
- package/lib/simple-tree/api/conciseTree.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +3 -3
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/customTree.d.ts +42 -12
- package/lib/simple-tree/api/customTree.d.ts.map +1 -1
- package/lib/simple-tree/api/customTree.js +30 -3
- package/lib/simple-tree/api/customTree.js.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts +10 -0
- package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.js +10 -0
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/getSimpleSchema.d.ts +13 -43
- package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getSimpleSchema.js +13 -43
- package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +7 -6
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +5 -3
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +112 -67
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +78 -155
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +38 -23
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +27 -2
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +40 -5
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts +19 -0
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -0
- package/lib/simple-tree/api/schemaFromSimple.js +67 -0
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -0
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +3 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +6 -6
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js +2 -1
- package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/lib/simple-tree/api/testRecursiveDomain.d.ts +10 -10
- package/lib/simple-tree/api/tree.d.ts +12 -6
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js +14 -5
- 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 +5 -20
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +102 -36
- package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.js +0 -1
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/api/verboseTree.d.ts +16 -25
- package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +16 -12
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/api/view.d.ts.map +1 -1
- package/lib/simple-tree/api/view.js +1 -2
- package/lib/simple-tree/api/view.js.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +16 -3
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +69 -146
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts +5 -4
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +7 -3
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/arrayNodeTypes.d.ts +46 -0
- package/lib/simple-tree/arrayNodeTypes.d.ts.map +1 -0
- package/lib/simple-tree/arrayNodeTypes.js +26 -0
- package/lib/simple-tree/arrayNodeTypes.js.map +1 -0
- package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
- package/lib/simple-tree/core/getOrCreateNode.js +2 -12
- package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +1 -2
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -2
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +12 -5
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +28 -14
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +14 -7
- 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/unhydratedFlexTree.d.ts +2 -2
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +2 -2
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/flexList.d.ts +4 -5
- package/lib/simple-tree/flexList.d.ts.map +1 -1
- package/lib/simple-tree/flexList.js +0 -12
- package/lib/simple-tree/flexList.js.map +1 -1
- package/lib/simple-tree/index.d.ts +9 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +5 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +22 -5
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +2 -0
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/mapNode.d.ts +3 -2
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js +5 -1
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/mapNodeTypes.d.ts +46 -0
- package/lib/simple-tree/mapNodeTypes.d.ts.map +1 -0
- package/lib/simple-tree/mapNodeTypes.js +26 -0
- package/lib/simple-tree/mapNodeTypes.js.map +1 -0
- package/lib/simple-tree/objectNode.d.ts +10 -3
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +12 -5
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/objectNodeTypes.d.ts +9 -5
- package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/objectNodeTypes.js +3 -0
- package/lib/simple-tree/objectNodeTypes.js.map +1 -1
- package/lib/simple-tree/proxies.js +2 -1
- package/lib/simple-tree/proxies.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +81 -8
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +91 -6
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/{api/simpleSchema.d.ts → simpleSchema.d.ts} +55 -28
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -0
- package/lib/simple-tree/simpleSchema.js.map +1 -0
- package/lib/simple-tree/toMapTree.d.ts +4 -4
- package/lib/simple-tree/toMapTree.d.ts.map +1 -1
- package/lib/simple-tree/toMapTree.js +2 -2
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +4 -8
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/simple-tree/treeNodeValid.d.ts +7 -1
- package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/treeNodeValid.js +14 -7
- package/lib/simple-tree/treeNodeValid.js.map +1 -1
- package/lib/treeFactory.d.ts +0 -12
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +1 -17
- package/lib/treeFactory.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/util/cloneWithReplacements.d.ts +21 -0
- package/lib/util/cloneWithReplacements.d.ts.map +1 -0
- package/lib/util/cloneWithReplacements.js +34 -0
- package/lib/util/cloneWithReplacements.js.map +1 -0
- package/lib/util/idAllocator.d.ts.map +1 -1
- package/lib/util/idAllocator.js +1 -2
- package/lib/util/idAllocator.js.map +1 -1
- package/lib/util/index.d.ts +2 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/referenceCounting.d.ts +18 -0
- package/lib/util/referenceCounting.d.ts.map +1 -1
- package/lib/util/referenceCounting.js.map +1 -1
- package/lib/util/typeCheck.d.ts +7 -0
- package/lib/util/typeCheck.d.ts.map +1 -1
- package/lib/util/typeCheck.js.map +1 -1
- package/lib/util/utils.d.ts +0 -1
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +0 -2
- package/lib/util/utils.js.map +1 -1
- package/package.json +37 -27
- package/src/codec/codec.ts +2 -2
- package/src/codec/discriminatedUnions.ts +2 -2
- package/src/core/forest/editableForest.ts +1 -52
- package/src/core/forest/forest.ts +17 -2
- package/src/core/forest/index.ts +0 -1
- package/src/core/index.ts +4 -2
- package/src/core/rebase/utils.ts +1 -1
- package/src/core/schema-stored/schema.ts +6 -2
- package/src/core/tree/anchorSet.ts +42 -12
- package/src/core/tree/delta.ts +8 -25
- package/src/core/tree/deltaUtil.ts +5 -5
- package/src/core/tree/index.ts +4 -1
- package/src/core/tree/pathTree.ts +72 -1
- package/src/core/tree/treeTextFormat.ts +1 -1
- package/src/core/tree/visitDelta.ts +38 -17
- package/src/core/tree/visitorUtils.ts +22 -36
- package/src/feature-libraries/chunked-forest/basicChunk.ts +3 -3
- package/src/feature-libraries/chunked-forest/chunkTree.ts +20 -9
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +10 -6
- package/src/feature-libraries/chunked-forest/codec/README.md +3 -3
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +3 -3
- package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +2 -2
- package/src/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.ts → schemaBasedEncode.ts} +1 -2
- package/src/feature-libraries/chunked-forest/emptyChunk.ts +1 -1
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +5 -4
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +21 -38
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -1
- package/src/feature-libraries/default-schema/index.ts +2 -0
- package/src/feature-libraries/default-schema/mappedEditBuilder.ts +68 -0
- package/src/feature-libraries/default-schema/schemaChecker.ts +1 -2
- package/src/feature-libraries/deltaUtils.ts +1 -1
- package/src/feature-libraries/flex-tree/context.ts +4 -4
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +2 -2
- package/src/feature-libraries/flex-tree/lazyField.ts +21 -12
- package/src/feature-libraries/flex-tree/lazyNode.ts +2 -2
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +5 -9
- package/src/feature-libraries/index.ts +10 -8
- package/src/feature-libraries/indexing/anchorTreeIndex.ts +4 -4
- package/src/feature-libraries/initializeForest.ts +55 -0
- package/src/feature-libraries/modular-schema/comparison.ts +2 -2
- package/src/feature-libraries/modular-schema/isNeverTree.ts +1 -2
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +1 -2
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +13 -30
- package/src/feature-libraries/node-identifier/README.md +11 -0
- package/src/feature-libraries/node-identifier/index.ts +17 -0
- package/src/feature-libraries/node-identifier/mockNodeIdentifierManager.ts +59 -0
- package/src/feature-libraries/node-identifier/nodeIdentifier.ts +50 -0
- package/src/feature-libraries/node-identifier/nodeIdentifierManager.ts +95 -0
- package/src/feature-libraries/object-forest/objectForest.ts +11 -5
- package/src/feature-libraries/schema-index/codec.ts +2 -1
- package/src/feature-libraries/sequence-field/compose.ts +2 -2
- package/src/feature-libraries/sequence-field/invert.ts +2 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +2 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +2 -2
- package/src/feature-libraries/sequence-field/utils.ts +2 -2
- package/src/feature-libraries/treeCursorUtils.ts +2 -3
- package/src/index.ts +43 -13
- package/src/jsonDomainSchema.ts +30 -11
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/checkoutFlexTreeView.ts +2 -2
- package/src/shared-tree/independentView.ts +5 -29
- package/src/shared-tree/index.ts +1 -0
- package/src/shared-tree/schematizeTree.ts +5 -4
- package/src/shared-tree/schematizingTreeView.ts +3 -3
- package/src/shared-tree/sharedTree.ts +29 -19
- package/src/shared-tree/sharedTreeChangeFamily.ts +1 -3
- package/src/shared-tree/sharedTreeEditBuilder.ts +5 -11
- package/src/shared-tree/treeApiAlpha.ts +45 -85
- package/src/shared-tree/treeCheckout.ts +4 -10
- package/src/shared-tree-core/branch.ts +5 -3
- package/src/shared-tree-core/editManager.ts +37 -45
- package/src/sharedTreeAttributes.ts +25 -0
- package/src/simple-tree/api/conciseTree.ts +25 -8
- package/src/simple-tree/api/create.ts +3 -3
- package/src/simple-tree/api/customTree.ts +60 -17
- package/src/simple-tree/api/getJsonSchema.ts +10 -0
- package/src/simple-tree/api/getSimpleSchema.ts +14 -44
- package/src/simple-tree/api/index.ts +17 -12
- package/src/simple-tree/api/schemaCreationUtilities.ts +1 -2
- package/src/simple-tree/api/schemaFactory.ts +179 -118
- package/src/simple-tree/api/schemaFactoryAlpha.ts +74 -67
- package/src/simple-tree/api/schemaFactoryRecursive.ts +44 -12
- package/src/simple-tree/api/schemaFromSimple.ts +96 -0
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +7 -7
- package/src/simple-tree/api/simpleTreeIndex.ts +2 -1
- package/src/simple-tree/api/tree.ts +16 -11
- package/src/simple-tree/api/treeNodeApi.ts +5 -18
- package/src/simple-tree/api/typesUnsafe.ts +166 -48
- package/src/simple-tree/api/verboseTree.ts +45 -57
- package/src/simple-tree/api/view.ts +1 -2
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +80 -185
- package/src/simple-tree/arrayNode.ts +20 -14
- package/src/simple-tree/arrayNodeTypes.ts +93 -0
- package/src/simple-tree/core/getOrCreateNode.ts +3 -13
- package/src/simple-tree/core/index.ts +1 -1
- package/src/simple-tree/core/treeNodeKernel.ts +32 -18
- package/src/simple-tree/core/treeNodeSchema.ts +14 -8
- package/src/simple-tree/core/unhydratedFlexTree.ts +4 -4
- package/src/simple-tree/flexList.ts +4 -14
- package/src/simple-tree/index.ts +36 -9
- package/src/simple-tree/leafNodeSchema.ts +28 -7
- package/src/simple-tree/mapNode.ts +13 -11
- package/src/simple-tree/mapNodeTypes.ts +90 -0
- package/src/simple-tree/objectNode.ts +40 -13
- package/src/simple-tree/objectNodeTypes.ts +21 -16
- package/src/simple-tree/proxies.ts +2 -2
- package/src/simple-tree/schemaTypes.ts +153 -23
- package/src/simple-tree/{api/simpleSchema.ts → simpleSchema.ts} +67 -28
- package/src/simple-tree/toMapTree.ts +8 -8
- package/src/simple-tree/toStoredSchema.ts +4 -7
- package/src/simple-tree/treeNodeValid.ts +17 -7
- package/src/treeFactory.ts +1 -19
- package/src/util/cloneWithReplacements.ts +41 -0
- package/src/util/idAllocator.ts +1 -3
- package/src/util/index.ts +2 -1
- package/src/util/referenceCounting.ts +18 -1
- package/src/util/typeCheck.ts +7 -0
- package/src/util/utils.ts +0 -3
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +0 -1
- package/dist/feature-libraries/node-key/index.d.ts +0 -8
- package/dist/feature-libraries/node-key/index.d.ts.map +0 -1
- package/dist/feature-libraries/node-key/index.js +0 -16
- package/dist/feature-libraries/node-key/index.js.map +0 -1
- package/dist/feature-libraries/node-key/mockNodeKeyManager.d.ts +0 -22
- package/dist/feature-libraries/node-key/mockNodeKeyManager.d.ts.map +0 -1
- package/dist/feature-libraries/node-key/mockNodeKeyManager.js.map +0 -1
- package/dist/feature-libraries/node-key/nodeKey.d.ts +0 -38
- package/dist/feature-libraries/node-key/nodeKey.d.ts.map +0 -1
- package/dist/feature-libraries/node-key/nodeKey.js +0 -26
- package/dist/feature-libraries/node-key/nodeKey.js.map +0 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +0 -37
- package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +0 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.js +0 -48
- package/dist/feature-libraries/node-key/nodeKeyManager.js.map +0 -1
- package/dist/simple-tree/api/simpleSchema.d.ts.map +0 -1
- package/dist/simple-tree/api/simpleSchema.js.map +0 -1
- package/dist/simple-tree/core/schemaCaching.d.ts +0 -16
- package/dist/simple-tree/core/schemaCaching.d.ts.map +0 -1
- package/dist/simple-tree/core/schemaCaching.js +0 -32
- package/dist/simple-tree/core/schemaCaching.js.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +0 -1
- package/lib/feature-libraries/node-key/index.d.ts +0 -8
- package/lib/feature-libraries/node-key/index.d.ts.map +0 -1
- package/lib/feature-libraries/node-key/index.js +0 -8
- package/lib/feature-libraries/node-key/index.js.map +0 -1
- package/lib/feature-libraries/node-key/mockNodeKeyManager.d.ts +0 -22
- package/lib/feature-libraries/node-key/mockNodeKeyManager.d.ts.map +0 -1
- package/lib/feature-libraries/node-key/mockNodeKeyManager.js +0 -45
- package/lib/feature-libraries/node-key/mockNodeKeyManager.js.map +0 -1
- package/lib/feature-libraries/node-key/nodeKey.d.ts +0 -38
- package/lib/feature-libraries/node-key/nodeKey.d.ts.map +0 -1
- package/lib/feature-libraries/node-key/nodeKey.js +0 -22
- package/lib/feature-libraries/node-key/nodeKey.js.map +0 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +0 -37
- package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +0 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.js +0 -43
- package/lib/feature-libraries/node-key/nodeKeyManager.js.map +0 -1
- package/lib/simple-tree/api/simpleSchema.d.ts.map +0 -1
- package/lib/simple-tree/api/simpleSchema.js.map +0 -1
- package/lib/simple-tree/core/schemaCaching.d.ts +0 -16
- package/lib/simple-tree/core/schemaCaching.d.ts.map +0 -1
- package/lib/simple-tree/core/schemaCaching.js +0 -27
- package/lib/simple-tree/core/schemaCaching.js.map +0 -1
- package/prettier.config.cjs +0 -8
- package/src/feature-libraries/node-key/README.md +0 -11
- package/src/feature-libraries/node-key/index.ts +0 -17
- package/src/feature-libraries/node-key/mockNodeKeyManager.ts +0 -54
- package/src/feature-libraries/node-key/nodeKey.ts +0 -47
- package/src/feature-libraries/node-key/nodeKeyManager.ts +0 -93
- package/src/simple-tree/core/schemaCaching.ts +0 -35
- /package/dist/simple-tree/{api/simpleSchema.js → simpleSchema.js} +0 -0
- /package/lib/simple-tree/{api/simpleSchema.js → simpleSchema.js} +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
7
7
|
|
|
8
|
-
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
|
+
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
9
9
|
|
|
10
10
|
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
11
11
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
@@ -17,16 +17,24 @@ import {
|
|
|
17
17
|
ReferenceCountedBase,
|
|
18
18
|
brand,
|
|
19
19
|
brandedSlot,
|
|
20
|
-
fail,
|
|
21
20
|
getOrAddEmptyToMap,
|
|
22
21
|
getOrCreate,
|
|
23
22
|
} from "../../util/index.js";
|
|
24
23
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
25
24
|
|
|
26
25
|
import type * as Delta from "./delta.js";
|
|
27
|
-
import
|
|
26
|
+
import {
|
|
27
|
+
isDetachedUpPathRoot,
|
|
28
|
+
type INormalizedUpPath,
|
|
29
|
+
type NormalizedUpPath,
|
|
30
|
+
type PlaceIndex,
|
|
31
|
+
type Range,
|
|
32
|
+
type UpPath,
|
|
33
|
+
} from "./pathTree.js";
|
|
28
34
|
import { EmptyKey } from "./types.js";
|
|
29
35
|
import type { DeltaVisitor } from "./visitDelta.js";
|
|
36
|
+
import { offsetDetachId } from "./deltaUtil.js";
|
|
37
|
+
import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
30
38
|
|
|
31
39
|
/**
|
|
32
40
|
* A way to refer to a particular tree location within an {@link AnchorSet}.
|
|
@@ -198,7 +206,7 @@ export interface AnchorSetRootEvents {
|
|
|
198
206
|
/**
|
|
199
207
|
* Node in a tree of anchors.
|
|
200
208
|
*/
|
|
201
|
-
export interface AnchorNode extends
|
|
209
|
+
export interface AnchorNode extends INormalizedUpPath<AnchorNode> {
|
|
202
210
|
/**
|
|
203
211
|
* Events for this anchor node.
|
|
204
212
|
*/
|
|
@@ -569,6 +577,13 @@ export class AnchorSet implements AnchorLocator {
|
|
|
569
577
|
node.parentIndex += destination.parentIndex - coupleInfo.startParentIndex;
|
|
570
578
|
node.parentPath = destinationPath;
|
|
571
579
|
node.parentField = destination.parentField;
|
|
580
|
+
// If the destination is a detached root, propagate its detachedNodeId, otherwise remove any existing one
|
|
581
|
+
node.detachedNodeId = isDetachedUpPathRoot(destination)
|
|
582
|
+
? offsetDetachId(
|
|
583
|
+
destination.detachedNodeId,
|
|
584
|
+
node.parentIndex - destination.parentIndex,
|
|
585
|
+
)
|
|
586
|
+
: undefined;
|
|
572
587
|
}
|
|
573
588
|
|
|
574
589
|
// Update new parent to add children
|
|
@@ -821,25 +836,34 @@ export class AnchorSet implements AnchorLocator {
|
|
|
821
836
|
this.anchorSet.moveChildren(sourcePath, destinationPath, count);
|
|
822
837
|
this.depthThresholdForSubtreeChanged = this.currentDepth;
|
|
823
838
|
},
|
|
824
|
-
detach(
|
|
839
|
+
detach(
|
|
840
|
+
source: Range,
|
|
841
|
+
destination: FieldKey,
|
|
842
|
+
detachedNodeId: Delta.DetachedNodeId,
|
|
843
|
+
): void {
|
|
825
844
|
this.notifyChildrenChanging();
|
|
826
|
-
this.detachEdit(source, destination);
|
|
845
|
+
this.detachEdit(source, destination, detachedNodeId);
|
|
827
846
|
this.notifyChildrenChanged();
|
|
828
847
|
},
|
|
829
|
-
detachEdit(
|
|
848
|
+
detachEdit(
|
|
849
|
+
source: Range,
|
|
850
|
+
destination: FieldKey,
|
|
851
|
+
detachedNodeId: Delta.DetachedNodeId,
|
|
852
|
+
): void {
|
|
830
853
|
assert(
|
|
831
854
|
this.parentField !== undefined,
|
|
832
855
|
0x7a5 /* Must be in a field in order to detach */,
|
|
833
856
|
);
|
|
834
|
-
const sourcePath = {
|
|
857
|
+
const sourcePath: UpPath = {
|
|
835
858
|
parent: this.parent,
|
|
836
859
|
parentField: this.parentField,
|
|
837
860
|
parentIndex: source.start,
|
|
838
861
|
};
|
|
839
|
-
const destinationPath = {
|
|
862
|
+
const destinationPath: NormalizedUpPath = {
|
|
840
863
|
parent: this.anchorSet.root,
|
|
841
864
|
parentField: destination,
|
|
842
865
|
parentIndex: 0,
|
|
866
|
+
detachedNodeId,
|
|
843
867
|
};
|
|
844
868
|
this.anchorSet.moveChildren(sourcePath, destinationPath, source.end - source.start);
|
|
845
869
|
this.depthThresholdForSubtreeChanged = this.currentDepth;
|
|
@@ -848,9 +872,10 @@ export class AnchorSet implements AnchorLocator {
|
|
|
848
872
|
newContentSource: FieldKey,
|
|
849
873
|
range: Range,
|
|
850
874
|
oldContentDestination: FieldKey,
|
|
875
|
+
destinationDetachedNodeId: Delta.DetachedNodeId,
|
|
851
876
|
): void {
|
|
852
877
|
this.notifyChildrenChanging();
|
|
853
|
-
this.detachEdit(range, oldContentDestination);
|
|
878
|
+
this.detachEdit(range, oldContentDestination, destinationDetachedNodeId);
|
|
854
879
|
this.attachEdit(newContentSource, range.end - range.start, range.start);
|
|
855
880
|
this.notifyChildrenChanged();
|
|
856
881
|
},
|
|
@@ -864,7 +889,7 @@ export class AnchorSet implements AnchorLocator {
|
|
|
864
889
|
count,
|
|
865
890
|
);
|
|
866
891
|
},
|
|
867
|
-
create(content:
|
|
892
|
+
create(content: ITreeCursorSynchronous[], destination: FieldKey): void {
|
|
868
893
|
// Nothing to do since content can only be created in a new detached field,
|
|
869
894
|
// which cannot contain any anchors.
|
|
870
895
|
},
|
|
@@ -969,7 +994,7 @@ enum Status {
|
|
|
969
994
|
* 2. refcount is non-zero.
|
|
970
995
|
* 3. events are registered.
|
|
971
996
|
*/
|
|
972
|
-
class PathNode extends ReferenceCountedBase implements
|
|
997
|
+
class PathNode extends ReferenceCountedBase implements AnchorNode {
|
|
973
998
|
public status: Status = Status.Alive;
|
|
974
999
|
/**
|
|
975
1000
|
* Event emitter for this anchor.
|
|
@@ -992,6 +1017,11 @@ class PathNode extends ReferenceCountedBase implements UpPath<PathNode>, AnchorN
|
|
|
992
1017
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
993
1018
|
public readonly slots: BrandedMapSubset<AnchorSlot<any>> = new Map();
|
|
994
1019
|
|
|
1020
|
+
/**
|
|
1021
|
+
* {@inheritdoc UpPath.detachedNodeId}
|
|
1022
|
+
*/
|
|
1023
|
+
public detachedNodeId: Delta.DetachedNodeId | undefined;
|
|
1024
|
+
|
|
995
1025
|
/**
|
|
996
1026
|
* Construct a PathNode with refcount 1.
|
|
997
1027
|
* @param anchorSet - used to determine if this PathNode is already part of a specific anchorSet
|
package/src/core/tree/delta.ts
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { RevisionTag } from "../rebase/index.js";
|
|
7
7
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
8
|
-
|
|
9
|
-
import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
8
|
+
import type { TreeChunk } from "./chunk.js";
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* This format describes changes that must be applied to a forest in order to update it.
|
|
@@ -70,7 +69,7 @@ import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
|
70
69
|
* Represents the change made to a document.
|
|
71
70
|
* Immutable, therefore safe to retain for async processing.
|
|
72
71
|
*/
|
|
73
|
-
export interface Root<
|
|
72
|
+
export interface Root<TTrees = ProtoNodes> {
|
|
74
73
|
/**
|
|
75
74
|
* Changes to apply to the root fields.
|
|
76
75
|
*/
|
|
@@ -83,7 +82,7 @@ export interface Root<TTree = ProtoNode> {
|
|
|
83
82
|
* For example, if one wishes to build a tree which is being renamed from ID A to ID B,
|
|
84
83
|
* then the build should be listed under ID A.
|
|
85
84
|
*/
|
|
86
|
-
readonly build?: readonly DetachedNodeBuild<
|
|
85
|
+
readonly build?: readonly DetachedNodeBuild<TTrees>[];
|
|
87
86
|
/**
|
|
88
87
|
* New detached nodes to be destroyed.
|
|
89
88
|
* The ordering has no significance.
|
|
@@ -97,7 +96,7 @@ export interface Root<TTree = ProtoNode> {
|
|
|
97
96
|
* Refreshers for detached nodes that may need to be recreated.
|
|
98
97
|
* The ordering has no significance.
|
|
99
98
|
*/
|
|
100
|
-
readonly refreshers?: readonly DetachedNodeBuild<
|
|
99
|
+
readonly refreshers?: readonly DetachedNodeBuild<TTrees>[];
|
|
101
100
|
/**
|
|
102
101
|
* Changes to apply to detached nodes.
|
|
103
102
|
* The ordering has no significance.
|
|
@@ -117,25 +116,9 @@ export interface Root<TTree = ProtoNode> {
|
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
/**
|
|
120
|
-
* The default representation for inserted content.
|
|
121
|
-
*
|
|
122
|
-
* TODO:
|
|
123
|
-
* Ownership and lifetime of data referenced by this cursor is unclear,
|
|
124
|
-
* so it is a poor abstraction for this use-case which needs to hold onto the data in a non-exclusive (readonly) way.
|
|
125
|
-
* Cursors can be one supported way to input data, but aren't a good storage format.
|
|
126
|
-
*/
|
|
127
|
-
export type ProtoNode = ITreeCursorSynchronous;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* The default representation a chunk (sub-sequence) of inserted content.
|
|
131
|
-
*
|
|
132
|
-
* TODO:
|
|
133
|
-
* See issue TODO with ProtoNode.
|
|
134
|
-
* Additionally, Cursors support sequences, so if using cursors, there are better ways to handle this than an array of cursors,
|
|
135
|
-
* like using a cursor over all the content (starting in fields mode).
|
|
136
|
-
* Long term something like TreeChunk should probably be used here.
|
|
119
|
+
* The default representation for a chunk (sub-sequence) of inserted content.
|
|
137
120
|
*/
|
|
138
|
-
export type ProtoNodes =
|
|
121
|
+
export type ProtoNodes = TreeChunk;
|
|
139
122
|
|
|
140
123
|
/**
|
|
141
124
|
* Represents a change being made to a part of the document tree.
|
|
@@ -192,9 +175,9 @@ export interface DetachedNodeChanges {
|
|
|
192
175
|
* Tree creation is idempotent: if a tree with the same ID already exists,
|
|
193
176
|
* then this build is ignored in favor of the existing tree.
|
|
194
177
|
*/
|
|
195
|
-
export interface DetachedNodeBuild<
|
|
178
|
+
export interface DetachedNodeBuild<TTrees = ProtoNodes> {
|
|
196
179
|
readonly id: DetachedNodeId;
|
|
197
|
-
readonly trees:
|
|
180
|
+
readonly trees: TTrees;
|
|
198
181
|
}
|
|
199
182
|
|
|
200
183
|
/**
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
import type { Mutable } from "../../util/index.js";
|
|
7
7
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
8
|
+
import type { TreeChunk } from "./chunk.js";
|
|
8
9
|
|
|
9
|
-
import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
10
10
|
import type { DetachedNodeId, FieldChanges, Mark, Root } from "./delta.js";
|
|
11
11
|
import { rootFieldKey } from "./types.js";
|
|
12
12
|
|
|
13
|
-
export const emptyDelta: Root
|
|
13
|
+
export const emptyDelta: Root = {};
|
|
14
14
|
|
|
15
15
|
export function isAttachMark(mark: Mark): boolean {
|
|
16
16
|
return mark.attach !== undefined && mark.detach === undefined;
|
|
@@ -24,15 +24,15 @@ export function isReplaceMark(mark: Mark): boolean {
|
|
|
24
24
|
return mark.detach !== undefined && mark.attach !== undefined;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export function deltaForRootInitialization(content:
|
|
28
|
-
if (content.
|
|
27
|
+
export function deltaForRootInitialization(content: TreeChunk): Root {
|
|
28
|
+
if (content.topLevelLength === 0) {
|
|
29
29
|
return emptyDelta;
|
|
30
30
|
}
|
|
31
31
|
const buildId = { minor: 0 };
|
|
32
32
|
const delta: Root = {
|
|
33
33
|
build: [{ id: buildId, trees: content }],
|
|
34
34
|
fields: new Map<FieldKey, FieldChanges>([
|
|
35
|
-
[rootFieldKey, [{ count: content.
|
|
35
|
+
[rootFieldKey, [{ count: content.topLevelLength, attach: buildId }]],
|
|
36
36
|
]),
|
|
37
37
|
};
|
|
38
38
|
return delta;
|
package/src/core/tree/index.ts
CHANGED
|
@@ -33,7 +33,6 @@ export {
|
|
|
33
33
|
export type {
|
|
34
34
|
ProtoNodes,
|
|
35
35
|
Root as DeltaRoot,
|
|
36
|
-
ProtoNode as DeltaProtoNode,
|
|
37
36
|
Mark as DeltaMark,
|
|
38
37
|
DetachedNodeId as DeltaDetachedNodeId,
|
|
39
38
|
FieldMap as DeltaFieldMap,
|
|
@@ -49,6 +48,9 @@ export {
|
|
|
49
48
|
topDownPath,
|
|
50
49
|
getDepth,
|
|
51
50
|
type UpPath,
|
|
51
|
+
type NormalizedUpPath,
|
|
52
|
+
type INormalizedUpPath,
|
|
53
|
+
type NormalizedFieldUpPath,
|
|
52
54
|
type FieldUpPath,
|
|
53
55
|
type Range,
|
|
54
56
|
type RangeUpPath,
|
|
@@ -57,6 +59,7 @@ export {
|
|
|
57
59
|
type NodeIndex,
|
|
58
60
|
compareUpPaths,
|
|
59
61
|
compareFieldUpPaths,
|
|
62
|
+
isDetachedUpPathRoot as isDetachedUpPath,
|
|
60
63
|
getDetachedFieldContainingPath,
|
|
61
64
|
type UpPathDefault,
|
|
62
65
|
} from "./pathTree.js";
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
7
|
+
import type { DetachedNodeId } from "./delta.js";
|
|
7
8
|
|
|
8
9
|
import { type DetachedField, keyAsDetachedField } from "./types.js";
|
|
9
10
|
|
|
@@ -41,12 +42,73 @@ export interface UpPath<TParent = UpPathDefault> {
|
|
|
41
42
|
readonly parentIndex: NodeIndex;
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Identical to {@link INormalizedUpPath}, but a duplicate declaration is needed to make the default type parameter compile.
|
|
47
|
+
*/
|
|
48
|
+
export type INormalizedUpPathDefault = INormalizedUpPath;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Identical to {@link UpPath}, but a with a {@link DetachedNodeId} to specify the ID of detached roots.
|
|
52
|
+
* Note that document roots (i.e., any node in the root field) are not considered detached roots and therefore do not have an associated ID.
|
|
53
|
+
*
|
|
54
|
+
* Use this interface for implementing a class that needs to be used as a {@link NormalizedUpPath}.
|
|
55
|
+
*/
|
|
56
|
+
export interface INormalizedUpPath<TParent = INormalizedUpPathDefault>
|
|
57
|
+
extends UpPath<TParent> {
|
|
58
|
+
readonly detachedNodeId: DetachedNodeId | undefined;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Identical to {@link UpPath}, but a with a {@link DetachedNodeId} to specify the ID of detached roots.
|
|
63
|
+
* Note that document roots (i.e., any node in the root field) are not considered detached roots and therefore do not have an associated ID.
|
|
64
|
+
*
|
|
65
|
+
* Prefer this type over {@link INormalizedUpPath} except when implementing a class that needs to be used as a {@link NormalizedUpPath}.
|
|
66
|
+
*/
|
|
67
|
+
export type NormalizedUpPath =
|
|
68
|
+
| INormalizedUpPath<NormalizedUpPath>
|
|
69
|
+
| NormalizedUpPathInterior<NormalizedUpPath>
|
|
70
|
+
| NormalizedUpPathRoot;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The root element of a {@link NormalizedUpPath}.
|
|
74
|
+
*/
|
|
75
|
+
export interface NormalizedUpPathRoot extends UpPath<undefined> {
|
|
76
|
+
/**
|
|
77
|
+
* The ID associated with this node if it is a detached root.
|
|
78
|
+
*/
|
|
79
|
+
readonly detachedNodeId: DetachedNodeId | undefined;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Identical to {@link NormalizedUpPathInterior}, but a duplicate declaration is needed to make the default type parameter compile.
|
|
84
|
+
*/
|
|
85
|
+
export type NormalizedUpPathInteriorDefault = NormalizedUpPathInterior;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* An interior (i.e., non-root) element of a {@link NormalizedUpPath}.
|
|
89
|
+
*/
|
|
90
|
+
export interface NormalizedUpPathInterior<
|
|
91
|
+
TParent = NormalizedUpPathInteriorDefault | NormalizedUpPathRoot,
|
|
92
|
+
> extends UpPath<TParent> {
|
|
93
|
+
/**
|
|
94
|
+
* The parent.
|
|
95
|
+
*/
|
|
96
|
+
readonly parent: TParent;
|
|
97
|
+
}
|
|
98
|
+
|
|
44
99
|
/**
|
|
45
100
|
* Path from a field in the tree upward.
|
|
46
101
|
*
|
|
47
102
|
* See {@link UpPath}.
|
|
48
103
|
*/
|
|
49
|
-
export
|
|
104
|
+
export type NormalizedFieldUpPath<TParent = NormalizedUpPath> = FieldUpPath<TParent>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Path from a field in the tree upward.
|
|
108
|
+
*
|
|
109
|
+
* See {@link FieldUpPath} and {@link NormalizedUpPath}.
|
|
110
|
+
*/
|
|
111
|
+
export interface FieldUpPath<TUpPath = UpPath> {
|
|
50
112
|
/**
|
|
51
113
|
* The parent, or undefined in the case where this path is to a detached sequence.
|
|
52
114
|
*/
|
|
@@ -59,6 +121,15 @@ export interface FieldUpPath<TUpPath extends UpPath = UpPath> {
|
|
|
59
121
|
readonly field: FieldKey; // TODO: Type information, including when in DetachedField.
|
|
60
122
|
}
|
|
61
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Given an {@link UpPath}, checks if it is a path to a detached root.
|
|
126
|
+
*/
|
|
127
|
+
export function isDetachedUpPathRoot<T>(
|
|
128
|
+
path: UpPath<T> | NormalizedUpPath,
|
|
129
|
+
): path is NormalizedUpPathRoot {
|
|
130
|
+
return (path as NormalizedUpPathRoot).detachedNodeId !== undefined;
|
|
131
|
+
}
|
|
132
|
+
|
|
62
133
|
/**
|
|
63
134
|
* Delimits the extend of a range.
|
|
64
135
|
*/
|
|
@@ -8,12 +8,8 @@ import { assert } from "@fluidframework/core-utils/internal";
|
|
|
8
8
|
import { type NestedMap, setInNestedMap, tryGetFromNestedMap } from "../../util/index.js";
|
|
9
9
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
10
10
|
|
|
11
|
-
import type
|
|
12
|
-
// eslint-disable-next-line import/no-duplicates
|
|
11
|
+
import { mapCursorField, type ITreeCursorSynchronous } from "./cursor.js";
|
|
13
12
|
import type * as Delta from "./delta.js";
|
|
14
|
-
// Since ProtoNodes is reexported, import it directly to avoid forcing Delta to be reexported.
|
|
15
|
-
// eslint-disable-next-line import/no-duplicates
|
|
16
|
-
import type { ProtoNodes } from "./delta.js";
|
|
17
13
|
import {
|
|
18
14
|
areDetachedNodeIdsEqual,
|
|
19
15
|
isAttachMark,
|
|
@@ -24,7 +20,7 @@ import {
|
|
|
24
20
|
import type { DetachedFieldIndex } from "./detachedFieldIndex.js";
|
|
25
21
|
import type { ForestRootId, Major, Minor } from "./detachedFieldIndexTypes.js";
|
|
26
22
|
import type { NodeIndex, PlaceIndex, Range } from "./pathTree.js";
|
|
27
|
-
import type { RevisionTag } from "../index.js";
|
|
23
|
+
import type { RevisionTag, TreeChunk } from "../index.js";
|
|
28
24
|
|
|
29
25
|
/**
|
|
30
26
|
* Implementation notes:
|
|
@@ -59,7 +55,7 @@ import type { RevisionTag } from "../index.js";
|
|
|
59
55
|
* This needs to happen last to allow modifications to detached roots to be applied before they are destroyed.
|
|
60
56
|
*
|
|
61
57
|
* The details of the delta visit algorithm can impact how/when events are emitted by the objects that own the visitors.
|
|
62
|
-
* For example, as of 2024-03-27, the
|
|
58
|
+
* For example, as of 2024-03-27, the subtreeChanged event of an AnchorNode is emitted when exiting a node during a
|
|
63
59
|
* delta visit, and thus the two-pass nature of the algorithm means the event fires twice for any given change.
|
|
64
60
|
* This two-pass nature also means that the event may fire at a time where no change is visible in the tree. E.g.,
|
|
65
61
|
* if a node is being replaced, when the event fires during the detach pass no change in the tree has happened so the
|
|
@@ -89,9 +85,10 @@ export function visitDelta(
|
|
|
89
85
|
const rootDestructions: Delta.DetachedNodeDestruction[] = [];
|
|
90
86
|
const refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous> = new Map();
|
|
91
87
|
delta.refreshers?.forEach(({ id: { major, minor }, trees }) => {
|
|
92
|
-
|
|
88
|
+
const treeCursors = nodeCursorsFromChunk(trees);
|
|
89
|
+
for (let i = 0; i < trees.topLevelLength; i += 1) {
|
|
93
90
|
const offsettedId = minor + i;
|
|
94
|
-
setInNestedMap(refreshers, major, offsettedId,
|
|
91
|
+
setInNestedMap(refreshers, major, offsettedId, treeCursors[i]);
|
|
95
92
|
}
|
|
96
93
|
});
|
|
97
94
|
const detachConfig: PassConfig = {
|
|
@@ -236,7 +233,7 @@ function transferRoots(
|
|
|
236
233
|
const oldField = detachedFieldIndex.toFieldKey(oldRootId);
|
|
237
234
|
const newField = detachedFieldIndex.toFieldKey(newRootId);
|
|
238
235
|
visitor.enterField(oldField);
|
|
239
|
-
visitor.detach({ start: 0, end: 1 }, newField);
|
|
236
|
+
visitor.detach({ start: 0, end: 1 }, newField, newId);
|
|
240
237
|
visitor.exitField(oldField);
|
|
241
238
|
detachedFieldIndex.deleteEntry(oldId);
|
|
242
239
|
}
|
|
@@ -266,7 +263,7 @@ export interface DeltaVisitor {
|
|
|
266
263
|
* @param destination - The key for a new detached field.
|
|
267
264
|
* A field with this key must not already exist.
|
|
268
265
|
*/
|
|
269
|
-
create(content:
|
|
266
|
+
create(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void;
|
|
270
267
|
/**
|
|
271
268
|
* Recursively destroys the given detached field and all of the nodes within it.
|
|
272
269
|
* @param detachedField - The key for the detached field to destroy.
|
|
@@ -287,8 +284,9 @@ export interface DeltaVisitor {
|
|
|
287
284
|
* @param source - The bounds of the range of nodes to detach.
|
|
288
285
|
* @param destination - The key for a new detached field.
|
|
289
286
|
* A field with this key must not already exist.
|
|
287
|
+
* @param id - The ID assigned to the first detached node as a result of the detach. The other nodes in the detached range are assigned subsequent IDs.
|
|
290
288
|
*/
|
|
291
|
-
detach(source: Range, destination: FieldKey): void;
|
|
289
|
+
detach(source: Range, destination: FieldKey, id: Delta.DetachedNodeId): void;
|
|
292
290
|
/**
|
|
293
291
|
* Replaces a range of nodes in the current field by transferring them out to a new detached field
|
|
294
292
|
* and transferring in all the nodes from an existing detached field in their place.
|
|
@@ -296,8 +294,14 @@ export interface DeltaVisitor {
|
|
|
296
294
|
* @param newContentSource - The detached field to transfer the new nodes from.
|
|
297
295
|
* @param range - The bounds of the range of nodes to replace.
|
|
298
296
|
* @param oldContentDestination - The key for a new detached field to transfer the old nodes to.
|
|
297
|
+
* @param oldContentId - The ID assigned to the first replaced node as a result of the replace. The other nodes in the replaced range are assigned subsequent IDs.
|
|
299
298
|
*/
|
|
300
|
-
replace(
|
|
299
|
+
replace(
|
|
300
|
+
newContentSource: FieldKey,
|
|
301
|
+
range: Range,
|
|
302
|
+
oldContentDestination: FieldKey,
|
|
303
|
+
oldContentId: Delta.DetachedNodeId,
|
|
304
|
+
): void;
|
|
301
305
|
|
|
302
306
|
/**
|
|
303
307
|
* Tells the visitor that it should update its "current location" to be the Node at the specified index
|
|
@@ -444,7 +448,7 @@ function detachPass(
|
|
|
444
448
|
config.attachPassRoots.set(root, mark.fields);
|
|
445
449
|
}
|
|
446
450
|
const field = config.detachedFieldIndex.toFieldKey(root);
|
|
447
|
-
visitor.detach({ start: index, end: index + 1 }, field);
|
|
451
|
+
visitor.detach({ start: index, end: index + 1 }, field, id);
|
|
448
452
|
}
|
|
449
453
|
} else if (!isAttachMark(mark)) {
|
|
450
454
|
index += mark.count;
|
|
@@ -476,7 +480,13 @@ function processBuilds(
|
|
|
476
480
|
): void {
|
|
477
481
|
if (builds !== undefined) {
|
|
478
482
|
for (const { id, trees } of builds) {
|
|
479
|
-
buildTrees(
|
|
483
|
+
buildTrees(
|
|
484
|
+
id,
|
|
485
|
+
nodeCursorsFromChunk(trees),
|
|
486
|
+
config.detachedFieldIndex,
|
|
487
|
+
config.latestRevision,
|
|
488
|
+
visitor,
|
|
489
|
+
);
|
|
480
490
|
}
|
|
481
491
|
}
|
|
482
492
|
}
|
|
@@ -558,9 +568,10 @@ function attachPass(
|
|
|
558
568
|
const sourceField = config.detachedFieldIndex.toFieldKey(sourceRoot);
|
|
559
569
|
const offsetIndex = index + i;
|
|
560
570
|
if (isReplaceMark(mark)) {
|
|
571
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
572
|
+
const destinationId = offsetDetachId(mark.detach!, i);
|
|
561
573
|
const rootDestination = config.detachedFieldIndex.createEntry(
|
|
562
|
-
|
|
563
|
-
offsetDetachId(mark.detach!, i),
|
|
574
|
+
destinationId,
|
|
564
575
|
config.latestRevision,
|
|
565
576
|
);
|
|
566
577
|
const destinationField = config.detachedFieldIndex.toFieldKey(rootDestination);
|
|
@@ -568,6 +579,7 @@ function attachPass(
|
|
|
568
579
|
sourceField,
|
|
569
580
|
{ start: offsetIndex, end: offsetIndex + 1 },
|
|
570
581
|
destinationField,
|
|
582
|
+
destinationId,
|
|
571
583
|
);
|
|
572
584
|
// We may need to do a second pass on the detached nodes
|
|
573
585
|
if (mark.fields !== undefined) {
|
|
@@ -592,3 +604,12 @@ function attachPass(
|
|
|
592
604
|
}
|
|
593
605
|
}
|
|
594
606
|
}
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Converts a chunk of trees into an array of cursors.
|
|
610
|
+
*
|
|
611
|
+
* TODO: Update the visitDelta logic and downstream APIs to avoid splitting up sequences into individual nodes.
|
|
612
|
+
*/
|
|
613
|
+
function nodeCursorsFromChunk(trees: TreeChunk): ITreeCursorSynchronous[] {
|
|
614
|
+
return mapCursorField(trees.cursor(), (c) => c.fork());
|
|
615
|
+
}
|
|
@@ -10,12 +10,13 @@ import { type IdAllocator, idAllocatorFromMaxId } from "../../util/index.js";
|
|
|
10
10
|
import type { RevisionTag, RevisionTagCodec } from "../rebase/index.js";
|
|
11
11
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
12
12
|
|
|
13
|
-
import type {
|
|
13
|
+
import type { DetachedNodeId, Root } from "./delta.js";
|
|
14
14
|
import { DetachedFieldIndex } from "./detachedFieldIndex.js";
|
|
15
15
|
import type { ForestRootId } from "./detachedFieldIndexTypes.js";
|
|
16
|
-
import type {
|
|
16
|
+
import type { PlaceIndex, Range } from "./pathTree.js";
|
|
17
17
|
import { type DeltaVisitor, visitDelta } from "./visitDelta.js";
|
|
18
18
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
19
|
+
import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
19
20
|
|
|
20
21
|
export function makeDetachedFieldIndex(
|
|
21
22
|
prefix: string = "Temp",
|
|
@@ -86,21 +87,31 @@ export function combineVisitors(
|
|
|
86
87
|
announcedVisitors.forEach((v) => v.beforeAttach(source, count, destination));
|
|
87
88
|
visitors.forEach((v) => v.attach(source, count, destination));
|
|
88
89
|
announcedVisitors.forEach((v) =>
|
|
89
|
-
v.afterAttach(source, {
|
|
90
|
+
v.afterAttach(source, {
|
|
91
|
+
start: destination,
|
|
92
|
+
end: destination + count,
|
|
93
|
+
}),
|
|
90
94
|
);
|
|
91
95
|
},
|
|
92
|
-
detach: (source: Range, destination: FieldKey) => {
|
|
96
|
+
detach: (source: Range, destination: FieldKey, id: DetachedNodeId) => {
|
|
93
97
|
announcedVisitors.forEach((v) => v.beforeDetach(source, destination));
|
|
94
|
-
visitors.forEach((v) => v.detach(source, destination));
|
|
98
|
+
visitors.forEach((v) => v.detach(source, destination, id));
|
|
95
99
|
announcedVisitors.forEach((v) =>
|
|
96
100
|
v.afterDetach(source.start, source.end - source.start, destination),
|
|
97
101
|
);
|
|
98
102
|
},
|
|
99
|
-
replace: (
|
|
103
|
+
replace: (
|
|
104
|
+
newContent: FieldKey,
|
|
105
|
+
oldContent: Range,
|
|
106
|
+
oldContentDestination: FieldKey,
|
|
107
|
+
oldContentId: DetachedNodeId,
|
|
108
|
+
) => {
|
|
100
109
|
announcedVisitors.forEach((v) =>
|
|
101
110
|
v.beforeReplace(newContent, oldContent, oldContentDestination),
|
|
102
111
|
);
|
|
103
|
-
visitors.forEach((v) =>
|
|
112
|
+
visitors.forEach((v) =>
|
|
113
|
+
v.replace(newContent, oldContent, oldContentDestination, oldContentId),
|
|
114
|
+
);
|
|
104
115
|
announcedVisitors.forEach((v) =>
|
|
105
116
|
v.afterReplace(newContent, oldContent, oldContentDestination),
|
|
106
117
|
);
|
|
@@ -120,7 +131,7 @@ export interface AnnouncedVisitor extends DeltaVisitor {
|
|
|
120
131
|
/**
|
|
121
132
|
* A hook that is called after all nodes have been created.
|
|
122
133
|
*/
|
|
123
|
-
afterCreate(content:
|
|
134
|
+
afterCreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void;
|
|
124
135
|
beforeDestroy(field: FieldKey, count: number): void;
|
|
125
136
|
beforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void;
|
|
126
137
|
afterAttach(source: FieldKey, destination: Range): void;
|
|
@@ -138,34 +149,9 @@ export interface AnnouncedVisitor extends DeltaVisitor {
|
|
|
138
149
|
* Creates an announced visitor with only the provided functions and uses a no op for the rest.
|
|
139
150
|
* This is provided to make some of the delta visitor definitions cleaner.
|
|
140
151
|
*/
|
|
141
|
-
export function createAnnouncedVisitor(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
afterCreate?: (content: ProtoNodes, destination: FieldKey) => void;
|
|
145
|
-
beforeDestroy?: (field: FieldKey, count: number) => void;
|
|
146
|
-
destroy?: (detachedField: FieldKey, count: number) => void;
|
|
147
|
-
beforeAttach?: (source: FieldKey, count: number, destination: PlaceIndex) => void;
|
|
148
|
-
attach?: (source: FieldKey, count: number, destination: PlaceIndex) => void;
|
|
149
|
-
afterAttach?: (source: FieldKey, destination: Range) => void;
|
|
150
|
-
beforeDetach?: (source: Range, destination: FieldKey) => void;
|
|
151
|
-
afterDetach?: (source: PlaceIndex, count: number, destination: FieldKey) => void;
|
|
152
|
-
detach?: (source: Range, destination: FieldKey) => void;
|
|
153
|
-
beforeReplace?: (
|
|
154
|
-
newContent: FieldKey,
|
|
155
|
-
oldContent: Range,
|
|
156
|
-
oldContentDestination: FieldKey,
|
|
157
|
-
) => void;
|
|
158
|
-
replace?: (
|
|
159
|
-
newContentSource: FieldKey,
|
|
160
|
-
range: Range,
|
|
161
|
-
oldContentDestination: FieldKey,
|
|
162
|
-
) => void;
|
|
163
|
-
afterReplace?: (newContentSource: FieldKey, newContent: Range, oldContent: FieldKey) => void;
|
|
164
|
-
enterNode?: (index: NodeIndex) => void;
|
|
165
|
-
exitNode?: (index: NodeIndex) => void;
|
|
166
|
-
enterField?: (key: FieldKey) => void;
|
|
167
|
-
exitField?: (key: FieldKey) => void;
|
|
168
|
-
}): AnnouncedVisitor {
|
|
152
|
+
export function createAnnouncedVisitor(
|
|
153
|
+
visitorFunctions: Partial<AnnouncedVisitor>,
|
|
154
|
+
): AnnouncedVisitor {
|
|
169
155
|
const noOp = (): void => {};
|
|
170
156
|
return {
|
|
171
157
|
free: visitorFunctions.free ?? noOp,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert, oob } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, oob, fail } from "@fluidframework/core-utils/internal";
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
CursorLocationType,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
cursorChunk,
|
|
21
21
|
dummyRoot,
|
|
22
22
|
} from "../../core/index.js";
|
|
23
|
-
import { ReferenceCountedBase
|
|
23
|
+
import { ReferenceCountedBase } from "../../util/index.js";
|
|
24
24
|
import { SynchronousCursor, prefixPath } from "../treeCursorUtils.js";
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -84,7 +84,7 @@ export type SiblingsOrKey = readonly TreeChunk[] | readonly FieldKey[];
|
|
|
84
84
|
* Cursor over basic chunks.
|
|
85
85
|
*
|
|
86
86
|
* @remarks This implementation is similar to StackCursor, however it is distinct because:
|
|
87
|
-
* 1. The children are chunks, which might have a top level length that greater than 1.
|
|
87
|
+
* 1. The children are chunks, which might have a top level length that's greater than 1.
|
|
88
88
|
* 2. It needs to be able to delegate to cursors of other chunk formats it does not natively understand (See TODO below).
|
|
89
89
|
*
|
|
90
90
|
* TODO:
|