@fluidframework/tree 2.81.1 → 2.82.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 +125 -0
- package/api-report/tree.alpha.api.md +54 -22
- package/api-report/tree.beta.api.md +150 -1
- package/api-report/tree.legacy.beta.api.md +150 -1
- package/api-report/tree.legacy.public.api.md +1 -0
- package/api-report/tree.public.api.md +1 -0
- package/dist/alpha.d.ts +8 -2
- package/dist/beta.d.ts +3 -0
- package/dist/codec/codec.d.ts +17 -8
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +8 -1
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +1 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +2 -1
- package/dist/codec/index.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +1 -1
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +4 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +3 -2
- package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
- package/dist/core/rebase/changeRebaser.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 +4 -2
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +23 -3
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +30 -16
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/schema-stored/formatV1.d.ts +2 -2
- package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV1.js +0 -5
- package/dist/core/schema-stored/formatV1.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts +11 -10
- package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV2.js +1 -6
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/delta.d.ts +9 -7
- package/dist/core/tree/delta.d.ts.map +1 -1
- package/dist/core/tree/delta.js.map +1 -1
- package/dist/core/tree/deltaUtil.js +1 -1
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/visitDelta.js +2 -2
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/extensibleSchemaUnion.d.ts +72 -0
- package/dist/extensibleSchemaUnion.d.ts.map +1 -0
- package/dist/extensibleSchemaUnion.js +79 -0
- package/dist/extensibleSchemaUnion.js.map +1 -0
- package/dist/feature-libraries/changeAtomIdBTree.d.ts +4 -2
- package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.js +9 -1
- package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -3
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +20 -21
- package/dist/feature-libraries/default-schema/defaultFieldKinds.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/forest-summary/codec.d.ts +2 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +5 -2
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts +1 -39
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.js +1 -2
- package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV1.d.ts +1 -39
- package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.d.ts +1 -39
- package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +4 -3
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js +42 -22
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.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 +2 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +9 -5
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +11 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +30 -7
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +38 -27
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +10 -127
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +2 -4
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +3 -79
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
- 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/requiredField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/requiredField.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +4 -4
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +2 -2
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -16
- package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +3 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts +36 -13
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +1 -0
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +1 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +10 -0
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +25 -9
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +3 -3
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +8 -32
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +11 -3
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +38 -4
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts +4 -4
- package/dist/shared-tree/tree.js +1 -1
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +20 -0
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +39 -3
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +2 -2
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/transaction.d.ts +14 -3
- package/dist/shared-tree-core/transaction.d.ts.map +1 -1
- package/dist/shared-tree-core/transaction.js +59 -16
- package/dist/shared-tree-core/transaction.js.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.js +1 -1
- package/dist/shared-tree-core/versionedSummarizer.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 +3 -2
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +9 -0
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +16 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/dist/simple-tree/api/transactionTypes.d.ts +10 -0
- package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/transactionTypes.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +81 -6
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +4 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +63 -0
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +43 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/index.d.ts +1 -1
- package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/index.js +2 -1
- package/dist/simple-tree/node-kinds/array/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/index.d.ts +1 -1
- package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/index.js +2 -1
- package/dist/simple-tree/node-kinds/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/tableSchema.d.ts +71 -48
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +200 -98
- package/dist/tableSchema.js.map +1 -1
- package/dist/text/textDomainFormatted.js +1 -1
- package/dist/text/textDomainFormatted.js.map +1 -1
- package/dist/util/bTreeUtils.d.ts +30 -4
- package/dist/util/bTreeUtils.d.ts.map +1 -1
- package/dist/util/bTreeUtils.js +29 -17
- package/dist/util/bTreeUtils.js.map +1 -1
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js.map +1 -1
- package/dist/util/brandedMap.d.ts.map +1 -1
- package/dist/util/brandedMap.js.map +1 -1
- package/dist/util/breakable.d.ts.map +1 -1
- package/dist/util/breakable.js +2 -1
- package/dist/util/breakable.js.map +1 -1
- package/dist/util/index.d.ts +2 -2
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +6 -3
- package/dist/util/index.js.map +1 -1
- package/dist/util/opaque.d.ts.map +1 -1
- package/dist/util/opaque.js.map +1 -1
- package/dist/util/rangeMap.d.ts +3 -2
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +7 -1
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/readSnapshotBlob.d.ts +1 -1
- package/dist/util/readSnapshotBlob.d.ts.map +1 -1
- package/dist/util/readSnapshotBlob.js.map +1 -1
- package/dist/util/typeCheck.d.ts.map +1 -1
- package/dist/util/typeCheck.js.map +1 -1
- package/dist/util/utils.d.ts +20 -16
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +49 -17
- package/dist/util/utils.js.map +1 -1
- package/eslint.config.mts +0 -9
- package/lib/alpha.d.ts +8 -2
- package/lib/beta.d.ts +3 -0
- package/lib/codec/codec.d.ts +17 -8
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +6 -0
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +1 -1
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/changeRebaser.d.ts +3 -2
- package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
- package/lib/core/rebase/changeRebaser.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 +23 -3
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +27 -15
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/formatV1.d.ts +2 -2
- package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV1.js +0 -5
- package/lib/core/schema-stored/formatV1.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts +11 -10
- package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV2.js +1 -6
- package/lib/core/schema-stored/formatV2.js.map +1 -1
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js +2 -0
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/delta.d.ts +9 -7
- package/lib/core/tree/delta.d.ts.map +1 -1
- package/lib/core/tree/delta.js.map +1 -1
- package/lib/core/tree/deltaUtil.js +1 -1
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/visitDelta.js +2 -2
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/extensibleSchemaUnion.d.ts +72 -0
- package/lib/extensibleSchemaUnion.d.ts.map +1 -0
- package/lib/extensibleSchemaUnion.js +76 -0
- package/lib/extensibleSchemaUnion.js.map +1 -0
- package/lib/feature-libraries/changeAtomIdBTree.d.ts +4 -2
- package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdBTree.js +7 -0
- package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -3
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +4 -5
- package/lib/feature-libraries/default-schema/defaultFieldKinds.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/forest-summary/codec.d.ts +2 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +6 -3
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts +1 -39
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.js +2 -3
- package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV1.d.ts +1 -39
- package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.d.ts +1 -39
- package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -3
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +3 -3
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js +41 -21
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.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 +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +10 -6
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +11 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +29 -6
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +41 -30
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +10 -127
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js +2 -4
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +3 -79
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
- 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/requiredField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/requiredField.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +4 -4
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +2 -2
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -16
- package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/index.d.ts +5 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +3 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts +36 -13
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +1 -0
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +1 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +10 -0
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +25 -9
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +3 -3
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +10 -34
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +11 -3
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +39 -5
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts +4 -4
- package/lib/shared-tree/tree.js +1 -1
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +20 -0
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +39 -3
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js +2 -2
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/transaction.d.ts +14 -3
- package/lib/shared-tree-core/transaction.d.ts.map +1 -1
- package/lib/shared-tree-core/transaction.js +61 -18
- package/lib/shared-tree-core/transaction.js.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.js +1 -1
- package/lib/shared-tree-core/versionedSummarizer.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/schemaCreationUtilities.d.ts +9 -0
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +14 -0
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/lib/simple-tree/api/transactionTypes.d.ts +10 -0
- package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/transactionTypes.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +81 -6
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +2 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +63 -0
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +41 -0
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/index.d.ts +1 -1
- package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/index.js +1 -1
- package/lib/simple-tree/node-kinds/array/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/index.d.ts +1 -1
- package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/index.js +1 -1
- package/lib/simple-tree/node-kinds/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/tableSchema.d.ts +71 -48
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +201 -99
- package/lib/tableSchema.js.map +1 -1
- package/lib/text/textDomainFormatted.js +1 -1
- package/lib/text/textDomainFormatted.js.map +1 -1
- package/lib/util/bTreeUtils.d.ts +30 -4
- package/lib/util/bTreeUtils.d.ts.map +1 -1
- package/lib/util/bTreeUtils.js +27 -16
- package/lib/util/bTreeUtils.js.map +1 -1
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js.map +1 -1
- package/lib/util/brandedMap.d.ts.map +1 -1
- package/lib/util/brandedMap.js.map +1 -1
- package/lib/util/breakable.d.ts.map +1 -1
- package/lib/util/breakable.js +2 -1
- package/lib/util/breakable.js.map +1 -1
- package/lib/util/index.d.ts +2 -2
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -2
- package/lib/util/index.js.map +1 -1
- package/lib/util/opaque.d.ts.map +1 -1
- package/lib/util/opaque.js.map +1 -1
- package/lib/util/rangeMap.d.ts +3 -2
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +7 -1
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/readSnapshotBlob.d.ts +1 -1
- package/lib/util/readSnapshotBlob.d.ts.map +1 -1
- package/lib/util/readSnapshotBlob.js.map +1 -1
- package/lib/util/typeCheck.d.ts.map +1 -1
- package/lib/util/typeCheck.js.map +1 -1
- package/lib/util/utils.d.ts +20 -16
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +44 -15
- package/lib/util/utils.js.map +1 -1
- package/package.json +22 -22
- package/src/codec/codec.ts +30 -11
- package/src/codec/index.ts +2 -0
- package/src/codec/versioned/codec.ts +9 -13
- package/src/core/index.ts +3 -1
- package/src/core/rebase/changeRebaser.ts +3 -2
- package/src/core/rebase/index.ts +3 -1
- package/src/core/rebase/types.ts +51 -13
- package/src/core/schema-stored/formatV1.ts +2 -4
- package/src/core/schema-stored/formatV2.ts +9 -7
- package/src/core/schema-stored/index.ts +2 -0
- package/src/core/schema-stored/schema.ts +4 -1
- package/src/core/tree/anchorSet.ts +1 -3
- package/src/core/tree/delta.ts +9 -7
- package/src/core/tree/deltaUtil.ts +1 -1
- package/src/core/tree/visitDelta.ts +2 -2
- package/src/extensibleSchemaUnion.ts +135 -0
- package/src/feature-libraries/changeAtomIdBTree.ts +17 -2
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +5 -6
- package/src/feature-libraries/default-schema/index.ts +0 -1
- package/src/feature-libraries/forest-summary/codec.ts +7 -2
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +15 -3
- package/src/feature-libraries/forest-summary/formatCommon.ts +2 -3
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +4 -5
- package/src/feature-libraries/index.ts +3 -2
- package/src/feature-libraries/modular-schema/defaultRevisionReplacer.ts +57 -31
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +1 -1
- package/src/feature-libraries/modular-schema/index.ts +4 -1
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +7 -6
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +32 -7
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +54 -33
- package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +2 -4
- package/src/feature-libraries/optional-field/optionalField.ts +1 -1
- package/src/feature-libraries/optional-field/requiredField.ts +2 -4
- package/src/feature-libraries/schema-index/codec.ts +1 -1
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
- package/src/feature-libraries/sequence-field/invert.ts +2 -2
- package/src/feature-libraries/sequence-field/replaceRevisions.ts +17 -10
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
- package/src/index.ts +12 -7
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +42 -6
- package/src/shared-tree/index.ts +2 -0
- package/src/shared-tree/schematizingTreeView.ts +63 -18
- package/src/shared-tree/sharedTree.ts +19 -37
- package/src/shared-tree/sharedTreeChangeCodecs.ts +43 -9
- package/src/shared-tree/tree.ts +1 -1
- package/src/shared-tree/treeCheckout.ts +50 -3
- package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
- package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -3
- package/src/shared-tree-core/transaction.ts +125 -23
- package/src/shared-tree-core/versionedSummarizer.ts +3 -2
- package/src/simple-tree/api/index.ts +1 -0
- package/src/simple-tree/api/schemaCreationUtilities.ts +35 -5
- package/src/simple-tree/api/simpleTreeIndex.ts +1 -1
- package/src/simple-tree/api/transactionTypes.ts +10 -0
- package/src/simple-tree/api/tree.ts +88 -6
- package/src/simple-tree/core/treeNodeSchema.ts +5 -8
- package/src/simple-tree/index.ts +3 -0
- package/src/simple-tree/leafNodeSchema.ts +3 -2
- package/src/simple-tree/node-kinds/array/arrayNode.ts +86 -0
- package/src/simple-tree/node-kinds/array/index.ts +2 -0
- package/src/simple-tree/node-kinds/index.ts +2 -0
- package/src/simple-tree/node-kinds/object/objectNode.ts +19 -18
- package/src/tableSchema.ts +280 -140
- package/src/text/textDomainFormatted.ts +1 -1
- package/src/util/bTreeUtils.ts +45 -26
- package/src/util/brand.ts +4 -12
- package/src/util/brandedMap.ts +2 -6
- package/src/util/breakable.ts +3 -2
- package/src/util/index.ts +9 -3
- package/src/util/opaque.ts +2 -6
- package/src/util/rangeMap.ts +11 -5
- package/src/util/readSnapshotBlob.ts +3 -3
- package/src/util/typeCheck.ts +11 -9
- package/src/util/utils.ts +57 -28
- package/biome.jsonc +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAG1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,wBAAgB,4BAA4B,CAC3C,uBAAuB,EAAE,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"modularChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAG1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,wBAAgB,4BAA4B,CAC3C,uBAAuB,EAAE,WAAW,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,EACxF,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,aAAa,EAC3B,wBAAwB,GAAE,uBAA4D,GACpF,YAAY,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAmCvD;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;CAqBrC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -4,23 +4,21 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { fail } from "@fluidframework/core-utils/internal";
|
|
6
6
|
import { makeCodecFamily, } from "../../codec/index.js";
|
|
7
|
+
import { strictEnum } from "../../util/index.js";
|
|
7
8
|
import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
|
|
8
9
|
import { makeModularChangeCodecV1 } from "./modularChangeCodecV1.js";
|
|
9
10
|
import { makeModularChangeCodecV2 } from "./modularChangeCodecV2.js";
|
|
10
11
|
export function makeModularChangeCodecFamily(fieldKindConfigurations, revisionTagCodec, fieldsCodec, codecOptions, chunkCompressionStrategy = TreeCompressionStrategy.Compressed) {
|
|
11
12
|
return makeCodecFamily(Array.from(fieldKindConfigurations.entries(), ([version, fieldKinds]) => {
|
|
12
13
|
switch (version) {
|
|
13
|
-
case
|
|
14
|
-
case
|
|
15
|
-
case 3:
|
|
16
|
-
case 4:
|
|
17
|
-
case 6: {
|
|
14
|
+
case ModularChangeFormatVersion.v3:
|
|
15
|
+
case ModularChangeFormatVersion.v4: {
|
|
18
16
|
return [
|
|
19
17
|
version,
|
|
20
18
|
makeModularChangeCodecV1(fieldKinds, revisionTagCodec, fieldsCodec, codecOptions, chunkCompressionStrategy),
|
|
21
19
|
];
|
|
22
20
|
}
|
|
23
|
-
case
|
|
21
|
+
case ModularChangeFormatVersion.v5: {
|
|
24
22
|
return [
|
|
25
23
|
version,
|
|
26
24
|
makeModularChangeCodecV2(fieldKinds, revisionTagCodec, fieldsCodec, codecOptions, chunkCompressionStrategy),
|
|
@@ -32,4 +30,29 @@ export function makeModularChangeCodecFamily(fieldKindConfigurations, revisionTa
|
|
|
32
30
|
}
|
|
33
31
|
}));
|
|
34
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* The format version for `ModularChangeset`.
|
|
35
|
+
*/
|
|
36
|
+
export const ModularChangeFormatVersion = strictEnum("ModularChangeFormatVersion", {
|
|
37
|
+
/**
|
|
38
|
+
* Introduced prior to 2.0 and used beyond.
|
|
39
|
+
* Reading capability must be maintained for backwards compatibility.
|
|
40
|
+
* Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.
|
|
41
|
+
*/
|
|
42
|
+
v3: 3,
|
|
43
|
+
/**
|
|
44
|
+
* Introduced in 2.2.0.
|
|
45
|
+
* Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.
|
|
46
|
+
* Reading capability must be maintained for backwards compatibility.
|
|
47
|
+
* Writing capability could be dropped in favor of {@link ModularChangeFormatVersion.v3},
|
|
48
|
+
* but doing so would make the pattern of writable versions more complex and gain little
|
|
49
|
+
* because the logic for this format is shared with {@link ModularChangeFormatVersion.v3}.
|
|
50
|
+
*/
|
|
51
|
+
v4: 4,
|
|
52
|
+
/**
|
|
53
|
+
* Introduced and made available for writing in 2.80.0
|
|
54
|
+
* Adds support for "no change" constraints.
|
|
55
|
+
*/
|
|
56
|
+
v5: 5,
|
|
57
|
+
});
|
|
35
58
|
//# sourceMappingURL=modularChangeCodecs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE3D,OAAO,EAIN,eAAe,GACf,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"modularChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE3D,OAAO,EAIN,eAAe,GACf,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,UAAU,EAAe,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,MAAM,UAAU,4BAA4B,CAC3C,uBAAwF,EACxF,gBAKC,EACD,WAA4B,EAC5B,YAA2B,EAC3B,2BAAoD,uBAAuB,CAAC,UAAU;IAEtF,OAAO,eAAe,CACrB,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE;QACvE,QAAQ,OAAO,EAAE,CAAC;YACjB,KAAK,0BAA0B,CAAC,EAAE,CAAC;YACnC,KAAK,0BAA0B,CAAC,EAAE,CAAC,CAAC,CAAC;gBACpC,OAAO;oBACN,OAAO;oBACP,wBAAwB,CACvB,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,wBAAwB,CACxB;iBACD,CAAC;YACH,CAAC;YACD,KAAK,0BAA0B,CAAC,EAAE,CAAC,CAAC,CAAC;gBACpC,OAAO;oBACN,OAAO;oBACP,wBAAwB,CACvB,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,wBAAwB,CACxB;iBACD,CAAC;YACH,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACT,IAAI,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAC5D,CAAC;QACF,CAAC;IACF,CAAC,CAAC,CACF,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAAC,4BAA4B,EAAE;IAClF;;;;OAIG;IACH,EAAE,EAAE,CAAC;IACL;;;;;;;OAOG;IACH,EAAE,EAAE,CAAC;IACL;;;OAGG;IACH,EAAE,EAAE,CAAC;CACL,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n} from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport { strictEnum, type Values } from \"../../util/index.js\";\nimport type { FieldBatchCodec } from \"../chunked-forest/index.js\";\nimport { TreeCompressionStrategy } from \"../treeCompressionUtils.js\";\n\nimport type { FieldKindConfiguration } from \"./fieldKindConfiguration.js\";\nimport { makeModularChangeCodecV1 } from \"./modularChangeCodecV1.js\";\nimport { makeModularChangeCodecV2 } from \"./modularChangeCodecV2.js\";\nimport type { ModularChangeset } from \"./modularChangeTypes.js\";\n\nexport function makeModularChangeCodecFamily(\n\tfieldKindConfigurations: ReadonlyMap<ModularChangeFormatVersion, FieldKindConfiguration>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tfieldsCodec: FieldBatchCodec,\n\tcodecOptions: ICodecOptions,\n\tchunkCompressionStrategy: TreeCompressionStrategy = TreeCompressionStrategy.Compressed,\n): ICodecFamily<ModularChangeset, ChangeEncodingContext> {\n\treturn makeCodecFamily(\n\t\tArray.from(fieldKindConfigurations.entries(), ([version, fieldKinds]) => {\n\t\t\tswitch (version) {\n\t\t\t\tcase ModularChangeFormatVersion.v3:\n\t\t\t\tcase ModularChangeFormatVersion.v4: {\n\t\t\t\t\treturn [\n\t\t\t\t\t\tversion,\n\t\t\t\t\t\tmakeModularChangeCodecV1(\n\t\t\t\t\t\t\tfieldKinds,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tfieldsCodec,\n\t\t\t\t\t\t\tcodecOptions,\n\t\t\t\t\t\t\tchunkCompressionStrategy,\n\t\t\t\t\t\t),\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tcase ModularChangeFormatVersion.v5: {\n\t\t\t\t\treturn [\n\t\t\t\t\t\tversion,\n\t\t\t\t\t\tmakeModularChangeCodecV2(\n\t\t\t\t\t\t\tfieldKinds,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tfieldsCodec,\n\t\t\t\t\t\t\tcodecOptions,\n\t\t\t\t\t\t\tchunkCompressionStrategy,\n\t\t\t\t\t\t),\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tfail(0xcc5 /* Unsupported modular change codec version */);\n\t\t\t\t}\n\t\t\t}\n\t\t}),\n\t);\n}\n\n/**\n * The format version for `ModularChangeset`.\n */\nexport const ModularChangeFormatVersion = strictEnum(\"ModularChangeFormatVersion\", {\n\t/**\n\t * Introduced prior to 2.0 and used beyond.\n\t * Reading capability must be maintained for backwards compatibility.\n\t * Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.\n\t */\n\tv3: 3,\n\t/**\n\t * Introduced in 2.2.0.\n\t * Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.\n\t * Reading capability must be maintained for backwards compatibility.\n\t * Writing capability could be dropped in favor of {@link ModularChangeFormatVersion.v3},\n\t * but doing so would make the pattern of writable versions more complex and gain little\n\t * because the logic for this format is shared with {@link ModularChangeFormatVersion.v3}.\n\t */\n\tv4: 4,\n\t/**\n\t * Introduced and made available for writing in 2.80.0\n\t * Adds support for \"no change\" constraints.\n\t */\n\tv5: 5,\n});\nexport type ModularChangeFormatVersion = Values<typeof ModularChangeFormatVersion>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeFamily.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAGrB,KAAK,mBAAmB,EAGxB,KAAK,SAAS,EACd,WAAW,EAEX,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,MAAM,EAYX,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"modularChangeFamily.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,MAAM,sBAAsB,CAAC;AAC9B,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kBA,aAAa,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI;IAKtE,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,gBAAgB;IA0C1D,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,gBAAgB;IAI5C,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI;IAqBlE,+BAA+B,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI;IAqB1E,qBAAqB,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;IAelD,6BAA6B,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;CAcjE;AAkHD,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;CACtC;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,qBAAqB,CAAC;AAuH3E,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAIrF;AAaD,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,iBAAiB,CAAC,MAAM,CAAC,GACpC,OAAO,CAIT"}
|
|
@@ -7,9 +7,9 @@ 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, newChangeAtomIdRangeMap, mapTaggedChange, } from "../../core/index.js";
|
|
11
|
-
import { brand, idAllocatorFromMaxId, idAllocatorFromState, getOrCreate,
|
|
12
|
-
import { getFromChangeAtomIdMap, setInChangeAtomIdMap, } from "../changeAtomIdBTree.js";
|
|
10
|
+
import { EditBuilder, makeDetachedNodeId, revisionMetadataSourceFromInfo, areEqualChangeAtomIds, areEqualChangeAtomIdOpts, tagChange, makeAnonChange, newChangeAtomIdRangeMap, mapTaggedChange, comparePartialRevisions, comparePartialChangesetLocalIds, } from "../../core/index.js";
|
|
11
|
+
import { brand, idAllocatorFromMaxId, idAllocatorFromState, getOrCreate, mergeTupleBTrees, RangeMap, balancedReduce, newTupleBTree, compareStrings, createTupleComparator, } from "../../util/index.js";
|
|
12
|
+
import { getFromChangeAtomIdMap, newChangeAtomIdBTree, setInChangeAtomIdMap, } from "../changeAtomIdBTree.js";
|
|
13
13
|
import { CrossFieldTarget, getFirstFromCrossFieldMap, setInCrossFieldMap, } from "./crossFieldQueries.js";
|
|
14
14
|
import { NodeAttachState, } from "./fieldChangeHandler.js";
|
|
15
15
|
import { convertGenericChange, genericFieldKind } from "./genericFieldKind.js";
|
|
@@ -351,7 +351,7 @@ export class ModularChangeFamily {
|
|
|
351
351
|
const { revInfos: oldRevInfos } = getRevInfoFromTaggedChanges([change]);
|
|
352
352
|
const revisionMetadata = revisionMetadataSourceFromInfo(oldRevInfos);
|
|
353
353
|
const invertedFields = this.invertFieldMap(change.change.fieldChanges, undefined, isRollback, genId, crossFieldTable, revisionMetadata, revisionForInvert);
|
|
354
|
-
const invertedNodes =
|
|
354
|
+
const invertedNodes = newChangeAtomIdBTree();
|
|
355
355
|
change.change.nodeChanges.forEachPair(([revision, localId], nodeChangeset) => {
|
|
356
356
|
invertedNodes.set([revision, localId], this.invertNodeChange(nodeChangeset, { revision, localId }, isRollback, genId, crossFieldTable, revisionMetadata, revisionForInvert));
|
|
357
357
|
});
|
|
@@ -434,12 +434,12 @@ export class ModularChangeFamily {
|
|
|
434
434
|
newChange: change,
|
|
435
435
|
baseChange: over.change,
|
|
436
436
|
baseFieldToContext: new Map(),
|
|
437
|
-
baseToRebasedNodeId:
|
|
437
|
+
baseToRebasedNodeId: newChangeAtomIdBTree(),
|
|
438
438
|
rebasedFields: new Set(),
|
|
439
439
|
rebasedNodeToParent: brand(change.nodeToParent.clone()),
|
|
440
440
|
rebasedCrossFieldKeys: change.crossFieldKeys.clone(),
|
|
441
441
|
nodeIdPairs: [],
|
|
442
|
-
affectedBaseFields:
|
|
442
|
+
affectedBaseFields: newFieldIdKeyBTree(),
|
|
443
443
|
fieldsWithUnattachedChild: new Set(),
|
|
444
444
|
};
|
|
445
445
|
const getBaseRevisions = () => revisionInfoFromTaggedChange(over).map((info) => info.revision);
|
|
@@ -752,8 +752,11 @@ export class ModularChangeFamily {
|
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
getRevisions(change) {
|
|
755
|
+
if (change.revisions === undefined || change.revisions.length === 0) {
|
|
756
|
+
return new Set([undefined]);
|
|
757
|
+
}
|
|
755
758
|
const aggregated = new Set();
|
|
756
|
-
for (const revInfo of change.revisions
|
|
759
|
+
for (const revInfo of change.revisions) {
|
|
757
760
|
aggregated.add(revInfo.revision);
|
|
758
761
|
}
|
|
759
762
|
return aggregated;
|
|
@@ -768,7 +771,7 @@ export class ModularChangeFamily {
|
|
|
768
771
|
nodeChanges: updatedNodes,
|
|
769
772
|
nodeToParent: updatedNodeToParent,
|
|
770
773
|
// We've updated all references to old node IDs, so we no longer need an alias table.
|
|
771
|
-
nodeAliases:
|
|
774
|
+
nodeAliases: newChangeAtomIdBTree(),
|
|
772
775
|
crossFieldKeys: replaceCrossFieldKeyTableRevisions(change.crossFieldKeys, replacer, change.nodeAliases),
|
|
773
776
|
};
|
|
774
777
|
if (change.builds !== undefined) {
|
|
@@ -905,7 +908,7 @@ function replaceCrossFieldKeyTableRevisions(table, replacer, nodeAliases) {
|
|
|
905
908
|
const updated = newCrossFieldKeyTable();
|
|
906
909
|
for (const entry of table.entries()) {
|
|
907
910
|
const key = entry.start;
|
|
908
|
-
const updatedKey = replacer.getUpdatedAtomId(key);
|
|
911
|
+
const updatedKey = replacer.getUpdatedAtomId(key, entry.length);
|
|
909
912
|
const field = entry.value;
|
|
910
913
|
const normalizedFieldId = normalizeFieldId(field, nodeAliases);
|
|
911
914
|
const updatedNodeId = normalizedFieldId.nodeId === undefined
|
|
@@ -920,7 +923,7 @@ function replaceCrossFieldKeyTableRevisions(table, replacer, nodeAliases) {
|
|
|
920
923
|
return updated;
|
|
921
924
|
}
|
|
922
925
|
function replaceIdMapRevisions(map, replacer, valueMapper = (value) => value) {
|
|
923
|
-
const updated =
|
|
926
|
+
const updated = newChangeAtomIdBTree();
|
|
924
927
|
for (const [[revision, localId], value] of map.entries()) {
|
|
925
928
|
const newAtom = replacer.getUpdatedAtomId({ revision, localId });
|
|
926
929
|
updated.set([newAtom.revision, newAtom.localId], valueMapper(value));
|
|
@@ -938,9 +941,9 @@ function composeBuildsDestroysAndRefreshers(change1, change2) {
|
|
|
938
941
|
// Note that it would in principle be possible to adopt the later build and exclude from the
|
|
939
942
|
// composition all the changes already reflected on the tree, but that is not something we
|
|
940
943
|
// care to support at this time.
|
|
941
|
-
const allBuilds = brand(mergeTupleBTrees(change1.builds ??
|
|
942
|
-
const allDestroys = brand(mergeTupleBTrees(change1.destroys ??
|
|
943
|
-
const allRefreshers = brand(mergeTupleBTrees(change1.refreshers ??
|
|
944
|
+
const allBuilds = brand(mergeTupleBTrees(change1.builds ?? newChangeAtomIdBTree(), change2.builds ?? newChangeAtomIdBTree(), true));
|
|
945
|
+
const allDestroys = brand(mergeTupleBTrees(change1.destroys ?? newChangeAtomIdBTree(), change2.destroys ?? newChangeAtomIdBTree()));
|
|
946
|
+
const allRefreshers = brand(mergeTupleBTrees(change1.refreshers ?? newChangeAtomIdBTree(), change2.refreshers ?? newChangeAtomIdBTree(), true));
|
|
944
947
|
if (change1.destroys !== undefined && change2.builds !== undefined) {
|
|
945
948
|
for (const [key, chunk] of change2.builds.entries()) {
|
|
946
949
|
const destroyCount = change1.destroys.get(key);
|
|
@@ -1012,7 +1015,7 @@ function* relevantRemovedRootsFromFields(change, nodeChanges, fieldKinds) {
|
|
|
1012
1015
|
* corresponding build or refresher.
|
|
1013
1016
|
*/
|
|
1014
1017
|
export function updateRefreshers(change, getDetachedNode, removedRoots, requireRefreshers = true) {
|
|
1015
|
-
const refreshers =
|
|
1018
|
+
const refreshers = newChangeAtomIdBTree();
|
|
1016
1019
|
const chunkLengths = new Map();
|
|
1017
1020
|
if (change.builds !== undefined) {
|
|
1018
1021
|
for (const [[revision, id], chunk] of change.builds.entries()) {
|
|
@@ -1125,7 +1128,7 @@ function intoDeltaImpl(change, nodeChanges, fieldKinds, global, rename) {
|
|
|
1125
1128
|
const nodeChange = nodeChangeFromId(nodeChanges, childChange);
|
|
1126
1129
|
return deltaFromNodeChange(nodeChange, nodeChanges, fieldKinds, global, rename);
|
|
1127
1130
|
});
|
|
1128
|
-
if (fieldChanges !== undefined && fieldChanges.length > 0) {
|
|
1131
|
+
if (fieldChanges !== undefined && fieldChanges.marks.length > 0) {
|
|
1129
1132
|
delta.set(field, fieldChanges);
|
|
1130
1133
|
}
|
|
1131
1134
|
for (const c of fieldGlobal ?? []) {
|
|
@@ -1193,13 +1196,13 @@ function newComposeTable(baseChange, newChange, composedNodeToParent) {
|
|
|
1193
1196
|
newChange,
|
|
1194
1197
|
fieldToContext: new Map(),
|
|
1195
1198
|
newFieldToBaseField: new Map(),
|
|
1196
|
-
newToBaseNodeId:
|
|
1199
|
+
newToBaseNodeId: newChangeAtomIdBTree(),
|
|
1197
1200
|
composedNodes: new Set(),
|
|
1198
1201
|
composedNodeToParent,
|
|
1199
1202
|
pendingCompositions: {
|
|
1200
1203
|
nodeIdsToCompose: [],
|
|
1201
|
-
affectedBaseFields:
|
|
1202
|
-
affectedNewFields:
|
|
1204
|
+
affectedBaseFields: newFieldIdKeyBTree(),
|
|
1205
|
+
affectedNewFields: newFieldIdKeyBTree(),
|
|
1203
1206
|
},
|
|
1204
1207
|
};
|
|
1205
1208
|
}
|
|
@@ -1353,9 +1356,9 @@ function makeModularChangeset(props) {
|
|
|
1353
1356
|
const p = props ?? { maxId: -1 };
|
|
1354
1357
|
const changeset = {
|
|
1355
1358
|
fieldChanges: p.fieldChanges ?? new Map(),
|
|
1356
|
-
nodeChanges: p.nodeChanges ??
|
|
1357
|
-
nodeToParent: p.nodeToParent ??
|
|
1358
|
-
nodeAliases: p.nodeAliases ??
|
|
1359
|
+
nodeChanges: p.nodeChanges ?? newChangeAtomIdBTree(),
|
|
1360
|
+
nodeToParent: p.nodeToParent ?? newChangeAtomIdBTree(),
|
|
1361
|
+
nodeAliases: p.nodeAliases ?? newChangeAtomIdBTree(),
|
|
1359
1362
|
crossFieldKeys: p.crossFieldKeys ?? newCrossFieldKeyTable(),
|
|
1360
1363
|
};
|
|
1361
1364
|
if (p.revisions !== undefined && p.revisions.length > 0) {
|
|
@@ -1424,7 +1427,7 @@ export class ModularEditBuilder extends EditBuilder {
|
|
|
1424
1427
|
}
|
|
1425
1428
|
// This content will be added to a GlobalEditDescription whose lifetime exceeds the scope of this function.
|
|
1426
1429
|
content.referenceAdded();
|
|
1427
|
-
const builds =
|
|
1430
|
+
const builds = newChangeAtomIdBTree();
|
|
1428
1431
|
builds.set([revision, firstId], content);
|
|
1429
1432
|
return {
|
|
1430
1433
|
type: "global",
|
|
@@ -1444,8 +1447,8 @@ export class ModularEditBuilder extends EditBuilder {
|
|
|
1444
1447
|
const modularChange = buildModularChangesetFromField({
|
|
1445
1448
|
path: field,
|
|
1446
1449
|
fieldChange: { fieldKind, change },
|
|
1447
|
-
nodeChanges:
|
|
1448
|
-
nodeToParent:
|
|
1450
|
+
nodeChanges: newChangeAtomIdBTree(),
|
|
1451
|
+
nodeToParent: newChangeAtomIdBTree(),
|
|
1449
1452
|
crossFieldKeys: newCrossFieldKeyTable(),
|
|
1450
1453
|
idAllocator: this.idAllocator,
|
|
1451
1454
|
localCrossFieldKeys,
|
|
@@ -1473,8 +1476,8 @@ export class ModularEditBuilder extends EditBuilder {
|
|
|
1473
1476
|
fieldKind: change.fieldKind,
|
|
1474
1477
|
change: change.change,
|
|
1475
1478
|
},
|
|
1476
|
-
nodeChanges:
|
|
1477
|
-
nodeToParent:
|
|
1479
|
+
nodeChanges: newChangeAtomIdBTree(),
|
|
1480
|
+
nodeToParent: newChangeAtomIdBTree(),
|
|
1478
1481
|
crossFieldKeys: newCrossFieldKeyTable(),
|
|
1479
1482
|
idAllocator: this.idAllocator,
|
|
1480
1483
|
localCrossFieldKeys: getChangeHandler(this.fieldKinds, change.fieldKind).getCrossFieldKeys(change.change),
|
|
@@ -1502,8 +1505,8 @@ export class ModularEditBuilder extends EditBuilder {
|
|
|
1502
1505
|
this.applyChange(tagChange(buildModularChangesetFromNode({
|
|
1503
1506
|
path,
|
|
1504
1507
|
nodeChange,
|
|
1505
|
-
nodeChanges:
|
|
1506
|
-
nodeToParent:
|
|
1508
|
+
nodeChanges: newChangeAtomIdBTree(),
|
|
1509
|
+
nodeToParent: newChangeAtomIdBTree(),
|
|
1507
1510
|
crossFieldKeys: newCrossFieldKeyTable(),
|
|
1508
1511
|
idAllocator: this.idAllocator,
|
|
1509
1512
|
revision,
|
|
@@ -1516,8 +1519,8 @@ export class ModularEditBuilder extends EditBuilder {
|
|
|
1516
1519
|
this.applyChange(tagChange(buildModularChangesetFromNode({
|
|
1517
1520
|
path,
|
|
1518
1521
|
nodeChange,
|
|
1519
|
-
nodeChanges:
|
|
1520
|
-
nodeToParent:
|
|
1522
|
+
nodeChanges: newChangeAtomIdBTree(),
|
|
1523
|
+
nodeToParent: newChangeAtomIdBTree(),
|
|
1521
1524
|
crossFieldKeys: newCrossFieldKeyTable(),
|
|
1522
1525
|
idAllocator: this.idAllocator,
|
|
1523
1526
|
revision,
|
|
@@ -1740,4 +1743,12 @@ function noNewChangesRebaseChild(child, _baseChild, _stateChange) {
|
|
|
1740
1743
|
function areEqualFieldIds(a, b) {
|
|
1741
1744
|
return areEqualChangeAtomIdOpts(a.nodeId, b.nodeId) && a.field === b.field;
|
|
1742
1745
|
}
|
|
1746
|
+
function newFieldIdKeyBTree() {
|
|
1747
|
+
return newTupleBTree(compareFieldIdKeys);
|
|
1748
|
+
}
|
|
1749
|
+
const compareFieldIdKeys = createTupleComparator([
|
|
1750
|
+
comparePartialRevisions,
|
|
1751
|
+
comparePartialChangesetLocalIds,
|
|
1752
|
+
(compareStrings),
|
|
1753
|
+
]);
|
|
1743
1754
|
//# sourceMappingURL=modularChangeFamily.js.map
|