@fluidframework/tree 2.81.1 → 2.83.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 +168 -0
- package/README.md +33 -5
- package/api-report/tree.alpha.api.md +75 -39
- package/api-report/tree.beta.api.md +164 -3
- package/api-report/tree.legacy.beta.api.md +164 -3
- package/api-report/tree.legacy.public.api.md +2 -1
- package/api-report/tree.public.api.md +2 -1
- package/dist/alpha.d.ts +10 -4
- package/dist/beta.d.ts +4 -0
- package/dist/codec/codec.d.ts +18 -45
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +12 -50
- 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 -2
- package/dist/codec/index.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +20 -7
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +56 -30
- 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/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.js +6 -4
- package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/dist/core/tree/visitDelta.js +2 -2
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/extensibleUnionNode.d.ts +97 -0
- package/dist/extensibleUnionNode.d.ts.map +1 -0
- package/dist/extensibleUnionNode.js +89 -0
- package/dist/extensibleUnionNode.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/chunked-forest/codec/codecs.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +4 -4
- package/dist/feature-libraries/chunked-forest/codec/codecs.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 +7 -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 +4 -42
- 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 +2 -41
- package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV1.js +1 -2
- package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.d.ts +2 -41
- package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.js +1 -2
- package/dist/feature-libraries/forest-summary/formatV2.js.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 +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +13 -9
- 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.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +6 -4
- 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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +4 -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 +39 -5
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts +4 -4
- package/dist/shared-tree/tree.d.ts +1 -1
- package/dist/shared-tree/tree.js +1 -1
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +1 -1
- package/dist/shared-tree/treeAlpha.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 +41 -7
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +3 -3
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +2 -2
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +2 -2
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +2 -2
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.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/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +2 -2
- package/dist/shared-tree-core/messageCodecs.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 +2 -2
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +4 -3
- 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/snapshotCompatibilityChecker.d.ts +148 -29
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +180 -99
- package/dist/simple-tree/api/snapshotCompatibilityChecker.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 +82 -7
- 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/api/treeBeta.d.ts +1 -1
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +1 -1
- package/dist/simple-tree/core/allowedTypes.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/core/unhydratedFlexTree.d.ts +1 -0
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +29 -0
- package/dist/simple-tree/core/unhydratedFlexTree.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 +5 -3
- 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 +47 -14
- 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/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +33 -7
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.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.d.ts +3 -3
- package/dist/text/textDomainFormatted.d.ts.map +1 -1
- package/dist/text/textDomainFormatted.js +48 -32
- 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 +35 -23
- 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 +12 -7
- 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 +10 -4
- package/lib/beta.d.ts +4 -0
- package/lib/codec/codec.d.ts +18 -45
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +10 -47
- 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 +20 -7
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +59 -33
- 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/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.js +6 -4
- package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/lib/core/tree/visitDelta.js +2 -2
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/extensibleUnionNode.d.ts +97 -0
- package/lib/extensibleUnionNode.d.ts.map +1 -0
- package/lib/extensibleUnionNode.js +86 -0
- package/lib/extensibleUnionNode.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/chunked-forest/codec/codecs.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +5 -5
- package/lib/feature-libraries/chunked-forest/codec/codecs.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 +8 -2
- 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 +4 -42
- 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 +2 -41
- package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV1.js +1 -2
- package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.d.ts +2 -41
- package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.js +1 -2
- package/lib/feature-libraries/forest-summary/formatV2.js.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 +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +14 -10
- 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.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +6 -4
- 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 +4 -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 +40 -6
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts +4 -4
- package/lib/shared-tree/tree.d.ts +1 -1
- package/lib/shared-tree/tree.js +1 -1
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +1 -1
- package/lib/shared-tree/treeAlpha.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 +41 -7
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +3 -3
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +2 -2
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +2 -2
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +2 -2
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +2 -2
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +2 -2
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.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/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +2 -2
- package/lib/shared-tree-core/messageCodecs.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 +2 -2
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +2 -2
- 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/snapshotCompatibilityChecker.d.ts +148 -29
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +179 -98
- package/lib/simple-tree/api/snapshotCompatibilityChecker.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 +82 -7
- 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/api/treeBeta.d.ts +1 -1
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +1 -1
- package/lib/simple-tree/core/allowedTypes.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/core/unhydratedFlexTree.d.ts +1 -0
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +29 -0
- package/lib/simple-tree/core/unhydratedFlexTree.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 +46 -14
- 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/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +34 -8
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.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.d.ts +3 -3
- package/lib/text/textDomainFormatted.d.ts.map +1 -1
- package/lib/text/textDomainFormatted.js +30 -14
- 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 +33 -22
- 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 +12 -7
- 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 +24 -24
- package/src/codec/codec.ts +33 -116
- package/src/codec/index.ts +2 -3
- package/src/codec/versioned/codec.ts +127 -95
- 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/detachedFieldIndexCodecs.ts +6 -4
- package/src/core/tree/visitDelta.ts +2 -2
- package/src/extensibleUnionNode.ts +177 -0
- package/src/feature-libraries/changeAtomIdBTree.ts +17 -2
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +5 -11
- 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 +15 -9
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +15 -3
- package/src/feature-libraries/forest-summary/formatCommon.ts +7 -6
- package/src/feature-libraries/forest-summary/formatV1.ts +1 -3
- package/src/feature-libraries/forest-summary/formatV2.ts +1 -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 +12 -12
- 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 +7 -5
- 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 +14 -9
- 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 +45 -11
- package/src/shared-tree/tree.ts +2 -2
- package/src/shared-tree/treeAlpha.ts +1 -1
- package/src/shared-tree/treeCheckout.ts +52 -7
- package/src/shared-tree-core/editManagerCodecsCommons.ts +7 -7
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +3 -10
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +3 -10
- package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
- package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -3
- package/src/shared-tree-core/messageCodecs.ts +2 -6
- 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 +3 -2
- package/src/simple-tree/api/schemaCreationUtilities.ts +35 -5
- package/src/simple-tree/api/simpleTreeIndex.ts +1 -1
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +344 -142
- package/src/simple-tree/api/transactionTypes.ts +10 -0
- package/src/simple-tree/api/tree.ts +89 -7
- package/src/simple-tree/api/treeBeta.ts +1 -1
- package/src/simple-tree/core/allowedTypes.ts +1 -1
- package/src/simple-tree/core/treeNodeSchema.ts +5 -8
- package/src/simple-tree/core/unhydratedFlexTree.ts +43 -1
- package/src/simple-tree/index.ts +5 -2
- package/src/simple-tree/leafNodeSchema.ts +3 -2
- package/src/simple-tree/node-kinds/array/arrayNode.ts +99 -19
- 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/simple-tree/unhydratedFlexTreeFromInsertable.ts +51 -10
- package/src/tableSchema.ts +280 -140
- package/src/text/textDomainFormatted.ts +37 -17
- package/src/util/bTreeUtils.ts +55 -32
- 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 +20 -11
- package/src/util/readSnapshotBlob.ts +3 -3
- package/src/util/typeCheck.ts +11 -9
- package/src/util/utils.ts +57 -28
- package/api-extractor-lint.json +0 -4
- package/biome.jsonc +0 -4
|
@@ -40,9 +40,9 @@ export function replaceRevisions(changeset: Changeset, replacer: RevisionReplace
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function updateMark(mark: Mark, replacer: RevisionReplacer): Mark {
|
|
43
|
-
const updatedMark = { ...updateEffect(mark, replacer) };
|
|
43
|
+
const updatedMark = { ...updateEffect(mark, mark.count, replacer) };
|
|
44
44
|
if (mark.cellId !== undefined) {
|
|
45
|
-
updatedMark.cellId = replacer.getUpdatedAtomId(mark.cellId);
|
|
45
|
+
updatedMark.cellId = replacer.getUpdatedAtomId(mark.cellId, mark.count);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
if (mark.changes !== undefined) {
|
|
@@ -54,9 +54,11 @@ function updateMark(mark: Mark, replacer: RevisionReplacer): Mark {
|
|
|
54
54
|
|
|
55
55
|
function updateEffect<TMark extends MarkEffect>(
|
|
56
56
|
input: TMark,
|
|
57
|
+
count: number,
|
|
57
58
|
replacer: RevisionReplacer,
|
|
58
59
|
): TMark {
|
|
59
|
-
const mark =
|
|
60
|
+
const mark =
|
|
61
|
+
isDetach(input) || isRename(input) ? updateIdOverride(input, count, replacer) : input;
|
|
60
62
|
const type = mark.type;
|
|
61
63
|
switch (type) {
|
|
62
64
|
case "Rename":
|
|
@@ -66,8 +68,8 @@ function updateEffect<TMark extends MarkEffect>(
|
|
|
66
68
|
case "AttachAndDetach": {
|
|
67
69
|
return {
|
|
68
70
|
...mark,
|
|
69
|
-
attach: updateEffect(mark.attach, replacer),
|
|
70
|
-
detach: updateEffect(mark.detach, replacer),
|
|
71
|
+
attach: updateEffect(mark.attach, count, replacer),
|
|
72
|
+
detach: updateEffect(mark.detach, count, replacer),
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
case "MoveIn":
|
|
@@ -75,12 +77,13 @@ function updateEffect<TMark extends MarkEffect>(
|
|
|
75
77
|
return updateMoveEffect<TMark & MoveMarkEffect>(
|
|
76
78
|
// For some reason, TypeScript is not able to infer that `mark` cannot be a `NoopMark` here.
|
|
77
79
|
mark as MoveMarkEffect,
|
|
80
|
+
count,
|
|
78
81
|
replacer,
|
|
79
82
|
);
|
|
80
83
|
}
|
|
81
84
|
case "Insert":
|
|
82
85
|
case "Remove": {
|
|
83
|
-
return updateRevisionAndId(mark as (TMark & Insert) | (TMark & Remove), replacer);
|
|
86
|
+
return updateRevisionAndId(mark as (TMark & Insert) | (TMark & Remove), count, replacer);
|
|
84
87
|
}
|
|
85
88
|
default: {
|
|
86
89
|
unreachableCase(type);
|
|
@@ -90,38 +93,42 @@ function updateEffect<TMark extends MarkEffect>(
|
|
|
90
93
|
|
|
91
94
|
function updateIdOverride<TEffect extends Detach | Rename>(
|
|
92
95
|
effect: TEffect,
|
|
96
|
+
count: number,
|
|
93
97
|
replacer: RevisionReplacer,
|
|
94
98
|
): TEffect {
|
|
95
99
|
if (effect.idOverride === undefined) {
|
|
96
100
|
return effect;
|
|
97
101
|
}
|
|
98
|
-
const idOverride = replacer.getUpdatedAtomId(effect.idOverride);
|
|
102
|
+
const idOverride = replacer.getUpdatedAtomId(effect.idOverride, count);
|
|
99
103
|
return { ...effect, idOverride };
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
function updateMoveEffect<TEffect extends HasMoveFields>(
|
|
103
107
|
effect: TEffect,
|
|
108
|
+
count: number,
|
|
104
109
|
replacer: RevisionReplacer,
|
|
105
110
|
): TEffect {
|
|
106
111
|
return effect.finalEndpoint === undefined
|
|
107
|
-
? updateRevisionAndId(effect, replacer)
|
|
112
|
+
? updateRevisionAndId(effect, count, replacer)
|
|
108
113
|
: updateRevisionAndId(
|
|
109
114
|
{
|
|
110
115
|
...effect,
|
|
111
|
-
finalEndpoint: replacer.getUpdatedAtomId(effect.finalEndpoint),
|
|
116
|
+
finalEndpoint: replacer.getUpdatedAtomId(effect.finalEndpoint, count),
|
|
112
117
|
},
|
|
118
|
+
count,
|
|
113
119
|
replacer,
|
|
114
120
|
);
|
|
115
121
|
}
|
|
116
122
|
|
|
117
123
|
function updateRevisionAndId<T extends HasRevisionTag & HasMoveId>(
|
|
118
124
|
input: T,
|
|
125
|
+
count: number,
|
|
119
126
|
replacer: RevisionReplacer,
|
|
120
127
|
): T {
|
|
121
128
|
if (!replacer.isObsolete(input.revision)) {
|
|
122
129
|
return input;
|
|
123
130
|
}
|
|
124
|
-
const newAtom = replacer.getUpdatedAtomId(makeChangeAtomId(input.id, input.revision));
|
|
131
|
+
const newAtom = replacer.getUpdatedAtomId(makeChangeAtomId(input.id, input.revision), count);
|
|
125
132
|
return withRevisionAndId(input, newAtom.revision, newAtom.localId);
|
|
126
133
|
}
|
|
127
134
|
|
package/src/index.ts
CHANGED
|
@@ -76,8 +76,10 @@ export {
|
|
|
76
76
|
type ObservationResults,
|
|
77
77
|
type TreeIdentifierUtils,
|
|
78
78
|
independentView,
|
|
79
|
+
type IndependentViewOptions,
|
|
79
80
|
createIndependentTreeBeta,
|
|
80
81
|
createIndependentTreeAlpha,
|
|
82
|
+
type CreateIndependentTreeAlphaOptions,
|
|
81
83
|
ForestTypeOptimized,
|
|
82
84
|
ForestTypeExpensiveDebug,
|
|
83
85
|
ForestTypeReference,
|
|
@@ -294,13 +296,15 @@ export {
|
|
|
294
296
|
exportCompatibilitySchemaSnapshot,
|
|
295
297
|
importCompatibilitySchemaSnapshot,
|
|
296
298
|
checkCompatibility,
|
|
297
|
-
|
|
299
|
+
snapshotSchemaCompatibility,
|
|
298
300
|
type SnapshotFileSystem,
|
|
299
301
|
incrementalSummaryHint,
|
|
300
302
|
incrementalEncodingPolicyForAllowedTypes,
|
|
301
303
|
eraseSchemaDetails,
|
|
302
304
|
eraseSchemaDetailsSubclassable,
|
|
303
|
-
type
|
|
305
|
+
type SnapshotSchemaCompatibilityOptions,
|
|
306
|
+
type ArrayPlaceAnchor,
|
|
307
|
+
createArrayInsertionAnchor,
|
|
304
308
|
} from "./simple-tree/index.js";
|
|
305
309
|
export {
|
|
306
310
|
SharedTree,
|
|
@@ -315,6 +319,7 @@ export { persistedToSimpleSchema } from "./shared-tree/index.js";
|
|
|
315
319
|
export {
|
|
316
320
|
type ICodecOptions,
|
|
317
321
|
type CodecWriteOptions,
|
|
322
|
+
type CodecWriteOptionsBeta,
|
|
318
323
|
FluidClientVersion,
|
|
319
324
|
type FormatValidator,
|
|
320
325
|
FormatValidatorNoOp,
|
|
@@ -348,13 +353,12 @@ export type {
|
|
|
348
353
|
export { cloneWithReplacements } from "./util/index.js";
|
|
349
354
|
|
|
350
355
|
import * as InternalTypes from "./internalTypes.js";
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
};
|
|
356
|
+
/**
|
|
357
|
+
* Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.
|
|
358
|
+
* They are used internally to implement API aspects, but are not intended for use by external consumers.
|
|
359
|
+
*/
|
|
360
|
+
// eslint-disable-next-line unicorn/prefer-export-from -- fixing requires `export * as` (breaks API-Extractor)
|
|
361
|
+
export { InternalTypes };
|
|
358
362
|
|
|
359
363
|
// Internal/System types:
|
|
360
364
|
// These would be put in `internalTypes` except doing so tents to cause errors like:
|
|
@@ -367,3 +371,4 @@ export { TableSchema, type System_TableSchema } from "./tableSchema.js";
|
|
|
367
371
|
export { asAlpha, asBeta } from "./api.js";
|
|
368
372
|
|
|
369
373
|
export { TextAsTree, FormattedTextAsTree } from "./text/index.js";
|
|
374
|
+
export { ExtensibleUnionNode } from "./extensibleUnionNode.js";
|
package/src/packageVersion.ts
CHANGED
|
@@ -61,6 +61,45 @@ import {
|
|
|
61
61
|
} from "./sharedTree.js";
|
|
62
62
|
import { createTreeCheckout } from "./treeCheckout.js";
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* {@link independentView} options.
|
|
66
|
+
* @alpha @input
|
|
67
|
+
*/
|
|
68
|
+
export interface IndependentViewOptions extends ForestOptions, Partial<CodecWriteOptions> {
|
|
69
|
+
/**
|
|
70
|
+
* Optional ID compressor for generating and compressing identifiers.
|
|
71
|
+
* If not provided, a new one will be created.
|
|
72
|
+
*/
|
|
73
|
+
idCompressor?: IIdCompressor | undefined;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* {@link createIndependentTreeAlpha} options.
|
|
78
|
+
* @alpha
|
|
79
|
+
*/
|
|
80
|
+
export type CreateIndependentTreeAlphaOptions = ForestOptions &
|
|
81
|
+
(
|
|
82
|
+
| (IndependentViewOptions & {
|
|
83
|
+
/**
|
|
84
|
+
* Optional content for initializing the tree.
|
|
85
|
+
* If not provided, the tree will be uninitialized.
|
|
86
|
+
*/
|
|
87
|
+
content?: never;
|
|
88
|
+
})
|
|
89
|
+
| (ICodecOptions & {
|
|
90
|
+
/**
|
|
91
|
+
* Content for initializing the tree.
|
|
92
|
+
* The content includes the idCompressor, so idCompressor should not be provided at the top level.
|
|
93
|
+
*/
|
|
94
|
+
content: ViewContent;
|
|
95
|
+
/**
|
|
96
|
+
* Should not be provided when content is specified.
|
|
97
|
+
* The idCompressor will be obtained from the content.
|
|
98
|
+
*/
|
|
99
|
+
idCompressor?: never;
|
|
100
|
+
})
|
|
101
|
+
);
|
|
102
|
+
|
|
64
103
|
/**
|
|
65
104
|
* Create an uninitialized {@link TreeView} that is not tied to any {@link ITree} instance.
|
|
66
105
|
*
|
|
@@ -72,7 +111,7 @@ import { createTreeCheckout } from "./treeCheckout.js";
|
|
|
72
111
|
*/
|
|
73
112
|
export function independentView<const TSchema extends ImplicitFieldSchema>(
|
|
74
113
|
config: TreeViewConfiguration<TSchema>,
|
|
75
|
-
options?:
|
|
114
|
+
options?: IndependentViewOptions,
|
|
76
115
|
): TreeViewAlpha<TSchema> {
|
|
77
116
|
return createIndependentTreeAlpha(options).viewWith(config) as TreeViewAlpha<TSchema>;
|
|
78
117
|
}
|
|
@@ -170,11 +209,7 @@ export function createIndependentTreeBeta<const TSchema extends ImplicitFieldSch
|
|
|
170
209
|
* @alpha
|
|
171
210
|
*/
|
|
172
211
|
export function createIndependentTreeAlpha<const TSchema extends ImplicitFieldSchema>(
|
|
173
|
-
options?:
|
|
174
|
-
(
|
|
175
|
-
| ({ idCompressor?: IIdCompressor | undefined } & { content?: undefined })
|
|
176
|
-
| (ICodecOptions & { content: ViewContent } & { idCompressor?: undefined })
|
|
177
|
-
),
|
|
212
|
+
options?: CreateIndependentTreeAlphaOptions,
|
|
178
213
|
): ViewableTree & Pick<ITreeAlpha, "exportVerbose" | "exportSimpleSchema"> {
|
|
179
214
|
const breaker = new Breakable("independentView");
|
|
180
215
|
const idCompressor: IIdCompressor =
|
|
@@ -197,6 +232,7 @@ export function createIndependentTreeAlpha<const TSchema extends ImplicitFieldSc
|
|
|
197
232
|
forest,
|
|
198
233
|
schema: schemaRepository,
|
|
199
234
|
breaker,
|
|
235
|
+
codecOptions: options,
|
|
200
236
|
});
|
|
201
237
|
|
|
202
238
|
if (options?.content !== undefined) {
|
package/src/shared-tree/index.ts
CHANGED
|
@@ -59,8 +59,10 @@ export {
|
|
|
59
59
|
independentInitializedView,
|
|
60
60
|
type ViewContent,
|
|
61
61
|
independentView,
|
|
62
|
+
type IndependentViewOptions,
|
|
62
63
|
createIndependentTreeBeta,
|
|
63
64
|
createIndependentTreeAlpha,
|
|
65
|
+
type CreateIndependentTreeAlphaOptions,
|
|
64
66
|
} from "./independentView.js";
|
|
65
67
|
|
|
66
68
|
export type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
@@ -227,21 +227,20 @@ export class SchematizingSimpleTreeView<
|
|
|
227
227
|
},
|
|
228
228
|
);
|
|
229
229
|
|
|
230
|
-
this.
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
)
|
|
241
|
-
)
|
|
242
|
-
|
|
243
|
-
);
|
|
244
|
-
this.checkout.transaction.commit();
|
|
230
|
+
this.runTransaction(() => {
|
|
231
|
+
initialize(
|
|
232
|
+
this.checkout,
|
|
233
|
+
schema,
|
|
234
|
+
initializerFromChunk(this.checkout, () => {
|
|
235
|
+
// This must be done after initial schema is set!
|
|
236
|
+
return combineChunks(
|
|
237
|
+
this.checkout.forest.chunkField(
|
|
238
|
+
cursorForMapTreeField(mapTree === undefined ? [] : [mapTree]),
|
|
239
|
+
),
|
|
240
|
+
);
|
|
241
|
+
}),
|
|
242
|
+
);
|
|
243
|
+
});
|
|
245
244
|
});
|
|
246
245
|
}
|
|
247
246
|
|
|
@@ -294,9 +293,43 @@ export class SchematizingSimpleTreeView<
|
|
|
294
293
|
| void,
|
|
295
294
|
params?: RunTransactionParams,
|
|
296
295
|
): TransactionResultExt<TSuccessValue, TFailureValue> | TransactionResult {
|
|
296
|
+
this.mountTransaction(params, false);
|
|
297
|
+
const transactionCallbackStatus = transaction();
|
|
298
|
+
return this.unmountTransaction(transactionCallbackStatus, params);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* {@inheritDoc @fluidframework/shared-tree#TreeViewAlpha.runTransactionAsync}
|
|
303
|
+
*/
|
|
304
|
+
public runTransactionAsync<TSuccessValue, TFailureValue>(
|
|
305
|
+
transaction: () => Promise<TransactionCallbackStatus<TSuccessValue, TFailureValue>>,
|
|
306
|
+
params?: RunTransactionParams,
|
|
307
|
+
): Promise<TransactionResultExt<TSuccessValue, TFailureValue>>;
|
|
308
|
+
/**
|
|
309
|
+
* {@inheritDoc @fluidframework/shared-tree#TreeViewAlpha.runTransactionAsync}
|
|
310
|
+
*/
|
|
311
|
+
public runTransactionAsync(
|
|
312
|
+
transaction: () => Promise<VoidTransactionCallbackStatus | void>,
|
|
313
|
+
params?: RunTransactionParams,
|
|
314
|
+
): Promise<TransactionResult>;
|
|
315
|
+
public async runTransactionAsync<TSuccessValue, TFailureValue>(
|
|
316
|
+
transaction: () => Promise<
|
|
317
|
+
| TransactionCallbackStatus<TSuccessValue, TFailureValue>
|
|
318
|
+
| VoidTransactionCallbackStatus
|
|
319
|
+
| void
|
|
320
|
+
>,
|
|
321
|
+
params: RunTransactionParams | undefined,
|
|
322
|
+
): Promise<TransactionResultExt<TSuccessValue, TFailureValue> | TransactionResult> {
|
|
323
|
+
this.mountTransaction(params, true);
|
|
324
|
+
const transactionCallbackStatus = await transaction();
|
|
325
|
+
return this.unmountTransaction(transactionCallbackStatus, params);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
private mountTransaction(params: RunTransactionParams | undefined, isAsync: boolean): void {
|
|
329
|
+
this.ensureUndisposed();
|
|
297
330
|
const { checkout } = this;
|
|
298
331
|
|
|
299
|
-
checkout.transaction.start();
|
|
332
|
+
checkout.transaction.start(isAsync);
|
|
300
333
|
|
|
301
334
|
// Validate preconditions before running the transaction callback.
|
|
302
335
|
addConstraintsToTransaction(
|
|
@@ -304,7 +337,17 @@ export class SchematizingSimpleTreeView<
|
|
|
304
337
|
false /* constraintsOnRevert */,
|
|
305
338
|
params?.preconditions,
|
|
306
339
|
);
|
|
307
|
-
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
private unmountTransaction<TSuccessValue, TFailureValue>(
|
|
343
|
+
transactionCallbackStatus:
|
|
344
|
+
| TransactionCallbackStatus<TSuccessValue, TFailureValue>
|
|
345
|
+
| VoidTransactionCallbackStatus
|
|
346
|
+
| void,
|
|
347
|
+
params?: RunTransactionParams,
|
|
348
|
+
): TransactionResultExt<TSuccessValue, TFailureValue> | TransactionResult {
|
|
349
|
+
this.ensureUndisposed();
|
|
350
|
+
const { checkout } = this;
|
|
308
351
|
const rollback = transactionCallbackStatus?.rollback;
|
|
309
352
|
const value = (
|
|
310
353
|
transactionCallbackStatus as TransactionCallbackStatus<TSuccessValue, TFailureValue>
|
|
@@ -324,7 +367,9 @@ export class SchematizingSimpleTreeView<
|
|
|
324
367
|
transactionCallbackStatus?.preconditionsOnRevert,
|
|
325
368
|
);
|
|
326
369
|
|
|
327
|
-
checkout.
|
|
370
|
+
checkout.runWithTransactionLabel(() => {
|
|
371
|
+
checkout.transaction.commit();
|
|
372
|
+
}, params?.label);
|
|
328
373
|
return value === undefined
|
|
329
374
|
? { success: true }
|
|
330
375
|
: { success: true, value: value as TSuccessValue };
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
type CodecTree,
|
|
23
23
|
type CodecWriteOptions,
|
|
24
|
+
type CodecWriteOptionsBeta,
|
|
24
25
|
DependentFormatVersion,
|
|
25
26
|
FluidClientVersion,
|
|
26
27
|
FormatValidatorNoOp,
|
|
@@ -99,7 +100,6 @@ import {
|
|
|
99
100
|
type SchemaType,
|
|
100
101
|
} from "../simple-tree/index.js";
|
|
101
102
|
import {
|
|
102
|
-
brand,
|
|
103
103
|
type Breakable,
|
|
104
104
|
breakingClass,
|
|
105
105
|
type JsonCompatible,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
|
|
110
110
|
import {
|
|
111
111
|
getCodecTreeForChangeFormat,
|
|
112
|
-
|
|
112
|
+
SharedTreeChangeFormatVersion,
|
|
113
113
|
} from "./sharedTreeChangeCodecs.js";
|
|
114
114
|
import { SharedTreeChangeFamily } from "./sharedTreeChangeFamily.js";
|
|
115
115
|
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
@@ -550,23 +550,14 @@ export function getBranch<T extends ImplicitFieldSchema | UnsafeUnknownSchema>(
|
|
|
550
550
|
* This is because the format for SharedTree changes are not explicitly versioned.
|
|
551
551
|
*/
|
|
552
552
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison -- intentional comparison
|
|
553
|
-
export const changeFormatVersionForEditManager = DependentFormatVersion.fromPairs
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
],
|
|
558
|
-
[
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
],
|
|
562
|
-
[
|
|
563
|
-
brand<EditManagerFormatVersion>(EditManagerFormatVersion.vSharedBranches),
|
|
564
|
-
brand<SharedTreeChangeFormatVersion>(4),
|
|
565
|
-
],
|
|
566
|
-
[
|
|
567
|
-
brand<EditManagerFormatVersion>(EditManagerFormatVersion.v6),
|
|
568
|
-
brand<SharedTreeChangeFormatVersion>(5),
|
|
569
|
-
],
|
|
553
|
+
export const changeFormatVersionForEditManager = DependentFormatVersion.fromPairs<
|
|
554
|
+
EditManagerFormatVersion,
|
|
555
|
+
SharedTreeChangeFormatVersion
|
|
556
|
+
>([
|
|
557
|
+
[EditManagerFormatVersion.v3, SharedTreeChangeFormatVersion.v3],
|
|
558
|
+
[EditManagerFormatVersion.v4, SharedTreeChangeFormatVersion.v4],
|
|
559
|
+
[EditManagerFormatVersion.vSharedBranches, SharedTreeChangeFormatVersion.v4],
|
|
560
|
+
[EditManagerFormatVersion.v6, SharedTreeChangeFormatVersion.v5],
|
|
570
561
|
]);
|
|
571
562
|
|
|
572
563
|
/**
|
|
@@ -575,23 +566,14 @@ export const changeFormatVersionForEditManager = DependentFormatVersion.fromPair
|
|
|
575
566
|
* Once an entry is defined and used in production, it cannot be changed.
|
|
576
567
|
* This is because the format for SharedTree changes are not explicitly versioned.
|
|
577
568
|
*/
|
|
578
|
-
export const changeFormatVersionForMessage = DependentFormatVersion.fromPairs
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
],
|
|
583
|
-
[
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
],
|
|
587
|
-
[
|
|
588
|
-
brand<MessageFormatVersion>(MessageFormatVersion.vSharedBranches),
|
|
589
|
-
brand<SharedTreeChangeFormatVersion>(4),
|
|
590
|
-
],
|
|
591
|
-
[
|
|
592
|
-
brand<MessageFormatVersion>(MessageFormatVersion.v6),
|
|
593
|
-
brand<SharedTreeChangeFormatVersion>(5),
|
|
594
|
-
],
|
|
569
|
+
export const changeFormatVersionForMessage = DependentFormatVersion.fromPairs<
|
|
570
|
+
MessageFormatVersion,
|
|
571
|
+
SharedTreeChangeFormatVersion
|
|
572
|
+
>([
|
|
573
|
+
[MessageFormatVersion.v3, SharedTreeChangeFormatVersion.v3],
|
|
574
|
+
[MessageFormatVersion.v4, SharedTreeChangeFormatVersion.v4],
|
|
575
|
+
[MessageFormatVersion.vSharedBranches, SharedTreeChangeFormatVersion.v4],
|
|
576
|
+
[MessageFormatVersion.v6, SharedTreeChangeFormatVersion.v5],
|
|
595
577
|
]);
|
|
596
578
|
|
|
597
579
|
function getCodecTreeForEditManagerFormat(clientVersion: MinimumVersionForCollab): CodecTree {
|
|
@@ -631,7 +613,7 @@ export function getCodecTreeForSharedTreeFormat(
|
|
|
631
613
|
* Configuration options for SharedTree.
|
|
632
614
|
* @beta @input
|
|
633
615
|
*/
|
|
634
|
-
export type SharedTreeOptionsBeta = ForestOptions
|
|
616
|
+
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;
|
|
635
617
|
|
|
636
618
|
/**
|
|
637
619
|
* Configuration options for SharedTree with alpha features.
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
type TreeStoredSchema,
|
|
24
24
|
} from "../core/index.js";
|
|
25
25
|
import {
|
|
26
|
-
|
|
26
|
+
ModularChangeFormatVersion,
|
|
27
27
|
type ModularChangeset,
|
|
28
28
|
type SchemaChange,
|
|
29
29
|
defaultSchemaPolicy,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
makeSchemaChangeCodecs,
|
|
33
33
|
} from "../feature-libraries/index.js";
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
type Brand,
|
|
35
|
+
strictEnum,
|
|
37
36
|
type JsonCompatibleReadOnly,
|
|
38
37
|
type Mutable,
|
|
38
|
+
type Values,
|
|
39
39
|
} from "../util/index.js";
|
|
40
40
|
|
|
41
41
|
import {
|
|
@@ -61,8 +61,8 @@ export function makeSharedTreeChangeCodecFamily(
|
|
|
61
61
|
([format, { modularChange, schemaChange }]) => [
|
|
62
62
|
format,
|
|
63
63
|
makeSharedTreeChangeCodec(
|
|
64
|
-
modularChangeCodecFamily.resolve(modularChange)
|
|
65
|
-
schemaChangeCodecs.resolve(schemaChange)
|
|
64
|
+
modularChangeCodecFamily.resolve(modularChange),
|
|
65
|
+
schemaChangeCodecs.resolve(schemaChange),
|
|
66
66
|
options,
|
|
67
67
|
),
|
|
68
68
|
],
|
|
@@ -75,7 +75,32 @@ interface ChangeFormatDependencies {
|
|
|
75
75
|
readonly schemaChange: SchemaFormatVersion;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
/**
|
|
79
|
+
* The format version for `SharedTreeChange`.
|
|
80
|
+
*/
|
|
81
|
+
export const SharedTreeChangeFormatVersion = strictEnum("SharedTreeChangeFormatVersion", {
|
|
82
|
+
/**
|
|
83
|
+
* Introduced prior to 2.0 and used beyond.
|
|
84
|
+
* Reading capability must be maintained for backwards compatibility.
|
|
85
|
+
* Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.
|
|
86
|
+
*/
|
|
87
|
+
v3: 3,
|
|
88
|
+
/**
|
|
89
|
+
* Introduced in 2.2.0.
|
|
90
|
+
* Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.
|
|
91
|
+
* Reading capability must be maintained for backwards compatibility.
|
|
92
|
+
* Writing capability could be dropped in favor of {@link SharedTreeChangeFormatVersion.v3},
|
|
93
|
+
* but doing so would make the pattern of writable versions more complex and gain little
|
|
94
|
+
* because the logic for this format is shared with {@link SharedTreeChangeFormatVersion.v3}.
|
|
95
|
+
*/
|
|
96
|
+
v4: 4,
|
|
97
|
+
/**
|
|
98
|
+
* Introduced and made available for writing in 2.80.0
|
|
99
|
+
* Adds support for "no change" constraints.
|
|
100
|
+
*/
|
|
101
|
+
v5: 5,
|
|
102
|
+
});
|
|
103
|
+
export type SharedTreeChangeFormatVersion = Values<typeof SharedTreeChangeFormatVersion>;
|
|
79
104
|
|
|
80
105
|
/**
|
|
81
106
|
* Defines for each SharedTree change format the corresponding dependent formats to use.
|
|
@@ -83,13 +108,22 @@ export type SharedTreeChangeFormatVersion = Brand<3 | 4 | 5, "SharedTreeChangeFo
|
|
|
83
108
|
* Once an entry is defined and used in production, it cannot be changed.
|
|
84
109
|
* This is because the format for the dependent formats are not explicitly versioned.
|
|
85
110
|
*/
|
|
86
|
-
export const dependenciesForChangeFormat
|
|
111
|
+
export const dependenciesForChangeFormat = new Map<
|
|
87
112
|
SharedTreeChangeFormatVersion,
|
|
88
113
|
ChangeFormatDependencies
|
|
89
|
-
>
|
|
90
|
-
[
|
|
91
|
-
|
|
92
|
-
|
|
114
|
+
>([
|
|
115
|
+
[
|
|
116
|
+
SharedTreeChangeFormatVersion.v3,
|
|
117
|
+
{ modularChange: ModularChangeFormatVersion.v3, schemaChange: SchemaFormatVersion.v1 },
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
SharedTreeChangeFormatVersion.v4,
|
|
121
|
+
{ modularChange: ModularChangeFormatVersion.v4, schemaChange: SchemaFormatVersion.v1 },
|
|
122
|
+
],
|
|
123
|
+
[
|
|
124
|
+
SharedTreeChangeFormatVersion.v5,
|
|
125
|
+
{ modularChange: ModularChangeFormatVersion.v5, schemaChange: SchemaFormatVersion.v1 },
|
|
126
|
+
],
|
|
93
127
|
]);
|
|
94
128
|
|
|
95
129
|
export function getCodecTreeForChangeFormat(
|
package/src/shared-tree/tree.ts
CHANGED
|
@@ -28,7 +28,7 @@ import type { ITreeCheckout } from "./treeCheckout.js";
|
|
|
28
28
|
* Provides various functions for interacting with {@link TreeNode}s.
|
|
29
29
|
* @remarks
|
|
30
30
|
* This type should only be used via the {@link (Tree:variable)} export.
|
|
31
|
-
* @
|
|
31
|
+
* @sealed @public
|
|
32
32
|
*/
|
|
33
33
|
export interface Tree extends TreeNodeApi {
|
|
34
34
|
/**
|
|
@@ -467,7 +467,7 @@ function runTransactionInCheckout<TResult>(
|
|
|
467
467
|
transaction: () => TResult | typeof rollback,
|
|
468
468
|
preconditions: readonly TransactionConstraint[],
|
|
469
469
|
): TResult | typeof rollback {
|
|
470
|
-
checkout.transaction.start();
|
|
470
|
+
checkout.transaction.start(false);
|
|
471
471
|
addConstraintsToTransaction(checkout, false, preconditions);
|
|
472
472
|
|
|
473
473
|
let result: ReturnType<typeof transaction>;
|
|
@@ -226,7 +226,7 @@ export interface TreeIdentifierUtils {
|
|
|
226
226
|
* There should be a way to provide a source for defaulted identifiers for unhydrated node creation, either via these APIs or some way to add them to its output later.
|
|
227
227
|
* If an option were added to these APIs, it could also be used to enable unknown optional fields.
|
|
228
228
|
*
|
|
229
|
-
* @
|
|
229
|
+
* @sealed @alpha
|
|
230
230
|
*/
|
|
231
231
|
export interface TreeAlpha {
|
|
232
232
|
/**
|