@fluidframework/tree 2.113.1 → 2.115.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 +289 -0
- package/api-report/tree.alpha.api.md +127 -39
- package/dist/core/change-family/changeFamily.d.ts +15 -4
- package/dist/core/change-family/changeFamily.d.ts.map +1 -1
- package/dist/core/change-family/changeFamily.js.map +1 -1
- package/dist/core/change-family/editBuilder.d.ts +2 -3
- package/dist/core/change-family/editBuilder.d.ts.map +1 -1
- package/dist/core/change-family/editBuilder.js +1 -2
- package/dist/core/change-family/editBuilder.js.map +1 -1
- package/dist/core/change-family/index.d.ts +1 -1
- package/dist/core/change-family/index.d.ts.map +1 -1
- package/dist/core/change-family/index.js.map +1 -1
- package/dist/core/index.d.ts +4 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +2 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +110 -0
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +47 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/tree/delta.d.ts +62 -16
- package/dist/core/tree/delta.d.ts.map +1 -1
- package/dist/core/tree/delta.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +7 -13
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +32 -46
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/index.d.ts +1 -0
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts +2 -4
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +2 -2
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/entrypoints/alpha.d.ts +1 -1
- package/dist/entrypoints/alpha.d.ts.map +1 -1
- package/dist/entrypoints/alpha.js +8 -3
- package/dist/entrypoints/alpha.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +9 -6
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +16 -13
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +10 -2
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/comparison-forest/comparisonForest.d.ts +51 -0
- package/dist/feature-libraries/comparison-forest/comparisonForest.d.ts.map +1 -0
- package/dist/feature-libraries/comparison-forest/comparisonForest.js +98 -0
- package/dist/feature-libraries/comparison-forest/comparisonForest.js.map +1 -0
- package/dist/feature-libraries/comparison-forest/index.d.ts +6 -0
- package/dist/feature-libraries/comparison-forest/index.d.ts.map +1 -0
- package/dist/feature-libraries/comparison-forest/index.js +10 -0
- package/dist/feature-libraries/comparison-forest/index.js.map +1 -0
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +8 -6
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.js +3 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +6 -3
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +18 -6
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -3
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +2 -3
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +4 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +77 -72
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.js +12 -0
- package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +9 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/invert.d.ts +15 -0
- package/dist/feature-libraries/modular-schema/invert.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/invert.js +159 -0
- package/dist/feature-libraries/modular-schema/invert.js.map +1 -0
- package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +3 -4
- package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/minimizeModularChange.js +2 -2
- package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +9 -9
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +0 -2
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -22
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +53 -406
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts +61 -0
- package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeUtils.js +205 -0
- package/dist/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -0
- package/dist/feature-libraries/modular-schema/prune.d.ts +10 -0
- package/dist/feature-libraries/modular-schema/prune.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/prune.js +49 -0
- package/dist/feature-libraries/modular-schema/prune.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +2 -2
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/treeTextCursor.d.ts +15 -0
- package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
- package/dist/feature-libraries/treeTextCursor.js +64 -1
- package/dist/feature-libraries/treeTextCursor.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/serializedChange.d.ts +2 -2
- package/dist/shared-tree/serializedChange.d.ts.map +1 -1
- package/dist/shared-tree/serializedChange.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +11 -3
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +9 -7
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +2 -2
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +41 -4
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +57 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/transactionMinimize.d.ts.map +1 -1
- package/dist/shared-tree/transactionMinimize.js +2 -2
- package/dist/shared-tree/transactionMinimize.js.map +1 -1
- package/dist/shared-tree/transactionPostProcessor.d.ts +2 -1
- package/dist/shared-tree/transactionPostProcessor.d.ts.map +1 -1
- package/dist/shared-tree/transactionPostProcessor.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +13 -7
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +59 -13
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +24 -9
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +7 -0
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +4 -4
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +2 -0
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -14
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +11 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +4 -11
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +4 -11
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +4 -4
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +0 -1
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +8 -1
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +5 -5
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/transaction.d.ts +10 -10
- package/dist/shared-tree-core/transaction.d.ts.map +1 -1
- package/dist/shared-tree-core/transaction.js +6 -3
- package/dist/shared-tree-core/transaction.js.map +1 -1
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts +15 -0
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
- package/dist/simple-tree/api/eraseSchemaDetails.js +15 -0
- package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +1 -1
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +2 -3
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +3 -3
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +6 -7
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaStatics.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts +20 -24
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +48 -49
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts +5 -6
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +2 -4
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/withType.d.ts +20 -7
- package/dist/simple-tree/core/withType.d.ts.map +1 -1
- package/dist/simple-tree/core/withType.js +4 -7
- package/dist/simple-tree/core/withType.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +3 -4
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +6 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +0 -1
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +53 -5
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +91 -10
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts +90 -0
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +26 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +2 -2
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +2 -2
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/text/codePointUtils.d.ts +2 -2
- package/dist/text/codePointUtils.js +2 -2
- package/dist/text/codePointUtils.js.map +1 -1
- package/dist/text/index.d.ts +3 -3
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.js +4 -4
- package/dist/text/index.js.map +1 -1
- package/dist/text/textDomain.d.ts +30 -18
- package/dist/text/textDomain.d.ts.map +1 -1
- package/dist/text/textDomain.js +44 -23
- package/dist/text/textDomain.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +180 -82
- package/dist/text/textDomainFormatted.d.ts.map +1 -1
- package/dist/text/textDomainFormatted.js +164 -84
- package/dist/text/textDomainFormatted.js.map +1 -1
- package/dist/text/textDomainFormattedDefault.d.ts +48 -25
- package/dist/text/textDomainFormattedDefault.d.ts.map +1 -1
- package/dist/text/textDomainFormattedDefault.js +24 -19
- package/dist/text/textDomainFormattedDefault.js.map +1 -1
- package/dist/treeDataStore.d.ts +49 -0
- package/dist/treeDataStore.d.ts.map +1 -0
- package/dist/treeDataStore.js +57 -0
- package/dist/treeDataStore.js.map +1 -0
- package/dist/treeFactory.d.ts +8 -3
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +6 -1
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/compressedIds.d.ts +22 -2
- package/dist/util/compressedIds.d.ts.map +1 -1
- package/dist/util/compressedIds.js +22 -1
- package/dist/util/compressedIds.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +15 -4
- package/lib/core/change-family/changeFamily.d.ts.map +1 -1
- package/lib/core/change-family/changeFamily.js.map +1 -1
- package/lib/core/change-family/editBuilder.d.ts +2 -3
- package/lib/core/change-family/editBuilder.d.ts.map +1 -1
- package/lib/core/change-family/editBuilder.js +1 -2
- package/lib/core/change-family/editBuilder.js.map +1 -1
- package/lib/core/change-family/index.d.ts +1 -1
- package/lib/core/change-family/index.d.ts.map +1 -1
- package/lib/core/change-family/index.js.map +1 -1
- package/lib/core/index.d.ts +4 -3
- 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/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +110 -0
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +46 -0
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/tree/delta.d.ts +62 -16
- package/lib/core/tree/delta.d.ts.map +1 -1
- package/lib/core/tree/delta.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +7 -13
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +7 -21
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/index.d.ts +1 -0
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts +2 -4
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js +2 -2
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/entrypoints/alpha.d.ts +1 -1
- package/lib/entrypoints/alpha.d.ts.map +1 -1
- package/lib/entrypoints/alpha.js +1 -1
- package/lib/entrypoints/alpha.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +9 -6
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +16 -13
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +10 -2
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/comparison-forest/comparisonForest.d.ts +51 -0
- package/lib/feature-libraries/comparison-forest/comparisonForest.d.ts.map +1 -0
- package/lib/feature-libraries/comparison-forest/comparisonForest.js +94 -0
- package/lib/feature-libraries/comparison-forest/comparisonForest.js.map +1 -0
- package/lib/feature-libraries/comparison-forest/index.d.ts +6 -0
- package/lib/feature-libraries/comparison-forest/index.d.ts.map +1 -0
- package/lib/feature-libraries/comparison-forest/index.js +6 -0
- package/lib/feature-libraries/comparison-forest/index.js.map +1 -0
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +8 -6
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.js +3 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +6 -3
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +16 -4
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -3
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -3
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +4 -3
- 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/mitigatedChangeFamily.d.ts +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.js +12 -0
- package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +9 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/invert.d.ts +15 -0
- package/lib/feature-libraries/modular-schema/invert.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/invert.js +155 -0
- package/lib/feature-libraries/modular-schema/invert.js.map +1 -0
- package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +3 -4
- package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/minimizeModularChange.js +2 -2
- package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +9 -9
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +0 -2
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -22
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +16 -367
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts +61 -0
- package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeUtils.js +192 -0
- package/lib/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -0
- package/lib/feature-libraries/modular-schema/prune.d.ts +10 -0
- package/lib/feature-libraries/modular-schema/prune.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/prune.js +45 -0
- package/lib/feature-libraries/modular-schema/prune.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +2 -2
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/treeTextCursor.d.ts +15 -0
- package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
- package/lib/feature-libraries/treeTextCursor.js +62 -1
- package/lib/feature-libraries/treeTextCursor.js.map +1 -1
- package/lib/index.d.ts +6 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/serializedChange.d.ts +2 -2
- package/lib/shared-tree/serializedChange.d.ts.map +1 -1
- package/lib/shared-tree/serializedChange.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +11 -3
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +10 -8
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +2 -2
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +41 -4
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +55 -0
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/transactionMinimize.d.ts.map +1 -1
- package/lib/shared-tree/transactionMinimize.js +3 -3
- package/lib/shared-tree/transactionMinimize.js.map +1 -1
- package/lib/shared-tree/transactionPostProcessor.d.ts +2 -1
- package/lib/shared-tree/transactionPostProcessor.d.ts.map +1 -1
- package/lib/shared-tree/transactionPostProcessor.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +13 -7
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +61 -15
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +24 -9
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +7 -0
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +4 -4
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +2 -0
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -14
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +11 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +4 -11
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +4 -11
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +4 -4
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +0 -1
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +8 -1
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +5 -5
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/transaction.d.ts +10 -10
- package/lib/shared-tree-core/transaction.d.ts.map +1 -1
- package/lib/shared-tree-core/transaction.js +6 -3
- package/lib/shared-tree-core/transaction.js.map +1 -1
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts +15 -0
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
- package/lib/simple-tree/api/eraseSchemaDetails.js +15 -0
- package/lib/simple-tree/api/eraseSchemaDetails.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +1 -1
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +3 -3
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +6 -7
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaStatics.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts +20 -24
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +46 -46
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts +5 -6
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +2 -4
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/withType.d.ts +20 -7
- package/lib/simple-tree/core/withType.d.ts.map +1 -1
- package/lib/simple-tree/core/withType.js +4 -7
- package/lib/simple-tree/core/withType.js.map +1 -1
- package/lib/simple-tree/index.d.ts +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +6 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +0 -1
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +53 -5
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +93 -12
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts +90 -0
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +27 -2
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +3 -3
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +3 -3
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/text/codePointUtils.d.ts +2 -2
- package/lib/text/codePointUtils.js +2 -2
- package/lib/text/codePointUtils.js.map +1 -1
- package/lib/text/index.d.ts +3 -3
- package/lib/text/index.d.ts.map +1 -1
- package/lib/text/index.js +3 -3
- package/lib/text/index.js.map +1 -1
- package/lib/text/textDomain.d.ts +30 -18
- package/lib/text/textDomain.d.ts.map +1 -1
- package/lib/text/textDomain.js +41 -22
- package/lib/text/textDomain.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +180 -82
- package/lib/text/textDomainFormatted.d.ts.map +1 -1
- package/lib/text/textDomainFormatted.js +165 -86
- package/lib/text/textDomainFormatted.js.map +1 -1
- package/lib/text/textDomainFormattedDefault.d.ts +48 -25
- package/lib/text/textDomainFormattedDefault.d.ts.map +1 -1
- package/lib/text/textDomainFormattedDefault.js +25 -20
- package/lib/text/textDomainFormattedDefault.js.map +1 -1
- package/lib/treeDataStore.d.ts +49 -0
- package/lib/treeDataStore.d.ts.map +1 -0
- package/lib/treeDataStore.js +52 -0
- package/lib/treeDataStore.js.map +1 -0
- package/lib/treeFactory.d.ts +8 -3
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +5 -0
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/compressedIds.d.ts +22 -2
- package/lib/util/compressedIds.d.ts.map +1 -1
- package/lib/util/compressedIds.js +22 -1
- package/lib/util/compressedIds.js.map +1 -1
- package/package.json +32 -24
- package/src/core/change-family/changeFamily.ts +32 -4
- package/src/core/change-family/editBuilder.ts +1 -2
- package/src/core/change-family/index.ts +2 -0
- package/src/core/index.ts +11 -6
- package/src/core/rebase/index.ts +2 -0
- package/src/core/rebase/types.ts +113 -0
- package/src/core/tree/delta.ts +62 -16
- package/src/core/tree/detachedFieldIndex.ts +7 -38
- package/src/core/tree/index.ts +2 -0
- package/src/core/tree/visitorUtils.ts +3 -17
- package/src/entrypoints/alpha.ts +9 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +17 -14
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +11 -1
- package/src/feature-libraries/comparison-forest/comparisonForest.ts +140 -0
- package/src/feature-libraries/comparison-forest/index.ts +6 -0
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +20 -6
- package/src/feature-libraries/default-schema/index.ts +1 -0
- package/src/feature-libraries/default-schema/noChangeCodecs.ts +11 -3
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +33 -5
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -3
- package/src/feature-libraries/index.ts +5 -0
- package/src/feature-libraries/mitigatedChangeFamily.ts +21 -3
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +10 -1
- package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +9 -4
- package/src/feature-libraries/modular-schema/index.ts +1 -0
- package/src/feature-libraries/modular-schema/invert.ts +338 -0
- package/src/feature-libraries/modular-schema/minimizeModularChange.ts +3 -5
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +16 -13
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +3 -1
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +2 -1
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +45 -644
- package/src/feature-libraries/modular-schema/modularChangeUtils.ts +340 -0
- package/src/feature-libraries/modular-schema/prune.ts +69 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +4 -2
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +5 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +4 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +4 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +6 -3
- package/src/feature-libraries/treeTextCursor.ts +66 -1
- package/src/index.ts +11 -4
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/serializedChange.ts +2 -2
- package/src/shared-tree/sharedTree.ts +40 -15
- package/src/shared-tree/sharedTreeChangeCodecs.ts +11 -3
- package/src/shared-tree/sharedTreeChangeFamily.ts +77 -2
- package/src/shared-tree/transactionMinimize.ts +7 -3
- package/src/shared-tree/transactionPostProcessor.ts +5 -1
- package/src/shared-tree/treeCheckout.ts +136 -30
- package/src/shared-tree-core/branch.ts +41 -12
- package/src/shared-tree-core/editManager.ts +46 -25
- package/src/shared-tree-core/editManagerCodecs.ts +9 -21
- package/src/shared-tree-core/editManagerCodecsCommons.ts +14 -2
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +18 -21
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +18 -20
- package/src/shared-tree-core/editManagerSummarizer.ts +9 -6
- package/src/shared-tree-core/messageCodecV1ToV4.ts +3 -3
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +2 -2
- package/src/shared-tree-core/messageCodecs.ts +12 -2
- package/src/shared-tree-core/sharedTreeCore.ts +16 -7
- package/src/shared-tree-core/transaction.ts +47 -25
- package/src/simple-tree/api/eraseSchemaDetails.ts +15 -0
- package/src/simple-tree/api/index.ts +0 -1
- package/src/simple-tree/api/schemaStatics.ts +2 -2
- package/src/simple-tree/api/treeNodeApi.ts +64 -48
- package/src/simple-tree/core/treeNode.ts +13 -10
- package/src/simple-tree/core/withType.ts +20 -7
- package/src/simple-tree/index.ts +1 -2
- package/src/simple-tree/leafNodeSchema.ts +6 -1
- package/src/simple-tree/node-kinds/array/arrayNode.ts +130 -16
- package/src/simple-tree/node-kinds/map/mapNode.ts +137 -5
- package/src/simple-tree/node-kinds/object/objectNode.ts +3 -3
- package/src/simple-tree/node-kinds/record/recordNode.ts +3 -3
- package/src/text/README.md +1 -1
- package/src/text/codePointUtils.ts +2 -2
- package/src/text/index.ts +3 -3
- package/src/text/textDomain.ts +50 -27
- package/src/text/textDomainFormatted.ts +384 -163
- package/src/text/textDomainFormattedDefault.ts +32 -32
- package/src/treeDataStore.ts +125 -0
- package/src/treeFactory.ts +11 -3
- package/src/util/compressedIds.ts +36 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,294 @@
|
|
|
1
1
|
# @fluidframework/tree
|
|
2
2
|
|
|
3
|
+
## 2.115.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Promote FormattedText APIs to alpha ([#27843](https://github.com/microsoft/FluidFramework/pull/27843)) [71895da92a](https://github.com/microsoft/FluidFramework/commit/71895da92ad598a366694ae6cd2cd8c296533804)
|
|
8
|
+
|
|
9
|
+
The [`FormattedText`](https://fluidframework.com/docs/api/fluid-framework/formattedtext-namespace) namespace is now available from the `fluid-framework/alpha` entrypoint.
|
|
10
|
+
It provides a generic, collaborative rich-text domain built on SharedTree, parameterized by the formatting you want to associate with each unit of text and by any extra "atom" (embedded object) types you want to allow alongside plain characters.
|
|
11
|
+
|
|
12
|
+
Use `FormattedText.createSchema` to generate a text schema for your chosen formatting, then treat the resulting node like a formatted string.
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { SchemaFactory } from "fluid-framework";
|
|
16
|
+
import { SchemaFactoryBeta } from "fluid-framework/beta";
|
|
17
|
+
import { FormattedText } from "fluid-framework/alpha";
|
|
18
|
+
|
|
19
|
+
// Note that a beta schema factory is currently required for use with `FormattedText`
|
|
20
|
+
const schemaFactory = new SchemaFactoryBeta("com.example.doc");
|
|
21
|
+
|
|
22
|
+
// Describe the formatting associated with each character.
|
|
23
|
+
class CharacterFormat extends schemaFactory.object("CharacterFormat", {
|
|
24
|
+
bold: SchemaFactory.boolean,
|
|
25
|
+
italic: SchemaFactory.boolean,
|
|
26
|
+
}) {}
|
|
27
|
+
|
|
28
|
+
// Generate the formatted-text schema. The last argument is the format applied
|
|
29
|
+
// to text inserted through the non-formatted APIs (for example `fromString`).
|
|
30
|
+
class RichText extends FormattedText.createSchema(
|
|
31
|
+
schemaFactory,
|
|
32
|
+
CharacterFormat,
|
|
33
|
+
[], // No extra embedded atom types.
|
|
34
|
+
{ bold: false, italic: false },
|
|
35
|
+
) {}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Once you have a schema, you can construct and edit formatted text:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// Create some text using the default format.
|
|
42
|
+
const text = RichText.fromString("hello world");
|
|
43
|
+
|
|
44
|
+
// Append more text with an explicit format.
|
|
45
|
+
text.insertAt(text.characterCount(), "!", { bold: true, italic: false });
|
|
46
|
+
|
|
47
|
+
// Bold everything from index 0 up to (but not including) index 5.
|
|
48
|
+
text.formatRange(0, 5, { bold: true });
|
|
49
|
+
|
|
50
|
+
// Read back the content with its associated formatting.
|
|
51
|
+
for (const atom of text.charactersWithFormatting()) {
|
|
52
|
+
console.log(atom.content, atom.format.bold, atom.format.italic);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`FormattedText` is currently surfaced as an alpha API and is subject to change.
|
|
57
|
+
|
|
58
|
+
- Array node deltas now cover the complete array ([#27809](https://github.com/microsoft/FluidFramework/pull/27809)) [6af2aba044](https://github.com/microsoft/FluidFramework/commit/6af2aba044e050b20386ae9e67111693117da5bd)
|
|
59
|
+
|
|
60
|
+
`ArrayNodeDeltaOp` and `ArrayNodeTreeChangedDeltaOp` sequences now include a final retain operation for an unchanged trailing portion of the array. Consumers can process the operations as a complete delta without separately retaining an omitted suffix.
|
|
61
|
+
|
|
62
|
+
Text deltas inherit the same complete-coverage behavior.
|
|
63
|
+
|
|
64
|
+
This should not break any existing users as this behavior was allowed under the old specification, but may allow some users to simplify their processing of the delta.
|
|
65
|
+
|
|
66
|
+
- Settled change notification ([#27814](https://github.com/microsoft/FluidFramework/pull/27814)) [73360b3d70](https://github.com/microsoft/FluidFramework/commit/73360b3d7036a5ce8be1f88a1ada3cfbe680541b)
|
|
67
|
+
|
|
68
|
+
`LocalChangeMetadata` now exposes an `events: Listenable<LocalCommitEvents>` property that fires a `"settled"` event once a commit has been ordered by the sequencing service.
|
|
69
|
+
|
|
70
|
+
Once a commit is sequenced, the following guarantees hold:
|
|
71
|
+
1. The changes carried by the commit have been persisted and other peers are able to see them.
|
|
72
|
+
2. There can be no more concurrent changes sequenced before this commit, which means this commit has reached its settled form.
|
|
73
|
+
|
|
74
|
+
The `"settled"` event provides details about the outcome of applying this settled form.
|
|
75
|
+
This can be used by an application to determine whether any constraints associated with the commits were violated.
|
|
76
|
+
|
|
77
|
+
This event can be used by applications to inform the end user that their changes have been saved (`CommitOutcome.FullyApplied`) or rejected (`CommitOutcome.FullyDropped` and `CommitOutcome.NewContentOnly`).
|
|
78
|
+
It can also be used to queue up a new attempt at making the rejected changes. Note however that new edits must be made outside of the event callback.
|
|
79
|
+
|
|
80
|
+
Example:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
// Use `asAlpha` API to access the settled event API
|
|
84
|
+
const view = asAlpha(tree.viewWith(config));
|
|
85
|
+
|
|
86
|
+
// Function to clear all contents of the tree, with a precondition that no changes have occurred.
|
|
87
|
+
const clearAllContents = () => {
|
|
88
|
+
view.runTransaction(
|
|
89
|
+
() => {
|
|
90
|
+
// Remove all contents at the root
|
|
91
|
+
view.root.removeRange();
|
|
92
|
+
},
|
|
93
|
+
{ preconditions: [{ type: "noChange" }] },
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// Register the logic for notifying the user of the outcome and allow them to retry
|
|
98
|
+
view.events.on("changed", (metadata) => {
|
|
99
|
+
if (metadata.isLocal) {
|
|
100
|
+
metadata.events.on("settled", (outcome) => {
|
|
101
|
+
if (outcome === CommitOutcome.FullyApplied) {
|
|
102
|
+
alert("Clear operation succeeded.");
|
|
103
|
+
} else {
|
|
104
|
+
const shouldTryAgain = confirm(
|
|
105
|
+
"The contents have changed. Do you still want to clear everything?",
|
|
106
|
+
);
|
|
107
|
+
if (shouldTryAgain) {
|
|
108
|
+
// It is invalid to make edits during the event callback, so we schedule the retry to occur asynchronously.
|
|
109
|
+
setTimeout(clearAllContents);
|
|
110
|
+
} else {
|
|
111
|
+
alert("Clear operation aborted.");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// First attempt to clear all contents.
|
|
119
|
+
// This will synchronously trigger the changed "event" and register the listener for the settled event.
|
|
120
|
+
clearAllContents();
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
- SharedTree now emits telemetry when it heals an unresolvable identifier on decode ([#27756](https://github.com/microsoft/FluidFramework/pull/27756)) [e5ada10ff4](https://github.com/microsoft/FluidFramework/commit/e5ada10ff41a959abe599bb407300e42e1008be3)
|
|
124
|
+
|
|
125
|
+
When [`SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode`](https://fluidframework.com/docs/api/tree/sharedtreeoptionsbeta-interface#healunresolvableidentifiersondecode-propertysignature) is enabled and an unresolvable identifier is healed while loading a summary, SharedTree now records a `HealUnresolvableIdentifierOnDecode` telemetry event (at `LogLevel.essential`). This lets applications relying on the healing workaround detect which documents actually required healing.
|
|
126
|
+
|
|
127
|
+
This only affects applications that have opted into `healUnresolvableIdentifiersOnDecode`; the telemetry is emitted through the same logger the DDS already uses, and no behavior other than the added telemetry has changed.
|
|
128
|
+
|
|
129
|
+
- Array insertion anchors now track their index from change deltas ([#27697](https://github.com/microsoft/FluidFramework/pull/27697)) [99d71d7054](https://github.com/microsoft/FluidFramework/commit/99d71d7054dd3ae5b2451c902bb7f7daf925c9f3)
|
|
130
|
+
|
|
131
|
+
The `@alpha` [`ArrayPlaceAnchor`](https://fluidframework.com/docs/api/tree/arrayplaceanchor-interface) returned by [`createArrayInsertionAnchor`](https://fluidframework.com/docs/api/tree/#createarrayinsertionanchor-function) now maintains its `index` incrementally from the array node's change delta instead of re-deriving it from the child that happened to sit at the anchor point when it was created. Inserts and removes before the anchor shift it, while edits after it leave it in place.
|
|
132
|
+
|
|
133
|
+
As a result, removing the child originally at the anchor's index no longer sends the anchor to the end of the array: it now stays in the gap between the surviving neighbors, which is the behavior an insertion point (such as a text cursor) needs.
|
|
134
|
+
|
|
135
|
+
Because the anchor now holds a subscription to the array node to receive those deltas, `ArrayPlaceAnchor` gained a `dispose()` method. Call it when the anchor is no longer needed to release the subscription. Interacting with an anchor after it has been disposed is invalid and will throw.
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
const anchor = createArrayInsertionAnchor(array, 1);
|
|
139
|
+
// ... use anchor.index as content is inserted and removed around it ...
|
|
140
|
+
anchor.dispose(); // release the subscription when done
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
- Rename the TextAsTree domain to PlainText ([#27853](https://github.com/microsoft/FluidFramework/pull/27853)) [cd26d781f4](https://github.com/microsoft/FluidFramework/commit/cd26d781f436da469abb79c9d63e40d3c3b8c5dc)
|
|
144
|
+
|
|
145
|
+
The experimental (`@alpha`) text domain namespace exported from `@fluidframework/tree` has been renamed: `TextAsTree` is now `PlainText`.
|
|
146
|
+
This is a breaking rename.
|
|
147
|
+
|
|
148
|
+
Consumers should update their imports and usages accordingly. For example:
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
// Before
|
|
152
|
+
import { TextAsTree } from "@fluidframework/tree/alpha";
|
|
153
|
+
const node = TextAsTree.Tree.fromString("hello");
|
|
154
|
+
|
|
155
|
+
// After
|
|
156
|
+
import { PlainText } from "@fluidframework/tree/alpha";
|
|
157
|
+
const node = PlainText.Tree.fromString("hello");
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The persisted schema identifiers for this domain are unchanged, so existing documents remain compatible.
|
|
161
|
+
|
|
162
|
+
- Add getOrInsert and getOrInsertComputed methods to TreeMapNodeAlpha ([#27787](https://github.com/microsoft/FluidFramework/pull/27787)) [e84cb5f754](https://github.com/microsoft/FluidFramework/commit/e84cb5f754d4e916b02896c128c11b6526c8cef3)
|
|
163
|
+
|
|
164
|
+
[`TreeMapNodeAlpha`](https://fluidframework.com/docs/api/fluid-framework/treemapnodealpha-interface) now has `getOrInsert` and `getOrInsertComputed` methods, further aligning it with JavaScript's built-in Map API.
|
|
165
|
+
Both return the value at a key, first inserting a value if the map has no entry for that key: `getOrInsert` takes the fallback value directly, while `getOrInsertComputed` takes a callback which is only invoked (with the key) when an insert is needed, which is preferable when producing the fallback value is expensive.
|
|
166
|
+
|
|
167
|
+
When the fallback value is inserted and is not already a [`TreeNode`](https://fluidframework.com/docs/api/fluid-framework/treenode-class), the inserted and returned value is the result of implicitly constructing a node from it.
|
|
168
|
+
|
|
169
|
+
These methods are available on `TreeMapNodeAlpha`, which can be obtained from an existing `TreeMapNode` via `asAlpha`, or by declaring the schema with `SchemaFactoryAlpha`'s `mapAlpha`.
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
const schemaFactory = new SchemaFactoryAlpha("example");
|
|
173
|
+
class Inventory extends schemaFactory.mapAlpha(
|
|
174
|
+
"Inventory",
|
|
175
|
+
schemaFactory.number,
|
|
176
|
+
) {}
|
|
177
|
+
|
|
178
|
+
const inventory = new Inventory(
|
|
179
|
+
new Map([
|
|
180
|
+
["apples", 5],
|
|
181
|
+
["pears", 3],
|
|
182
|
+
]),
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
inventory.getOrInsert("apples", 10); // 5 (existing value returned, not overwritten)
|
|
186
|
+
inventory.getOrInsert("oranges", 10); // 10 (inserted and returned)
|
|
187
|
+
|
|
188
|
+
inventory.getOrInsertComputed("pears", () => computeRestockAmount()); // 3 (existing value returned, callback not invoked)
|
|
189
|
+
inventory.getOrInsertComputed("plums", () => computeRestockAmount()); // inserts and returns the computed value
|
|
190
|
+
|
|
191
|
+
inventory.size; // 4
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## 2.114.0
|
|
195
|
+
|
|
196
|
+
### Minor Changes
|
|
197
|
+
|
|
198
|
+
- Add clear method to TreeMapNodeAlpha ([#27765](https://github.com/microsoft/FluidFramework/pull/27765)) [30c889b99c](https://github.com/microsoft/FluidFramework/commit/30c889b99caca3d6ad1ab276761092d94118eab1)
|
|
199
|
+
|
|
200
|
+
[`TreeMapNodeAlpha`](https://fluidframework.com/docs/api/fluid-framework/treemapnodealpha-interface) now has a `clear` method, further aligning it with JavaScript's built-in Map API. It removes all elements from the map.
|
|
201
|
+
|
|
202
|
+
The merge semantics of `clear` are loosely specified: either of the following may occur:
|
|
203
|
+
- `clear` may remove all elements that were in the map when the edit was authored, even if some of those elements have since been moved elsewhere in the tree (in which case they are removed from their new location).
|
|
204
|
+
- `clear` may remove all elements that are in the map when the edit is sequenced, even if some of those elements were not yet in the map when the edit was authored.
|
|
205
|
+
|
|
206
|
+
This method is available on `TreeMapNodeAlpha`, which can be obtained from an existing `TreeMapNode` via `asAlpha`, or by declaring the schema with `SchemaFactoryAlpha`'s `mapAlpha`.
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
const schemaFactory = new SchemaFactoryAlpha("example");
|
|
210
|
+
class Inventory extends schemaFactory.mapAlpha(
|
|
211
|
+
"Inventory",
|
|
212
|
+
schemaFactory.number,
|
|
213
|
+
) {}
|
|
214
|
+
|
|
215
|
+
const inventory = new Inventory(
|
|
216
|
+
new Map([
|
|
217
|
+
["apples", 5],
|
|
218
|
+
["pears", 3],
|
|
219
|
+
]),
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
inventory.size; // 2
|
|
223
|
+
inventory.clear();
|
|
224
|
+
inventory.size; // 0
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
- Add new @alpha ServiceClient API for creating and loading Fluid containers ([#27693](https://github.com/microsoft/FluidFramework/pull/27693)) [ee47192d4a](https://github.com/microsoft/FluidFramework/commit/ee47192d4ae91bc28f9154c4d1ead2acad762f3c)
|
|
228
|
+
|
|
229
|
+
This introduces an experimental (`@alpha`), service-agnostic API for working with Fluid containers whose root is an arbitrary data store, along with an in-memory implementation for testing.
|
|
230
|
+
|
|
231
|
+
The new surface is made up of:
|
|
232
|
+
- `ServiceClient` (`@fluidframework/driver-definitions`): the entry point for creating and loading containers. Along with it come the supporting container types (`FluidContainer`, `FluidContainerWithService`, `FluidContainerAttached`), the data store model (`DataStoreKind`, `DataStoreKey`, `DataStoreRegistry`, `DataStoreCreator`), and the generic registry primitives (`Registry`, `RegistryKey`, `lookupInRegistry`, `createBasicRegistryKey`).
|
|
233
|
+
- `defineDataStore` and `sharedObjectRegistryFromIterable` (`@fluidframework/shared-object-base`): build a `DataStoreKind` from a root shared object and a registry of shared object kinds.
|
|
234
|
+
- `defineTreeDataStore` and `instantiateTreeFirstTime` (`@fluidframework/tree`): a SharedTree-specific convenience wrapper that produces a `DataStoreKind` backed by a `TreeView`.
|
|
235
|
+
- `startEphemeralService` (`@fluidframework/local-driver`): starts an in-memory `EphemeralService` for tests. The service owns the lifetime of the in-memory documents and resources, and produces `ServiceClient`s connected to it (via `EphemeralService.newClient` or `EphemeralService.defaultClient`). The helpers `cleanupEphemeralService` and `getDefaultEphemeralService` manage an optional default service instance.
|
|
236
|
+
|
|
237
|
+
Apart from the `@fluidframework/local-driver` helpers (which come from `@fluidframework/local-driver/alpha`), these APIs are also re-exported from `fluid-framework`. None reference any `@legacy` types.
|
|
238
|
+
|
|
239
|
+
Example:
|
|
240
|
+
|
|
241
|
+
```typescript
|
|
242
|
+
import { startEphemeralService } from "@fluidframework/local-driver/alpha";
|
|
243
|
+
import {
|
|
244
|
+
ServiceClient,
|
|
245
|
+
defineTreeDataStore,
|
|
246
|
+
TreeViewConfiguration,
|
|
247
|
+
SchemaFactory,
|
|
248
|
+
} from "fluid-framework/alpha";
|
|
249
|
+
import { strict as assert } from "node:assert";
|
|
250
|
+
|
|
251
|
+
// Start an ephemeral in-memory service and get a ServiceClient connected to it.
|
|
252
|
+
const service = startEphemeralService();
|
|
253
|
+
const client: ServiceClient = service.defaultClient;
|
|
254
|
+
// Define a DataStoreKind which uses a SharedTree.
|
|
255
|
+
// In this case the schema is for a single number with an initializer that starts the it at 1.
|
|
256
|
+
// This schema is captures in the type allowing for strongly typed access to the data in the tree,
|
|
257
|
+
// where the type matches the schema based runtime enforcement of the schema.
|
|
258
|
+
const numberStore = defineTreeDataStore({
|
|
259
|
+
type: "my-app-root",
|
|
260
|
+
config: new TreeViewConfiguration({ schema: SchemaFactory.number }),
|
|
261
|
+
initializer: () => 1,
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
// Create a container in the service with the above DataStoreKind.
|
|
265
|
+
// Ideally this creation would use a service independent API, and only the attach call would be service dependent,
|
|
266
|
+
// but that is not supported yet.
|
|
267
|
+
const detachedContainer1 = await client.createContainer(numberStore);
|
|
268
|
+
const container1 = await detachedContainer1.attach();
|
|
269
|
+
|
|
270
|
+
// We now have easy and type safe access to the data in the tree, which will be synced over the service.
|
|
271
|
+
assert.equal(container1.data.root, 1);
|
|
272
|
+
|
|
273
|
+
// A second client can load the same container from the service, and will see the same data.
|
|
274
|
+
const container2 = await client.loadContainer(container1.id, numberStore);
|
|
275
|
+
assert.equal(container2.data.root, 1);
|
|
276
|
+
|
|
277
|
+
// Both clients can modify the data, and the changes will be synced over the service.
|
|
278
|
+
container2.data.root = 2;
|
|
279
|
+
// Since we are using an ephemeral service, we can await the synchronization using service.synchronize.
|
|
280
|
+
await service.synchronize();
|
|
281
|
+
|
|
282
|
+
// And now the changes are visible for all clients.
|
|
283
|
+
assert.equal(container1.data.root, 2);
|
|
284
|
+
assert.equal(container2.data.root, 2);
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Note that this example does a couple of things which are difficult to do with the other API surfaces:
|
|
288
|
+
1. It creates a container, then loads a second copy of it, allowing for collaboration. There is currently no non-legacy API surface which allows this without spawning a server process. This is also cleaner than the exacting legacy API options, and can replace the test specific APIs for this as well.
|
|
289
|
+
2. It creates a container which has a SharedTree at the root, and nothing else. This avoids depending on legacy DDS implementations, which is great for long-term document support and bundle size. This is currently impossible using `fluid-static`, which forces a special root data store. It is also impossible if using `aqueduct`, which forces a root directory in every data store. It can be done using the low level legacy APIs directly, but this new API for it is much simpler.
|
|
290
|
+
3. There is a common interface all services implement (`ServiceClient`), making the container creation part of the code work for any service implementation.
|
|
291
|
+
|
|
3
292
|
## 2.113.0
|
|
4
293
|
|
|
5
294
|
### Minor Changes
|
|
@@ -155,6 +155,7 @@ export interface ArrayNodeTreeChangedRetainOp extends ArrayNodeRetainOp {
|
|
|
155
155
|
|
|
156
156
|
// @alpha @sealed
|
|
157
157
|
export interface ArrayPlaceAnchor {
|
|
158
|
+
dispose(): void;
|
|
158
159
|
get index(): number;
|
|
159
160
|
}
|
|
160
161
|
|
|
@@ -215,6 +216,13 @@ export interface CommitMetadata {
|
|
|
215
216
|
readonly kind: CommitKind;
|
|
216
217
|
}
|
|
217
218
|
|
|
219
|
+
// @alpha
|
|
220
|
+
export enum CommitOutcome {
|
|
221
|
+
FullyApplied = 0,
|
|
222
|
+
FullyDropped = 1,
|
|
223
|
+
NewContentOnly = 2
|
|
224
|
+
}
|
|
225
|
+
|
|
218
226
|
// @alpha
|
|
219
227
|
export function comparePersistedSchema(persisted: JsonCompatible, view: ImplicitFieldSchema, options: ICodecOptions): Omit<SchemaCompatibilityStatus, "canInitialize">;
|
|
220
228
|
|
|
@@ -296,6 +304,9 @@ export function decodeSchemaCompatibilitySnapshot(encodedSchema: JsonCompatibleR
|
|
|
296
304
|
interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
|
|
297
305
|
}
|
|
298
306
|
|
|
307
|
+
// @alpha
|
|
308
|
+
export function defineTreeDataStore<const TSchema extends ImplicitFieldSchema>(options: TreeDataStoreOptions<TSchema>): DataStoreKind<TreeView<TSchema>>;
|
|
309
|
+
|
|
299
310
|
// @alpha
|
|
300
311
|
export interface DirtyTreeMap {
|
|
301
312
|
// (undocumented)
|
|
@@ -511,6 +522,56 @@ export const ForestTypeOptimized: ForestType;
|
|
|
511
522
|
// @beta
|
|
512
523
|
export const ForestTypeReference: ForestType;
|
|
513
524
|
|
|
525
|
+
// @alpha
|
|
526
|
+
export namespace FormattedText {
|
|
527
|
+
export function createSchema<const TUserScope extends string, const FormatSchema extends ImplicitAllowedTypes, const ExtraAtomsSchema extends readonly LazyItem<TreeNodeSchema<string, NodeKind, TextAtom & TreeNode>>[]>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, formatSchema: FormatSchema, extraAtoms: ExtraAtomsSchema, defaultFormatInsertable: InsertableTreeFieldFromImplicitField<FormatSchema>): FormattedTextSchema<TUserScope, FormatSchema, ExtraAtomsSchema>;
|
|
528
|
+
// @sealed
|
|
529
|
+
export interface FormattedAtom<TFormat, TText> {
|
|
530
|
+
readonly content: TText;
|
|
531
|
+
format: TFormat;
|
|
532
|
+
}
|
|
533
|
+
// @input
|
|
534
|
+
export interface FormattedAtomInsertable<TFormat, TContent> {
|
|
535
|
+
// (undocumented)
|
|
536
|
+
readonly content: TContent;
|
|
537
|
+
// (undocumented)
|
|
538
|
+
readonly format: TFormat;
|
|
539
|
+
}
|
|
540
|
+
// @sealed
|
|
541
|
+
export type FormattedTextSchema<TUserScope extends string, FormatSchema extends ImplicitAllowedTypes, ExtraAtomsSchema extends readonly LazyItem<TreeNodeSchema<string, NodeKind, TextAtom & TreeNode>>[]> = Statics<ErasedNode<Members<FormatSchema, ExtraAtomsSchema>, FormattedTextSchemaIdentifier<TUserScope>>, FormatSchema> & ErasedSchemaSubclassable<Members<FormatSchema, ExtraAtomsSchema>, FormattedTextSchemaIdentifier<TUserScope>>;
|
|
542
|
+
const // @sealed
|
|
543
|
+
StringTextAtom: StringTextAtomStatics & TreeNodeSchema<"com.fluidframework.text.formatted.StringTextAtom", NodeKind, TextAtom & TreeNode & WithType<"com.fluidframework.text.formatted.StringTextAtom", NodeKind, unknown>, never, false>;
|
|
544
|
+
export type FormattedTextSchemaIdentifier<TUserScope extends string> = ScopedSchemaName<`com.fluidframework.text.formatted<${TUserScope}>`, "Text">;
|
|
545
|
+
// @sealed
|
|
546
|
+
export interface Members<FormatSchema extends ImplicitAllowedTypes, ExtraAtomsSchema extends readonly LazyItem<TreeNodeSchema<string, NodeKind, TextAtom & TreeNode>>[]> extends PlainText.Members {
|
|
547
|
+
charactersWithFormatting(): readonly FormattedAtom<TreeNodeFromImplicitAllowedTypes<FormatSchema>, TreeNodeFromImplicitAllowedTypes<TextAtomSchemas<ExtraAtomsSchema>>>[];
|
|
548
|
+
formatRange(startIndex: number | undefined, endIndex: number | undefined, format: Partial<TreeNodeFromImplicitAllowedTypes<FormatSchema>>): void;
|
|
549
|
+
getString(startIndex: number, endIndex?: number): string;
|
|
550
|
+
getUniformRun(startIndex: number, endIndex?: number): number;
|
|
551
|
+
// @override
|
|
552
|
+
insertAt(index: number, additionalCharacters: string | Iterable<TreeNodeFromImplicitAllowedTypes<TextAtomSchemas<ExtraAtomsSchema>>>, format?: InsertableTreeFieldFromImplicitField<FormatSchema>): void;
|
|
553
|
+
insertWithFormattingAt(index: number, additionalCharacters: Iterable<FormattedAtomInsertable<InsertableTreeNodeFromImplicitAllowedTypes<FormatSchema>, InsertableTreeNodeFromImplicitAllowedTypes<TextAtomSchemas<ExtraAtomsSchema>>>>): void;
|
|
554
|
+
onContentChanged(callback: (ops: readonly PlainText.TextOp[] | undefined) => void): () => void;
|
|
555
|
+
reformat(startIndex?: number | undefined, endIndex?: number | undefined, format?: InsertableTreeFieldFromImplicitField<FormatSchema>): void;
|
|
556
|
+
}
|
|
557
|
+
// @sealed
|
|
558
|
+
export interface Statics<TTree, FormatSchema extends ImplicitAllowedTypes> {
|
|
559
|
+
fromString(value: string, format?: InsertableTreeFieldFromImplicitField<FormatSchema>): TTree;
|
|
560
|
+
}
|
|
561
|
+
// @sealed
|
|
562
|
+
export type StringTextAtom = ErasedNode<TextAtom, "com.fluidframework.text.formatted.StringTextAtom">;
|
|
563
|
+
// @sealed
|
|
564
|
+
export interface StringTextAtomStatics {
|
|
565
|
+
fromCharacter(value: string): StringTextAtom;
|
|
566
|
+
fromString(value: string): StringTextAtom[];
|
|
567
|
+
}
|
|
568
|
+
export interface TextAtom {
|
|
569
|
+
readonly content: string;
|
|
570
|
+
}
|
|
571
|
+
// @sealed
|
|
572
|
+
export type TextAtomSchemas<ExtraAtomsSchema extends readonly LazyItem<TreeNodeSchema<string, NodeKind, TextAtom & TreeNode>>[]> = readonly [typeof StringTextAtom, ...ExtraAtomsSchema];
|
|
573
|
+
}
|
|
574
|
+
|
|
514
575
|
// @alpha @sealed
|
|
515
576
|
export interface FormatValidator extends ErasedType<"FormatValidator"> {
|
|
516
577
|
}
|
|
@@ -638,6 +699,9 @@ TSchema
|
|
|
638
699
|
// @public
|
|
639
700
|
export type InsertableTypedNode<TSchema extends TreeNodeSchema, T = UnionToIntersection<TSchema>> = (T extends TreeNodeSchema<string, NodeKind, TreeNode | TreeLeafValue, never, true> ? NodeBuilderData<T> : never) | (T extends TreeNodeSchema ? Unhydrated<TreeNode extends NodeFromSchema<T> ? never : NodeFromSchema<T>> : never);
|
|
640
701
|
|
|
702
|
+
// @alpha
|
|
703
|
+
export function instantiateTreeFirstTime<TSchema extends ImplicitFieldSchema>(rootCreator: SharedObjectCreator, creator: SharedObjectCreator, treeKind: SharedObjectKey<ITree>, options: Pick<TreeDataStoreOptions<TSchema>, "config" | "initializer">): Promise<ITree>;
|
|
704
|
+
|
|
641
705
|
// @public @sealed
|
|
642
706
|
export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> {
|
|
643
707
|
}
|
|
@@ -839,6 +903,7 @@ export type Listeners<T extends object> = Listeners_2<T>;
|
|
|
839
903
|
|
|
840
904
|
// @alpha @sealed
|
|
841
905
|
export interface LocalChangeMetadata extends CommitMetadata {
|
|
906
|
+
readonly events: Listenable_2<LocalCommitEvents>;
|
|
842
907
|
getChange(): JsonCompatibleReadOnly;
|
|
843
908
|
getRevertible(onDisposed?: (revertible: RevertibleAlpha) => void): RevertibleAlpha | undefined;
|
|
844
909
|
readonly isLocal: true;
|
|
@@ -846,6 +911,11 @@ export interface LocalChangeMetadata extends CommitMetadata {
|
|
|
846
911
|
readonly labels: TransactionLabels;
|
|
847
912
|
}
|
|
848
913
|
|
|
914
|
+
// @alpha @sealed
|
|
915
|
+
export interface LocalCommitEvents {
|
|
916
|
+
settled(outcome: CommitOutcome): void;
|
|
917
|
+
}
|
|
918
|
+
|
|
849
919
|
// @public @sealed
|
|
850
920
|
export interface MakeNominal {
|
|
851
921
|
}
|
|
@@ -1003,6 +1073,42 @@ export type Off = Off_2;
|
|
|
1003
1073
|
// @alpha
|
|
1004
1074
|
export function persistedToSimpleSchema(persisted: JsonCompatible, options: ICodecOptions): SimpleTreeSchema;
|
|
1005
1075
|
|
|
1076
|
+
// @alpha
|
|
1077
|
+
export namespace PlainText {
|
|
1078
|
+
// @sealed
|
|
1079
|
+
export interface Members {
|
|
1080
|
+
characterCount(): number;
|
|
1081
|
+
characters(): Iterable<string>;
|
|
1082
|
+
charactersCopy(): string[];
|
|
1083
|
+
fullString(): string;
|
|
1084
|
+
insertAt(index: number, additionalCharacters: string): void;
|
|
1085
|
+
onCharactersChanged(callback: (ops: readonly TextOp[] | undefined) => void): () => void;
|
|
1086
|
+
removeRange(startIndex: number | undefined, endIndex: number | undefined): void;
|
|
1087
|
+
}
|
|
1088
|
+
export interface Statics {
|
|
1089
|
+
fromString(value: string): Tree;
|
|
1090
|
+
}
|
|
1091
|
+
// @sealed
|
|
1092
|
+
export interface TextInsertOp {
|
|
1093
|
+
readonly text: string;
|
|
1094
|
+
readonly type: "insert";
|
|
1095
|
+
}
|
|
1096
|
+
export type TextOp = TextRetainOp | TextInsertOp | TextRemoveOp;
|
|
1097
|
+
// @sealed
|
|
1098
|
+
export interface TextRemoveOp {
|
|
1099
|
+
readonly count: number;
|
|
1100
|
+
readonly type: "remove";
|
|
1101
|
+
}
|
|
1102
|
+
// @sealed
|
|
1103
|
+
export interface TextRetainOp {
|
|
1104
|
+
readonly count: number;
|
|
1105
|
+
readonly formattingChanged?: boolean;
|
|
1106
|
+
readonly type: "retain";
|
|
1107
|
+
}
|
|
1108
|
+
const Tree: Statics & TreeNodeSchema<"com.fluidframework.text.Text", NodeKind, Members & TreeNode & WithType<"com.fluidframework.text.Text", NodeKind, unknown>, never, false>;
|
|
1109
|
+
export type Tree = Members & TreeNode & WithType<"com.fluidframework.text.Text">;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1006
1112
|
// @beta @system
|
|
1007
1113
|
export type PopUnion<Union, AsOverloadedFunction = UnionToIntersection<Union extends unknown ? (f: Union) => void : never>> = AsOverloadedFunction extends (a: infer First) => void ? First : never;
|
|
1008
1114
|
|
|
@@ -1164,9 +1270,9 @@ export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
|
|
|
1164
1270
|
export class SchemaFactoryAlpha<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactoryBeta<TScope, TName> {
|
|
1165
1271
|
arrayAlpha<const Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaAlpha<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
1166
1272
|
arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
|
|
1167
|
-
static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier,
|
|
1168
|
-
static readonly leaves: readonly [
|
|
1169
|
-
readonly leaves: readonly [
|
|
1273
|
+
static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier, StringSchema, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1274
|
+
static readonly leaves: readonly [StringSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle<unknown>> & SimpleLeafNodeSchema<SchemaType>];
|
|
1275
|
+
readonly leaves: readonly [StringSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle<unknown>> & SimpleLeafNodeSchema<SchemaType>];
|
|
1170
1276
|
mapAlpha<Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
1171
1277
|
mapRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
|
|
1172
1278
|
objectAlpha<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchema>, const TCustomMetadata = unknown>(name: Name, fields: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): ObjectNodeSchemaWorkaround<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
@@ -1279,6 +1385,9 @@ export class SchemaUpgrade {
|
|
|
1279
1385
|
// @public @system
|
|
1280
1386
|
type ScopedSchemaName<TScope extends string | undefined, TName extends number | string> = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`;
|
|
1281
1387
|
|
|
1388
|
+
// @alpha
|
|
1389
|
+
export const SharedTreeAlpha: SharedObjectKindAlpha<ITree>;
|
|
1390
|
+
|
|
1282
1391
|
// @alpha @input
|
|
1283
1392
|
export interface SharedTreeFormatOptions {
|
|
1284
1393
|
treeEncodeType: TreeCompressionStrategy;
|
|
@@ -1420,6 +1529,9 @@ export interface StagedSchemaUpgradePolicyFactory {
|
|
|
1420
1529
|
readonly restrictive: StagedSchemaUpgradePolicy;
|
|
1421
1530
|
}
|
|
1422
1531
|
|
|
1532
|
+
// @alpha @sealed @system
|
|
1533
|
+
export type StringSchema = LeafSchema<"string", string> & SimpleLeafNodeSchema;
|
|
1534
|
+
|
|
1423
1535
|
// @beta @system
|
|
1424
1536
|
export namespace System_TableSchema {
|
|
1425
1537
|
// @sealed @system
|
|
@@ -1654,42 +1766,6 @@ export namespace TableSchema {
|
|
|
1654
1766
|
}
|
|
1655
1767
|
}
|
|
1656
1768
|
|
|
1657
|
-
// @alpha
|
|
1658
|
-
export namespace TextAsTree {
|
|
1659
|
-
// @sealed
|
|
1660
|
-
export interface Members {
|
|
1661
|
-
characterCount(): number;
|
|
1662
|
-
characters(): Iterable<string>;
|
|
1663
|
-
charactersCopy(): string[];
|
|
1664
|
-
fullString(): string;
|
|
1665
|
-
insertAt(index: number, additionalCharacters: string): void;
|
|
1666
|
-
onCharactersChanged(callback: (ops: readonly TextOp[] | undefined) => void): () => void;
|
|
1667
|
-
removeRange(startIndex: number | undefined, endIndex: number | undefined): void;
|
|
1668
|
-
}
|
|
1669
|
-
export interface Statics {
|
|
1670
|
-
fromString(value: string): Tree;
|
|
1671
|
-
}
|
|
1672
|
-
// @sealed
|
|
1673
|
-
export interface TextInsertOp {
|
|
1674
|
-
readonly text: string;
|
|
1675
|
-
readonly type: "insert";
|
|
1676
|
-
}
|
|
1677
|
-
export type TextOp = TextRetainOp | TextInsertOp | TextRemoveOp;
|
|
1678
|
-
// @sealed
|
|
1679
|
-
export interface TextRemoveOp {
|
|
1680
|
-
readonly count: number;
|
|
1681
|
-
readonly type: "remove";
|
|
1682
|
-
}
|
|
1683
|
-
// @sealed
|
|
1684
|
-
export interface TextRetainOp {
|
|
1685
|
-
readonly count: number;
|
|
1686
|
-
readonly formattingChanged?: boolean;
|
|
1687
|
-
readonly type: "retain";
|
|
1688
|
-
}
|
|
1689
|
-
const Tree: Statics & TreeNodeSchema<"com.fluidframework.text.Text", NodeKind, Members & TreeNode & WithType<"com.fluidframework.text.Text", NodeKind, unknown>, never, false>;
|
|
1690
|
-
export type Tree = Members & TreeNode & WithType<"com.fluidframework.text.Text">;
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
1769
|
// @alpha
|
|
1694
1770
|
export function trackDirtyNodes(view: TreeViewAlpha<ImplicitFieldSchema>, dirty: DirtyTreeMap): () => void;
|
|
1695
1771
|
|
|
@@ -1889,6 +1965,15 @@ export interface TreeContextAlpha {
|
|
|
1889
1965
|
runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
|
|
1890
1966
|
}
|
|
1891
1967
|
|
|
1968
|
+
// @alpha @input
|
|
1969
|
+
export interface TreeDataStoreOptions<TSchema extends ImplicitFieldSchema> extends Pick<DataStoreOptions<never, never>, "type"> {
|
|
1970
|
+
readonly config: TreeViewConfiguration<TSchema>;
|
|
1971
|
+
readonly initializer?: (creator: SharedObjectCreator) => InsertableTreeFieldFromImplicitField<TSchema>;
|
|
1972
|
+
// (undocumented)
|
|
1973
|
+
readonly key?: SharedObjectKey<ITree>;
|
|
1974
|
+
readonly registry?: Iterable<SharedObjectKindAlpha<IFluidLoadable>> | SharedObjectRegistry;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1892
1977
|
// @beta @input
|
|
1893
1978
|
export interface TreeEncodingOptions<TKeyOptions = KeyEncodingOptions> {
|
|
1894
1979
|
readonly keys?: TKeyOptions;
|
|
@@ -1932,6 +2017,9 @@ export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTyp
|
|
|
1932
2017
|
|
|
1933
2018
|
// @alpha @sealed
|
|
1934
2019
|
export interface TreeMapNodeAlpha<T extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends FluidReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>, TreeNode, Pick<TreeMapNode<T>, "set" | "delete"> {
|
|
2020
|
+
clear(): void;
|
|
2021
|
+
getOrInsert(key: string, fallbackValue: InsertableTreeNodeFromImplicitAllowedTypes<T>): TreeNodeFromImplicitAllowedTypes<T>;
|
|
2022
|
+
getOrInsertComputed(key: string, callback: (key: string) => InsertableTreeNodeFromImplicitAllowedTypes<T>): TreeNodeFromImplicitAllowedTypes<T>;
|
|
1935
2023
|
}
|
|
1936
2024
|
|
|
1937
2025
|
// @public @sealed
|
|
@@ -7,10 +7,12 @@ import type { ICodecFamily, IJsonCodec } from "../../codec/index.js";
|
|
|
7
7
|
import type { SchemaAndPolicy } from "../../core/index.js";
|
|
8
8
|
import type { IdentifierHealingConfig, JsonCompatibleReadOnly } from "../../util/index.js";
|
|
9
9
|
import type { ChangeRebaser, RevisionTag, TaggedChange } from "../rebase/index.js";
|
|
10
|
-
export
|
|
10
|
+
export type ProcessChangeFn<TChange, TChangeProcessingContext> = TChangeProcessingContext extends never ? (change: TChange) => TChange : (change: TChange, context: TChangeProcessingContext) => TChange;
|
|
11
|
+
export interface ChangeFamily<TEditor extends ChangeFamilyEditor, TChange, TChangeProcessingContext = never> {
|
|
11
12
|
buildEditor(mintRevisionTag: () => RevisionTag, changeReceiver: (change: TaggedChange<TChange>) => void): TEditor;
|
|
12
13
|
readonly rebaser: ChangeRebaser<TChange>;
|
|
13
|
-
readonly codecs: ICodecFamily<TChange, ChangeEncodingContext>;
|
|
14
|
+
readonly codecs: ICodecFamily<TChange, ChangeEncodingContext, ChangeDecodingContext>;
|
|
15
|
+
buildProcessor(processFn: ProcessChangeFn<TChange, TChangeProcessingContext>): (change: TChange) => TChange;
|
|
14
16
|
}
|
|
15
17
|
export interface ChangeEncodingContext {
|
|
16
18
|
readonly originatorId: SessionId;
|
|
@@ -28,13 +30,22 @@ export interface ChangeEncodingContext {
|
|
|
28
30
|
* (possibly broken) attach-summary blob, never when applying ops.
|
|
29
31
|
*/
|
|
30
32
|
readonly isSummary: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Context provided to change codecs when decoding.
|
|
36
|
+
* @remarks
|
|
37
|
+
* The same as {@link ChangeEncodingContext} except that it omits `schema` (only consulted when
|
|
38
|
+
* *encoding*, for schema-aware compression) and adds `healing` (only consulted when *decoding*, to
|
|
39
|
+
* recover unresolvable identifiers from a summary blob).
|
|
40
|
+
*/
|
|
41
|
+
export type ChangeDecodingContext = Omit<ChangeEncodingContext, "schema"> & {
|
|
31
42
|
/**
|
|
32
43
|
* Heal-on-decode workaround configuration. See {@link IdentifierHealingConfig}.
|
|
33
44
|
* Only takes effect when `isSummary` is also `true`.
|
|
34
45
|
*/
|
|
35
46
|
readonly healing?: IdentifierHealingConfig;
|
|
36
|
-
}
|
|
37
|
-
export type ChangeFamilyCodec<TChange> = IJsonCodec<TChange, JsonCompatibleReadOnly, JsonCompatibleReadOnly, ChangeEncodingContext>;
|
|
47
|
+
};
|
|
48
|
+
export type ChangeFamilyCodec<TChange> = IJsonCodec<TChange, JsonCompatibleReadOnly, JsonCompatibleReadOnly, ChangeEncodingContext, ChangeDecodingContext>;
|
|
38
49
|
export interface ChangeFamilyEditor {
|
|
39
50
|
/**
|
|
40
51
|
* Must be called when a new transaction starts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeFamily.d.ts","sourceRoot":"","sources":["../../../src/core/change-family/changeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnF,MAAM,WAAW,YAAY,
|
|
1
|
+
{"version":3,"file":"changeFamily.d.ts","sourceRoot":"","sources":["../../../src/core/change-family/changeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnF,MAAM,MAAM,eAAe,CAAC,OAAO,EAAE,wBAAwB,IAC5D,wBAAwB,SAAS,KAAK,GACnC,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,GAC5B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,wBAAwB,KAAK,OAAO,CAAC;AAEpE,MAAM,WAAW,YAAY,CAC5B,OAAO,SAAS,kBAAkB,EAClC,OAAO,EAKP,wBAAwB,GAAG,KAAK;IAEhC,WAAW,CACV,eAAe,EAAE,MAAM,WAAW,EAClC,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,KAAK,IAAI,GACrD,OAAO,CAAC;IAEX,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,CAAC;IAErF,cAAc,CACb,SAAS,EAAE,eAAe,CAAC,OAAO,EAAE,wBAAwB,CAAC,GAC3D,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAClC;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,GAAG;IAC3E;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,uBAAuB,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,UAAU,CAClD,OAAO,EACP,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,CACrB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC;;;;;;;OAOG;IACH,gBAAgB,IAAI,IAAI,CAAC;IAEzB;;;;;;;OAOG;IACH,eAAe,IAAI,IAAI,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeFamily.js","sourceRoot":"","sources":["../../../src/core/change-family/changeFamily.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nimport type { ICodecFamily, IJsonCodec } from \"../../codec/index.js\";\nimport type { SchemaAndPolicy } from \"../../core/index.js\";\nimport type { IdentifierHealingConfig, JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport type { ChangeRebaser, RevisionTag, TaggedChange } from \"../rebase/index.js\";\n\nexport interface ChangeFamily
|
|
1
|
+
{"version":3,"file":"changeFamily.js","sourceRoot":"","sources":["../../../src/core/change-family/changeFamily.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nimport type { ICodecFamily, IJsonCodec } from \"../../codec/index.js\";\nimport type { SchemaAndPolicy } from \"../../core/index.js\";\nimport type { IdentifierHealingConfig, JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport type { ChangeRebaser, RevisionTag, TaggedChange } from \"../rebase/index.js\";\n\nexport type ProcessChangeFn<TChange, TChangeProcessingContext> =\n\tTChangeProcessingContext extends never\n\t\t? (change: TChange) => TChange\n\t\t: (change: TChange, context: TChangeProcessingContext) => TChange;\n\nexport interface ChangeFamily<\n\tTEditor extends ChangeFamilyEditor,\n\tTChange,\n\t// For simplicity, may be a concrete ChangeFamily implementation such as\n\t// ChangeFamilyFoo implements ChangeFamily<EditorFoo, ChangeFoo, ChangeFamilyFoo>\n\t// to provide all details and helpers that processFn for ChangeFoo\n\t// may require, but there is no requirement to follow that pattern.\n\tTChangeProcessingContext = never,\n> {\n\tbuildEditor(\n\t\tmintRevisionTag: () => RevisionTag,\n\t\tchangeReceiver: (change: TaggedChange<TChange>) => void,\n\t): TEditor;\n\n\treadonly rebaser: ChangeRebaser<TChange>;\n\treadonly codecs: ICodecFamily<TChange, ChangeEncodingContext, ChangeDecodingContext>;\n\n\tbuildProcessor(\n\t\tprocessFn: ProcessChangeFn<TChange, TChangeProcessingContext>,\n\t): (change: TChange) => TChange;\n}\n\nexport interface ChangeEncodingContext {\n\treadonly originatorId: SessionId;\n\treadonly revision: RevisionTag | undefined;\n\treadonly idCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\t/**\n\t * `true` when this context is encoding to or decoding from a summary blob.\n\t * `false` when this context is for an op (or any other non-summary path,\n\t * including utility encoders that aren't tied to persistence).\n\t *\n\t * @remarks\n\t * Used to gate decode-time recovery behavior — for example, healing of\n\t * unresolvable identifier IDs — that should only run when loading a\n\t * (possibly broken) attach-summary blob, never when applying ops.\n\t */\n\treadonly isSummary: boolean;\n}\n\n/**\n * Context provided to change codecs when decoding.\n * @remarks\n * The same as {@link ChangeEncodingContext} except that it omits `schema` (only consulted when\n * *encoding*, for schema-aware compression) and adds `healing` (only consulted when *decoding*, to\n * recover unresolvable identifiers from a summary blob).\n */\nexport type ChangeDecodingContext = Omit<ChangeEncodingContext, \"schema\"> & {\n\t/**\n\t * Heal-on-decode workaround configuration. See {@link IdentifierHealingConfig}.\n\t * Only takes effect when `isSummary` is also `true`.\n\t */\n\treadonly healing?: IdentifierHealingConfig;\n};\n\nexport type ChangeFamilyCodec<TChange> = IJsonCodec<\n\tTChange,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tChangeEncodingContext,\n\tChangeDecodingContext\n>;\n\nexport interface ChangeFamilyEditor {\n\t/**\n\t * Must be called when a new transaction starts.\n\t *\n\t * Note: transactions are an optional feature. It is valid to make edits outside of a transaction.\n\t *\n\t * For each call to this function, a matching call to `exitTransaction` must be made at a later time.\n\t * Can be called repeatedly to indicate the start of nesting transactions.\n\t */\n\tenterTransaction(): void;\n\n\t/**\n\t * Must be called when a transaction ends.\n\t *\n\t * Note: transactions are an optional feature. It is valid to make edits outside of a transaction.\n\t *\n\t * For each call to this function, a matching call to `enterTransaction` must be made at an earlier time.\n\t * Can be called repeatedly to indicate the end of nesting transactions.\n\t */\n\texitTransaction(): void;\n}\n"]}
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { TaggedChange } from "../rebase/index.js";
|
|
6
|
-
import type {
|
|
6
|
+
import type { ChangeFamilyEditor } from "./changeFamily.js";
|
|
7
7
|
export declare abstract class EditBuilder<TChange> implements ChangeFamilyEditor {
|
|
8
|
-
protected readonly changeFamily: ChangeFamily<ChangeFamilyEditor, TChange>;
|
|
9
8
|
private readonly changeReceiver;
|
|
10
|
-
constructor(
|
|
9
|
+
constructor(changeReceiver: (change: TaggedChange<TChange>) => void);
|
|
11
10
|
/**
|
|
12
11
|
* Subclasses add editing methods which call this with their generated edits.
|
|
13
12
|
*
|