@fluidframework/tree 2.113.0-411909 → 2.114.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 +272 -0
- package/api-report/tree.alpha.api.md +19 -0
- 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 +3 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.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 +5 -2
- package/dist/entrypoints/alpha.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/optionalField.js +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- 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 +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/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 +6 -3
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +8 -6
- 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 +8 -7
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +1 -1
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +23 -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.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/node-kinds/array/arrayNode.d.ts +21 -2
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts +13 -0
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +9 -0
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/text/textDomain.d.ts +12 -0
- package/dist/text/textDomain.d.ts.map +1 -1
- package/dist/text/textDomain.js +37 -16
- package/dist/text/textDomain.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +155 -61
- package/dist/text/textDomainFormatted.d.ts.map +1 -1
- package/dist/text/textDomainFormatted.js +147 -71
- package/dist/text/textDomainFormatted.js.map +1 -1
- package/dist/text/textDomainFormattedDefault.d.ts +37 -14
- package/dist/text/textDomainFormattedDefault.d.ts.map +1 -1
- package/dist/text/textDomainFormattedDefault.js +13 -5
- 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/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 +3 -2
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/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/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/optionalField.js +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- 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 +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/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 +6 -3
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +9 -7
- 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 +8 -7
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +1 -1
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +23 -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.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/node-kinds/array/arrayNode.d.ts +21 -2
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts +13 -0
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +9 -0
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/text/textDomain.d.ts +12 -0
- package/lib/text/textDomain.d.ts.map +1 -1
- package/lib/text/textDomain.js +34 -15
- package/lib/text/textDomain.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +155 -61
- package/lib/text/textDomainFormatted.d.ts.map +1 -1
- package/lib/text/textDomainFormatted.js +148 -73
- package/lib/text/textDomainFormatted.js.map +1 -1
- package/lib/text/textDomainFormattedDefault.d.ts +37 -14
- package/lib/text/textDomainFormattedDefault.d.ts.map +1 -1
- package/lib/text/textDomainFormattedDefault.js +14 -6
- 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/package.json +25 -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 +9 -6
- 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 +7 -3
- 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/optionalField.ts +1 -1
- 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 +4 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/serializedChange.ts +2 -2
- package/src/shared-tree/sharedTree.ts +34 -14
- 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 +55 -16
- package/src/shared-tree-core/branch.ts +40 -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 +15 -6
- package/src/shared-tree-core/transaction.ts +47 -25
- package/src/simple-tree/api/eraseSchemaDetails.ts +15 -0
- package/src/simple-tree/node-kinds/array/arrayNode.ts +21 -2
- package/src/simple-tree/node-kinds/map/mapNode.ts +24 -2
- package/src/text/textDomain.ts +29 -6
- package/src/text/textDomainFormatted.ts +351 -134
- package/src/text/textDomainFormattedDefault.ts +25 -16
- package/src/treeDataStore.ts +125 -0
- package/src/treeFactory.ts +11 -3
|
@@ -7,13 +7,15 @@ import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
|
7
7
|
import { BTree } from "@tylerbu/sorted-btree-es6";
|
|
8
8
|
import { lt } from "semver-ts";
|
|
9
9
|
import { FluidClientVersion, } from "../../codec/index.js";
|
|
10
|
-
import { EditBuilder, makeDetachedNodeId, revisionMetadataSourceFromInfo, areEqualChangeAtomIds, areEqualChangeAtomIdOpts, tagChange, makeAnonChange,
|
|
10
|
+
import { EditBuilder, makeDetachedNodeId, revisionMetadataSourceFromInfo, areEqualChangeAtomIds, areEqualChangeAtomIdOpts, tagChange, makeAnonChange, mapTaggedChange, comparePartialRevisions, comparePartialChangesetLocalIds, } from "../../core/index.js";
|
|
11
11
|
import { brand, idAllocatorFromMaxId, idAllocatorFromState, getOrCreate, mergeTupleBTrees, RangeMap, balancedReduce, newTupleBTree, compareStrings, createTupleComparator, } from "../../util/index.js";
|
|
12
12
|
import { getFromChangeAtomIdMap, newChangeAtomIdBTree, setInChangeAtomIdMap, } from "../changeAtomIdBTree.js";
|
|
13
|
-
import { CrossFieldTarget, getFirstFromCrossFieldMap, setInCrossFieldMap, } from "./crossFieldQueries.js";
|
|
14
13
|
import { EditFilterStatus, NodeAttachState, } from "./fieldChangeHandler.js";
|
|
15
14
|
import { convertGenericChange, genericFieldKind } from "./genericFieldKind.js";
|
|
16
15
|
import { newCrossFieldKeyTable, } from "./modularChangeTypes.js";
|
|
16
|
+
import { CrossFieldManagerI, getChangeHandler, getRevInfoFromTaggedChanges, hasConflicts, makeModularChangeset, newConstraintState, newCrossFieldTable, nodeChangeFromId, revisionInfoFromTaggedChange, updateConstraintsForFields, } from "./modularChangeUtils.js";
|
|
17
|
+
import { invertModularChange } from "./invert.js";
|
|
18
|
+
import { pruneFieldMap } from "./prune.js";
|
|
17
19
|
/**
|
|
18
20
|
* Implementation of ChangeFamily which delegates work in a given field to the appropriate FieldKind
|
|
19
21
|
* as determined by the schema.
|
|
@@ -27,6 +29,9 @@ export class ModularChangeFamily {
|
|
|
27
29
|
get rebaser() {
|
|
28
30
|
return this;
|
|
29
31
|
}
|
|
32
|
+
buildProcessor(processFn) {
|
|
33
|
+
return (change) => processFn(change, this);
|
|
34
|
+
}
|
|
30
35
|
/**
|
|
31
36
|
* Produces an equivalent list of `FieldChangeset`s that all target the same {@link FlexFieldKind}.
|
|
32
37
|
* @param changes - The list of `FieldChange`s whose `FieldChangeset`s needs to be normalized.
|
|
@@ -48,8 +53,7 @@ export class ModularChangeFamily {
|
|
|
48
53
|
change2: change2.change,
|
|
49
54
|
};
|
|
50
55
|
}
|
|
51
|
-
const
|
|
52
|
-
const changeHandler = fieldKind.changeHandler;
|
|
56
|
+
const changeHandler = getChangeHandler(this.fieldKinds, kind);
|
|
53
57
|
const normalizedChange1 = this.normalizeFieldChange(change1, changeHandler);
|
|
54
58
|
const normalizedChange2 = this.normalizeFieldChange(change2, changeHandler);
|
|
55
59
|
return {
|
|
@@ -319,106 +323,8 @@ export class ModularChangeFamily {
|
|
|
319
323
|
}
|
|
320
324
|
return composedNodeChange;
|
|
321
325
|
}
|
|
322
|
-
/**
|
|
323
|
-
* @param change - The change to invert.
|
|
324
|
-
* @param isRollback - Whether the inverted change is meant to rollback a change on a branch as is the case when
|
|
325
|
-
* performing a sandwich rebase.
|
|
326
|
-
* @param revisionForInvert - The revision for the invert changeset.
|
|
327
|
-
*/
|
|
328
326
|
invert(change, isRollback, revisionForInvert) {
|
|
329
|
-
|
|
330
|
-
const destroys = isRollback ? invertBuilds(change.change.builds) : undefined;
|
|
331
|
-
// Destroys only occur in rollback changesets, which are never inverted.
|
|
332
|
-
assert(change.change.destroys === undefined, 0x89a /* Unexpected destroys in change to invert */);
|
|
333
|
-
const revInfos = isRollback
|
|
334
|
-
? [{ revision: revisionForInvert, rollbackOf: change.revision }]
|
|
335
|
-
: [{ revision: revisionForInvert }];
|
|
336
|
-
const noChangeConstraint = change.change.noChangeConstraintOnRevert;
|
|
337
|
-
const noChangeConstraintOnRevert = change.change.noChangeConstraint;
|
|
338
|
-
if (hasConflicts(change.change)) {
|
|
339
|
-
return makeModularChangeset({
|
|
340
|
-
maxId: change.change.maxId,
|
|
341
|
-
revisions: revInfos,
|
|
342
|
-
destroys,
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
const genId = idAllocatorFromMaxId(change.change.maxId ?? -1);
|
|
346
|
-
const crossFieldTable = {
|
|
347
|
-
...newCrossFieldTable(),
|
|
348
|
-
originalFieldToContext: new Map(),
|
|
349
|
-
invertedNodeToParent: brand(change.change.nodeToParent.clone()),
|
|
350
|
-
};
|
|
351
|
-
const { revInfos: oldRevInfos } = getRevInfoFromTaggedChanges([change]);
|
|
352
|
-
const revisionMetadata = revisionMetadataSourceFromInfo(oldRevInfos);
|
|
353
|
-
const invertedFields = this.invertFieldMap(change.change.fieldChanges, undefined, isRollback, genId, crossFieldTable, revisionMetadata, revisionForInvert);
|
|
354
|
-
const invertedNodes = newChangeAtomIdBTree();
|
|
355
|
-
change.change.nodeChanges.forEachPair(([revision, localId], nodeChangeset) => {
|
|
356
|
-
invertedNodes.set([revision, localId], this.invertNodeChange(nodeChangeset, { revision, localId }, isRollback, genId, crossFieldTable, revisionMetadata, revisionForInvert));
|
|
357
|
-
});
|
|
358
|
-
if (crossFieldTable.invalidatedFields.size > 0) {
|
|
359
|
-
const fieldsToUpdate = crossFieldTable.invalidatedFields;
|
|
360
|
-
crossFieldTable.invalidatedFields = new Set();
|
|
361
|
-
for (const fieldChange of fieldsToUpdate) {
|
|
362
|
-
const originalFieldChange = fieldChange.change;
|
|
363
|
-
const context = crossFieldTable.originalFieldToContext.get(fieldChange);
|
|
364
|
-
assert(context !== undefined, 0x851 /* Should have context for every invalidated field */);
|
|
365
|
-
const { invertedField, fieldId } = context;
|
|
366
|
-
const amendedChange = getChangeHandler(this.fieldKinds, fieldChange.fieldKind).rebaser.invert(originalFieldChange, isRollback, genId, revisionForInvert, new InvertManager(crossFieldTable, fieldChange, fieldId), revisionMetadata);
|
|
367
|
-
invertedField.change = brand(amendedChange);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
const crossFieldKeys = this.makeCrossFieldKeyTable(invertedFields, invertedNodes);
|
|
371
|
-
const constraintState = newConstraintState(0);
|
|
372
|
-
this.updateConstraintsForFields(invertedFields, NodeAttachState.Attached, constraintState, invertedNodes);
|
|
373
|
-
return makeModularChangeset({
|
|
374
|
-
fieldChanges: invertedFields,
|
|
375
|
-
nodeChanges: invertedNodes,
|
|
376
|
-
nodeToParent: crossFieldTable.invertedNodeToParent,
|
|
377
|
-
nodeAliases: change.change.nodeAliases,
|
|
378
|
-
crossFieldKeys,
|
|
379
|
-
maxId: genId.getMaxId(),
|
|
380
|
-
revisions: revInfos,
|
|
381
|
-
constraintViolationCount: constraintState.violationCount,
|
|
382
|
-
noChangeConstraint,
|
|
383
|
-
noChangeConstraintOnRevert,
|
|
384
|
-
destroys,
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
invertFieldMap(changes, parentId, isRollback, genId, crossFieldTable, revisionMetadata, revisionForInvert) {
|
|
388
|
-
const invertedFields = new Map();
|
|
389
|
-
for (const [field, fieldChange] of changes) {
|
|
390
|
-
const fieldId = { nodeId: parentId, field };
|
|
391
|
-
const manager = new InvertManager(crossFieldTable, fieldChange, fieldId);
|
|
392
|
-
const invertedChange = getChangeHandler(this.fieldKinds, fieldChange.fieldKind).rebaser.invert(fieldChange.change, isRollback, genId, revisionForInvert, manager, revisionMetadata);
|
|
393
|
-
const invertedFieldChange = {
|
|
394
|
-
...fieldChange,
|
|
395
|
-
change: brand(invertedChange),
|
|
396
|
-
};
|
|
397
|
-
invertedFields.set(field, invertedFieldChange);
|
|
398
|
-
crossFieldTable.originalFieldToContext.set(fieldChange, {
|
|
399
|
-
fieldId,
|
|
400
|
-
invertedField: invertedFieldChange,
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
return invertedFields;
|
|
404
|
-
}
|
|
405
|
-
invertNodeChange(change, id, isRollback, genId, crossFieldTable, revisionMetadata, revisionForInvert) {
|
|
406
|
-
const inverse = {};
|
|
407
|
-
// If the node has a constraint, it should be inverted to a node-exist-on-revert constraint. This ensure that if
|
|
408
|
-
// the inverse is inverted again, the original input constraint will be restored.
|
|
409
|
-
if (change.nodeExistsConstraint !== undefined) {
|
|
410
|
-
inverse.nodeExistsConstraintOnRevert = change.nodeExistsConstraint;
|
|
411
|
-
}
|
|
412
|
-
// The node-exist-on-revert constraint of a node is the constraint that should apply when the a change is reverted.
|
|
413
|
-
// So, it should become the constraint in the inverse. If this constraint is violated when applying the inverse,
|
|
414
|
-
// it will be discarded.
|
|
415
|
-
if (change.nodeExistsConstraintOnRevert !== undefined) {
|
|
416
|
-
inverse.nodeExistsConstraint = change.nodeExistsConstraintOnRevert;
|
|
417
|
-
}
|
|
418
|
-
if (change.fieldChanges !== undefined) {
|
|
419
|
-
inverse.fieldChanges = this.invertFieldMap(change.fieldChanges, id, isRollback, genId, crossFieldTable, revisionMetadata, revisionForInvert);
|
|
420
|
-
}
|
|
421
|
-
return inverse;
|
|
327
|
+
return invertModularChange(change, isRollback, revisionForInvert, this.fieldKinds);
|
|
422
328
|
}
|
|
423
329
|
rebase(taggedChange, potentiallyConflictedOver, revisionMetadata, ignoreNoChangeViolation = false) {
|
|
424
330
|
// Our current cell ordering scheme in sequences depends on being able to rebase over a change with conflicts.
|
|
@@ -460,9 +366,9 @@ export class ModularChangeFamily {
|
|
|
460
366
|
noChangeConstraint = { violated: true };
|
|
461
367
|
constraintState.violationCount += 1;
|
|
462
368
|
}
|
|
463
|
-
|
|
369
|
+
updateConstraintsForFields(rebasedFields, NodeAttachState.Attached, constraintState, rebasedNodes, this.fieldKinds);
|
|
464
370
|
const rebased = makeModularChangeset({
|
|
465
|
-
fieldChanges:
|
|
371
|
+
fieldChanges: pruneFieldMap(rebasedFields, rebasedNodes, this.fieldKinds),
|
|
466
372
|
nodeChanges: rebasedNodes,
|
|
467
373
|
nodeToParent: crossFieldTable.rebasedNodeToParent,
|
|
468
374
|
nodeAliases: change.nodeAliases,
|
|
@@ -678,66 +584,6 @@ export class ModularChangeFamily {
|
|
|
678
584
|
setInChangeAtomIdMap(crossFieldTable.baseToRebasedNodeId, baseId, newId);
|
|
679
585
|
return rebasedChange;
|
|
680
586
|
}
|
|
681
|
-
updateConstraintsForFields(fields, parentInputAttachState, constraintState, nodes) {
|
|
682
|
-
for (const field of fields.values()) {
|
|
683
|
-
const handler = getChangeHandler(this.fieldKinds, field.fieldKind);
|
|
684
|
-
for (const [nodeId, inputIndex, _outputIndex] of handler.getNestedChanges(field.change)) {
|
|
685
|
-
const isInputDetached = inputIndex === undefined;
|
|
686
|
-
const inputAttachState = parentInputAttachState === NodeAttachState.Detached || isInputDetached
|
|
687
|
-
? NodeAttachState.Detached
|
|
688
|
-
: NodeAttachState.Attached;
|
|
689
|
-
this.updateConstraintsForNode(nodeId, inputAttachState, nodes, constraintState);
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
updateConstraintsForNode(nodeId, inputAttachState, nodes, constraintState) {
|
|
694
|
-
const node = nodes.get([nodeId.revision, nodeId.localId]) ?? fail(0xb24 /* Unknown node ID */);
|
|
695
|
-
if (node.nodeExistsConstraint !== undefined) {
|
|
696
|
-
const isNowViolated = inputAttachState === NodeAttachState.Detached;
|
|
697
|
-
if (node.nodeExistsConstraint.violated !== isNowViolated) {
|
|
698
|
-
node.nodeExistsConstraint = {
|
|
699
|
-
...node.nodeExistsConstraint,
|
|
700
|
-
violated: isNowViolated,
|
|
701
|
-
};
|
|
702
|
-
constraintState.violationCount += isNowViolated ? 1 : -1;
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
if (node.fieldChanges !== undefined) {
|
|
706
|
-
this.updateConstraintsForFields(node.fieldChanges, inputAttachState, constraintState, nodes);
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
pruneFieldMap(changeset, nodeMap) {
|
|
710
|
-
if (changeset === undefined) {
|
|
711
|
-
return undefined;
|
|
712
|
-
}
|
|
713
|
-
const prunedChangeset = new Map();
|
|
714
|
-
for (const [field, fieldChange] of changeset) {
|
|
715
|
-
const handler = getChangeHandler(this.fieldKinds, fieldChange.fieldKind);
|
|
716
|
-
const prunedFieldChangeset = handler.rebaser.prune(fieldChange.change, (nodeId) => this.pruneNodeChange(nodeId, nodeMap));
|
|
717
|
-
if (!handler.isEmpty(prunedFieldChangeset)) {
|
|
718
|
-
prunedChangeset.set(field, { ...fieldChange, change: brand(prunedFieldChangeset) });
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
return prunedChangeset.size > 0 ? prunedChangeset : undefined;
|
|
722
|
-
}
|
|
723
|
-
pruneNodeChange(nodeId, nodeMap) {
|
|
724
|
-
const changeset = nodeChangeFromId(nodeMap, nodeId);
|
|
725
|
-
const prunedFields = changeset.fieldChanges === undefined
|
|
726
|
-
? undefined
|
|
727
|
-
: this.pruneFieldMap(changeset.fieldChanges, nodeMap);
|
|
728
|
-
const prunedChange = { ...changeset, fieldChanges: prunedFields };
|
|
729
|
-
if (prunedChange.fieldChanges === undefined) {
|
|
730
|
-
delete prunedChange.fieldChanges;
|
|
731
|
-
}
|
|
732
|
-
if (isEmptyNodeChangeset(prunedChange)) {
|
|
733
|
-
nodeMap.delete([nodeId.revision, nodeId.localId]);
|
|
734
|
-
return undefined;
|
|
735
|
-
}
|
|
736
|
-
else {
|
|
737
|
-
setInChangeAtomIdMap(nodeMap, nodeId, prunedChange);
|
|
738
|
-
return nodeId;
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
587
|
getRevisions(change) {
|
|
742
588
|
if (change.revisions === undefined || change.revisions.length === 0) {
|
|
743
589
|
return new Set([undefined]);
|
|
@@ -788,29 +634,8 @@ export class ModularChangeFamily {
|
|
|
788
634
|
}
|
|
789
635
|
return updatedFields;
|
|
790
636
|
}
|
|
791
|
-
makeCrossFieldKeyTable(fields, nodes) {
|
|
792
|
-
const keys = newCrossFieldKeyTable();
|
|
793
|
-
this.populateCrossFieldKeyTableForFieldMap(keys, fields, undefined);
|
|
794
|
-
nodes.forEachPair(([revision, localId], node) => {
|
|
795
|
-
if (node.fieldChanges !== undefined) {
|
|
796
|
-
this.populateCrossFieldKeyTableForFieldMap(keys, node.fieldChanges, {
|
|
797
|
-
revision,
|
|
798
|
-
localId,
|
|
799
|
-
});
|
|
800
|
-
}
|
|
801
|
-
});
|
|
802
|
-
return keys;
|
|
803
|
-
}
|
|
804
|
-
populateCrossFieldKeyTableForFieldMap(table, fields, parent) {
|
|
805
|
-
for (const [fieldKey, fieldChange] of fields) {
|
|
806
|
-
const keys = getChangeHandler(this.fieldKinds, fieldChange.fieldKind).getCrossFieldKeys(fieldChange.change);
|
|
807
|
-
for (const { key, count } of keys) {
|
|
808
|
-
table.set(key, count, { nodeId: parent, field: fieldKey });
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
637
|
buildEditor(mintRevisionTag, changeReceiver) {
|
|
813
|
-
return new ModularEditBuilder(this, this.fieldKinds, changeReceiver, this.codecOptions);
|
|
638
|
+
return new ModularEditBuilder(this.rebaser, this.fieldKinds, changeReceiver, this.codecOptions);
|
|
814
639
|
}
|
|
815
640
|
createEmptyFieldChange(fieldKind) {
|
|
816
641
|
const emptyChange = getChangeHandler(this.fieldKinds, fieldKind).createEmpty();
|
|
@@ -960,12 +785,6 @@ function composeBuildsDestroysAndRefreshers(change1, change2) {
|
|
|
960
785
|
}
|
|
961
786
|
return { allBuilds, allDestroys, allRefreshers };
|
|
962
787
|
}
|
|
963
|
-
function invertBuilds(builds) {
|
|
964
|
-
if (builds !== undefined) {
|
|
965
|
-
return brand(builds.mapValues((chunk) => chunk.topLevelLength));
|
|
966
|
-
}
|
|
967
|
-
return undefined;
|
|
968
|
-
}
|
|
969
788
|
/**
|
|
970
789
|
* Returns the set of removed roots that should be in memory for the given change to be applied.
|
|
971
790
|
* A removed root is relevant if any of the following is true:
|
|
@@ -1166,22 +985,6 @@ export function rebaseRevisionMetadataFromInfo(revInfos, revisionToRebase, baseR
|
|
|
1166
985
|
getBaseRevisions,
|
|
1167
986
|
};
|
|
1168
987
|
}
|
|
1169
|
-
function isEmptyNodeChangeset(change) {
|
|
1170
|
-
return (change.fieldChanges === undefined &&
|
|
1171
|
-
change.nodeExistsConstraint === undefined &&
|
|
1172
|
-
change.nodeExistsConstraintOnRevert === undefined);
|
|
1173
|
-
}
|
|
1174
|
-
export function getFieldKind(fieldKinds, kind) {
|
|
1175
|
-
if (kind === genericFieldKind.identifier) {
|
|
1176
|
-
return genericFieldKind;
|
|
1177
|
-
}
|
|
1178
|
-
const fieldKind = fieldKinds.get(kind);
|
|
1179
|
-
assert(fieldKind !== undefined, 0x3ad /* Unknown field kind */);
|
|
1180
|
-
return fieldKind;
|
|
1181
|
-
}
|
|
1182
|
-
export function getChangeHandler(fieldKinds, kind) {
|
|
1183
|
-
return getFieldKind(fieldKinds, kind).changeHandler;
|
|
1184
|
-
}
|
|
1185
988
|
function newComposeTable(baseChange, newChange, composedNodeToParent) {
|
|
1186
989
|
return {
|
|
1187
990
|
...newCrossFieldTable(),
|
|
@@ -1199,75 +1002,6 @@ function newComposeTable(baseChange, newChange, composedNodeToParent) {
|
|
|
1199
1002
|
},
|
|
1200
1003
|
};
|
|
1201
1004
|
}
|
|
1202
|
-
function newCrossFieldTable() {
|
|
1203
|
-
return {
|
|
1204
|
-
srcTable: newChangeAtomIdRangeMap(),
|
|
1205
|
-
dstTable: newChangeAtomIdRangeMap(),
|
|
1206
|
-
srcDependents: newChangeAtomIdRangeMap(),
|
|
1207
|
-
dstDependents: newChangeAtomIdRangeMap(),
|
|
1208
|
-
invalidatedFields: new Set(),
|
|
1209
|
-
};
|
|
1210
|
-
}
|
|
1211
|
-
function newConstraintState(violationCount) {
|
|
1212
|
-
return {
|
|
1213
|
-
violationCount,
|
|
1214
|
-
};
|
|
1215
|
-
}
|
|
1216
|
-
class CrossFieldManagerI {
|
|
1217
|
-
constructor(crossFieldTable, currentFieldKey, allowInval = true) {
|
|
1218
|
-
this.crossFieldTable = crossFieldTable;
|
|
1219
|
-
this.currentFieldKey = currentFieldKey;
|
|
1220
|
-
this.allowInval = allowInval;
|
|
1221
|
-
}
|
|
1222
|
-
set(target, revision, id, count, newValue, invalidateDependents) {
|
|
1223
|
-
if (invalidateDependents && this.allowInval) {
|
|
1224
|
-
const lastChangedId = id + count - 1;
|
|
1225
|
-
let firstId = id;
|
|
1226
|
-
while (firstId <= lastChangedId) {
|
|
1227
|
-
const dependentEntry = getFirstFromCrossFieldMap(this.getDependents(target), revision, firstId, lastChangedId - firstId + 1);
|
|
1228
|
-
if (dependentEntry.value !== undefined) {
|
|
1229
|
-
this.crossFieldTable.invalidatedFields.add(dependentEntry.value);
|
|
1230
|
-
}
|
|
1231
|
-
firstId = brand(firstId + dependentEntry.length);
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
setInCrossFieldMap(this.getMap(target), revision, id, count, newValue);
|
|
1235
|
-
}
|
|
1236
|
-
get(target, revision, id, count, addDependency) {
|
|
1237
|
-
if (addDependency) {
|
|
1238
|
-
// We assume that if there is already an entry for this ID it is because
|
|
1239
|
-
// a field handler has called compose on the same node multiple times.
|
|
1240
|
-
// In this case we only want to update the latest version, so we overwrite the dependency.
|
|
1241
|
-
setInCrossFieldMap(this.getDependents(target), revision, id, count, this.currentFieldKey);
|
|
1242
|
-
}
|
|
1243
|
-
return getFirstFromCrossFieldMap(this.getMap(target), revision, id, count);
|
|
1244
|
-
}
|
|
1245
|
-
getMap(target) {
|
|
1246
|
-
return target === CrossFieldTarget.Source
|
|
1247
|
-
? this.crossFieldTable.srcTable
|
|
1248
|
-
: this.crossFieldTable.dstTable;
|
|
1249
|
-
}
|
|
1250
|
-
getDependents(target) {
|
|
1251
|
-
return target === CrossFieldTarget.Source
|
|
1252
|
-
? this.crossFieldTable.srcDependents
|
|
1253
|
-
: this.crossFieldTable.dstDependents;
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
class InvertManager extends CrossFieldManagerI {
|
|
1257
|
-
constructor(table, field, fieldId, allowInval = true) {
|
|
1258
|
-
super(table, field, allowInval);
|
|
1259
|
-
this.fieldId = fieldId;
|
|
1260
|
-
}
|
|
1261
|
-
onMoveIn(id) {
|
|
1262
|
-
setInChangeAtomIdMap(this.table.invertedNodeToParent, id, this.fieldId);
|
|
1263
|
-
}
|
|
1264
|
-
moveKey(target, revision, id, count) {
|
|
1265
|
-
assert(false, 0x9c5 /* Keys should not be moved manually during invert */);
|
|
1266
|
-
}
|
|
1267
|
-
get table() {
|
|
1268
|
-
return this.crossFieldTable;
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
1005
|
class RebaseManager extends CrossFieldManagerI {
|
|
1272
1006
|
constructor(table, currentField, fieldId, allowInval = true) {
|
|
1273
1007
|
super(table, currentField, allowInval);
|
|
@@ -1345,44 +1079,10 @@ class ComposeManager extends CrossFieldManagerI {
|
|
|
1345
1079
|
return this.crossFieldTable;
|
|
1346
1080
|
}
|
|
1347
1081
|
}
|
|
1348
|
-
function makeModularChangeset(props) {
|
|
1349
|
-
const p = props ?? { maxId: -1 };
|
|
1350
|
-
const changeset = {
|
|
1351
|
-
fieldChanges: p.fieldChanges ?? new Map(),
|
|
1352
|
-
nodeChanges: p.nodeChanges ?? newChangeAtomIdBTree(),
|
|
1353
|
-
nodeToParent: p.nodeToParent ?? newChangeAtomIdBTree(),
|
|
1354
|
-
nodeAliases: p.nodeAliases ?? newChangeAtomIdBTree(),
|
|
1355
|
-
crossFieldKeys: p.crossFieldKeys ?? newCrossFieldKeyTable(),
|
|
1356
|
-
};
|
|
1357
|
-
if (p.revisions !== undefined && p.revisions.length > 0) {
|
|
1358
|
-
changeset.revisions = p.revisions;
|
|
1359
|
-
}
|
|
1360
|
-
if (p.maxId >= 0) {
|
|
1361
|
-
changeset.maxId = brand(p.maxId);
|
|
1362
|
-
}
|
|
1363
|
-
if (p.constraintViolationCount !== undefined && p.constraintViolationCount > 0) {
|
|
1364
|
-
changeset.constraintViolationCount = p.constraintViolationCount;
|
|
1365
|
-
}
|
|
1366
|
-
if (p.noChangeConstraint !== undefined) {
|
|
1367
|
-
changeset.noChangeConstraint = p.noChangeConstraint;
|
|
1368
|
-
}
|
|
1369
|
-
if (p.noChangeConstraintOnRevert !== undefined) {
|
|
1370
|
-
changeset.noChangeConstraintOnRevert = p.noChangeConstraintOnRevert;
|
|
1371
|
-
}
|
|
1372
|
-
if (p.builds !== undefined && p.builds.size > 0) {
|
|
1373
|
-
changeset.builds = p.builds;
|
|
1374
|
-
}
|
|
1375
|
-
if (p.destroys !== undefined && p.destroys.size > 0) {
|
|
1376
|
-
changeset.destroys = p.destroys;
|
|
1377
|
-
}
|
|
1378
|
-
if (p.refreshers !== undefined && p.refreshers.size > 0) {
|
|
1379
|
-
changeset.refreshers = p.refreshers;
|
|
1380
|
-
}
|
|
1381
|
-
return changeset;
|
|
1382
|
-
}
|
|
1383
1082
|
export class ModularEditBuilder extends EditBuilder {
|
|
1384
|
-
constructor(
|
|
1385
|
-
super(
|
|
1083
|
+
constructor(rebaser, fieldKinds, changeReceiver, codecOptions) {
|
|
1084
|
+
super(changeReceiver);
|
|
1085
|
+
this.rebaser = rebaser;
|
|
1386
1086
|
this.fieldKinds = fieldKinds;
|
|
1387
1087
|
this.transactionDepth = 0;
|
|
1388
1088
|
this.idAllocator = idAllocatorFromMaxId();
|
|
@@ -1475,7 +1175,7 @@ export class ModularEditBuilder extends EditBuilder {
|
|
|
1475
1175
|
});
|
|
1476
1176
|
const revInfo = [...revisions].map((revision) => ({ revision }));
|
|
1477
1177
|
const composedChange = {
|
|
1478
|
-
...this.
|
|
1178
|
+
...this.rebaser.compose(changeMaps),
|
|
1479
1179
|
revisions: revInfo,
|
|
1480
1180
|
};
|
|
1481
1181
|
const maxId = brand(this.idAllocator.getMaxId());
|
|
@@ -1600,49 +1300,6 @@ function buildModularChangesetFromNode(props) {
|
|
|
1600
1300
|
childId: nodeId,
|
|
1601
1301
|
});
|
|
1602
1302
|
}
|
|
1603
|
-
function getRevInfoFromTaggedChanges(changes) {
|
|
1604
|
-
let maxId = -1;
|
|
1605
|
-
const revInfos = [];
|
|
1606
|
-
const revisions = new Set();
|
|
1607
|
-
for (const taggedChange of changes) {
|
|
1608
|
-
const change = taggedChange.change;
|
|
1609
|
-
maxId = Math.max(change.maxId ?? -1, maxId);
|
|
1610
|
-
const infosToAdd = revisionInfoFromTaggedChange(taggedChange);
|
|
1611
|
-
for (const info of infosToAdd) {
|
|
1612
|
-
if (!revisions.has(info.revision)) {
|
|
1613
|
-
revisions.add(info.revision);
|
|
1614
|
-
revInfos.push(info);
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
const rolledBackRevisions = [];
|
|
1619
|
-
for (const info of revInfos) {
|
|
1620
|
-
if (info.rollbackOf !== undefined) {
|
|
1621
|
-
rolledBackRevisions.push(info.rollbackOf);
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
rolledBackRevisions.reverse();
|
|
1625
|
-
for (const revision of rolledBackRevisions) {
|
|
1626
|
-
if (!revisions.has(revision)) {
|
|
1627
|
-
revInfos.push({ revision });
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
return { maxId: brand(maxId), revInfos };
|
|
1631
|
-
}
|
|
1632
|
-
function revisionInfoFromTaggedChange(taggedChange) {
|
|
1633
|
-
const revInfos = [];
|
|
1634
|
-
if (taggedChange.change.revisions !== undefined) {
|
|
1635
|
-
revInfos.push(...taggedChange.change.revisions);
|
|
1636
|
-
}
|
|
1637
|
-
else if (taggedChange.revision !== undefined) {
|
|
1638
|
-
const info = { revision: taggedChange.revision };
|
|
1639
|
-
if (taggedChange.rollbackOf !== undefined) {
|
|
1640
|
-
info.rollbackOf = taggedChange.rollbackOf;
|
|
1641
|
-
}
|
|
1642
|
-
revInfos.push(info);
|
|
1643
|
-
}
|
|
1644
|
-
return revInfos;
|
|
1645
|
-
}
|
|
1646
1303
|
function fieldChangeFromId(fields, nodes, id) {
|
|
1647
1304
|
const fieldMap = fieldMapFromNodeId(fields, nodes, id.nodeId);
|
|
1648
1305
|
return fieldMap.get(id.field) ?? fail(0xb25 /* No field exists for the given ID */);
|
|
@@ -1664,11 +1321,6 @@ function rebasedFieldIdFromBaseId(table, baseId) {
|
|
|
1664
1321
|
function rebasedNodeIdFromBaseNodeId(table, baseId) {
|
|
1665
1322
|
return getFromChangeAtomIdMap(table.baseToRebasedNodeId, baseId) ?? baseId;
|
|
1666
1323
|
}
|
|
1667
|
-
function nodeChangeFromId(nodes, id) {
|
|
1668
|
-
const node = getFromChangeAtomIdMap(nodes, id);
|
|
1669
|
-
assert(node !== undefined, 0x9ca /* Unknown node ID */);
|
|
1670
|
-
return node;
|
|
1671
|
-
}
|
|
1672
1324
|
function fieldIdFromFieldIdKey([revision, localId, field]) {
|
|
1673
1325
|
const nodeId = localId === undefined ? undefined : { revision, localId };
|
|
1674
1326
|
return { nodeId, field };
|
|
@@ -1721,9 +1373,6 @@ function normalizeNodeId(nodeId, nodeAliases) {
|
|
|
1721
1373
|
currentId = dealiased;
|
|
1722
1374
|
}
|
|
1723
1375
|
}
|
|
1724
|
-
function hasConflicts(change) {
|
|
1725
|
-
return (change.constraintViolationCount ?? 0) > 0;
|
|
1726
|
-
}
|
|
1727
1376
|
/**
|
|
1728
1377
|
* A rebaseChild callback for fields with no new changes.
|
|
1729
1378
|
* Asserts that there are no new changes and returns undefined.
|