@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import type {
|
|
8
8
|
ErasedType,
|
|
9
9
|
IFluidHandle,
|
|
@@ -35,6 +35,7 @@ import type { ISequencedDocumentMessage } from "@fluidframework/driver-definitio
|
|
|
35
35
|
|
|
36
36
|
import { type ICodecOptions, noopValidator } from "../codec/index.js";
|
|
37
37
|
import {
|
|
38
|
+
type FieldKey,
|
|
38
39
|
type GraphCommit,
|
|
39
40
|
type IEditableForest,
|
|
40
41
|
type ITreeCursor,
|
|
@@ -93,6 +94,7 @@ import {
|
|
|
93
94
|
type CustomTreeNode,
|
|
94
95
|
type CustomTreeValue,
|
|
95
96
|
type ITreeAlpha,
|
|
97
|
+
type SimpleObjectFieldSchema,
|
|
96
98
|
} from "../simple-tree/index.js";
|
|
97
99
|
|
|
98
100
|
import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
|
|
@@ -101,7 +103,7 @@ import { SharedTreeChangeFamily } from "./sharedTreeChangeFamily.js";
|
|
|
101
103
|
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
102
104
|
import type { SharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
|
|
103
105
|
import { type TreeCheckout, type BranchableTree, createTreeCheckout } from "./treeCheckout.js";
|
|
104
|
-
import { Breakable, breakingClass,
|
|
106
|
+
import { Breakable, breakingClass, throwIfBroken } from "../util/index.js";
|
|
105
107
|
|
|
106
108
|
/**
|
|
107
109
|
* Copy of data from an {@link ITreePrivate} at some point in time.
|
|
@@ -478,14 +480,7 @@ class SharedTreeKernel extends SharedTreeCore<SharedTreeEditBuilder, SharedTreeC
|
|
|
478
480
|
}
|
|
479
481
|
|
|
480
482
|
public exportSimpleSchema(): SimpleTreeSchema {
|
|
481
|
-
return
|
|
482
|
-
...exportSimpleFieldSchemaStored(this.storedSchema.rootFieldSchema),
|
|
483
|
-
definitions: new Map(
|
|
484
|
-
[...this.storedSchema.nodeSchema].map(([key, schema]) => {
|
|
485
|
-
return [key, exportSimpleNodeSchemaStored(schema)];
|
|
486
|
-
}),
|
|
487
|
-
),
|
|
488
|
-
};
|
|
483
|
+
return exportSimpleSchema(this.storedSchema);
|
|
489
484
|
}
|
|
490
485
|
|
|
491
486
|
@throwIfBroken
|
|
@@ -572,6 +567,17 @@ class SharedTreeKernel extends SharedTreeCore<SharedTreeEditBuilder, SharedTreeC
|
|
|
572
567
|
public onDisconnect(): void {}
|
|
573
568
|
}
|
|
574
569
|
|
|
570
|
+
export function exportSimpleSchema(storedSchema: TreeStoredSchema): SimpleTreeSchema {
|
|
571
|
+
return {
|
|
572
|
+
...exportSimpleFieldSchemaStored(storedSchema.rootFieldSchema),
|
|
573
|
+
definitions: new Map(
|
|
574
|
+
[...storedSchema.nodeSchema].map(([key, schema]) => {
|
|
575
|
+
return [key, exportSimpleNodeSchemaStored(schema)];
|
|
576
|
+
}),
|
|
577
|
+
),
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
|
|
575
581
|
/**
|
|
576
582
|
* Get a {@link BranchableTree} from a {@link ITree}.
|
|
577
583
|
* @remarks The branch can be used for "version control"-style coordination of edits on the tree.
|
|
@@ -770,7 +776,7 @@ function verboseFromCursor(
|
|
|
770
776
|
const nodeSchema =
|
|
771
777
|
schema.get(reader.type) ?? fail(0xac9 /* missing schema for type in cursor */);
|
|
772
778
|
if (nodeSchema instanceof LeafNodeStoredSchema) {
|
|
773
|
-
return fields as CustomTreeValue
|
|
779
|
+
return fields as CustomTreeValue;
|
|
774
780
|
}
|
|
775
781
|
|
|
776
782
|
return {
|
|
@@ -798,30 +804,34 @@ function exportSimpleFieldSchemaStored(schema: TreeFieldStoredSchema): SimpleFie
|
|
|
798
804
|
default:
|
|
799
805
|
fail(0xaca /* invalid field kind */);
|
|
800
806
|
}
|
|
801
|
-
return { kind,
|
|
807
|
+
return { kind, allowedTypesIdentifiers: schema.types, metadata: {} };
|
|
802
808
|
}
|
|
803
809
|
|
|
804
810
|
function exportSimpleNodeSchemaStored(schema: TreeNodeStoredSchema): SimpleNodeSchema {
|
|
805
811
|
const arrayTypes = tryStoredSchemaAsArray(schema);
|
|
806
812
|
if (arrayTypes !== undefined) {
|
|
807
|
-
return { kind: NodeKind.Array,
|
|
813
|
+
return { kind: NodeKind.Array, allowedTypesIdentifiers: arrayTypes, metadata: {} };
|
|
808
814
|
}
|
|
809
815
|
if (schema instanceof ObjectNodeStoredSchema) {
|
|
810
|
-
const fields
|
|
811
|
-
for (const [
|
|
812
|
-
fields
|
|
816
|
+
const fields = new Map<FieldKey, SimpleObjectFieldSchema>();
|
|
817
|
+
for (const [storedKey, field] of schema.objectNodeFields) {
|
|
818
|
+
fields.set(storedKey, { ...exportSimpleFieldSchemaStored(field), storedKey });
|
|
813
819
|
}
|
|
814
|
-
return { kind: NodeKind.Object, fields };
|
|
820
|
+
return { kind: NodeKind.Object, fields, metadata: {} };
|
|
815
821
|
}
|
|
816
822
|
if (schema instanceof MapNodeStoredSchema) {
|
|
817
823
|
assert(
|
|
818
824
|
schema.mapFields.kind === FieldKinds.optional.identifier,
|
|
819
825
|
0xa95 /* Invalid map schema */,
|
|
820
826
|
);
|
|
821
|
-
return {
|
|
827
|
+
return {
|
|
828
|
+
kind: NodeKind.Map,
|
|
829
|
+
allowedTypesIdentifiers: schema.mapFields.types,
|
|
830
|
+
metadata: {},
|
|
831
|
+
};
|
|
822
832
|
}
|
|
823
833
|
if (schema instanceof LeafNodeStoredSchema) {
|
|
824
|
-
return { kind: NodeKind.Leaf, leafKind: schema.leafValue };
|
|
834
|
+
return { kind: NodeKind.Leaf, leafKind: schema.leafValue, metadata: {} };
|
|
825
835
|
}
|
|
826
836
|
fail(0xacb /* invalid schema kind */);
|
|
827
837
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
7
7
|
|
|
8
8
|
import type { ICodecFamily, ICodecOptions } from "../codec/index.js";
|
|
9
9
|
import {
|
|
@@ -31,7 +31,6 @@ import {
|
|
|
31
31
|
type Mutable,
|
|
32
32
|
type NestedSet,
|
|
33
33
|
addToNestedSet,
|
|
34
|
-
fail,
|
|
35
34
|
hasSingle,
|
|
36
35
|
nestedSetContains,
|
|
37
36
|
} from "../util/index.js";
|
|
@@ -87,7 +86,6 @@ export class SharedTreeChangeFamily
|
|
|
87
86
|
this.modularChangeFamily,
|
|
88
87
|
mintRevisionTag,
|
|
89
88
|
changeReceiver,
|
|
90
|
-
this.idCompressor,
|
|
91
89
|
);
|
|
92
90
|
}
|
|
93
91
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
6
|
import type {
|
|
8
7
|
ChangeFamilyEditor,
|
|
9
8
|
RevisionTag,
|
|
@@ -55,17 +54,12 @@ export class SharedTreeEditBuilder
|
|
|
55
54
|
modularChangeFamily: ModularChangeFamily,
|
|
56
55
|
mintRevisionTag: () => RevisionTag,
|
|
57
56
|
private readonly changeReceiver: (change: TaggedChange<SharedTreeChange>) => void,
|
|
58
|
-
idCompressor?: IIdCompressor,
|
|
59
57
|
) {
|
|
60
|
-
super(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
...taggedChange,
|
|
66
|
-
change: { changes: [{ type: "data", innerChange: taggedChange.change }] },
|
|
67
|
-
}),
|
|
68
|
-
idCompressor,
|
|
58
|
+
super(modularChangeFamily, mintRevisionTag, (taggedChange) =>
|
|
59
|
+
changeReceiver({
|
|
60
|
+
...taggedChange,
|
|
61
|
+
change: { changes: [{ type: "data", innerChange: taggedChange.change }] },
|
|
62
|
+
}),
|
|
69
63
|
);
|
|
70
64
|
|
|
71
65
|
this.schema = {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import { createIdCompressor } from "@fluidframework/id-compressor/internal";
|
|
8
8
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
9
9
|
import type { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
@@ -32,14 +32,13 @@ import {
|
|
|
32
32
|
verboseFromCursor,
|
|
33
33
|
type ParseOptions,
|
|
34
34
|
type VerboseTree,
|
|
35
|
-
type VerboseTreeNode,
|
|
36
35
|
toStoredSchema,
|
|
37
36
|
type EncodeOptions,
|
|
38
37
|
extractPersistedSchema,
|
|
39
38
|
TreeViewConfiguration,
|
|
40
39
|
type TreeBranch,
|
|
41
40
|
} from "../simple-tree/index.js";
|
|
42
|
-
import {
|
|
41
|
+
import type { JsonCompatible } from "../util/index.js";
|
|
43
42
|
import { noopValidator, type FluidClientVersion, type ICodecOptions } from "../codec/index.js";
|
|
44
43
|
import type { ITreeCursorSynchronous } from "../core/index.js";
|
|
45
44
|
import {
|
|
@@ -126,65 +125,32 @@ export const TreeAlpha: {
|
|
|
126
125
|
* Construct tree content compatible with a field defined by the provided `schema`.
|
|
127
126
|
* @param schema - The schema for what to construct. As this is an {@link ImplicitFieldSchema}, a {@link FieldSchema}, {@link TreeNodeSchema} or {@link AllowedTypes} array can be provided.
|
|
128
127
|
* @param data - The data used to construct the field content. See {@link TreeAlpha.(exportVerbose:1)}.
|
|
129
|
-
* @remarks
|
|
130
|
-
* This overload requires that any {@link @fluidframework/core-interfaces#IFluidHandle|IFluidHandles} are encoded as actual {@link @fluidframework/core-interfaces#IFluidHandle|IFluidHandles} in the input.
|
|
131
128
|
*/
|
|
132
129
|
importVerbose<const TSchema extends ImplicitFieldSchema>(
|
|
133
130
|
schema: TSchema,
|
|
134
131
|
data: VerboseTree | undefined,
|
|
135
|
-
options?: Partial<ParseOptions
|
|
136
|
-
): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Construct tree content compatible with a field defined by the provided `schema`.
|
|
140
|
-
* @param schema - The schema for what to construct. As this is an {@link ImplicitFieldSchema}, a {@link FieldSchema}, {@link TreeNodeSchema} or {@link AllowedTypes} array can be provided.
|
|
141
|
-
* @param data - The data used to construct the field content. See {@link TreeAlpha.(exportVerbose:2)}.
|
|
142
|
-
*
|
|
143
|
-
* @typeparam THandle - How {@link @fluidframework/core-interfaces#IFluidHandle|IFluidHandles} in the input `data` are encoded.
|
|
144
|
-
* A converter from this encoding to {@link @fluidframework/core-interfaces#IFluidHandle} is required in `options`.
|
|
145
|
-
*/
|
|
146
|
-
importVerbose<const TSchema extends ImplicitFieldSchema, THandle>(
|
|
147
|
-
schema: TSchema,
|
|
148
|
-
data: VerboseTree<THandle> | undefined,
|
|
149
|
-
options: ParseOptions<THandle>,
|
|
132
|
+
options?: Partial<ParseOptions>,
|
|
150
133
|
): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
151
134
|
|
|
152
|
-
/**
|
|
153
|
-
* Same as {@link TreeAlpha.(exportConcise:2)}, except leaves handles as is.
|
|
154
|
-
*/
|
|
155
|
-
exportConcise(
|
|
156
|
-
node: TreeNode | TreeLeafValue,
|
|
157
|
-
options?: Partial<EncodeOptions<IFluidHandle>>,
|
|
158
|
-
): ConciseTree;
|
|
159
|
-
|
|
160
135
|
/**
|
|
161
136
|
* Copy a snapshot of the current version of a TreeNode into a {@link ConciseTree}.
|
|
162
|
-
*
|
|
163
|
-
* @typeparam THandle - How {@link @fluidframework/core-interfaces#IFluidHandle|IFluidHandles} in the output should be encoded.
|
|
164
|
-
* A converter from from {@link @fluidframework/core-interfaces#IFluidHandle} to this format is required in `options`.
|
|
165
137
|
*/
|
|
166
|
-
exportConcise
|
|
167
|
-
node: TreeNode | TreeLeafValue,
|
|
168
|
-
options: EncodeOptions<THandle>,
|
|
169
|
-
): ConciseTree<THandle>;
|
|
138
|
+
exportConcise(node: TreeNode | TreeLeafValue, options?: EncodeOptions): ConciseTree;
|
|
170
139
|
|
|
171
140
|
/**
|
|
172
|
-
*
|
|
141
|
+
* Copy a snapshot of the current version of a TreeNode into a {@link ConciseTree}, allowing undefined.
|
|
173
142
|
*/
|
|
174
|
-
|
|
175
|
-
node: TreeNode | TreeLeafValue,
|
|
176
|
-
options?:
|
|
177
|
-
):
|
|
143
|
+
exportConcise(
|
|
144
|
+
node: TreeNode | TreeLeafValue | undefined,
|
|
145
|
+
options?: EncodeOptions,
|
|
146
|
+
): ConciseTree | undefined;
|
|
178
147
|
|
|
179
148
|
/**
|
|
180
|
-
* Copy a snapshot of the current version of a TreeNode into a JSON compatible plain old JavaScript Object.
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* @typeparam THandle - How {@link @fluidframework/core-interfaces#IFluidHandle|IFluidHandles} in the output should be encoded.
|
|
184
|
-
* A converter from from {@link @fluidframework/core-interfaces#IFluidHandle} to this format is required in `options`.
|
|
149
|
+
* Copy a snapshot of the current version of a TreeNode into a JSON compatible plain old JavaScript Object (except for {@link @fluidframework/core-interfaces#IFluidHandle|IFluidHandles}).
|
|
150
|
+
* Uses the {@link VerboseTree} format, with an explicit type on every node.
|
|
185
151
|
*
|
|
186
152
|
* @remarks
|
|
187
|
-
* There are several cases this may be preferred to {@link TreeAlpha.(exportConcise:
|
|
153
|
+
* There are several cases this may be preferred to {@link TreeAlpha.(exportConcise:1)}:
|
|
188
154
|
*
|
|
189
155
|
* 1. When not using {@link ITreeConfigurationOptions.preventAmbiguity} (or when using `useStableFieldKeys`), `exportConcise` can produce ambiguous data (the type may be unclear on some nodes).
|
|
190
156
|
* `exportVerbose` will always be unambiguous and thus lossless.
|
|
@@ -193,7 +159,7 @@ export const TreeAlpha: {
|
|
|
193
159
|
*
|
|
194
160
|
* 3. When easy access to the type is desired.
|
|
195
161
|
*/
|
|
196
|
-
exportVerbose
|
|
162
|
+
exportVerbose(node: TreeNode | TreeLeafValue, options?: EncodeOptions): VerboseTree;
|
|
197
163
|
|
|
198
164
|
/**
|
|
199
165
|
* Export the content of the provided `tree` in a compressed JSON compatible format.
|
|
@@ -274,17 +240,12 @@ export const TreeAlpha: {
|
|
|
274
240
|
>;
|
|
275
241
|
},
|
|
276
242
|
|
|
277
|
-
importVerbose<const TSchema extends ImplicitFieldSchema
|
|
243
|
+
importVerbose<const TSchema extends ImplicitFieldSchema>(
|
|
278
244
|
schema: TSchema,
|
|
279
|
-
data: VerboseTree
|
|
280
|
-
options?:
|
|
245
|
+
data: VerboseTree | undefined,
|
|
246
|
+
options?: ParseOptions,
|
|
281
247
|
): Unhydrated<TreeFieldFromImplicitField<TSchema>> {
|
|
282
|
-
const config: ParseOptions
|
|
283
|
-
valueConverter: (input: VerboseTree<THandle>) => {
|
|
284
|
-
return input as TreeLeafValue | VerboseTreeNode<THandle>;
|
|
285
|
-
},
|
|
286
|
-
...options,
|
|
287
|
-
};
|
|
248
|
+
const config: ParseOptions = { ...options };
|
|
288
249
|
// Create a config which is standalone, and thus can be used without having to refer back to the schema.
|
|
289
250
|
const schemalessConfig = applySchemaToParserOptions(schema, config);
|
|
290
251
|
if (data === undefined) {
|
|
@@ -294,39 +255,14 @@ export const TreeAlpha: {
|
|
|
294
255
|
}
|
|
295
256
|
return undefined as Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
296
257
|
}
|
|
297
|
-
const cursor = cursorFromVerbose
|
|
258
|
+
const cursor = cursorFromVerbose(data, schemalessConfig);
|
|
298
259
|
return createFromCursor(schema, cursor);
|
|
299
260
|
},
|
|
300
261
|
|
|
301
|
-
exportConcise
|
|
302
|
-
node: TreeNode | TreeLeafValue,
|
|
303
|
-
options?: Partial<EncodeOptions<T>>,
|
|
304
|
-
): ConciseTree<T> {
|
|
305
|
-
const config: EncodeOptions<T> = {
|
|
306
|
-
valueConverter(handle: IFluidHandle): T {
|
|
307
|
-
return handle as T;
|
|
308
|
-
},
|
|
309
|
-
...options,
|
|
310
|
-
};
|
|
262
|
+
exportConcise,
|
|
311
263
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
cursor,
|
|
315
|
-
tryGetSchema(node) ?? fail(0xacd /* invalid input */),
|
|
316
|
-
config,
|
|
317
|
-
);
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
exportVerbose<T>(
|
|
321
|
-
node: TreeNode | TreeLeafValue,
|
|
322
|
-
options?: Partial<EncodeOptions<T>>,
|
|
323
|
-
): VerboseTree<T> {
|
|
324
|
-
const config: EncodeOptions<T> = {
|
|
325
|
-
valueConverter(handle: IFluidHandle): T {
|
|
326
|
-
return handle as T;
|
|
327
|
-
},
|
|
328
|
-
...options,
|
|
329
|
-
};
|
|
264
|
+
exportVerbose(node: TreeNode | TreeLeafValue, options?: EncodeOptions): VerboseTree {
|
|
265
|
+
const config: EncodeOptions = { ...options };
|
|
330
266
|
|
|
331
267
|
const cursor = borrowCursorFromTreeNodeOrValue(node);
|
|
332
268
|
return verboseFromCursor(
|
|
@@ -378,6 +314,30 @@ export const TreeAlpha: {
|
|
|
378
314
|
},
|
|
379
315
|
};
|
|
380
316
|
|
|
317
|
+
function exportConcise(node: TreeNode | TreeLeafValue, options?: EncodeOptions): ConciseTree;
|
|
318
|
+
|
|
319
|
+
function exportConcise(
|
|
320
|
+
node: TreeNode | TreeLeafValue | undefined,
|
|
321
|
+
options?: EncodeOptions,
|
|
322
|
+
): ConciseTree | undefined;
|
|
323
|
+
|
|
324
|
+
function exportConcise(
|
|
325
|
+
node: TreeNode | TreeLeafValue | undefined,
|
|
326
|
+
options?: EncodeOptions,
|
|
327
|
+
): ConciseTree | undefined {
|
|
328
|
+
if (node === undefined) {
|
|
329
|
+
return undefined;
|
|
330
|
+
}
|
|
331
|
+
const config: EncodeOptions = { ...options };
|
|
332
|
+
|
|
333
|
+
const cursor = borrowCursorFromTreeNodeOrValue(node);
|
|
334
|
+
return conciseFromCursor(
|
|
335
|
+
cursor,
|
|
336
|
+
tryGetSchema(node) ?? fail(0xacd /* invalid input */),
|
|
337
|
+
config,
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
381
341
|
function borrowCursorFromTreeNodeOrValue(
|
|
382
342
|
node: TreeNode | TreeLeafValue,
|
|
383
343
|
): ITreeCursorSynchronous {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, unreachableCase, fail } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
8
8
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
9
9
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
type FieldBatchCodec,
|
|
48
48
|
type TreeCompressionStrategy,
|
|
49
49
|
buildForest,
|
|
50
|
-
|
|
50
|
+
createNodeIdentifierManager,
|
|
51
51
|
intoDelta,
|
|
52
52
|
jsonableTreeFromCursor,
|
|
53
53
|
makeFieldBatchCodec,
|
|
@@ -60,13 +60,7 @@ import {
|
|
|
60
60
|
type SharedTreeBranchChange,
|
|
61
61
|
type Transactor,
|
|
62
62
|
} from "../shared-tree-core/index.js";
|
|
63
|
-
import {
|
|
64
|
-
Breakable,
|
|
65
|
-
disposeSymbol,
|
|
66
|
-
fail,
|
|
67
|
-
getOrCreate,
|
|
68
|
-
type WithBreakable,
|
|
69
|
-
} from "../util/index.js";
|
|
63
|
+
import { Breakable, disposeSymbol, getOrCreate, type WithBreakable } from "../util/index.js";
|
|
70
64
|
|
|
71
65
|
import { SharedTreeChangeFamily, hasSchemaChange } from "./sharedTreeChangeFamily.js";
|
|
72
66
|
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
@@ -662,7 +656,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
662
656
|
const view = new SchematizingSimpleTreeView(
|
|
663
657
|
this,
|
|
664
658
|
config,
|
|
665
|
-
|
|
659
|
+
createNodeIdentifierManager(this.idCompressor),
|
|
666
660
|
() => {
|
|
667
661
|
this.views.delete(view);
|
|
668
662
|
},
|
|
@@ -282,10 +282,11 @@ export class SharedTreeBranch<TEditor extends ChangeFamilyEditor, TChange> {
|
|
|
282
282
|
* Apply all the divergent changes on the given branch to this branch.
|
|
283
283
|
*
|
|
284
284
|
* @param branch - the branch to merge into this branch
|
|
285
|
-
* @returns the
|
|
286
|
-
* or undefined if nothing changed
|
|
285
|
+
* @returns the commits that were added to this branch by the merge, or undefined if nothing changed
|
|
287
286
|
*/
|
|
288
|
-
public merge(
|
|
287
|
+
public merge(
|
|
288
|
+
branch: SharedTreeBranch<TEditor, TChange>,
|
|
289
|
+
): { sourceCommits: GraphCommit<TChange>[] } | undefined {
|
|
289
290
|
this.assertNotDisposed();
|
|
290
291
|
branch.assertNotDisposed();
|
|
291
292
|
|
|
@@ -316,6 +317,7 @@ export class SharedTreeBranch<TEditor extends ChangeFamilyEditor, TChange> {
|
|
|
316
317
|
this.#events.emit("beforeChange", changeEvent);
|
|
317
318
|
this.head = rebaseResult.newSourceHead;
|
|
318
319
|
this.#events.emit("afterChange", changeEvent);
|
|
320
|
+
return { sourceCommits };
|
|
319
321
|
}
|
|
320
322
|
|
|
321
323
|
/** Rebase `branchHead` onto `onto`, but return undefined if nothing changed */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
8
8
|
import type { SessionId } from "@fluidframework/id-compressor";
|
|
9
9
|
import { BTree } from "@tylerbu/sorted-btree-es6";
|
|
@@ -16,11 +16,10 @@ import {
|
|
|
16
16
|
findAncestor,
|
|
17
17
|
findCommonAncestor,
|
|
18
18
|
mintCommit,
|
|
19
|
-
rebaseChange,
|
|
20
19
|
type RebaseStatsWithDuration,
|
|
21
20
|
tagChange,
|
|
22
21
|
} from "../core/index.js";
|
|
23
|
-
import { type Mutable, brand,
|
|
22
|
+
import { type Mutable, brand, getOrCreate, mapIterable } from "../util/index.js";
|
|
24
23
|
|
|
25
24
|
import { SharedTreeBranch, type BranchTrimmingEvents, onForkTransitive } from "./branch.js";
|
|
26
25
|
import type {
|
|
@@ -39,7 +38,6 @@ import {
|
|
|
39
38
|
} from "./sequenceIdUtils.js";
|
|
40
39
|
import {
|
|
41
40
|
TelemetryEventBatcher,
|
|
42
|
-
measure,
|
|
43
41
|
type ITelemetryLoggerExt,
|
|
44
42
|
} from "@fluidframework/telemetry-utils/internal";
|
|
45
43
|
|
|
@@ -706,51 +704,45 @@ export class EditManager<
|
|
|
706
704
|
}
|
|
707
705
|
|
|
708
706
|
// Remote changes, i.e., changes from remote clients are applied in three steps.
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
);
|
|
721
|
-
peerLocalBranch.rebaseOnto(this.trunk, baseRevisionInTrunk);
|
|
707
|
+
// Step 1 - Recreate the peer remote client's local environment.
|
|
708
|
+
// Get the revision that the remote change is based on and rebase that peer local branch over the part of the
|
|
709
|
+
// trunk up to the base revision. This will be a no-op if the sending client has not advanced since the last
|
|
710
|
+
// time we received an edit from it
|
|
711
|
+
const [, baseRevisionInTrunk] = this.getClosestTrunkCommit(referenceSequenceNumber);
|
|
712
|
+
const peerLocalBranch = getOrCreate(
|
|
713
|
+
this.peerLocalBranches,
|
|
714
|
+
sessionId,
|
|
715
|
+
() => new SharedTreeBranch(baseRevisionInTrunk, this.changeFamily, this.mintRevisionTag),
|
|
716
|
+
);
|
|
717
|
+
peerLocalBranch.rebaseOnto(this.trunk, baseRevisionInTrunk);
|
|
722
718
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
719
|
+
// Step 2 - Append the changes to the peer branch and rebase the changes to the tip of the trunk.
|
|
720
|
+
if (peerLocalBranch.getHead() === this.trunk.getHead()) {
|
|
721
|
+
// If the peer local branch is fully caught up and empty (no changes relative to the trunk) after being
|
|
722
|
+
// rebased, then push changes to the trunk directly and update the peer branch to the trunk's head.
|
|
723
|
+
for (const newCommit of newCommits) {
|
|
726
724
|
this.pushCommitToTrunk(nextSequenceId, { ...newCommit, sessionId });
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
newCommit,
|
|
734
|
-
peerLocalBranch.getHead(),
|
|
735
|
-
this.trunk.getHead(),
|
|
736
|
-
this.mintRevisionTag,
|
|
737
|
-
),
|
|
738
|
-
);
|
|
739
|
-
|
|
740
|
-
this.telemetryEventBatcher?.accumulateAndLog({
|
|
741
|
-
duration,
|
|
742
|
-
...newChangeFullyRebased.telemetryProperties,
|
|
743
|
-
});
|
|
744
|
-
|
|
725
|
+
nextSequenceId = getNextSequenceId(nextSequenceId);
|
|
726
|
+
}
|
|
727
|
+
peerLocalBranch.setHead(this.trunk.getHead());
|
|
728
|
+
} else {
|
|
729
|
+
// Otherwise, push the changes to the peer local branch and merge the branch into the trunk.
|
|
730
|
+
for (const newCommit of newCommits) {
|
|
745
731
|
peerLocalBranch.apply(tagChange(newCommit.change, newCommit.revision));
|
|
746
|
-
this.pushCommitToTrunk(nextSequenceId, {
|
|
747
|
-
...newCommit,
|
|
748
|
-
sessionId,
|
|
749
|
-
change: newChangeFullyRebased.change,
|
|
750
|
-
});
|
|
751
732
|
}
|
|
752
|
-
|
|
753
|
-
|
|
733
|
+
const result = this.trunk.merge(peerLocalBranch);
|
|
734
|
+
if (result !== undefined) {
|
|
735
|
+
// If the merge resulted in any changes to the trunk, update the sequence map and trunk metadata
|
|
736
|
+
// with the rebased commits.
|
|
737
|
+
for (const sourceCommit of result.sourceCommits) {
|
|
738
|
+
this.sequenceMap.set(nextSequenceId, sourceCommit);
|
|
739
|
+
this.trunkMetadata.set(sourceCommit.revision, {
|
|
740
|
+
sequenceId: nextSequenceId,
|
|
741
|
+
sessionId,
|
|
742
|
+
});
|
|
743
|
+
nextSequenceId = getNextSequenceId(nextSequenceId);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
754
746
|
}
|
|
755
747
|
|
|
756
748
|
// Step 3 - Rebase the local branch over the updated trunk.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IChannelAttributes } from "@fluidframework/datastore-definitions/internal";
|
|
7
|
+
import { pkgVersion } from "./packageVersion.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory."type"}
|
|
11
|
+
* @alpha
|
|
12
|
+
* @legacy
|
|
13
|
+
*/
|
|
14
|
+
export const SharedTreeFactoryType = "https://graph.microsoft.com/types/tree";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}
|
|
18
|
+
* @alpha
|
|
19
|
+
* @legacy
|
|
20
|
+
*/
|
|
21
|
+
export const SharedTreeAttributes: IChannelAttributes = {
|
|
22
|
+
type: SharedTreeFactoryType,
|
|
23
|
+
snapshotFormatVersion: "0.0.0",
|
|
24
|
+
packageVersion: pkgVersion,
|
|
25
|
+
};
|
|
@@ -8,7 +8,12 @@ import type { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
|
8
8
|
import type { ITreeCursor } from "../../core/index.js";
|
|
9
9
|
import type { TreeLeafValue, ImplicitAllowedTypes } from "../schemaTypes.js";
|
|
10
10
|
import type { TreeNodeSchema } from "../core/index.js";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
customFromCursor,
|
|
13
|
+
replaceHandles,
|
|
14
|
+
type EncodeOptions,
|
|
15
|
+
type HandleConverter,
|
|
16
|
+
} from "./customTree.js";
|
|
12
17
|
import { getUnhydratedContext } from "../createContext.js";
|
|
13
18
|
|
|
14
19
|
/**
|
|
@@ -36,12 +41,12 @@ export type ConciseTree<THandle = IFluidHandle> =
|
|
|
36
41
|
/**
|
|
37
42
|
* Used to read a node cursor as a ConciseTree.
|
|
38
43
|
*/
|
|
39
|
-
export function conciseFromCursor
|
|
44
|
+
export function conciseFromCursor(
|
|
40
45
|
reader: ITreeCursor,
|
|
41
46
|
rootSchema: ImplicitAllowedTypes,
|
|
42
|
-
options: EncodeOptions
|
|
43
|
-
): ConciseTree
|
|
44
|
-
const config: Required<EncodeOptions
|
|
47
|
+
options: EncodeOptions,
|
|
48
|
+
): ConciseTree {
|
|
49
|
+
const config: Required<EncodeOptions> = {
|
|
45
50
|
useStoredKeys: false,
|
|
46
51
|
...options,
|
|
47
52
|
};
|
|
@@ -50,10 +55,22 @@ export function conciseFromCursor<TCustom>(
|
|
|
50
55
|
return conciseFromCursorInner(reader, config, schemaMap);
|
|
51
56
|
}
|
|
52
57
|
|
|
53
|
-
function conciseFromCursorInner
|
|
58
|
+
function conciseFromCursorInner(
|
|
54
59
|
reader: ITreeCursor,
|
|
55
|
-
options: Required<EncodeOptions
|
|
60
|
+
options: Required<EncodeOptions>,
|
|
56
61
|
schema: ReadonlyMap<string, TreeNodeSchema>,
|
|
57
|
-
): ConciseTree
|
|
62
|
+
): ConciseTree {
|
|
58
63
|
return customFromCursor(reader, options, schema, conciseFromCursorInner);
|
|
59
64
|
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Clones tree, replacing any handles.
|
|
68
|
+
* @remarks A strongly typed version of {@link replaceHandles}.
|
|
69
|
+
* @alpha
|
|
70
|
+
*/
|
|
71
|
+
export function replaceConciseTreeHandles<T>(
|
|
72
|
+
tree: ConciseTree,
|
|
73
|
+
replacer: HandleConverter<T>,
|
|
74
|
+
): ConciseTree<T> {
|
|
75
|
+
return replaceHandles(tree, replacer) as ConciseTree<T>;
|
|
76
|
+
}
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
defaultSchemaPolicy,
|
|
27
27
|
FieldKinds,
|
|
28
28
|
mapTreeFromCursor,
|
|
29
|
-
type
|
|
29
|
+
type NodeIdentifierManager,
|
|
30
30
|
} from "../../feature-libraries/index.js";
|
|
31
31
|
import { isFieldInSchema } from "../../feature-libraries/index.js";
|
|
32
32
|
import { toStoredSchema } from "../toStoredSchema.js";
|
|
@@ -53,7 +53,7 @@ export function createFromInsertable<
|
|
|
53
53
|
? ImplicitFieldSchema
|
|
54
54
|
: TSchema & ImplicitFieldSchema,
|
|
55
55
|
data: InsertableField<TSchema>,
|
|
56
|
-
context?:
|
|
56
|
+
context?: NodeIdentifierManager | undefined,
|
|
57
57
|
): Unhydrated<
|
|
58
58
|
TSchema extends ImplicitFieldSchema
|
|
59
59
|
? TreeFieldFromImplicitField<TSchema>
|
|
@@ -84,7 +84,7 @@ export function cursorFromInsertable<
|
|
|
84
84
|
? ImplicitFieldSchema
|
|
85
85
|
: TSchema & ImplicitFieldSchema,
|
|
86
86
|
data: InsertableField<TSchema>,
|
|
87
|
-
context?:
|
|
87
|
+
context?: NodeIdentifierManager | undefined,
|
|
88
88
|
):
|
|
89
89
|
| ITreeCursorSynchronous
|
|
90
90
|
| (TSchema extends FieldSchema<FieldKind.Optional> ? undefined : never) {
|