@fluidframework/tree 2.91.0 → 2.92.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 +118 -0
- package/api-report/tree.alpha.api.md +60 -22
- package/dist/api.d.ts +6 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js.map +1 -1
- package/dist/codec/codec.d.ts +28 -2
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +1 -0
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +2 -2
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +2 -4
- package/dist/codec/index.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +18 -36
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +46 -59
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/index.d.ts +1 -1
- package/dist/codec/versioned/index.d.ts.map +1 -1
- package/dist/codec/versioned/index.js +2 -4
- package/dist/codec/versioned/index.js.map +1 -1
- package/dist/core/forest/forest.d.ts +5 -2
- package/dist/core/forest/forest.d.ts.map +1 -1
- package/dist/core/forest/forest.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 +6 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +8 -1
- package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
- package/dist/core/rebase/changeRebaser.js.map +1 -1
- package/dist/core/rebase/revisionTagCodec.d.ts +4 -3
- package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
- package/dist/core/rebase/revisionTagCodec.js +2 -0
- package/dist/core/rebase/revisionTagCodec.js.map +1 -1
- package/dist/core/rebase/utils.d.ts +2 -2
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +4 -4
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts +1 -1
- package/dist/core/schema-stored/formatV2.js +1 -1
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +8 -0
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +42 -7
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/cursor.d.ts +25 -1
- package/dist/core/tree/cursor.d.ts.map +1 -1
- package/dist/core/tree/cursor.js +45 -1
- package/dist/core/tree/cursor.js.map +1 -1
- package/dist/core/tree/deltaUtil.d.ts +13 -1
- package/dist/core/tree/deltaUtil.d.ts.map +1 -1
- package/dist/core/tree/deltaUtil.js +34 -1
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts +5 -5
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/dist/core/tree/index.d.ts +2 -2
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +6 -2
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +11 -0
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +5 -0
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/entrypoints/alpha.d.ts +1 -1
- package/dist/entrypoints/alpha.d.ts.map +1 -1
- package/dist/entrypoints/alpha.js +2 -3
- package/dist/entrypoints/alpha.js.map +1 -1
- package/dist/entrypoints/beta.js +1 -1
- package/dist/entrypoints/beta.js.map +1 -1
- package/dist/entrypoints/legacy.d.ts +1 -1
- package/dist/entrypoints/legacy.d.ts.map +1 -1
- package/dist/entrypoints/legacy.js +1 -1
- package/dist/entrypoints/legacy.js.map +1 -1
- package/dist/entrypoints/public.js +1 -1
- package/dist/entrypoints/public.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.d.ts +4 -3
- package/dist/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.js +2 -0
- package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +2 -2
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +4 -4
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +6 -6
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -4
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +6 -6
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +12 -12
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/{formatGeneric.d.ts → format/formatGeneric.d.ts} +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +187 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +115 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +33 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +16 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts +10 -0
- package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/index.js +18 -0
- package/dist/feature-libraries/chunked-forest/codec/format/index.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts +93 -0
- package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/versions.js +29 -0
- package/dist/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +6 -4
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/cursorComparator.d.ts +23 -0
- package/dist/feature-libraries/cursorComparator.d.ts.map +1 -0
- package/dist/feature-libraries/cursorComparator.js +65 -0
- package/dist/feature-libraries/cursorComparator.js.map +1 -0
- package/dist/feature-libraries/forest-summary/codec.d.ts +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +3 -3
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -2
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +5 -5
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -0
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.js +12 -7
- package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
- package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +3 -3
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +0 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +10 -10
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +2 -4
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +4 -3
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +2 -2
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +4 -4
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +3 -3
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/index.js +2 -3
- package/dist/feature-libraries/schema-edits/index.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -15
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +8 -54
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +3 -16
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +1 -21
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/dist/feature-libraries/schema-index/index.d.ts +1 -1
- package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/index.js +1 -2
- package/dist/feature-libraries/schema-index/index.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -4
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +14 -21
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +2 -2
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +1 -2
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +2 -36
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +15 -117
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +3 -22
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +10 -27
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +3 -2
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +23 -16
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.js +13 -5
- package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/dist/shared-tree/tree.d.ts.map +1 -1
- package/dist/shared-tree/tree.js +2 -1
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +13 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +3 -0
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +34 -69
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +885 -678
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/unhydratedTreeContext.js +3 -3
- package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +23 -12
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +40 -67
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +0 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +10 -2
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +18 -13
- 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 +6 -9
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +3 -3
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +5 -8
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -3
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +8 -8
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +2 -3
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +5 -4
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +15 -14
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +38 -74
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +0 -1
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +1 -2
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +1 -3
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +12 -2
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/sharedTreeAttributes.d.ts.map +1 -1
- package/dist/sharedTreeAttributes.js +3 -0
- package/dist/sharedTreeAttributes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +1 -0
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +2 -2
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +6 -6
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +7 -19
- 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/treeAlpha.d.ts +69 -0
- package/dist/simple-tree/api/treeAlpha.d.ts.map +1 -0
- package/dist/simple-tree/api/treeAlpha.js +7 -0
- package/dist/simple-tree/api/treeAlpha.js.map +1 -0
- package/dist/simple-tree/api/treeBeta.d.ts +1 -1
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/api/treeChangeEvents.d.ts +3 -0
- package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
- package/dist/simple-tree/api/treeChangeEvents.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts +49 -0
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +41 -2
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +45 -8
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +5 -1
- 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.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +16 -0
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +23 -0
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +10 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/index.d.ts +2 -2
- package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -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.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +319 -9
- package/dist/text/textDomainFormatted.d.ts.map +1 -1
- package/dist/text/textDomainFormatted.js +100 -25
- package/dist/text/textDomainFormatted.js.map +1 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +5 -2
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/referenceCounting.d.ts.map +1 -1
- package/dist/util/referenceCounting.js +0 -1
- package/dist/util/referenceCounting.js.map +1 -1
- package/legacy.d.ts +2 -3
- package/lib/api.d.ts +6 -1
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js.map +1 -1
- package/lib/codec/codec.d.ts +28 -2
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +1 -0
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +2 -2
- 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 +18 -36
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +45 -56
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/index.d.ts +1 -1
- package/lib/codec/versioned/index.d.ts.map +1 -1
- package/lib/codec/versioned/index.js +1 -1
- package/lib/codec/versioned/index.js.map +1 -1
- package/lib/core/forest/forest.d.ts +5 -2
- package/lib/core/forest/forest.d.ts.map +1 -1
- package/lib/core/forest/forest.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 +8 -1
- package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
- package/lib/core/rebase/changeRebaser.js.map +1 -1
- package/lib/core/rebase/revisionTagCodec.d.ts +4 -3
- package/lib/core/rebase/revisionTagCodec.d.ts.map +1 -1
- package/lib/core/rebase/revisionTagCodec.js +2 -0
- package/lib/core/rebase/revisionTagCodec.js.map +1 -1
- package/lib/core/rebase/utils.d.ts +2 -2
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +4 -4
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts +1 -1
- package/lib/core/schema-stored/formatV2.js +1 -1
- package/lib/core/schema-stored/formatV2.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts +8 -0
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +42 -7
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/cursor.d.ts +25 -1
- package/lib/core/tree/cursor.d.ts.map +1 -1
- package/lib/core/tree/cursor.js +43 -0
- package/lib/core/tree/cursor.js.map +1 -1
- package/lib/core/tree/deltaUtil.d.ts +13 -1
- package/lib/core/tree/deltaUtil.d.ts.map +1 -1
- package/lib/core/tree/deltaUtil.js +31 -0
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts +5 -5
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/lib/core/tree/index.d.ts +2 -2
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +2 -2
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +11 -0
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js +5 -0
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/entrypoints/alpha.d.ts +1 -1
- package/lib/entrypoints/alpha.d.ts.map +1 -1
- package/lib/entrypoints/alpha.js +2 -2
- package/lib/entrypoints/alpha.js.map +1 -1
- package/lib/entrypoints/beta.js +1 -1
- package/lib/entrypoints/beta.js.map +1 -1
- package/lib/entrypoints/legacy.d.ts +1 -1
- package/lib/entrypoints/legacy.d.ts.map +1 -1
- package/lib/entrypoints/legacy.js +1 -1
- package/lib/entrypoints/legacy.js.map +1 -1
- package/lib/entrypoints/public.js +1 -1
- package/lib/entrypoints/public.js.map +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.d.ts +4 -3
- package/lib/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.js +2 -0
- package/lib/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +2 -2
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +4 -4
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +4 -4
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -4
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +12 -12
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/{formatGeneric.d.ts → format/formatGeneric.d.ts} +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +187 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js +112 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +33 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js +13 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts +10 -0
- package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/index.js +8 -0
- package/lib/feature-libraries/chunked-forest/codec/format/index.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts +93 -0
- package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/versions.js +26 -0
- package/lib/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +4 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/cursorComparator.d.ts +23 -0
- package/lib/feature-libraries/cursorComparator.d.ts.map +1 -0
- package/lib/feature-libraries/cursorComparator.js +61 -0
- package/lib/feature-libraries/cursorComparator.js.map +1 -0
- package/lib/feature-libraries/forest-summary/codec.d.ts +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +3 -3
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -2
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +3 -2
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -0
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.js +12 -7
- package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
- package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +3 -3
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +0 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +10 -10
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +2 -4
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +4 -3
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +2 -2
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +4 -4
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +3 -3
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/index.js +1 -1
- package/lib/feature-libraries/schema-edits/index.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -15
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +6 -50
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +3 -16
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +0 -19
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/lib/feature-libraries/schema-index/index.d.ts +1 -1
- package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/index.js +1 -1
- package/lib/feature-libraries/schema-index/index.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -4
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +4 -11
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +2 -2
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +2 -36
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +17 -116
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +3 -22
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +11 -27
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +3 -2
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +19 -12
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +2 -2
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.js +11 -5
- package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/lib/shared-tree/tree.d.ts.map +1 -1
- package/lib/shared-tree/tree.js +2 -1
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +13 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +3 -0
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +34 -69
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +889 -683
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/unhydratedTreeContext.js +1 -1
- package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +23 -12
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +41 -65
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +0 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +10 -2
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +16 -11
- 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 +5 -8
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +3 -3
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +3 -3
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -3
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js +8 -8
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +2 -3
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +5 -4
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +15 -14
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +38 -71
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +0 -1
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +0 -1
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +1 -3
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +14 -4
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/sharedTreeAttributes.d.ts.map +1 -1
- package/lib/sharedTreeAttributes.js +3 -0
- package/lib/sharedTreeAttributes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +1 -0
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +2 -2
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +7 -7
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +7 -19
- 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/treeAlpha.d.ts +69 -0
- package/lib/simple-tree/api/treeAlpha.d.ts.map +1 -0
- package/lib/simple-tree/api/treeAlpha.js +6 -0
- package/lib/simple-tree/api/treeAlpha.js.map +1 -0
- package/lib/simple-tree/api/treeBeta.d.ts +1 -1
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/api/treeChangeEvents.d.ts +3 -0
- package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
- package/lib/simple-tree/api/treeChangeEvents.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts +49 -0
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +41 -2
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +45 -8
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +5 -1
- 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.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +16 -0
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +23 -0
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +10 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/index.d.ts +2 -2
- package/lib/simple-tree/node-kinds/array/index.d.ts.map +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.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +319 -9
- package/lib/text/textDomainFormatted.d.ts.map +1 -1
- package/lib/text/textDomainFormatted.js +103 -28
- package/lib/text/textDomainFormatted.js.map +1 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +6 -3
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/referenceCounting.d.ts.map +1 -1
- package/lib/util/referenceCounting.js +0 -1
- package/lib/util/referenceCounting.js.map +1 -1
- package/package.json +27 -27
- package/scripts/generate-entrypoint-sources.sh +4 -2
- package/src/api.ts +11 -0
- package/src/codec/codec.ts +32 -2
- package/src/codec/index.ts +2 -3
- package/src/codec/versioned/codec.ts +99 -109
- package/src/codec/versioned/index.ts +1 -3
- package/src/core/forest/forest.ts +5 -2
- package/src/core/index.ts +4 -0
- package/src/core/rebase/changeRebaser.ts +8 -0
- package/src/core/rebase/revisionTagCodec.ts +4 -4
- package/src/core/rebase/utils.ts +9 -2
- package/src/core/schema-stored/formatV2.ts +1 -1
- package/src/core/tree/anchorSet.ts +67 -10
- package/src/core/tree/cursor.ts +52 -1
- package/src/core/tree/deltaUtil.ts +37 -1
- package/src/core/tree/detachedFieldIndexCodecs.ts +4 -4
- package/src/core/tree/index.ts +4 -0
- package/src/core/tree/visitDelta.ts +13 -1
- package/src/core/tree/visitorUtils.ts +5 -0
- package/src/entrypoints/alpha.ts +13 -6
- package/src/entrypoints/beta.ts +2 -2
- package/src/entrypoints/legacy.ts +11 -3
- package/src/entrypoints/public.ts +1 -1
- package/src/feature-libraries/changeAtomIdCodec.ts +8 -7
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +3 -2
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +18 -13
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -2
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +16 -10
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +16 -14
- package/src/feature-libraries/chunked-forest/codec/{formatGeneric.ts → format/formatGeneric.ts} +1 -1
- package/src/feature-libraries/chunked-forest/codec/{format.ts → format/formatV1.ts} +41 -111
- package/src/feature-libraries/chunked-forest/codec/format/formatV2.ts +31 -0
- package/src/feature-libraries/chunked-forest/codec/format/index.ts +31 -0
- package/src/feature-libraries/chunked-forest/codec/format/versions.ts +81 -0
- package/src/feature-libraries/chunked-forest/codec/index.ts +6 -2
- package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +19 -12
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +6 -4
- package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +10 -10
- package/src/feature-libraries/chunked-forest/index.ts +2 -1
- package/src/feature-libraries/cursorComparator.ts +77 -0
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +5 -5
- package/src/feature-libraries/index.ts +5 -3
- package/src/feature-libraries/indexing/anchorTreeIndex.ts +20 -10
- package/src/feature-libraries/mitigatedChangeFamily.ts +4 -1
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +4 -5
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +0 -1
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +19 -26
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +4 -4
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +4 -5
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +6 -2
- package/src/feature-libraries/object-forest/objectForest.ts +8 -2
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +11 -13
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +4 -5
- package/src/feature-libraries/schema-edits/index.ts +1 -4
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +10 -78
- package/src/feature-libraries/schema-index/codec.ts +0 -25
- package/src/feature-libraries/schema-index/formatV2.ts +1 -1
- package/src/feature-libraries/schema-index/index.ts +1 -4
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +6 -6
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +8 -5
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +4 -5
- package/src/index.ts +10 -3
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +5 -18
- package/src/shared-tree/index.ts +0 -4
- package/src/shared-tree/schematizingTreeView.ts +19 -165
- package/src/shared-tree/sharedTree.ts +16 -59
- package/src/shared-tree/sharedTreeChangeCodecs.ts +23 -29
- package/src/shared-tree/sharedTreeChangeEnricher.ts +1 -2
- package/src/shared-tree/sharedTreeChangeFamily.ts +2 -0
- package/src/shared-tree/sharedTreeChangeFormat.ts +23 -8
- package/src/shared-tree/tree.ts +2 -5
- package/src/shared-tree/treeAlpha.ts +26 -0
- package/src/shared-tree/treeCheckout.ts +275 -99
- package/src/shared-tree/unhydratedTreeContext.ts +1 -1
- package/src/shared-tree-core/editManagerCodecs.ts +99 -124
- package/src/shared-tree-core/editManagerCodecsCommons.ts +0 -1
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +54 -59
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +72 -95
- package/src/shared-tree-core/index.ts +4 -8
- package/src/shared-tree-core/messageCodecV1ToV4.ts +56 -71
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +76 -92
- package/src/shared-tree-core/messageCodecs.ts +88 -126
- package/src/shared-tree-core/messageFormat.ts +0 -3
- package/src/shared-tree-core/sharedTreeCore.ts +14 -21
- package/src/sharedTreeAttributes.ts +3 -0
- package/src/simple-tree/api/index.ts +10 -0
- package/src/simple-tree/api/schemaFactory.ts +0 -2
- package/src/simple-tree/api/schemaFactoryAlpha.ts +13 -2
- package/src/simple-tree/api/storedSchema.ts +8 -19
- package/src/simple-tree/api/tree.ts +7 -20
- package/src/simple-tree/api/treeAlpha.ts +90 -0
- package/src/simple-tree/api/treeBeta.ts +1 -1
- package/src/simple-tree/api/treeChangeEvents.ts +3 -0
- package/src/simple-tree/api/treeNodeApi.ts +95 -3
- package/src/simple-tree/core/treeNodeKernel.ts +53 -7
- package/src/simple-tree/core/unhydratedFlexTree.ts +5 -1
- package/src/simple-tree/index.ts +10 -0
- package/src/simple-tree/node-kinds/array/arrayNode.ts +64 -0
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +25 -1
- package/src/simple-tree/node-kinds/array/index.ts +2 -0
- package/src/simple-tree/node-kinds/index.ts +2 -0
- package/src/text/textDomainFormatted.ts +113 -11
- package/src/treeFactory.ts +10 -5
- package/src/util/referenceCounting.ts +0 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +0 -383
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +0 -191
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +0 -383
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +0 -188
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +0 -1
- /package/dist/feature-libraries/chunked-forest/codec/{formatGeneric.js → format/formatGeneric.js} +0 -0
- /package/lib/feature-libraries/chunked-forest/codec/{formatGeneric.js → format/formatGeneric.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitorUtils.js","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,kDAA6E;AAM7E,mEAA6D;AA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C,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;YACtB,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAhFD,0CAgFC;AAwBD,MAAM,IAAI,GAAG,GAAS,EAAE,GAAE,CAAC,CAAC;AAE5B;;;GAGG;AACH,SAAgB,sBAAsB,CACrC,gBAA2C;IAE3C,OAAO;QACN,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,gBAAgB,CAAC,IAAI,IAAI,IAAI;QACnC,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,aAAa,EAAE,gBAAgB,CAAC,aAAa,IAAI,IAAI;QACrD,OAAO,EAAE,gBAAgB,CAAC,OAAO,IAAI,IAAI;QACzC,YAAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,YAAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;QAC7C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,IAAI,IAAI;QAC3C,UAAU,EAAE,gBAAgB,CAAC,UAAU,IAAI,IAAI;QAC/C,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;KAC7C,CAAC;AACH,CAAC;AArBD,wDAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecWriteOptions } from \"../../codec/index.js\";\nimport { type IdAllocator, idAllocatorFromMaxId } from \"../../util/index.js\";\nimport type { RevisionTag, RevisionTagCodec } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { ITreeCursorSynchronous } from \"./cursor.js\";\nimport type { DetachedNodeId, Root } from \"./delta.js\";\nimport { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId } from \"./detachedFieldIndexTypes.js\";\nimport type { PlaceIndex, Range } from \"./pathTree.js\";\nimport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\n\nexport function makeDetachedFieldIndex(\n\tprefix: string = \"Temp\",\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\toptions?: CodecWriteOptions,\n): DetachedFieldIndex {\n\treturn new DetachedFieldIndex(\n\t\tprefix,\n\t\tidAllocatorFromMaxId() as IdAllocator<ForestRootId>,\n\t\trevisionTagCodec,\n\t\tidCompressor,\n\t\toptions,\n\t);\n}\n\nexport function applyDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, visitor, detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport function announceDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor & AnnouncedVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, combineVisitors([visitor]), detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport interface CombinedVisitor extends DeltaVisitor {\n\treadonly type: \"Combined\";\n\n\treadonly visitors: readonly CombinableVisitor[];\n}\n\nexport type CombinableVisitor =\n\t| (DeltaVisitor & { type?: never })\n\t| AnnouncedVisitor\n\t| CombinedVisitor;\n\n/**\n * Combines multiple visitors into a single visitor.\n * @param visitors - The returned visitor invokes the corresponding events for all these visitors, in order.\n * @returns a DeltaVisitor combining all `visitors`.\n */\nexport function combineVisitors(visitors: readonly CombinableVisitor[]): CombinedVisitor {\n\tconst allVisitors = visitors.flatMap((v) => (v.type === \"Combined\" ? v.visitors : [v]));\n\tconst announcedVisitors = allVisitors.filter(\n\t\t(v): v is AnnouncedVisitor => v.type === \"Announced\",\n\t);\n\treturn {\n\t\ttype: \"Combined\",\n\t\tvisitors: allVisitors,\n\t\tfree: () => {\n\t\t\tfor (const v of visitors) {\n\t\t\t\tv.free();\n\t\t\t}\n\t\t},\n\t\tcreate: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.create(...args);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterCreate(...args);\n\t\t\t}\n\t\t},\n\t\tdestroy: (...args) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDestroy(...args);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.destroy(...args);\n\t\t\t}\n\t\t},\n\t\tattach: (source: FieldKey, count: number, destination: PlaceIndex) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeAttach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.attach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterAttach(source, {\n\t\t\t\t\tstart: destination,\n\t\t\t\t\tend: destination + count,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdetach: (\n\t\t\tsource: Range,\n\t\t\tdestination: FieldKey,\n\t\t\tid: DetachedNodeId,\n\t\t\tisReplaced: boolean,\n\t\t) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDetach(source, destination, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.detach(source, destination, id, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterDetach(source.start, source.end - source.start, destination, isReplaced);\n\t\t\t}\n\t\t},\n\t\tenterNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterNode(...args);\n\t\t\t}\n\t\t},\n\t\texitNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitNode(...args);\n\t\t\t}\n\t\t},\n\t\tenterField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterField(...args);\n\t\t\t}\n\t\t},\n\t\texitField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitField(...args);\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * Visitor that is notified of changes before, after, and when changes are made.\n * Must be freed after use.\n */\nexport interface AnnouncedVisitor extends DeltaVisitor {\n\treadonly type: \"Announced\";\n\t/**\n\t * A hook that is called after all nodes have been created.\n\t */\n\tafterCreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void;\n\tbeforeDestroy(field: FieldKey, count: number): void;\n\tbeforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\tafterAttach(source: FieldKey, destination: Range): void;\n\tbeforeDetach(source: Range, destination: FieldKey, isReplaced: boolean): void;\n\tafterDetach(\n\t\tsource: PlaceIndex,\n\t\tcount: number,\n\t\tdestination: FieldKey,\n\t\tisReplaced: boolean,\n\t): void;\n}\n\nconst noOp = (): void => {};\n\n/**\n * Creates an announced visitor with only the provided functions and uses a no op for the rest.\n * This is provided to make some of the delta visitor definitions cleaner.\n */\nexport function createAnnouncedVisitor(\n\tvisitorFunctions: Partial<AnnouncedVisitor>,\n): AnnouncedVisitor {\n\treturn {\n\t\ttype: \"Announced\",\n\t\tfree: visitorFunctions.free ?? noOp,\n\t\tcreate: visitorFunctions.create ?? noOp,\n\t\tafterCreate: visitorFunctions.afterCreate ?? noOp,\n\t\tbeforeDestroy: visitorFunctions.beforeDestroy ?? noOp,\n\t\tdestroy: visitorFunctions.destroy ?? noOp,\n\t\tbeforeAttach: visitorFunctions.beforeAttach ?? noOp,\n\t\tattach: visitorFunctions.attach ?? noOp,\n\t\tafterAttach: visitorFunctions.afterAttach ?? noOp,\n\t\tbeforeDetach: visitorFunctions.beforeDetach ?? noOp,\n\t\tdetach: visitorFunctions.detach ?? noOp,\n\t\tafterDetach: visitorFunctions.afterDetach ?? noOp,\n\t\tenterNode: visitorFunctions.enterNode ?? noOp,\n\t\texitNode: visitorFunctions.exitNode ?? noOp,\n\t\tenterField: visitorFunctions.enterField ?? noOp,\n\t\texitField: visitorFunctions.exitField ?? noOp,\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"visitorUtils.js","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,kDAA6E;AAM7E,mEAA6D;AAG7D,mDAAgE;AAEhE,SAAgB,sBAAsB,CACrC,SAAiB,MAAM,EACvB,gBAAkC,EAClC,YAA2B,EAC3B,OAA2B;IAE3B,OAAO,IAAI,0CAAkB,CAC5B,MAAM,EACN,IAAA,+BAAoB,GAA+B,EACnD,gBAAgB,EAChB,YAAY,EACZ,OAAO,CACP,CAAC;AACH,CAAC;AAbD,wDAaC;AAED,SAAgB,UAAU,CACzB,KAAW,EACX,cAAuC,EACvC,cAAsD,EACtD,kBAAsC;IAEtC,MAAM,OAAO,GAAG,cAAc,CAAC,cAAc,EAAE,CAAC;IAChD,IAAA,0BAAU,EAAC,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAC/D,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AATD,gCASC;AAED,SAAgB,aAAa,CAC5B,KAAW,EACX,cAAuC,EACvC,cAAyE,EACzE,kBAAsC;IAEtC,MAAM,OAAO,GAAG,cAAc,CAAC,cAAc,EAAE,CAAC;IAChD,IAAA,0BAAU,EAAC,KAAK,EAAE,eAAe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AAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,YAAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;QAC7C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,IAAI,IAAI;QAC3C,UAAU,EAAE,gBAAgB,CAAC,UAAU,IAAI,IAAI;QAC/C,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;KAC7C,CAAC;AACH,CAAC;AArBD,wDAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecWriteOptions } from \"../../codec/index.js\";\nimport { type IdAllocator, idAllocatorFromMaxId } from \"../../util/index.js\";\nimport type { RevisionTag, RevisionTagCodec } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { ITreeCursorSynchronous } from \"./cursor.js\";\nimport type { DetachedNodeId, Root } from \"./delta.js\";\nimport { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId } from \"./detachedFieldIndexTypes.js\";\nimport type { PlaceIndex, Range } from \"./pathTree.js\";\nimport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\n\nexport function makeDetachedFieldIndex(\n\tprefix: string = \"Temp\",\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\toptions?: CodecWriteOptions,\n): DetachedFieldIndex {\n\treturn new DetachedFieldIndex(\n\t\tprefix,\n\t\tidAllocatorFromMaxId() as IdAllocator<ForestRootId>,\n\t\trevisionTagCodec,\n\t\tidCompressor,\n\t\toptions,\n\t);\n}\n\nexport function applyDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, visitor, detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport function announceDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor & AnnouncedVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, combineVisitors([visitor]), detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport interface CombinedVisitor extends DeltaVisitor {\n\treadonly type: \"Combined\";\n\n\treadonly visitors: readonly CombinableVisitor[];\n}\n\nexport type CombinableVisitor =\n\t| (DeltaVisitor & { type?: never })\n\t| AnnouncedVisitor\n\t| CombinedVisitor;\n\n/**\n * Combines multiple visitors into a single visitor.\n * @param visitors - The returned visitor invokes the corresponding events for all these visitors, in order.\n * @returns a DeltaVisitor combining all `visitors`.\n */\nexport function combineVisitors(visitors: readonly CombinableVisitor[]): CombinedVisitor {\n\tconst allVisitors = visitors.flatMap((v) => (v.type === \"Combined\" ? v.visitors : [v]));\n\tconst announcedVisitors = allVisitors.filter(\n\t\t(v): v is AnnouncedVisitor => v.type === \"Announced\",\n\t);\n\treturn {\n\t\ttype: \"Combined\",\n\t\tvisitors: allVisitors,\n\t\tfree: () => {\n\t\t\tfor (const v of visitors) {\n\t\t\t\tv.free();\n\t\t\t}\n\t\t},\n\t\tcreate: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.create(...args);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterCreate(...args);\n\t\t\t}\n\t\t},\n\t\tdestroy: (...args) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDestroy(...args);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.destroy(...args);\n\t\t\t}\n\t\t},\n\t\tattach: (source: FieldKey, count: number, destination: PlaceIndex) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeAttach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.attach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterAttach(source, {\n\t\t\t\t\tstart: destination,\n\t\t\t\t\tend: destination + count,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdetach: (\n\t\t\tsource: Range,\n\t\t\tdestination: FieldKey,\n\t\t\tid: DetachedNodeId,\n\t\t\tisReplaced: boolean,\n\t\t) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDetach(source, destination, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.detach(source, destination, id, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterDetach(source.start, source.end - source.start, destination, isReplaced);\n\t\t\t}\n\t\t},\n\t\tenterNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterNode(...args);\n\t\t\t}\n\t\t},\n\t\texitNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitNode(...args);\n\t\t\t}\n\t\t},\n\t\tenterField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterField(...args);\n\t\t\t}\n\t\t},\n\t\texitField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitField(...args);\n\t\t\t}\n\t\t},\n\t\tfieldMarks: (marks) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.fieldMarks?.(marks);\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * Visitor that is notified of changes before, after, and when changes are made.\n * Must be freed after use.\n */\nexport interface AnnouncedVisitor extends DeltaVisitor {\n\treadonly type: \"Announced\";\n\t/**\n\t * A hook that is called after all nodes have been created.\n\t */\n\tafterCreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void;\n\tbeforeDestroy(field: FieldKey, count: number): void;\n\tbeforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\tafterAttach(source: FieldKey, destination: Range): void;\n\tbeforeDetach(source: Range, destination: FieldKey, isReplaced: boolean): void;\n\tafterDetach(\n\t\tsource: PlaceIndex,\n\t\tcount: number,\n\t\tdestination: FieldKey,\n\t\tisReplaced: boolean,\n\t): void;\n}\n\nconst noOp = (): void => {};\n\n/**\n * Creates an announced visitor with only the provided functions and uses a no op for the rest.\n * This is provided to make some of the delta visitor definitions cleaner.\n */\nexport function createAnnouncedVisitor(\n\tvisitorFunctions: Partial<AnnouncedVisitor>,\n): AnnouncedVisitor {\n\treturn {\n\t\ttype: \"Announced\",\n\t\tfree: visitorFunctions.free ?? noOp,\n\t\tcreate: visitorFunctions.create ?? noOp,\n\t\tafterCreate: visitorFunctions.afterCreate ?? noOp,\n\t\tbeforeDestroy: visitorFunctions.beforeDestroy ?? noOp,\n\t\tdestroy: visitorFunctions.destroy ?? noOp,\n\t\tbeforeAttach: visitorFunctions.beforeAttach ?? noOp,\n\t\tattach: visitorFunctions.attach ?? noOp,\n\t\tafterAttach: visitorFunctions.afterAttach ?? noOp,\n\t\tbeforeDetach: visitorFunctions.beforeDetach ?? noOp,\n\t\tdetach: visitorFunctions.detach ?? noOp,\n\t\tafterDetach: visitorFunctions.afterDetach ?? noOp,\n\t\tenterNode: visitorFunctions.enterNode ?? noOp,\n\t\texitNode: visitorFunctions.exitNode ?? noOp,\n\t\tenterField: visitorFunctions.enterField ?? noOp,\n\t\texitField: visitorFunctions.exitField ?? noOp,\n\t};\n}\n"]}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { AllowedTypes, CommitKind, CommitMetadata, FieldKind, FieldProps, FieldSchema, FieldSchemaMetadata, ITree, ITreeConfigurationOptions, ITreeViewConfiguration, ImplicitAllowedTypes, ImplicitFieldSchema, Input, InsertableTreeFieldFromImplicitField, InsertableTreeNodeFromAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, InsertableTypedNode, InternalTreeNode, InternalTypes, IsListener, IsUnion, IterableTreeArrayContent, LazyItem, LeafSchema, Listenable, Listeners, MakeNominal, MapNodeInsertableData, NodeFromSchema, NodeInDocumentConstraint, NodeKind, NodeSchemaMetadata, NodeSchemaOptions, NumberKeys, ObjectFromSchemaRecord, Off, ReadonlyArrayNode, RestrictiveReadonlyRecord, RestrictiveStringRecord, Revertible, RevertibleFactory, RevertibleStatus, RunTransaction, SchemaCompatibilityStatus, SchemaFactory, SchemaFactory_base, SchemaStatics, SimpleNodeSchemaBase, System_Unsafe, TransactionConstraint, Tree, TreeArrayNode, TreeChangeEvents, TreeFieldFromImplicitField, TreeLeafValue, TreeMapNode, TreeNode, TreeNodeApi, TreeNodeFromImplicitAllowedTypes, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaCore, TreeNodeSchemaNonClass, TreeObjectNode, TreeStatus, TreeView, TreeViewConfiguration, TreeViewEvents, Unenforced, Unhydrated, UnionToIntersection, ValidateRecursiveSchema, ValidateRecursiveSchemaTemplate, ViewableTree, WithType, rollback, typeSchemaSymbol, AllowedTypeMetadata, AllowedTypesFull, AllowedTypesFullEvaluated, AllowedTypesFullFromMixed, AllowedTypesFullFromMixedUnsafe, AllowedTypesMetadata, AnnotateAllowedTypesList, AnnotateAllowedTypesListUnsafe, AnnotatedAllowedType, AnnotatedAllowedTypeUnsafe, AnnotatedAllowedTypes, AnnotatedAllowedTypesUnsafe, CodecWriteOptionsBeta, ConciseTree, ExtensibleUnionNode, FixRecursiveArraySchema, FluidSerializableAsTree, ForestOptions, ForestType, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, JsonCompatible, JsonCompatibleObject, KeyEncodingOptions, NodeChangedData, ObjectSchemaOptions, PopUnion, RecordNodeInsertableData, SchemaFactoryBeta, SchemaStaticsBeta, SchemaUpgrade, SharedTreeOptionsBeta, SnapshotFileSystem, SnapshotSchemaCompatibilityOptions, System_TableSchema, TableSchema, TreeBeta, TreeBranch, TreeChangeEventsBeta, TreeEncodingOptions, TreeRecordNode, TreeRecordNodeUnsafe, TreeViewBeta, UnannotateAllowedTypeUnsafe, UnannotateAllowedTypesList, UnannotateAllowedTypesListUnsafe, UnionToTuple, adaptEnum, asBeta, configuredSharedTreeBeta, createIndependentTreeBeta, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, AllowedTypesFullUnsafe, ArrayNodeCustomizableSchema, ArrayNodeCustomizableSchemaUnsafe, ArrayNodePojoEmulationSchema, ArrayNodeSchema, ArrayPlaceAnchor,
|
|
5
|
+
export { AllowedTypes, CommitKind, CommitMetadata, FieldKind, FieldProps, FieldSchema, FieldSchemaMetadata, ITree, ITreeConfigurationOptions, ITreeViewConfiguration, ImplicitAllowedTypes, ImplicitFieldSchema, Input, InsertableTreeFieldFromImplicitField, InsertableTreeNodeFromAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, InsertableTypedNode, InternalTreeNode, InternalTypes, IsListener, IsUnion, IterableTreeArrayContent, LazyItem, LeafSchema, Listenable, Listeners, MakeNominal, MapNodeInsertableData, NodeFromSchema, NodeInDocumentConstraint, NodeKind, NodeSchemaMetadata, NodeSchemaOptions, NumberKeys, ObjectFromSchemaRecord, Off, ReadonlyArrayNode, RestrictiveReadonlyRecord, RestrictiveStringRecord, Revertible, RevertibleFactory, RevertibleStatus, RunTransaction, SchemaCompatibilityStatus, SchemaFactory, SchemaFactory_base, SchemaStatics, SimpleNodeSchemaBase, System_Unsafe, TransactionConstraint, Tree, TreeArrayNode, TreeChangeEvents, TreeFieldFromImplicitField, TreeLeafValue, TreeMapNode, TreeNode, TreeNodeApi, TreeNodeFromImplicitAllowedTypes, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaCore, TreeNodeSchemaNonClass, TreeObjectNode, TreeStatus, TreeView, TreeViewConfiguration, TreeViewEvents, Unenforced, Unhydrated, UnionToIntersection, ValidateRecursiveSchema, ValidateRecursiveSchemaTemplate, ViewableTree, WithType, rollback, typeSchemaSymbol, AllowedTypeMetadata, AllowedTypesFull, AllowedTypesFullEvaluated, AllowedTypesFullFromMixed, AllowedTypesFullFromMixedUnsafe, AllowedTypesMetadata, AnnotateAllowedTypesList, AnnotateAllowedTypesListUnsafe, AnnotatedAllowedType, AnnotatedAllowedTypeUnsafe, AnnotatedAllowedTypes, AnnotatedAllowedTypesUnsafe, ArrayNodeDeltaOp, ArrayNodeInsertOp, ArrayNodeRemoveOp, ArrayNodeRetainOp, CodecWriteOptionsBeta, ConciseTree, ExtensibleUnionNode, FixRecursiveArraySchema, FluidSerializableAsTree, ForestOptions, ForestType, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, JsonCompatible, JsonCompatibleObject, KeyEncodingOptions, NodeChangedData, NodeChangedDataAlpha, NodeChangedDataDelta, NodeChangedDataProperties, ObjectSchemaOptions, PopUnion, RecordNodeInsertableData, SchemaFactoryBeta, SchemaStaticsBeta, SchemaUpgrade, SharedTreeOptionsBeta, SnapshotFileSystem, SnapshotSchemaCompatibilityOptions, System_TableSchema, TableSchema, TreeBeta, TreeBranch, TreeChangeEventsBeta, TreeChangeEventsAlpha, TreeEncodingOptions, TreeRecordNode, TreeRecordNodeUnsafe, TreeViewBeta, UnannotateAllowedTypeUnsafe, UnannotateAllowedTypesList, UnannotateAllowedTypesListUnsafe, UnionToTuple, adaptEnum, asBeta, configuredSharedTreeBeta, createIndependentTreeBeta, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, AllowedTypesFullUnsafe, ArrayNodeCustomizableSchema, ArrayNodeCustomizableSchemaAlpha, ArrayNodeCustomizableSchemaUnsafe, ArrayNodePojoEmulationSchema, ArrayNodeSchema, ArrayPlaceAnchor, ChangeMetadata, CodecName, CodecWriteOptions, CreateIndependentTreeAlphaOptions, DirtyTreeMap, DirtyTreeStatus, ErasedNode, ErasedSchema, ErasedSchemaSubclassable, FactoryContent, FactoryContentObject, FieldHasDefaultAlpha, FieldHasDefaultAlphaUnsafe, FieldPropsAlpha, FieldSchemaAlpha, FieldSchemaAlphaUnsafe, FluidClientVersion, FormatValidator, FormatValidatorBasic, FormatValidatorNoOp, FormatVersion, HandleConverter, ICodecOptions, ITreeAlpha, IdentifierIndex, IncrementalEncodingPolicy, IndependentViewOptions, Insertable, InsertableContent, InsertableField, InsertableObjectFromSchemaRecordAlpha, InsertableObjectFromSchemaRecordAlphaUnsafe, JsonArrayNodeSchema, JsonAsTree, JsonCompatibleReadOnly, JsonCompatibleReadOnlyObject, JsonFieldSchema, JsonLeafNodeSchema, JsonLeafSchemaType, JsonMapNodeSchema, JsonNodeSchema, JsonNodeSchemaBase, JsonObjectNodeSchema, JsonRecordNodeSchema, JsonRefPath, JsonSchemaId, JsonSchemaRef, JsonSchemaType, JsonStringKeyPatternProperties, JsonTreeSchema, LabelTree, LocalChangeMetadata, MapNodeCustomizableSchema, MapNodeCustomizableSchemaUnsafe, MapNodePojoEmulationSchema, MapNodeSchema, NoChangeConstraint, NodeProvider, NodeSchemaOptionsAlpha, ObjectNodeSchema, ObjectNodeSchemaWorkaround, ObjectSchemaOptionsAlpha, ObservationResults, ReadSchema, ReadableField, RecordNodeCustomizableSchema, RecordNodePojoEmulationSchema, RecordNodeSchema, RemoteChangeMetadata, RevertibleAlpha, RevertibleAlphaFactory, RunTransactionParams, SchemaFactoryAlpha, SchemaStaticsAlpha, SchemaType, SharedTreeFormatOptions, SharedTreeOptions, SimpleAllowedTypeAttributes, SimpleArrayNodeSchema, SimpleFieldSchema, SimpleLeafNodeSchema, SimpleMapNodeSchema, SimpleNodeSchema, SimpleNodeSchemaBaseAlpha, SimpleObjectFieldSchema, SimpleObjectNodeSchema, SimpleRecordNodeSchema, SimpleTreeSchema, TextAsTree, TransactionCallbackStatus, TransactionConstraintAlpha, TransactionLabels, TransactionResult, TransactionResultExt, TransactionResultFailed, TransactionResultSuccess, TreeAlpha, TreeArrayNodeAlpha, TreeBranchAlpha, TreeBranchEvents, TreeCompressionStrategy, TreeContextAlpha, TreeIdentifierUtils, TreeIndex, TreeIndexKey, TreeIndexNodes, TreeParsingOptions, TreeSchema, TreeSchemaEncodingOptions, TreeViewAlpha, TreeViewConfigurationAlpha, UnsafeUnknownSchema, ValueSchema, VerboseTree, VerboseTreeNode, ViewContent, VoidTransactionCallbackStatus, WithValue, allowUnused, asAlpha, asTreeViewAlpha, checkCompatibility, cloneWithReplacements, comparePersistedSchema, configuredSharedTreeAlpha, contentSchemaSymbol, createArrayInsertionAnchor, createIdentifierIndex, createIndependentTreeAlpha, createTreeIndex, decodeSchemaCompatibilitySnapshot, encodeSchemaCompatibilitySnapshot, eraseSchemaDetails, eraseSchemaDetailsSubclassable, evaluateLazySchema, exportCompatibilitySchemaSnapshot, extractPersistedSchema, generateSchemaFromSimpleSchema, getJsonSchema, getSimpleSchema, importCompatibilitySchemaSnapshot, incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, independentInitializedView, independentView, normalizeAllowedTypes, persistedToSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, trackDirtyNodes } from "../index.js";
|
|
6
6
|
//# sourceMappingURL=alpha.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.d.ts","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EAC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,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,kCAAkC,EAClC,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,2BAA2B,EAC3B,0BAA0B,EAC1B,gCAAgC,EAChC,YAAY,EACZ,SAAS,EACT,MAAM,EACN,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,2BAA2B,EAI3B,sBAAsB,EACtB,2BAA2B,EAC3B,iCAAiC,EACjC,4BAA4B,EAC5B,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"alpha.d.ts","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,EACL,oCAAoC,EACpC,kCAAkC,EAClC,0CAA0C,EAC1C,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,OAAO,EACP,wBAAwB,EACxB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,GAAG,EACH,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,a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,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,eAAe,EACf,WAAW,EACX,6BAA6B,EAC7B,SAAS,EACT,WAAW,EACX,OAAO,EACP,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,EAClB,8BAA8B,EAC9B,kBAAkB,EAClB,iCAAiC,EACjC,sBAAsB,EACtB,8BAA8B,EAC9B,aAAa,EACb,eAAe,EACf,iCAAiC,EACjC,wCAAwC,EACxC,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EACzB,eAAe,EAEf,MAAM,aAAa,CAAC"}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.comparePersistedSchema = exports.cloneWithReplacements = exports.checkCompatibility = exports.asTreeViewAlpha = exports.asAlpha = exports.allowUnused = exports.ValueSchema = exports.TreeViewConfigurationAlpha = exports.TreeCompressionStrategy = exports.TreeAlpha = exports.TextAsTree = exports.SchemaFactoryAlpha = exports.RecordNodeSchema = exports.ObjectNodeSchema = exports.MapNodeSchema = exports.JsonAsTree = exports.FormatValidatorNoOp = exports.FormatValidatorBasic = exports.FluidClientVersion = exports.ArrayNodeSchema = exports.snapshotSchemaCompatibility = exports.singletonSchema = exports.enumFromStrings = exports.createIndependentTreeBeta = exports.configuredSharedTreeBeta = exports.asBeta = exports.adaptEnum = exports.TreeBeta = exports.TableSchema = exports.SchemaFactoryBeta = exports.KeyEncodingOptions = exports.ForestTypeReference = exports.ForestTypeOptimized = exports.ForestTypeExpensiveDebug = exports.FluidSerializableAsTree = exports.ExtensibleUnionNode = exports.rollback = exports.TreeViewConfiguration = exports.TreeStatus = exports.TreeNode = exports.TreeArrayNode = exports.Tree = exports.SchemaFactory = exports.RevertibleStatus = exports.NodeKind = exports.IterableTreeArrayContent = exports.InternalTypes = exports.FieldSchema = exports.FieldKind = exports.CommitKind = void 0;
|
|
8
|
-
exports.trackDirtyNodes = exports.replaceVerboseTreeHandles = exports.replaceHandles = exports.replaceConciseTreeHandles = exports.persistedToSimpleSchema = exports.normalizeAllowedTypes = exports.independentView = exports.independentInitializedView = exports.incrementalSummaryHint = exports.incrementalEncodingPolicyForAllowedTypes = exports.importCompatibilitySchemaSnapshot = exports.getSimpleSchema = exports.getJsonSchema = exports.
|
|
8
|
+
exports.trackDirtyNodes = exports.replaceVerboseTreeHandles = exports.replaceHandles = exports.replaceConciseTreeHandles = exports.persistedToSimpleSchema = exports.normalizeAllowedTypes = exports.independentView = exports.independentInitializedView = exports.incrementalSummaryHint = exports.incrementalEncodingPolicyForAllowedTypes = exports.importCompatibilitySchemaSnapshot = exports.getSimpleSchema = exports.getJsonSchema = exports.generateSchemaFromSimpleSchema = exports.extractPersistedSchema = exports.exportCompatibilitySchemaSnapshot = exports.evaluateLazySchema = exports.eraseSchemaDetailsSubclassable = exports.eraseSchemaDetails = exports.encodeSchemaCompatibilitySnapshot = exports.decodeSchemaCompatibilitySnapshot = exports.createTreeIndex = exports.createIndependentTreeAlpha = exports.createIdentifierIndex = exports.createArrayInsertionAnchor = exports.contentSchemaSymbol = exports.configuredSharedTreeAlpha = void 0;
|
|
9
9
|
/*
|
|
10
10
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
11
|
-
* Generated by "
|
|
11
|
+
* Generated by "generate:entrypoint-sources".
|
|
12
12
|
*/
|
|
13
13
|
var index_js_1 = require("../index.js");
|
|
14
14
|
Object.defineProperty(exports, "CommitKind", { enumerable: true, get: function () { return index_js_1.CommitKind; } });
|
|
@@ -75,7 +75,6 @@ Object.defineProperty(exports, "evaluateLazySchema", { enumerable: true, get: fu
|
|
|
75
75
|
Object.defineProperty(exports, "exportCompatibilitySchemaSnapshot", { enumerable: true, get: function () { return index_js_1.exportCompatibilitySchemaSnapshot; } });
|
|
76
76
|
Object.defineProperty(exports, "extractPersistedSchema", { enumerable: true, get: function () { return index_js_1.extractPersistedSchema; } });
|
|
77
77
|
Object.defineProperty(exports, "generateSchemaFromSimpleSchema", { enumerable: true, get: function () { return index_js_1.generateSchemaFromSimpleSchema; } });
|
|
78
|
-
Object.defineProperty(exports, "getBranch", { enumerable: true, get: function () { return index_js_1.getBranch; } });
|
|
79
78
|
Object.defineProperty(exports, "getJsonSchema", { enumerable: true, get: function () { return index_js_1.getJsonSchema; } });
|
|
80
79
|
Object.defineProperty(exports, "getSimpleSchema", { enumerable: true, get: function () { return index_js_1.getSimpleSchema; } });
|
|
81
80
|
Object.defineProperty(exports, "importCompatibilitySchemaSnapshot", { enumerable: true, get: function () { return index_js_1.importCompatibilitySchemaSnapshot; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.js","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"alpha.js","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH;;;GAGG;AAEH,wCAm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AAA;AACP,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,iHAAA,qBAAqB,OAAA;AACrB,kHAAA,sBAAsB,OAAA;AACtB,qHAAA,yBAAyB,OAAA;AACzB,+GAAA,mBAAmB,OAAA;AACnB,sHAAA,0BAA0B,OAAA;AAC1B,iHAAA,qBAAqB,OAAA;AACrB,sHAAA,0BAA0B,OAAA;AAC1B,2GAAA,eAAe,OAAA;AACf,6HAAA,iCAAiC,OAAA;AACjC,6HAAA,iCAAiC,OAAA;AACjC,8GAAA,kBAAkB,OAAA;AAClB,0HAAA,8BAA8B,OAAA;AAC9B,8GAAA,kBAAkB,OAAA;AAClB,6HAAA,iCAAiC,OAAA;AACjC,kHAAA,sBAAsB,OAAA;AACtB,0HAAA,8BAA8B,OAAA;AAC9B,yGAAA,aAAa,OAAA;AACb,2GAAA,eAAe,OAAA;AACf,6HAAA,iCAAiC,OAAA;AACjC,oIAAA,wCAAwC,OAAA;AACxC,kHAAA,sBAAsB,OAAA;AACtB,sHAAA,0BAA0B,OAAA;AAC1B,2GAAA,eAAe,OAAA;AACf,iHAAA,qBAAqB,OAAA;AACrB,mHAAA,uBAAuB,OAAA;AACvB,qHAAA,yBAAyB,OAAA;AACzB,0GAAA,cAAc,OAAA;AACd,qHAAA,yBAAyB,OAAA;AACzB,2GAAA,eAAe,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by \"generate:entrypoint-sources\".\n */\n\nexport {\n\t// #region @public APIs\n\tAllowedTypes, \n\tCommitKind, \n\tCommitMetadata, \n\tFieldKind, \n\tFieldProps, \n\tFieldSchema, \n\tFieldSchemaMetadata, \n\tITree, \n\tITreeConfigurationOptions, \n\tITreeViewConfiguration, \n\tImplicitAllowedTypes, \n\tImplicitFieldSchema, \n\tInput, \n\tInsertableTreeFieldFromImplicitField, \n\tInsertableTreeNodeFromAllowedTypes, \n\tInsertableTreeNodeFromImplicitAllowedTypes, \n\tInsertableTypedNode, \n\tInternalTreeNode, \n\tInternalTypes, \n\tIsListener, \n\tIsUnion, \n\tIterableTreeArrayContent, \n\tLazyItem, \n\tLeafSchema, \n\tListenable, \n\tListeners, \n\tMakeNominal, \n\tMapNodeInsertableData, \n\tNodeFromSchema, \n\tNodeInDocumentConstraint, \n\tNodeKind, \n\tNodeSchemaMetadata, \n\tNodeSchemaOptions, \n\tNumberKeys, \n\tObjectFromSchemaRecord, \n\tOff, \n\tReadonlyArrayNode, \n\tRestrictiveReadonlyRecord, \n\tRestrictiveStringRecord, \n\tRevertible, \n\tRevertibleFactory, \n\tRevertibleStatus, \n\tRunTransaction, \n\tSchemaCompatibilityStatus, \n\tSchemaFactory, \n\tSchemaFactory_base, \n\tSchemaStatics, \n\tSimpleNodeSchemaBase, \n\tSystem_Unsafe, \n\tTransactionConstraint, \n\tTree, \n\tTreeArrayNode, \n\tTreeChangeEvents, \n\tTreeFieldFromImplicitField, \n\tTreeLeafValue, \n\tTreeMapNode, \n\tTreeNode, \n\tTreeNodeApi, \n\tTreeNodeFromImplicitAllowedTypes, \n\tTreeNodeSchema, \n\tTreeNodeSchemaClass, \n\tTreeNodeSchemaCore, \n\tTreeNodeSchemaNonClass, \n\tTreeObjectNode, \n\tTreeStatus, \n\tTreeView, \n\tTreeViewConfiguration, \n\tTreeViewEvents, \n\tUnenforced, \n\tUnhydrated, \n\tUnionToIntersection, \n\tValidateRecursiveSchema, \n\tValidateRecursiveSchemaTemplate, \n\tViewableTree, \n\tWithType, \n\trollback, \n\ttypeSchemaSymbol,\n\t// #endregion\n \n\t// #region @beta APIs\n\tAllowedTypeMetadata, \n\tAllowedTypesFull, \n\tAllowedTypesFullEvaluated, \n\tAllowedTypesFullFromMixed, \n\tAllowedTypesFullFromMixedUnsafe, \n\tAllowedTypesMetadata, \n\tAnnotateAllowedTypesList, \n\tAnnotateAllowedTypesListUnsafe, \n\tAnnotatedAllowedType, \n\tAnnotatedAllowedTypeUnsafe, \n\tAnnotatedAllowedTypes, \n\tAnnotatedAllowedTypesUnsafe, \n\tArrayNodeDeltaOp, \n\tArrayNodeInsertOp, \n\tArrayNodeRemoveOp, \n\tArrayNodeRetainOp, \n\tCodecWriteOptionsBeta, \n\tConciseTree, \n\tExtensibleUnionNode, \n\tFixRecursiveArraySchema, \n\tFluidSerializableAsTree, \n\tForestOptions, \n\tForestType, \n\tForestTypeExpensiveDebug, \n\tForestTypeOptimized, \n\tForestTypeReference, \n\tJsonCompatible, \n\tJsonCompatibleObject, \n\tKeyEncodingOptions, \n\tNodeChangedData,\n\tNodeChangedDataAlpha,\n\tNodeChangedDataDelta,\n\tNodeChangedDataProperties,\n\tObjectSchemaOptions, \n\tPopUnion, \n\tRecordNodeInsertableData, \n\tSchemaFactoryBeta, \n\tSchemaStaticsBeta, \n\tSchemaUpgrade, \n\tSharedTreeOptionsBeta, \n\tSnapshotFileSystem, \n\tSnapshotSchemaCompatibilityOptions, \n\tSystem_TableSchema, \n\tTableSchema, \n\tTreeBeta, \n\tTreeBranch, \n\tTreeChangeEventsBeta,\n\tTreeChangeEventsAlpha,\n\tTreeEncodingOptions, \n\tTreeRecordNode, \n\tTreeRecordNodeUnsafe, \n\tTreeViewBeta, \n\tUnannotateAllowedTypeUnsafe, \n\tUnannotateAllowedTypesList, \n\tUnannotateAllowedTypesListUnsafe, \n\tUnionToTuple, \n\tadaptEnum, \n\tasBeta, \n\tconfiguredSharedTreeBeta, \n\tcreateIndependentTreeBeta, \n\tenumFromStrings, \n\tsingletonSchema, \n\tsnapshotSchemaCompatibility,\n\t// #endregion\n \n\t// #region @alpha APIs\n\tAllowedTypesFullUnsafe, \n\tArrayNodeCustomizableSchema, \n\tArrayNodeCustomizableSchemaAlpha, \n\tArrayNodeCustomizableSchemaUnsafe, \n\tArrayNodePojoEmulationSchema, \n\tArrayNodeSchema, \n\tArrayPlaceAnchor, \n\tChangeMetadata, \n\tCodecName, \n\tCodecWriteOptions, \n\tCreateIndependentTreeAlphaOptions, \n\tDirtyTreeMap, \n\tDirtyTreeStatus, \n\tErasedNode, \n\tErasedSchema, \n\tErasedSchemaSubclassable, \n\tFactoryContent, \n\tFactoryContentObject, \n\tFieldHasDefaultAlpha, \n\tFieldHasDefaultAlphaUnsafe, \n\tFieldPropsAlpha, \n\tFieldSchemaAlpha, \n\tFieldSchemaAlphaUnsafe, \n\tFluidClientVersion, \n\tFormatValidator, \n\tFormatValidatorBasic, \n\tFormatValidatorNoOp, \n\tFormatVersion, \n\tHandleConverter, \n\tICodecOptions, \n\tITreeAlpha, \n\tIdentifierIndex, \n\tIncrementalEncodingPolicy, \n\tIndependentViewOptions, \n\tInsertable, \n\tInsertableContent, \n\tInsertableField, \n\tInsertableObjectFromSchemaRecordAlpha, \n\tInsertableObjectFromSchemaRecordAlphaUnsafe, \n\tJsonArrayNodeSchema, \n\tJsonAsTree, \n\tJsonCompatibleReadOnly, \n\tJsonCompatibleReadOnlyObject, \n\tJsonFieldSchema, \n\tJsonLeafNodeSchema, \n\tJsonLeafSchemaType, \n\tJsonMapNodeSchema, \n\tJsonNodeSchema, \n\tJsonNodeSchemaBase, \n\tJsonObjectNodeSchema, \n\tJsonRecordNodeSchema, \n\tJsonRefPath, \n\tJsonSchemaId, \n\tJsonSchemaRef, \n\tJsonSchemaType, \n\tJsonStringKeyPatternProperties, \n\tJsonTreeSchema, \n\tLabelTree, \n\tLocalChangeMetadata, \n\tMapNodeCustomizableSchema, \n\tMapNodeCustomizableSchemaUnsafe, \n\tMapNodePojoEmulationSchema, \n\tMapNodeSchema, \n\tNoChangeConstraint, \n\tNodeProvider, \n\tNodeSchemaOptionsAlpha, \n\tObjectNodeSchema, \n\tObjectNodeSchemaWorkaround, \n\tObjectSchemaOptionsAlpha, \n\tObservationResults, \n\tReadSchema, \n\tReadableField, \n\tRecordNodeCustomizableSchema, \n\tRecordNodePojoEmulationSchema, \n\tRecordNodeSchema, \n\tRemoteChangeMetadata, \n\tRevertibleAlpha, \n\tRevertibleAlphaFactory, \n\tRunTransactionParams, \n\tSchemaFactoryAlpha, \n\tSchemaStaticsAlpha, \n\tSchemaType, \n\tSharedTreeFormatOptions, \n\tSharedTreeOptions, \n\tSimpleAllowedTypeAttributes, \n\tSimpleArrayNodeSchema, \n\tSimpleFieldSchema, \n\tSimpleLeafNodeSchema, \n\tSimpleMapNodeSchema, \n\tSimpleNodeSchema, \n\tSimpleNodeSchemaBaseAlpha, \n\tSimpleObjectFieldSchema, \n\tSimpleObjectNodeSchema, \n\tSimpleRecordNodeSchema, \n\tSimpleTreeSchema, \n\tTextAsTree, \n\tTransactionCallbackStatus, \n\tTransactionConstraintAlpha, \n\tTransactionLabels, \n\tTransactionResult, \n\tTransactionResultExt, \n\tTransactionResultFailed, \n\tTransactionResultSuccess, \n\tTreeAlpha, \n\tTreeArrayNodeAlpha, \n\tTreeBranchAlpha, \n\tTreeBranchEvents, \n\tTreeCompressionStrategy, \n\tTreeContextAlpha, \n\tTreeIdentifierUtils, \n\tTreeIndex, \n\tTreeIndexKey, \n\tTreeIndexNodes, \n\tTreeParsingOptions, \n\tTreeSchema, \n\tTreeSchemaEncodingOptions, \n\tTreeViewAlpha, \n\tTreeViewConfigurationAlpha, \n\tUnsafeUnknownSchema, \n\tValueSchema, \n\tVerboseTree, \n\tVerboseTreeNode, \n\tViewContent, \n\tVoidTransactionCallbackStatus, \n\tWithValue, \n\tallowUnused, \n\tasAlpha, \n\tasTreeViewAlpha, \n\tcheckCompatibility, \n\tcloneWithReplacements, \n\tcomparePersistedSchema, \n\tconfiguredSharedTreeAlpha, \n\tcontentSchemaSymbol, \n\tcreateArrayInsertionAnchor, \n\tcreateIdentifierIndex, \n\tcreateIndependentTreeAlpha, \n\tcreateTreeIndex, \n\tdecodeSchemaCompatibilitySnapshot, \n\tencodeSchemaCompatibilitySnapshot, \n\teraseSchemaDetails, \n\teraseSchemaDetailsSubclassable, \n\tevaluateLazySchema, \n\texportCompatibilitySchemaSnapshot, \n\textractPersistedSchema, \n\tgenerateSchemaFromSimpleSchema, \n\tgetJsonSchema, \n\tgetSimpleSchema, \n\timportCompatibilitySchemaSnapshot, \n\tincrementalEncodingPolicyForAllowedTypes, \n\tincrementalSummaryHint, \n\tindependentInitializedView, \n\tindependentView, \n\tnormalizeAllowedTypes, \n\tpersistedToSimpleSchema, \n\treplaceConciseTreeHandles, \n\treplaceHandles, \n\treplaceVerboseTreeHandles, \n\ttrackDirtyNodes\n\t// #endregion\n} from \"../index.js\";\n"]}
|
package/dist/entrypoints/beta.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.snapshotSchemaCompatibility = exports.singletonSchema = exports.enumFromStrings = exports.createIndependentTreeBeta = exports.configuredSharedTreeBeta = exports.asBeta = exports.adaptEnum = exports.TreeBeta = exports.TableSchema = exports.SchemaFactoryBeta = exports.KeyEncodingOptions = exports.ForestTypeReference = exports.ForestTypeOptimized = exports.ForestTypeExpensiveDebug = exports.FluidSerializableAsTree = exports.ExtensibleUnionNode = exports.rollback = exports.TreeViewConfiguration = exports.TreeStatus = exports.TreeNode = exports.TreeArrayNode = exports.Tree = exports.SchemaFactory = exports.RevertibleStatus = exports.NodeKind = exports.IterableTreeArrayContent = exports.InternalTypes = exports.FieldSchema = exports.FieldKind = exports.CommitKind = void 0;
|
|
8
8
|
/*
|
|
9
9
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
10
|
-
* Generated by "
|
|
10
|
+
* Generated by "generate:entrypoint-sources".
|
|
11
11
|
*/
|
|
12
12
|
var index_js_1 = require("../index.js");
|
|
13
13
|
Object.defineProperty(exports, "CommitKind", { enumerable: true, get: function () { return index_js_1.CommitKind; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beta.js","sourceRoot":"","sources":["../../src/entrypoints/beta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AAEH,wCA0IqB;AAvIpB,sGAAA,UAAU,OAAA;AAEV,qGAAA,SAAS,OAAA;AAET,uGAAA,WAAW,OAAA;AAaX,yGAAA,aAAa,OAAA;AAGb,oHAAA,wBAAwB,OAAA;AASxB,oGAAA,QAAQ,OAAA;AAWR,4GAAA,gBAAgB,OAAA;AAGhB,yGAAA,aAAa,OAAA;AAMb,gGAAA,IAAI,OAAA;AACJ,yGAAA,aAAa,OAAA;AAKb,oGAAA,QAAQ,OAAA;AAQR,sGAAA,UAAU,OAAA;AAEV,iHAAA,qBAAqB,OAAA;AASrB,oGAAA,QAAQ,OAAA;AAmBR,+GAAA,mBAAmB,OAAA;AAEnB,mHAAA,uBAAuB,OAAA;AAGvB,oHAAA,wBAAwB,OAAA;AACxB,+GAAA,mBAAmB,OAAA;AACnB,+GAAA,mBAAmB,OAAA;AAGnB,8GAAA,kBAAkB,OAAA;AAKlB,6GAAA,iBAAiB,OAAA;AAOjB,uGAAA,WAAW,OAAA;AACX,oGAAA,QAAQ,OAAA;AAWR,qGAAA,SAAS,OAAA;AACT,kGAAA,MAAM,OAAA;AACN,oHAAA,wBAAwB,OAAA;AACxB,qHAAA,yBAAyB,OAAA;AACzB,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,uHAAA,2BAA2B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by \"
|
|
1
|
+
{"version":3,"file":"beta.js","sourceRoot":"","sources":["../../src/entrypoints/beta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AAEH,wCA0IqB;AAvIpB,sGAAA,UAAU,OAAA;AAEV,qGAAA,SAAS,OAAA;AAET,uGAAA,WAAW,OAAA;AAaX,yGAAA,aAAa,OAAA;AAGb,oHAAA,wBAAwB,OAAA;AASxB,oGAAA,QAAQ,OAAA;AAWR,4GAAA,gBAAgB,OAAA;AAGhB,yGAAA,aAAa,OAAA;AAMb,gGAAA,IAAI,OAAA;AACJ,yGAAA,aAAa,OAAA;AAKb,oGAAA,QAAQ,OAAA;AAQR,sGAAA,UAAU,OAAA;AAEV,iHAAA,qBAAqB,OAAA;AASrB,oGAAA,QAAQ,OAAA;AAmBR,+GAAA,mBAAmB,OAAA;AAEnB,mHAAA,uBAAuB,OAAA;AAGvB,oHAAA,wBAAwB,OAAA;AACxB,+GAAA,mBAAmB,OAAA;AACnB,+GAAA,mBAAmB,OAAA;AAGnB,8GAAA,kBAAkB,OAAA;AAKlB,6GAAA,iBAAiB,OAAA;AAOjB,uGAAA,WAAW,OAAA;AACX,oGAAA,QAAQ,OAAA;AAWR,qGAAA,SAAS,OAAA;AACT,kGAAA,MAAM,OAAA;AACN,oHAAA,wBAAwB,OAAA;AACxB,qHAAA,yBAAyB,OAAA;AACzB,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,uHAAA,2BAA2B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by \"generate:entrypoint-sources\".\n */\n\nexport {\n\t// #region @public APIs\n\tAllowedTypes, \n\tCommitKind, \n\tCommitMetadata, \n\tFieldKind, \n\tFieldProps, \n\tFieldSchema, \n\tFieldSchemaMetadata, \n\tITree, \n\tITreeConfigurationOptions, \n\tITreeViewConfiguration, \n\tImplicitAllowedTypes, \n\tImplicitFieldSchema, \n\tInput, \n\tInsertableTreeFieldFromImplicitField, \n\tInsertableTreeNodeFromAllowedTypes, \n\tInsertableTreeNodeFromImplicitAllowedTypes, \n\tInsertableTypedNode, \n\tInternalTreeNode, \n\tInternalTypes, \n\tIsListener, \n\tIsUnion, \n\tIterableTreeArrayContent, \n\tLazyItem, \n\tLeafSchema, \n\tListenable, \n\tListeners, \n\tMakeNominal, \n\tMapNodeInsertableData, \n\tNodeFromSchema, \n\tNodeInDocumentConstraint, \n\tNodeKind, \n\tNodeSchemaMetadata, \n\tNodeSchemaOptions, \n\tNumberKeys, \n\tObjectFromSchemaRecord, \n\tOff, \n\tReadonlyArrayNode, \n\tRestrictiveReadonlyRecord, \n\tRestrictiveStringRecord, \n\tRevertible, \n\tRevertibleFactory, \n\tRevertibleStatus, \n\tRunTransaction, \n\tSchemaCompatibilityStatus, \n\tSchemaFactory, \n\tSchemaFactory_base, \n\tSchemaStatics, \n\tSimpleNodeSchemaBase, \n\tSystem_Unsafe, \n\tTransactionConstraint, \n\tTree, \n\tTreeArrayNode, \n\tTreeChangeEvents, \n\tTreeFieldFromImplicitField, \n\tTreeLeafValue, \n\tTreeMapNode, \n\tTreeNode, \n\tTreeNodeApi, \n\tTreeNodeFromImplicitAllowedTypes, \n\tTreeNodeSchema, \n\tTreeNodeSchemaClass, \n\tTreeNodeSchemaCore, \n\tTreeNodeSchemaNonClass, \n\tTreeObjectNode, \n\tTreeStatus, \n\tTreeView, \n\tTreeViewConfiguration, \n\tTreeViewEvents, \n\tUnenforced, \n\tUnhydrated, \n\tUnionToIntersection, \n\tValidateRecursiveSchema, \n\tValidateRecursiveSchemaTemplate, \n\tViewableTree, \n\tWithType, \n\trollback, \n\ttypeSchemaSymbol,\n\t// #endregion\n \n\t// #region @beta APIs\n\tAllowedTypeMetadata, \n\tAllowedTypesFull, \n\tAllowedTypesFullEvaluated, \n\tAllowedTypesFullFromMixed, \n\tAllowedTypesFullFromMixedUnsafe, \n\tAllowedTypesMetadata, \n\tAnnotateAllowedTypesList, \n\tAnnotateAllowedTypesListUnsafe, \n\tAnnotatedAllowedType, \n\tAnnotatedAllowedTypeUnsafe, \n\tAnnotatedAllowedTypes, \n\tAnnotatedAllowedTypesUnsafe, \n\tCodecWriteOptionsBeta, \n\tConciseTree, \n\tExtensibleUnionNode, \n\tFixRecursiveArraySchema, \n\tFluidSerializableAsTree, \n\tForestOptions, \n\tForestType, \n\tForestTypeExpensiveDebug, \n\tForestTypeOptimized, \n\tForestTypeReference, \n\tJsonCompatible, \n\tJsonCompatibleObject, \n\tKeyEncodingOptions, \n\tNodeChangedData,\n\tObjectSchemaOptions, \n\tPopUnion, \n\tRecordNodeInsertableData, \n\tSchemaFactoryBeta, \n\tSchemaStaticsBeta, \n\tSchemaUpgrade, \n\tSharedTreeOptionsBeta, \n\tSnapshotFileSystem, \n\tSnapshotSchemaCompatibilityOptions, \n\tSystem_TableSchema, \n\tTableSchema, \n\tTreeBeta, \n\tTreeBranch, \n\tTreeChangeEventsBeta, \n\tTreeEncodingOptions, \n\tTreeRecordNode, \n\tTreeRecordNodeUnsafe, \n\tTreeViewBeta, \n\tUnannotateAllowedTypeUnsafe, \n\tUnannotateAllowedTypesList, \n\tUnannotateAllowedTypesListUnsafe, \n\tUnionToTuple, \n\tadaptEnum, \n\tasBeta, \n\tconfiguredSharedTreeBeta, \n\tcreateIndependentTreeBeta, \n\tenumFromStrings, \n\tsingletonSchema, \n\tsnapshotSchemaCompatibility\n\t// #endregion\n} from \"../index.js\";\n"]}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { AllowedTypes, CommitKind, CommitMetadata, FieldKind, FieldProps, FieldSchema, FieldSchemaMetadata, ITree, ITreeConfigurationOptions, ITreeViewConfiguration, ImplicitAllowedTypes, ImplicitFieldSchema, Input, InsertableTreeFieldFromImplicitField, InsertableTreeNodeFromAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, InsertableTypedNode, InternalTreeNode, InternalTypes, IsListener, IsUnion, IterableTreeArrayContent, LazyItem, LeafSchema, Listenable, Listeners, MakeNominal, MapNodeInsertableData, NodeFromSchema, NodeInDocumentConstraint, NodeKind, NodeSchemaMetadata, NodeSchemaOptions, NumberKeys, ObjectFromSchemaRecord, Off, ReadonlyArrayNode, RestrictiveReadonlyRecord, RestrictiveStringRecord, Revertible, RevertibleFactory, RevertibleStatus, RunTransaction, SchemaCompatibilityStatus, SchemaFactory, SchemaFactory_base, SchemaStatics, SimpleNodeSchemaBase, System_Unsafe, TransactionConstraint, Tree, TreeArrayNode, TreeChangeEvents, TreeFieldFromImplicitField, TreeLeafValue, TreeMapNode, TreeNode, TreeNodeApi, TreeNodeFromImplicitAllowedTypes, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaCore, TreeNodeSchemaNonClass, TreeObjectNode, TreeStatus, TreeView, TreeViewConfiguration, TreeViewEvents, Unenforced, Unhydrated, UnionToIntersection, ValidateRecursiveSchema, ValidateRecursiveSchemaTemplate, ViewableTree, WithType, rollback, typeSchemaSymbol, AllowedTypeMetadata, AllowedTypesFull, AllowedTypesFullEvaluated, AllowedTypesFullFromMixed, AllowedTypesFullFromMixedUnsafe, AllowedTypesMetadata, AnnotateAllowedTypesList, AnnotateAllowedTypesListUnsafe, AnnotatedAllowedType, AnnotatedAllowedTypeUnsafe, AnnotatedAllowedTypes, AnnotatedAllowedTypesUnsafe, CodecWriteOptionsBeta, ConciseTree, ExtensibleUnionNode, FixRecursiveArraySchema, FluidSerializableAsTree, ForestOptions, ForestType, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, JsonCompatible, JsonCompatibleObject, KeyEncodingOptions, NodeChangedData, ObjectSchemaOptions, PopUnion, RecordNodeInsertableData, SchemaFactoryBeta, SchemaStaticsBeta, SchemaUpgrade, SharedTreeOptionsBeta, SnapshotFileSystem, SnapshotSchemaCompatibilityOptions, System_TableSchema, TableSchema, TreeBeta, TreeBranch, TreeChangeEventsBeta, TreeEncodingOptions, TreeRecordNode, TreeRecordNodeUnsafe, TreeViewBeta, UnannotateAllowedTypeUnsafe, UnannotateAllowedTypesList, UnannotateAllowedTypesListUnsafe, UnionToTuple, adaptEnum, asBeta, configuredSharedTreeBeta, createIndependentTreeBeta, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, SharedTree, SharedTreeAttributes, SharedTreeFactoryType, configuredSharedTreeBetaLegacy } from "../index.js";
|
|
5
|
+
export { AllowedTypes, CommitKind, CommitMetadata, FieldKind, FieldProps, FieldSchema, FieldSchemaMetadata, ITree, ITreeConfigurationOptions, ITreeViewConfiguration, ImplicitAllowedTypes, ImplicitFieldSchema, Input, InsertableTreeFieldFromImplicitField, InsertableTreeNodeFromAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, InsertableTypedNode, InternalTreeNode, InternalTypes, IsListener, IsUnion, IterableTreeArrayContent, LazyItem, LeafSchema, Listenable, Listeners, MakeNominal, MapNodeInsertableData, NodeFromSchema, NodeInDocumentConstraint, NodeKind, NodeSchemaMetadata, NodeSchemaOptions, NumberKeys, ObjectFromSchemaRecord, Off, ReadonlyArrayNode, RestrictiveReadonlyRecord, RestrictiveStringRecord, Revertible, RevertibleFactory, RevertibleStatus, RunTransaction, SchemaCompatibilityStatus, SchemaFactory, SchemaFactory_base, SchemaStatics, SimpleNodeSchemaBase, System_Unsafe, TransactionConstraint, Tree, TreeArrayNode, TreeChangeEvents, TreeFieldFromImplicitField, TreeLeafValue, TreeMapNode, TreeNode, TreeNodeApi, TreeNodeFromImplicitAllowedTypes, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaCore, TreeNodeSchemaNonClass, TreeObjectNode, TreeStatus, TreeView, TreeViewConfiguration, TreeViewEvents, Unenforced, Unhydrated, UnionToIntersection, ValidateRecursiveSchema, ValidateRecursiveSchemaTemplate, ViewableTree, WithType, rollback, typeSchemaSymbol, AllowedTypeMetadata, AllowedTypesFull, AllowedTypesFullEvaluated, AllowedTypesFullFromMixed, AllowedTypesFullFromMixedUnsafe, AllowedTypesMetadata, AnnotateAllowedTypesList, AnnotateAllowedTypesListUnsafe, AnnotatedAllowedType, AnnotatedAllowedTypeUnsafe, AnnotatedAllowedTypes, AnnotatedAllowedTypesUnsafe, ArrayNodeDeltaOp, ArrayNodeInsertOp, ArrayNodeRemoveOp, ArrayNodeRetainOp, CodecWriteOptionsBeta, ConciseTree, ExtensibleUnionNode, FixRecursiveArraySchema, FluidSerializableAsTree, ForestOptions, ForestType, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, JsonCompatible, JsonCompatibleObject, KeyEncodingOptions, NodeChangedData, NodeChangedDataAlpha, NodeChangedDataDelta, NodeChangedDataProperties, ObjectSchemaOptions, PopUnion, RecordNodeInsertableData, SchemaFactoryBeta, SchemaStaticsBeta, SchemaUpgrade, SharedTreeOptionsBeta, SnapshotFileSystem, SnapshotSchemaCompatibilityOptions, System_TableSchema, TableSchema, TreeBeta, TreeBranch, TreeChangeEventsBeta, TreeChangeEventsAlpha, TreeEncodingOptions, TreeRecordNode, TreeRecordNodeUnsafe, TreeViewBeta, UnannotateAllowedTypeUnsafe, UnannotateAllowedTypesList, UnannotateAllowedTypesListUnsafe, UnionToTuple, adaptEnum, asBeta, configuredSharedTreeBeta, createIndependentTreeBeta, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, SharedTree, SharedTreeAttributes, SharedTreeFactoryType, configuredSharedTreeBetaLegacy } from "../index.js";
|
|
6
6
|
//# sourceMappingURL=legacy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../../src/entrypoints/legacy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,EACL,oCAAoC,EACpC,kCAAkC,EAClC,0CAA0C,EAC1C,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,OAAO,EACP,wBAAwB,EACxB,Q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oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,2BAA2B,EAC3B,0BAA0B,EAC1B,gCAAgC,EAChC,YAAY,EACZ,SAAS,EACT,MAAM,EACN,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,2BAA2B,EAI3B,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,8BAA8B,EAE9B,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../../src/entrypoints/legacy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,EACL,oCAAoC,EACpC,kCAAkC,EAClC,0CAA0C,EAC1C,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,OAAO,EACP,wBAAwB,EACxB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,GAAG,EACH,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EACb,WAAW,EACX,QAAQ,EACR,WAAW,EACX,gCAAgC,EAChC,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,UAAU,EACV,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,+BAA+B,EAC/B,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAIhB,mBAAmB,EACnB,gBAAgB,EAChB,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,QAAQ,EACR,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,kCAAkC,EAClC,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,2BAA2B,EAC3B,0BAA0B,EAC1B,gCAAgC,EAChC,YAAY,EACZ,SAAS,EACT,MAAM,EACN,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,2BAA2B,EAI3B,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,8BAA8B,EAE9B,MAAM,aAAa,CAAC"}
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.configuredSharedTreeBetaLegacy = exports.SharedTreeFactoryType = exports.SharedTreeAttributes = exports.SharedTree = exports.snapshotSchemaCompatibility = exports.singletonSchema = exports.enumFromStrings = exports.createIndependentTreeBeta = exports.configuredSharedTreeBeta = exports.asBeta = exports.adaptEnum = exports.TreeBeta = exports.TableSchema = exports.SchemaFactoryBeta = exports.KeyEncodingOptions = exports.ForestTypeReference = exports.ForestTypeOptimized = exports.ForestTypeExpensiveDebug = exports.FluidSerializableAsTree = exports.ExtensibleUnionNode = exports.rollback = exports.TreeViewConfiguration = exports.TreeStatus = exports.TreeNode = exports.TreeArrayNode = exports.Tree = exports.SchemaFactory = exports.RevertibleStatus = exports.NodeKind = exports.IterableTreeArrayContent = exports.InternalTypes = exports.FieldSchema = exports.FieldKind = exports.CommitKind = void 0;
|
|
8
8
|
/*
|
|
9
9
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
10
|
-
* Generated by "
|
|
10
|
+
* Generated by "generate:entrypoint-sources".
|
|
11
11
|
*/
|
|
12
12
|
var index_js_1 = require("../index.js");
|
|
13
13
|
Object.defineProperty(exports, "CommitKind", { enumerable: true, get: function () { return index_js_1.CommitKind; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../src/entrypoints/legacy.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../src/entrypoints/legacy.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AAEH,wCAyJqB;AAtJpB,sGAAA,UAAU,OAAA;AAEV,qGAAA,SAAS,OAAA;AAET,uGAAA,WAAW,OAAA;AAaX,yGAAA,aAAa,OAAA;AAGb,oHAAA,wBAAwB,OAAA;AASxB,oGAAA,QAAQ,OAAA;AAWR,4GAAA,gBAAgB,OAAA;AAGhB,yGAAA,aAAa,OAAA;AAMb,gGAAA,IAAI,OAAA;AACJ,yGAAA,aAAa,OAAA;AAKb,oGAAA,QAAQ,OAAA;AAQR,sGAAA,UAAU,OAAA;AAEV,iHAAA,qBAAqB,OAAA;AASrB,oGAAA,QAAQ,OAAA;AAuBR,+GAAA,mBAAmB,OAAA;AAEnB,mHAAA,uBAAuB,OAAA;AAGvB,oHAAA,wBAAwB,OAAA;AACxB,+GAAA,mBAAmB,OAAA;AACnB,+GAAA,mBAAmB,OAAA;AAGnB,8GAAA,kBAAkB,OAAA;AAQlB,6GAAA,iBAAiB,OAAA;AAOjB,uGAAA,WAAW,OAAA;AACX,oGAAA,QAAQ,OAAA;AAYR,qGAAA,SAAS,OAAA;AACT,kGAAA,MAAM,OAAA;AACN,oHAAA,wBAAwB,OAAA;AACxB,qHAAA,yBAAyB,OAAA;AACzB,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,uHAAA,2BAA2B,OAAA;AAC3B,aAAa;AAEb,2BAA2B;AAC3B,sGAAA,UAAU,OAAA;AACV,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AACrB,0HAAA,8BAA8B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by \"generate:entrypoint-sources\".\n */\n\nexport {\n\t// #region @public APIs\n\tAllowedTypes, \n\tCommitKind, \n\tCommitMetadata, \n\tFieldKind, \n\tFieldProps, \n\tFieldSchema, \n\tFieldSchemaMetadata, \n\tITree, \n\tITreeConfigurationOptions, \n\tITreeViewConfiguration, \n\tImplicitAllowedTypes, \n\tImplicitFieldSchema, \n\tInput, \n\tInsertableTreeFieldFromImplicitField, \n\tInsertableTreeNodeFromAllowedTypes, \n\tInsertableTreeNodeFromImplicitAllowedTypes, \n\tInsertableTypedNode, \n\tInternalTreeNode, \n\tInternalTypes, \n\tIsListener, \n\tIsUnion, \n\tIterableTreeArrayContent, \n\tLazyItem, \n\tLeafSchema, \n\tListenable, \n\tListeners, \n\tMakeNominal, \n\tMapNodeInsertableData, \n\tNodeFromSchema, \n\tNodeInDocumentConstraint, \n\tNodeKind, \n\tNodeSchemaMetadata, \n\tNodeSchemaOptions, \n\tNumberKeys, \n\tObjectFromSchemaRecord, \n\tOff, \n\tReadonlyArrayNode, \n\tRestrictiveReadonlyRecord, \n\tRestrictiveStringRecord, \n\tRevertible, \n\tRevertibleFactory, \n\tRevertibleStatus, \n\tRunTransaction, \n\tSchemaCompatibilityStatus, \n\tSchemaFactory, \n\tSchemaFactory_base, \n\tSchemaStatics, \n\tSimpleNodeSchemaBase, \n\tSystem_Unsafe, \n\tTransactionConstraint, \n\tTree, \n\tTreeArrayNode, \n\tTreeChangeEvents, \n\tTreeFieldFromImplicitField, \n\tTreeLeafValue, \n\tTreeMapNode, \n\tTreeNode, \n\tTreeNodeApi, \n\tTreeNodeFromImplicitAllowedTypes, \n\tTreeNodeSchema, \n\tTreeNodeSchemaClass, \n\tTreeNodeSchemaCore, \n\tTreeNodeSchemaNonClass, \n\tTreeObjectNode, \n\tTreeStatus, \n\tTreeView, \n\tTreeViewConfiguration, \n\tTreeViewEvents, \n\tUnenforced, \n\tUnhydrated, \n\tUnionToIntersection, \n\tValidateRecursiveSchema, \n\tValidateRecursiveSchemaTemplate, \n\tViewableTree, \n\tWithType, \n\trollback, \n\ttypeSchemaSymbol,\n\t// #endregion\n \n\t// #region @beta APIs\n\tAllowedTypeMetadata, \n\tAllowedTypesFull, \n\tAllowedTypesFullEvaluated, \n\tAllowedTypesFullFromMixed, \n\tAllowedTypesFullFromMixedUnsafe, \n\tAllowedTypesMetadata, \n\tAnnotateAllowedTypesList, \n\tAnnotateAllowedTypesListUnsafe, \n\tAnnotatedAllowedType, \n\tAnnotatedAllowedTypeUnsafe, \n\tAnnotatedAllowedTypes, \n\tAnnotatedAllowedTypesUnsafe, \n\tArrayNodeDeltaOp, \n\tArrayNodeInsertOp, \n\tArrayNodeRemoveOp, \n\tArrayNodeRetainOp, \n\tCodecWriteOptionsBeta, \n\tConciseTree, \n\tExtensibleUnionNode, \n\tFixRecursiveArraySchema, \n\tFluidSerializableAsTree, \n\tForestOptions, \n\tForestType, \n\tForestTypeExpensiveDebug, \n\tForestTypeOptimized, \n\tForestTypeReference, \n\tJsonCompatible, \n\tJsonCompatibleObject, \n\tKeyEncodingOptions, \n\tNodeChangedData,\n\tNodeChangedDataAlpha,\n\tNodeChangedDataDelta,\n\tNodeChangedDataProperties,\n\tObjectSchemaOptions, \n\tPopUnion, \n\tRecordNodeInsertableData, \n\tSchemaFactoryBeta, \n\tSchemaStaticsBeta, \n\tSchemaUpgrade, \n\tSharedTreeOptionsBeta, \n\tSnapshotFileSystem, \n\tSnapshotSchemaCompatibilityOptions, \n\tSystem_TableSchema, \n\tTableSchema, \n\tTreeBeta, \n\tTreeBranch, \n\tTreeChangeEventsBeta,\n\tTreeChangeEventsAlpha,\n\tTreeEncodingOptions, \n\tTreeRecordNode, \n\tTreeRecordNodeUnsafe, \n\tTreeViewBeta, \n\tUnannotateAllowedTypeUnsafe, \n\tUnannotateAllowedTypesList, \n\tUnannotateAllowedTypesListUnsafe, \n\tUnionToTuple, \n\tadaptEnum, \n\tasBeta, \n\tconfiguredSharedTreeBeta, \n\tcreateIndependentTreeBeta, \n\tenumFromStrings, \n\tsingletonSchema, \n\tsnapshotSchemaCompatibility,\n\t// #endregion\n \n\t// #region @legacyBeta APIs\n\tSharedTree, \n\tSharedTreeAttributes, \n\tSharedTreeFactoryType, \n\tconfiguredSharedTreeBetaLegacy\n\t// #endregion\n} from \"../index.js\";\n"]}
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.rollback = exports.TreeViewConfiguration = exports.TreeStatus = exports.TreeNode = exports.TreeArrayNode = exports.Tree = exports.SchemaFactory = exports.RevertibleStatus = exports.NodeKind = exports.IterableTreeArrayContent = exports.InternalTypes = exports.FieldSchema = exports.FieldKind = exports.CommitKind = void 0;
|
|
8
8
|
/*
|
|
9
9
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
10
|
-
* Generated by "
|
|
10
|
+
* Generated by "generate:entrypoint-sources".
|
|
11
11
|
*/
|
|
12
12
|
var index_js_1 = require("../index.js");
|
|
13
13
|
Object.defineProperty(exports, "CommitKind", { enumerable: true, get: function () { return index_js_1.CommitKind; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/entrypoints/public.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AAEH,wCAgFqB;AA7EpB,sGAAA,UAAU,OAAA;AAEV,qGAAA,SAAS,OAAA;AAET,uGAAA,WAAW,OAAA;AAaX,yGAAA,aAAa,OAAA;AAGb,oHAAA,wBAAwB,OAAA;AASxB,oGAAA,QAAQ,OAAA;AAWR,4GAAA,gBAAgB,OAAA;AAGhB,yGAAA,aAAa,OAAA;AAMb,gGAAA,IAAI,OAAA;AACJ,yGAAA,aAAa,OAAA;AAKb,oGAAA,QAAQ,OAAA;AAQR,sGAAA,UAAU,OAAA;AAEV,iHAAA,qBAAqB,OAAA;AASrB,oGAAA,QAAQ,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by \"
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/entrypoints/public.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AAEH,wCAgFqB;AA7EpB,sGAAA,UAAU,OAAA;AAEV,qGAAA,SAAS,OAAA;AAET,uGAAA,WAAW,OAAA;AAaX,yGAAA,aAAa,OAAA;AAGb,oHAAA,wBAAwB,OAAA;AASxB,oGAAA,QAAQ,OAAA;AAWR,4GAAA,gBAAgB,OAAA;AAGhB,yGAAA,aAAa,OAAA;AAMb,gGAAA,IAAI,OAAA;AACJ,yGAAA,aAAa,OAAA;AAKb,oGAAA,QAAQ,OAAA;AAQR,sGAAA,UAAU,OAAA;AAEV,iHAAA,qBAAqB,OAAA;AASrB,oGAAA,QAAQ,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by \"generate:entrypoint-sources\".\n */\n\nexport {\n\t// #region @public APIs\n\tAllowedTypes, \n\tCommitKind, \n\tCommitMetadata, \n\tFieldKind, \n\tFieldProps, \n\tFieldSchema, \n\tFieldSchemaMetadata, \n\tITree, \n\tITreeConfigurationOptions, \n\tITreeViewConfiguration, \n\tImplicitAllowedTypes, \n\tImplicitFieldSchema, \n\tInput, \n\tInsertableTreeFieldFromImplicitField, \n\tInsertableTreeNodeFromAllowedTypes, \n\tInsertableTreeNodeFromImplicitAllowedTypes, \n\tInsertableTypedNode, \n\tInternalTreeNode, \n\tInternalTypes, \n\tIsListener, \n\tIsUnion, \n\tIterableTreeArrayContent, \n\tLazyItem, \n\tLeafSchema, \n\tListenable, \n\tListeners, \n\tMakeNominal, \n\tMapNodeInsertableData, \n\tNodeFromSchema, \n\tNodeInDocumentConstraint, \n\tNodeKind, \n\tNodeSchemaMetadata, \n\tNodeSchemaOptions, \n\tNumberKeys, \n\tObjectFromSchemaRecord, \n\tOff, \n\tReadonlyArrayNode, \n\tRestrictiveReadonlyRecord, \n\tRestrictiveStringRecord, \n\tRevertible, \n\tRevertibleFactory, \n\tRevertibleStatus, \n\tRunTransaction, \n\tSchemaCompatibilityStatus, \n\tSchemaFactory, \n\tSchemaFactory_base, \n\tSchemaStatics, \n\tSimpleNodeSchemaBase, \n\tSystem_Unsafe, \n\tTransactionConstraint, \n\tTree, \n\tTreeArrayNode, \n\tTreeChangeEvents, \n\tTreeFieldFromImplicitField, \n\tTreeLeafValue, \n\tTreeMapNode, \n\tTreeNode, \n\tTreeNodeApi, \n\tTreeNodeFromImplicitAllowedTypes, \n\tTreeNodeSchema, \n\tTreeNodeSchemaClass, \n\tTreeNodeSchemaCore, \n\tTreeNodeSchemaNonClass, \n\tTreeObjectNode, \n\tTreeStatus, \n\tTreeView, \n\tTreeViewConfiguration, \n\tTreeViewEvents, \n\tUnenforced, \n\tUnhydrated, \n\tUnionToIntersection, \n\tValidateRecursiveSchema, \n\tValidateRecursiveSchemaTemplate, \n\tViewableTree, \n\tWithType, \n\trollback, \n\ttypeSchemaSymbol\n\t// #endregion\n} from \"../index.js\";\n"]}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
6
|
-
import type { ChangeAtomId, ChangeEncodingContext,
|
|
7
|
-
|
|
5
|
+
import type { JsonCodecPart } from "../codec/index.js";
|
|
6
|
+
import type { ChangeAtomId, ChangeEncodingContext, RevisionTag, RevisionTagSchema } from "../core/index.js";
|
|
7
|
+
import { EncodedChangeAtomId } from "./modular-schema/index.js";
|
|
8
|
+
export declare function makeChangeAtomIdCodec(revisionTagCodec: JsonCodecPart<RevisionTag, typeof RevisionTagSchema, ChangeEncodingContext>): JsonCodecPart<ChangeAtomId, typeof EncodedChangeAtomId, ChangeEncodingContext>;
|
|
8
9
|
//# sourceMappingURL=changeAtomIdCodec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeAtomIdCodec.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/changeAtomIdCodec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"changeAtomIdCodec.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/changeAtomIdCodec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EACX,YAAY,EACZ,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,wBAAgB,qBAAqB,CACpC,gBAAgB,EAAE,aAAa,CAC9B,WAAW,EACX,OAAO,iBAAiB,EACxB,qBAAqB,CACrB,GACC,aAAa,CAAC,YAAY,EAAE,OAAO,mBAAmB,EAAE,qBAAqB,CAAC,CAiBhF"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.makeChangeAtomIdCodec = void 0;
|
|
8
|
+
const index_js_1 = require("./modular-schema/index.js");
|
|
8
9
|
function makeChangeAtomIdCodec(revisionTagCodec) {
|
|
9
10
|
return {
|
|
10
11
|
encode(changeAtomId, context) {
|
|
@@ -20,6 +21,7 @@ function makeChangeAtomIdCodec(revisionTagCodec) {
|
|
|
20
21
|
}
|
|
21
22
|
: { localId: changeAtomId, revision: context.revision };
|
|
22
23
|
},
|
|
24
|
+
encodedSchema: index_js_1.EncodedChangeAtomId,
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
27
|
exports.makeChangeAtomIdCodec = makeChangeAtomIdCodec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeAtomIdCodec.js","sourceRoot":"","sources":["../../src/feature-libraries/changeAtomIdCodec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"changeAtomIdCodec.js","sourceRoot":"","sources":["../../src/feature-libraries/changeAtomIdCodec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAUH,wDAAgE;AAEhE,SAAgB,qBAAqB,CACpC,gBAIC;IAED,OAAO;QACN,MAAM,CAAC,YAA0B,EAAE,OAA8B;YAChE,OAAO,YAAY,CAAC,QAAQ,KAAK,SAAS,IAAI,YAAY,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ;gBACvF,CAAC,CAAC,YAAY,CAAC,OAAO;gBACtB,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;QACpF,CAAC;QACD,MAAM,CAAC,YAAiC,EAAE,OAA8B;YACvE,OAAO,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;gBACjC,CAAC,CAAC;oBACA,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;oBACxB,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;iBAC3D;gBACF,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC1D,CAAC;QACD,aAAa,EAAE,8BAAmB;KAClC,CAAC;AACH,CAAC;AAvBD,sDAuBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { JsonCodecPart } from \"../codec/index.js\";\nimport type {\n\tChangeAtomId,\n\tChangeEncodingContext,\n\tRevisionTag,\n\tRevisionTagSchema,\n} from \"../core/index.js\";\n\nimport { EncodedChangeAtomId } from \"./modular-schema/index.js\";\n\nexport function makeChangeAtomIdCodec(\n\trevisionTagCodec: JsonCodecPart<\n\t\tRevisionTag,\n\t\ttypeof RevisionTagSchema,\n\t\tChangeEncodingContext\n\t>,\n): JsonCodecPart<ChangeAtomId, typeof EncodedChangeAtomId, ChangeEncodingContext> {\n\treturn {\n\t\tencode(changeAtomId: ChangeAtomId, context: ChangeEncodingContext): EncodedChangeAtomId {\n\t\t\treturn changeAtomId.revision === undefined || changeAtomId.revision === context.revision\n\t\t\t\t? changeAtomId.localId\n\t\t\t\t: [changeAtomId.localId, revisionTagCodec.encode(changeAtomId.revision, context)];\n\t\t},\n\t\tdecode(changeAtomId: EncodedChangeAtomId, context: ChangeEncodingContext): ChangeAtomId {\n\t\t\treturn Array.isArray(changeAtomId)\n\t\t\t\t? {\n\t\t\t\t\t\tlocalId: changeAtomId[0],\n\t\t\t\t\t\trevision: revisionTagCodec.decode(changeAtomId[1], context),\n\t\t\t\t\t}\n\t\t\t\t: { localId: changeAtomId, revision: context.revision };\n\t\t},\n\t\tencodedSchema: EncodedChangeAtomId,\n\t};\n}\n"]}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { Listenable } from "@fluidframework/core-interfaces";
|
|
6
6
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
7
|
import { type Anchor, AnchorSet, type AnnouncedVisitor, type DeltaVisitor, type DetachedField, type FieldAnchor, type FieldKey, type ForestEvents, type IEditableForest, type ITreeCursorSynchronous, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, TreeNavigationResult, type TreeStoredSchemaSubscription, type UpPath, type ChunkedCursor, type TreeChunk } from "../../core/index.js";
|
|
8
|
+
import { type Breakable } from "../../util/index.js";
|
|
8
9
|
import { BasicChunk, BasicChunkCursor, type SiblingsOrKey } from "./basicChunk.js";
|
|
9
10
|
import { type IChunker } from "./chunkTree.js";
|
|
10
11
|
/**
|
|
@@ -30,7 +31,7 @@ export declare class ChunkedForest implements IEditableForest {
|
|
|
30
31
|
*/
|
|
31
32
|
constructor(roots: BasicChunk, schema: TreeStoredSchemaSubscription, chunker: IChunker, anchors?: AnchorSet, idCompressor?: IIdCompressor | undefined);
|
|
32
33
|
get isEmpty(): boolean;
|
|
33
|
-
clone(schema: TreeStoredSchemaSubscription,
|
|
34
|
+
clone(schema: TreeStoredSchemaSubscription, _breaker?: Breakable): ChunkedForest;
|
|
34
35
|
chunkField(cursor: ITreeCursorSynchronous): TreeChunk[];
|
|
35
36
|
forgetAnchor(anchor: Anchor): void;
|
|
36
37
|
registerAnnouncedVisitor(visitor: () => AnnouncedVisitor): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunkedForest.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/chunkedForest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EACN,KAAK,MAAM,EACX,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,4BAA4B,EAG5B,oBAAoB,EACpB,KAAK,4BAA4B,EACjC,KAAK,MAAM,EAMX,KAAK,aAAa,EAClB,KAAK,SAAS,EAEd,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"chunkedForest.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/chunkedForest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EACN,KAAK,MAAM,EACX,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,4BAA4B,EAG5B,oBAAoB,EACpB,KAAK,4BAA4B,EACjC,KAAK,MAAM,EAMX,KAAK,aAAa,EAClB,KAAK,SAAS,EAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAMN,K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AuB,GACnC,oBAAoB;IAkBhB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,uBAAuB,GAAG,IAAI;IAmClF,4BAA4B,IAAI,sBAAsB;CAK7D;AAED,cAAM,MAAO,SAAQ,gBAAiB,YAAW,uBAAuB;aAEtD,MAAM,EAAE,aAAa;IAC9B,KAAK,EAAE,4BAA4B;gBAD1B,MAAM,EAAE,aAAa,EAC9B,KAAK,EAAE,4BAA4B,EAC1C,IAAI,EAAE,SAAS,SAAS,EAAE,EAC1B,YAAY,EAAE,aAAa,EAAE,EAC7B,UAAU,EAAE,MAAM,EAAE,EACpB,iBAAiB,EAAE,MAAM,EAAE,EAC3B,qBAAqB,EAAE,MAAM,EAAE,EAC/B,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EACxB,YAAY,EAAE,aAAa,GAAG,SAAS;IAgBjC,qBAAqB,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI;IAajC,IAAI,IAAI,MAAM;IAmBvB,gBAAgB,IAAI,WAAW;IAO/B,IAAI,IAAI,IAAI;IAIZ,WAAW,IAAI,MAAM;IAIrB,KAAK,IAAI,IAAI;CAIpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,QAAQ,EACjB,OAAO,CAAC,EAAE,SAAS,EACnB,YAAY,CAAC,EAAE,aAAa,GAC1B,aAAa,CAEf"}
|
|
@@ -46,9 +46,9 @@ class ChunkedForest {
|
|
|
46
46
|
get isEmpty() {
|
|
47
47
|
return this.roots.fields.size === 0;
|
|
48
48
|
}
|
|
49
|
-
clone(schema,
|
|
49
|
+
clone(schema, _breaker) {
|
|
50
50
|
this.roots.referenceAdded();
|
|
51
|
-
return new ChunkedForest(this.roots, schema, this.chunker.clone(schema)
|
|
51
|
+
return new ChunkedForest(this.roots, schema, this.chunker.clone(schema));
|
|
52
52
|
}
|
|
53
53
|
chunkField(cursor) {
|
|
54
54
|
return (0, chunkTree_js_1.chunkField)(cursor, { idCompressor: this.idCompressor, policy: this.chunker });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunkedForest.js","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/chunkedForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;AAEH,+DAA6D;AAE7D,kEAAwE;AAGxE,kDA0B6B;AAC7B,kDAM6B;AAE7B,mDAAmF;AACnF,iDAAsF;AAEtF,SAAS,QAAQ;IAChB,OAAO,IAAI,0BAAU,CAAC,+BAAoB,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AACxD,CAAC;AAOD;;;;GAIG;AACH,MAAa,aAAa;IAOzB;;;;;OAKG;IACH,YACQ,KAAiB,EACR,MAAoC,EACpC,OAAiB,EACjB,UAAqB,IAAI,oBAAS,EAAE,EACpC,YAA4B;QAJrC,UAAK,GAAL,KAAK,CAAY;QACR,WAAM,GAAN,MAAM,CAA8B;QACpC,YAAO,GAAP,OAAO,CAAU;QACjB,YAAO,GAAP,OAAO,CAA6B;QACpC,iBAAY,GAAZ,YAAY,CAAgB;QAf5B,kBAAa,GAAgC,IAAI,GAAG,EAAE,CAAC;QAC/D,gCAAU,IAAA,4BAAa,GAAgB,EAAC;QACjC,WAAM,GAA6B,uBAAA,IAAI,6BAAQ,CAAC;QA2NxD,gCAA2B,GAAG,CAAC,CAAC;IA7MrC,CAAC;IAEJ,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,MAAoC,EAAE,OAAkB;QACpE,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QAC5B,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,C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,QAAQ,EAAE,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;AACtF,CAAC;AAND,gDAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type { Listenable } from \"@fluidframework/core-interfaces\";\nimport { assert, oob, fail } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport {\n\ttype Anchor,\n\tAnchorSet,\n\ttype AnnouncedVisitor,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype FieldAnchor,\n\ttype FieldKey,\n\ttype ForestEvents,\n\ttype IEditableForest,\n\ttype ITreeCursorSynchronous,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype PlaceIndex,\n\ttype Range,\n\tTreeNavigationResult,\n\ttype TreeStoredSchemaSubscription,\n\ttype UpPath,\n\taboveRootPlaceholder,\n\tcombineVisitors,\n\tdetachedFieldAsKey,\n\tmapCursorField,\n\trootFieldKey,\n\ttype ChunkedCursor,\n\ttype TreeChunk,\n\ttype DeltaDetachedNodeId,\n} from \"../../core/index.js\";\nimport {\n\tassertValidRange,\n\tbrand,\n\tgetLast,\n\tgetOrAddEmptyToMap,\n\thasSome,\n} from \"../../util/index.js\";\n\nimport { BasicChunk, BasicChunkCursor, type SiblingsOrKey } from \"./basicChunk.js\";\nimport { type IChunker, basicChunkTree, chunkField, chunkTree } from \"./chunkTree.js\";\n\nfunction makeRoot(): BasicChunk {\n\treturn new BasicChunk(aboveRootPlaceholder, new Map());\n}\n\ninterface StackNode {\n\tmutableChunk: BasicChunk;\n\tkey: FieldKey;\n}\n\n/**\n * Implementation of IEditableForest based on copy on write chunks.\n *\n * This implementation focuses on performance.\n */\nexport class ChunkedForest implements IEditableForest {\n\tprivate activeVisitor?: DeltaVisitor;\n\n\tprivate readonly deltaVisitors: Set<() => AnnouncedVisitor> = new Set();\n\treadonly #events = createEmitter<ForestEvents>();\n\tpublic readonly events: Listenable<ForestEvents> = this.#events;\n\n\t/**\n\t * @param roots - dummy node above the root under which detached fields are stored. All content of the forest is reachable from this.\n\t * @param schema - schema which all content in this forest is assumed to comply with.\n\t * @param chunker - Chunking policy. TODO: dispose of this when forest is disposed.\n\t * @param anchors - anchorSet used to track location in this forest across changes. Callers of applyDelta must ensure this is updated accordingly.\n\t */\n\tpublic constructor(\n\t\tpublic roots: BasicChunk,\n\t\tpublic readonly schema: TreeStoredSchemaSubscription,\n\t\tpublic readonly chunker: IChunker,\n\t\tpublic readonly anchors: AnchorSet = new AnchorSet(),\n\t\tpublic readonly idCompressor?: IIdCompressor,\n\t) {}\n\n\tpublic get isEmpty(): boolean {\n\t\treturn this.roots.fields.size === 0;\n\t}\n\n\tpublic clone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): ChunkedForest {\n\t\tthis.roots.referenceAdded();\n\t\treturn new ChunkedForest(this.roots, schema, this.chunker.clone(schema), anchors);\n\t}\n\n\tpublic chunkField(cursor: ITreeCursorSynchronous): TreeChunk[] {\n\t\treturn chunkField(cursor, { idCompressor: this.idCompressor, policy: this.chunker });\n\t}\n\n\tpublic forgetAnchor(anchor: Anchor): void {\n\t\tthis.anchors.forget(anchor);\n\t}\n\n\tpublic registerAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.add(visitor);\n\t}\n\n\tpublic deregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.delete(visitor);\n\t}\n\n\tpublic acquireVisitor(): DeltaVisitor {\n\t\tassert(\n\t\t\tthis.activeVisitor === undefined,\n\t\t\t0x76a /* Must release existing visitor before acquiring another */,\n\t\t);\n\n\t\tif (this.roots.isShared()) {\n\t\t\tthis.roots = this.roots.clone();\n\t\t}\n\n\t\tconst forestVisitor = {\n\t\t\tforest: this,\n\t\t\t// Current location in the tree, as a non-shared BasicChunk (TODO: support in-place modification of other chunk formats when possible).\n\t\t\t// Start above root detached sequences.\n\t\t\tmutableChunkStack: [] as StackNode[],\n\t\t\tmutableChunk: this.roots as BasicChunk | undefined,\n\t\t\tgetParent(): StackNode {\n\t\t\t\tassert(hasSome(this.mutableChunkStack), 0x532 /* invalid access to root's parent */);\n\t\t\t\treturn getLast(this.mutableChunkStack);\n\t\t\t},\n\t\t\tfree(): void {\n\t\t\t\tthis.mutableChunk = undefined;\n\t\t\t\tthis.mutableChunkStack.length = 0;\n\t\t\t\tassert(\n\t\t\t\t\tthis.forest.activeVisitor !== undefined,\n\t\t\t\t\t0x76b /* Multiple free calls for same visitor */,\n\t\t\t\t);\n\t\t\t\tthis.forest.activeVisitor = undefined;\n\t\t\t},\n\t\t\tdestroy(detachedField: FieldKey, count: number): void {\n\t\t\t\tthis.forest.#events.emit(\"beforeChange\");\n\t\t\t\tthis.forest.roots.fields.delete(detachedField);\n\t\t\t},\n\t\t\tcreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void {\n\t\t\t\tthis.forest.#events.emit(\"beforeChange\");\n\t\t\t\tconst chunks: TreeChunk[] = content.map((c) =>\n\t\t\t\t\tchunkTree(c, {\n\t\t\t\t\t\tpolicy: this.forest.chunker,\n\t\t\t\t\t\tidCompressor: this.forest.idCompressor,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\tthis.forest.roots.fields.set(destination, chunks);\n\t\t\t\tthis.forest.#events.emit(\"afterRootFieldCreated\", destination);\n\t\t\t},\n\t\t\tattach(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tthis.attachEdit(source, count, destination);\n\t\t\t},\n\t\t\tdetach(source: Range, destination: FieldKey, id: DeltaDetachedNodeId): void {\n\t\t\t\tthis.detachEdit(source, destination);\n\t\t\t},\n\t\t\t/**\n\t\t\t * Attaches the range into the current field by transferring it from the given source path.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The the range to be attached.\n\t\t\t * @param destination - The index in the current field at which to attach the content.\n\t\t\t */\n\t\t\tattachEdit(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tthis.forest.#events.emit(\"beforeChange\");\n\t\t\t\tconst sourceField = this.forest.roots.fields.get(source) ?? [];\n\t\t\t\tthis.forest.roots.fields.delete(source);\n\t\t\t\tif (sourceField.length === 0) {\n\t\t\t\t\treturn; // Prevent creating 0 sized fields when inserting empty into empty.\n\t\t\t\t}\n\n\t\t\t\tconst parent = this.getParent();\n\t\t\t\tconst destinationField = getOrAddEmptyToMap(parent.mutableChunk.fields, parent.key);\n\t\t\t\t// TODO: this will fail for very large moves due to argument limits.\n\t\t\t\tdestinationField.splice(destination, 0, ...sourceField);\n\t\t\t},\n\t\t\t/**\n\t\t\t * Detaches the range from the current field and transfers it to the given destination if any.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The bounds of the range to be detached from the current field.\n\t\t\t * @param destination - If specified, the destination to transfer the detached range to.\n\t\t\t * If not specified, the detached range is destroyed.\n\t\t\t */\n\t\t\tdetachEdit(source: Range, destination: FieldKey | undefined): void {\n\t\t\t\t// TODO: optimize this to perform in-place replace in uniform chunks when attach edits bring the chunk back to its original shape.\n\t\t\t\t// This should result in 3 cases:\n\t\t\t\t// 1. In-place update of uniform chunk. No allocations, no ref count changes, no new TreeChunks.\n\t\t\t\t// 2. Uniform chunk is shared: copy it (and parent path as needed), and update the copy.\n\t\t\t\t// 3. Fallback to detach then attach (Which will copy parents and convert to basic chunks as needed).\n\n\t\t\t\tthis.forest.#events.emit(\"beforeChange\");\n\t\t\t\tconst parent = this.getParent();\n\t\t\t\tconst sourceField = parent.mutableChunk.fields.get(parent.key) ?? [];\n\n\t\t\t\tassertValidRange(source, sourceField);\n\t\t\t\tconst newField = sourceField.splice(source.start, source.end - source.start);\n\n\t\t\t\tif (destination === undefined) {\n\t\t\t\t\tfor (const child of newField) {\n\t\t\t\t\t\tchild.referenceRemoved();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tassert(\n\t\t\t\t\t\t!this.forest.roots.fields.has(destination),\n\t\t\t\t\t\t0x7af /* Destination must be a new empty detached field */,\n\t\t\t\t\t);\n\t\t\t\t\tif (newField.length > 0) {\n\t\t\t\t\t\tthis.forest.roots.fields.set(destination, newField);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// This check is performed after the transfer to ensure that the field is not removed in scenarios\n\t\t\t\t// where the source and destination are the same.\n\t\t\t\tif (sourceField.length === 0) {\n\t\t\t\t\tparent.mutableChunk.fields.delete(parent.key);\n\t\t\t\t}\n\t\t\t},\n\t\t\tenterNode(index: number): void {\n\t\t\t\tassert(this.mutableChunk === undefined, 0x535 /* should be in field */);\n\t\t\t\tconst parent = this.getParent();\n\t\t\t\tconst chunks =\n\t\t\t\t\tparent.mutableChunk.fields.get(parent.key) ?? fail(0xaf6 /* missing edited field */);\n\t\t\t\tlet indexWithinChunk = index;\n\t\t\t\tlet indexOfChunk = 0;\n\t\t\t\tlet chunk = chunks[indexOfChunk] ?? oob();\n\t\t\t\twhile (indexWithinChunk >= chunk.topLevelLength) {\n\t\t\t\t\tchunk = chunks[indexOfChunk] ?? oob();\n\t\t\t\t\tindexWithinChunk -= chunk.topLevelLength;\n\t\t\t\t\tindexOfChunk++;\n\t\t\t\t\tif (indexOfChunk === chunks.length) {\n\t\t\t\t\t\tfail(0xaf7 /* missing edited node */);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet found = chunks[indexOfChunk] ?? oob();\n\t\t\t\tif (!(found instanceof BasicChunk)) {\n\t\t\t\t\t// TODO:Perf: support in place editing of other chunk formats when possible:\n\t\t\t\t\t// 1. Support updating values in uniform chunks.\n\t\t\t\t\t// 2. Support traversing sequence chunks.\n\t\t\t\t\t//\n\t\t\t\t\t// Maybe build path when visitor navigates then lazily sync to chunk tree when editing?\n\t\t\t\t\tconst newChunks = mapCursorField(found.cursor(), (cursor) =>\n\t\t\t\t\t\tbasicChunkTree(cursor, {\n\t\t\t\t\t\t\tpolicy: this.forest.chunker,\n\t\t\t\t\t\t\tidCompressor: this.forest.idCompressor,\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t\t// TODO: this could fail for really long chunks being split (due to argument count limits).\n\t\t\t\t\t// Current implementations of chunks shouldn't ever be that long, but it could be an issue if they get bigger.\n\t\t\t\t\tchunks.splice(indexOfChunk, 1, ...newChunks);\n\t\t\t\t\tfound.referenceRemoved();\n\n\t\t\t\t\tfound = newChunks[indexWithinChunk] ?? oob();\n\t\t\t\t}\n\t\t\t\tassert(found instanceof BasicChunk, 0x536 /* chunk should have been normalized */);\n\t\t\t\tif (found.isShared()) {\n\t\t\t\t\tthis.mutableChunk = chunks[indexOfChunk] = found.clone();\n\t\t\t\t\tfound.referenceRemoved();\n\t\t\t\t} else {\n\t\t\t\t\tthis.mutableChunk = found;\n\t\t\t\t}\n\t\t\t},\n\t\t\texitNode(index: number): void {\n\t\t\t\tassert(this.mutableChunk !== undefined, 0x537 /* should be in node */);\n\t\t\t\tthis.mutableChunk = undefined;\n\t\t\t},\n\t\t\tenterField(key: FieldKey): void {\n\t\t\t\tassert(this.mutableChunk !== undefined, 0x538 /* should be in node */);\n\t\t\t\tthis.mutableChunkStack.push({ key, mutableChunk: this.mutableChunk });\n\t\t\t\tthis.mutableChunk = undefined;\n\t\t\t},\n\t\t\texitField(key: FieldKey): void {\n\t\t\t\tconst top = this.mutableChunkStack.pop() ?? fail(0xaf8 /* should not be at root */);\n\t\t\t\tassert(this.mutableChunk === undefined, 0x539 /* should be in field */);\n\t\t\t\tthis.mutableChunk = top.mutableChunk;\n\t\t\t},\n\t\t};\n\n\t\tconst announcedVisitors: AnnouncedVisitor[] = [];\n\t\tfor (const getVisitor of this.deltaVisitors) {\n\t\t\tannouncedVisitors.push(getVisitor());\n\t\t}\n\t\tconst combinedVisitor = combineVisitors([forestVisitor, ...announcedVisitors]);\n\t\tthis.activeVisitor = combinedVisitor;\n\t\treturn combinedVisitor;\n\t}\n\n\tprivate nextDetachedFieldIdentifier = 0;\n\tpublic newDetachedField(): DetachedField {\n\t\tconst field: DetachedField = brand(String(this.nextDetachedFieldIdentifier));\n\t\tassert(\n\t\t\t!this.roots.fields.has(detachedFieldAsKey(field)),\n\t\t\t0x53a /* new field must not already exist */,\n\t\t);\n\t\tthis.nextDetachedFieldIdentifier += 1;\n\t\treturn field;\n\t}\n\n\tpublic allocateCursor(): Cursor {\n\t\treturn new Cursor(\n\t\t\tthis,\n\t\t\tITreeSubscriptionCursorState.Cleared,\n\t\t\t[],\n\t\t\t[],\n\t\t\t[],\n\t\t\t[],\n\t\t\t[],\n\t\t\t[],\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\tundefined,\n\t\t);\n\t}\n\n\tpublic tryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tconst path = this.anchors.locate(destination);\n\t\tif (path === undefined) {\n\t\t\treturn TreeNavigationResult.NotFound;\n\t\t}\n\t\tthis.moveCursorToPath(path, cursorToMove);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic tryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tassert(\n\t\t\tcursorToMove instanceof Cursor,\n\t\t\t0x53b /* ChunkedForest must only be given its own Cursor type */,\n\t\t);\n\t\tif (destination.parent === undefined) {\n\t\t\tcursorToMove.setToDetachedSequence(destination.fieldKey);\n\t\t\treturn TreeNavigationResult.Ok;\n\t\t}\n\t\tconst result = this.tryMoveCursorToNode(destination.parent, cursorToMove);\n\t\tif (result !== TreeNavigationResult.Ok) {\n\t\t\treturn result;\n\t\t}\n\n\t\tcursorToMove.enterField(destination.fieldKey);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic moveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void {\n\t\tassert(\n\t\t\tcursorToMove instanceof Cursor,\n\t\t\t0x53c /* ChunkedForest must only be given its own Cursor type */,\n\t\t);\n\t\tassert(\n\t\t\tcursorToMove.forest === this,\n\t\t\t0x53d /* ChunkedForest must only be given its own Cursor */,\n\t\t);\n\n\t\tconst indexStack: number[] = [];\n\t\tconst keyStack: FieldKey[] = [];\n\n\t\tlet path: UpPath | undefined = destination;\n\t\twhile (path !== undefined) {\n\t\t\tindexStack.push(path.parentIndex);\n\t\t\tkeyStack.push(path.parentField);\n\t\t\tpath = path.parent;\n\t\t}\n\t\tcursorToMove.clear();\n\t\twhile (keyStack.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tconst key = keyStack.pop()!;\n\t\t\tif (cursorToMove.state === ITreeSubscriptionCursorState.Cleared) {\n\t\t\t\tcursorToMove.setToDetachedSequence(key);\n\t\t\t\tcursorToMove.state = ITreeSubscriptionCursorState.Current;\n\t\t\t} else {\n\t\t\t\tcursorToMove.enterField(key);\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterNode(indexStack.pop()!);\n\t\t}\n\t}\n\n\tpublic getCursorAboveDetachedFields(): ITreeCursorSynchronous {\n\t\tconst rootCursor = this.roots.cursor();\n\t\trootCursor.enterNode(0);\n\t\treturn rootCursor;\n\t}\n}\n\nclass Cursor extends BasicChunkCursor implements ITreeSubscriptionCursor {\n\tpublic constructor(\n\t\tpublic readonly forest: ChunkedForest,\n\t\tpublic state: ITreeSubscriptionCursorState,\n\t\troot: readonly TreeChunk[],\n\t\tsiblingStack: SiblingsOrKey[],\n\t\tindexStack: number[],\n\t\tindexOfChunkStack: number[],\n\t\tindexWithinChunkStack: number[],\n\t\tsiblings: SiblingsOrKey,\n\t\tindex: number,\n\t\tindexOfChunk: number,\n\t\tindexWithinChunk: number,\n\t\tnestedCursor: ChunkedCursor | undefined,\n\t) {\n\t\tsuper(\n\t\t\troot,\n\t\t\tsiblingStack,\n\t\t\tindexStack,\n\t\t\tindexOfChunkStack,\n\t\t\tindexWithinChunkStack,\n\t\t\tsiblings,\n\t\t\tindex,\n\t\t\tindexOfChunk,\n\t\t\tindexWithinChunk,\n\t\t\tnestedCursor,\n\t\t);\n\t}\n\n\tpublic setToDetachedSequence(key: FieldKey): void {\n\t\tthis.root = (this.forest.roots.fields.get(key) ?? []) as BasicChunk[];\n\t\tthis.siblingStack.length = 0;\n\t\tthis.indexStack.length = 0;\n\t\tthis.indexOfChunkStack.length = 0;\n\t\tthis.indexWithinChunkStack.length = 0;\n\t\tthis.siblings = [key];\n\t\tthis.index = 0;\n\t\tthis.indexOfChunk = 0;\n\t\tthis.indexWithinChunk = 0;\n\t\tthis.nestedCursor = undefined;\n\t}\n\n\tpublic override fork(): Cursor {\n\t\t// Siblings arrays are not modified during navigation and do not need be be copied.\n\t\t// This allows this copy to be shallow, and `this.siblings` below to not be copied as all.\n\t\treturn new Cursor(\n\t\t\tthis.forest,\n\t\t\tthis.state,\n\t\t\tthis.root,\n\t\t\t[...this.siblingStack],\n\t\t\t[...this.indexStack],\n\t\t\t[...this.indexOfChunkStack],\n\t\t\t[...this.indexWithinChunkStack],\n\t\t\tthis.siblings,\n\t\t\tthis.index,\n\t\t\tthis.indexOfChunk,\n\t\t\tthis.indexWithinChunk,\n\t\t\tthis.nestedCursor?.fork(),\n\t\t);\n\t}\n\n\tpublic buildFieldAnchor(): FieldAnchor {\n\t\tconst path = this.getFieldPath();\n\t\tconst anchor =\n\t\t\tpath.parent === undefined ? undefined : this.forest.anchors.track(path.parent);\n\t\treturn { parent: anchor, fieldKey: path.field };\n\t}\n\n\tpublic free(): void {\n\t\tthis.state = ITreeSubscriptionCursorState.Freed;\n\t}\n\n\tpublic buildAnchor(): Anchor {\n\t\treturn this.forest.anchors.track(this.getPath());\n\t}\n\n\tpublic clear(): void {\n\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\tthis.setToDetachedSequence(rootFieldKey);\n\t}\n}\n\n/**\n * Creates an implementation of {@link IEditableForest} with no data or schema.\n */\nexport function buildChunkedForest(\n\tchunker: IChunker,\n\tanchors?: AnchorSet,\n\tidCompressor?: IIdCompressor,\n): ChunkedForest {\n\treturn new ChunkedForest(makeRoot(), chunker.schema, chunker, anchors, idCompressor);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"chunkedForest.js","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/chunkedForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;AAEH,+DAA6D;AAE7D,kEAAwE;AAGxE,kDA0B6B;AAC7B,kDAO6B;AAE7B,mDAAmF;AACnF,iDAAsF;AAEtF,SAAS,QAAQ;IAChB,OAAO,IAAI,0BAAU,CAAC,+BAAoB,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AACxD,CAAC;AAOD;;;;GAIG;AACH,MAAa,aAAa;IAOzB;;;;;OAKG;IACH,YACQ,KAAiB,EACR,MAAoC,EACpC,OAAiB,EACjB,UAAqB,IAAI,oBAAS,EAAE,EACpC,YAA4B;QAJrC,UAAK,GAAL,KAAK,CAAY;QACR,WAAM,GAAN,MAAM,CAA8B;QACpC,YAAO,GAAP,OAAO,CAAU;QACjB,YAAO,GAAP,OAAO,CAA6B;QACpC,iBAAY,GAAZ,YAAY,CAAgB;QAf5B,kBAAa,GAAgC,IAAI,GAAG,EAAE,CAAC;QAC/D,gCAAU,IAAA,4BAAa,GAAgB,EAAC;QACjC,WAAM,GAA6B,uBAAA,IAAI,6BAAQ,CAAC;QA2NxD,gCAA2B,GAAG,CAAC,CAAC;IA7MrC,CAAC;IAEJ,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,MAAoC,EAAE,QAAoB;QACtE,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QAC5B,OAAO,IAAI,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D;AAED;;GAEG;AACH,SAAgB,kBAAkB,CACjC,OAAiB,EACjB,OAAmB,EACnB,YAA4B;IAE5B,OAAO,IAAI,aAAa,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;AACtF,CAAC;AAND,gDAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type { Listenable } from \"@fluidframework/core-interfaces\";\nimport { assert, oob, fail } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport {\n\ttype Anchor,\n\tAnchorSet,\n\ttype AnnouncedVisitor,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype FieldAnchor,\n\ttype FieldKey,\n\ttype ForestEvents,\n\ttype IEditableForest,\n\ttype ITreeCursorSynchronous,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype PlaceIndex,\n\ttype Range,\n\tTreeNavigationResult,\n\ttype TreeStoredSchemaSubscription,\n\ttype UpPath,\n\taboveRootPlaceholder,\n\tcombineVisitors,\n\tdetachedFieldAsKey,\n\tmapCursorField,\n\trootFieldKey,\n\ttype ChunkedCursor,\n\ttype TreeChunk,\n\ttype DeltaDetachedNodeId,\n} from \"../../core/index.js\";\nimport {\n\tassertValidRange,\n\tbrand,\n\tgetLast,\n\tgetOrAddEmptyToMap,\n\thasSome,\n\ttype Breakable,\n} from \"../../util/index.js\";\n\nimport { BasicChunk, BasicChunkCursor, type SiblingsOrKey } from \"./basicChunk.js\";\nimport { type IChunker, basicChunkTree, chunkField, chunkTree } from \"./chunkTree.js\";\n\nfunction makeRoot(): BasicChunk {\n\treturn new BasicChunk(aboveRootPlaceholder, new Map());\n}\n\ninterface StackNode {\n\tmutableChunk: BasicChunk;\n\tkey: FieldKey;\n}\n\n/**\n * Implementation of IEditableForest based on copy on write chunks.\n *\n * This implementation focuses on performance.\n */\nexport class ChunkedForest implements IEditableForest {\n\tprivate activeVisitor?: DeltaVisitor;\n\n\tprivate readonly deltaVisitors: Set<() => AnnouncedVisitor> = new Set();\n\treadonly #events = createEmitter<ForestEvents>();\n\tpublic readonly events: Listenable<ForestEvents> = this.#events;\n\n\t/**\n\t * @param roots - dummy node above the root under which detached fields are stored. All content of the forest is reachable from this.\n\t * @param schema - schema which all content in this forest is assumed to comply with.\n\t * @param chunker - Chunking policy. TODO: dispose of this when forest is disposed.\n\t * @param anchors - anchorSet used to track location in this forest across changes. Callers of applyDelta must ensure this is updated accordingly.\n\t */\n\tpublic constructor(\n\t\tpublic roots: BasicChunk,\n\t\tpublic readonly schema: TreeStoredSchemaSubscription,\n\t\tpublic readonly chunker: IChunker,\n\t\tpublic readonly anchors: AnchorSet = new AnchorSet(),\n\t\tpublic readonly idCompressor?: IIdCompressor,\n\t) {}\n\n\tpublic get isEmpty(): boolean {\n\t\treturn this.roots.fields.size === 0;\n\t}\n\n\tpublic clone(schema: TreeStoredSchemaSubscription, _breaker?: Breakable): ChunkedForest {\n\t\tthis.roots.referenceAdded();\n\t\treturn new ChunkedForest(this.roots, schema, this.chunker.clone(schema));\n\t}\n\n\tpublic chunkField(cursor: ITreeCursorSynchronous): TreeChunk[] {\n\t\treturn chunkField(cursor, { idCompressor: this.idCompressor, policy: this.chunker });\n\t}\n\n\tpublic forgetAnchor(anchor: Anchor): void {\n\t\tthis.anchors.forget(anchor);\n\t}\n\n\tpublic registerAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.add(visitor);\n\t}\n\n\tpublic deregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.delete(visitor);\n\t}\n\n\tpublic acquireVisitor(): DeltaVisitor {\n\t\tassert(\n\t\t\tthis.activeVisitor === undefined,\n\t\t\t0x76a /* Must release existing visitor before acquiring another */,\n\t\t);\n\n\t\tif (this.roots.isShared()) {\n\t\t\tthis.roots = this.roots.clone();\n\t\t}\n\n\t\tconst forestVisitor = {\n\t\t\tforest: this,\n\t\t\t// Current location in the tree, as a non-shared BasicChunk (TODO: support in-place modification of other chunk formats when possible).\n\t\t\t// Start above root detached sequences.\n\t\t\tmutableChunkStack: [] as StackNode[],\n\t\t\tmutableChunk: this.roots as BasicChunk | undefined,\n\t\t\tgetParent(): StackNode {\n\t\t\t\tassert(hasSome(this.mutableChunkStack), 0x532 /* invalid access to root's parent */);\n\t\t\t\treturn getLast(this.mutableChunkStack);\n\t\t\t},\n\t\t\tfree(): void {\n\t\t\t\tthis.mutableChunk = undefined;\n\t\t\t\tthis.mutableChunkStack.length = 0;\n\t\t\t\tassert(\n\t\t\t\t\tthis.forest.activeVisitor !== undefined,\n\t\t\t\t\t0x76b /* Multiple free calls for same visitor */,\n\t\t\t\t);\n\t\t\t\tthis.forest.activeVisitor = undefined;\n\t\t\t},\n\t\t\tdestroy(detachedField: FieldKey, count: number): void {\n\t\t\t\tthis.forest.#events.emit(\"beforeChange\");\n\t\t\t\tthis.forest.roots.fields.delete(detachedField);\n\t\t\t},\n\t\t\tcreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void {\n\t\t\t\tthis.forest.#events.emit(\"beforeChange\");\n\t\t\t\tconst chunks: TreeChunk[] = content.map((c) =>\n\t\t\t\t\tchunkTree(c, {\n\t\t\t\t\t\tpolicy: this.forest.chunker,\n\t\t\t\t\t\tidCompressor: this.forest.idCompressor,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\tthis.forest.roots.fields.set(destination, chunks);\n\t\t\t\tthis.forest.#events.emit(\"afterRootFieldCreated\", destination);\n\t\t\t},\n\t\t\tattach(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tthis.attachEdit(source, count, destination);\n\t\t\t},\n\t\t\tdetach(source: Range, destination: FieldKey, id: DeltaDetachedNodeId): void {\n\t\t\t\tthis.detachEdit(source, destination);\n\t\t\t},\n\t\t\t/**\n\t\t\t * Attaches the range into the current field by transferring it from the given source path.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The the range to be attached.\n\t\t\t * @param destination - The index in the current field at which to attach the content.\n\t\t\t */\n\t\t\tattachEdit(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tthis.forest.#events.emit(\"beforeChange\");\n\t\t\t\tconst sourceField = this.forest.roots.fields.get(source) ?? [];\n\t\t\t\tthis.forest.roots.fields.delete(source);\n\t\t\t\tif (sourceField.length === 0) {\n\t\t\t\t\treturn; // Prevent creating 0 sized fields when inserting empty into empty.\n\t\t\t\t}\n\n\t\t\t\tconst parent = this.getParent();\n\t\t\t\tconst destinationField = getOrAddEmptyToMap(parent.mutableChunk.fields, parent.key);\n\t\t\t\t// TODO: this will fail for very large moves due to argument limits.\n\t\t\t\tdestinationField.splice(destination, 0, ...sourceField);\n\t\t\t},\n\t\t\t/**\n\t\t\t * Detaches the range from the current field and transfers it to the given destination if any.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The bounds of the range to be detached from the current field.\n\t\t\t * @param destination - If specified, the destination to transfer the detached range to.\n\t\t\t * If not specified, the detached range is destroyed.\n\t\t\t */\n\t\t\tdetachEdit(source: Range, destination: FieldKey | undefined): void {\n\t\t\t\t// TODO: optimize this to perform in-place replace in uniform chunks when attach edits bring the chunk back to its original shape.\n\t\t\t\t// This should result in 3 cases:\n\t\t\t\t// 1. In-place update of uniform chunk. No allocations, no ref count changes, no new TreeChunks.\n\t\t\t\t// 2. Uniform chunk is shared: copy it (and parent path as needed), and update the copy.\n\t\t\t\t// 3. Fallback to detach then attach (Which will copy parents and convert to basic chunks as needed).\n\n\t\t\t\tthis.forest.#events.emit(\"beforeChange\");\n\t\t\t\tconst parent = this.getParent();\n\t\t\t\tconst sourceField = parent.mutableChunk.fields.get(parent.key) ?? [];\n\n\t\t\t\tassertValidRange(source, sourceField);\n\t\t\t\tconst newField = sourceField.splice(source.start, source.end - source.start);\n\n\t\t\t\tif (destination === undefined) {\n\t\t\t\t\tfor (const child of newField) {\n\t\t\t\t\t\tchild.referenceRemoved();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tassert(\n\t\t\t\t\t\t!this.forest.roots.fields.has(destination),\n\t\t\t\t\t\t0x7af /* Destination must be a new empty detached field */,\n\t\t\t\t\t);\n\t\t\t\t\tif (newField.length > 0) {\n\t\t\t\t\t\tthis.forest.roots.fields.set(destination, newField);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// This check is performed after the transfer to ensure that the field is not removed in scenarios\n\t\t\t\t// where the source and destination are the same.\n\t\t\t\tif (sourceField.length === 0) {\n\t\t\t\t\tparent.mutableChunk.fields.delete(parent.key);\n\t\t\t\t}\n\t\t\t},\n\t\t\tenterNode(index: number): void {\n\t\t\t\tassert(this.mutableChunk === undefined, 0x535 /* should be in field */);\n\t\t\t\tconst parent = this.getParent();\n\t\t\t\tconst chunks =\n\t\t\t\t\tparent.mutableChunk.fields.get(parent.key) ?? fail(0xaf6 /* missing edited field */);\n\t\t\t\tlet indexWithinChunk = index;\n\t\t\t\tlet indexOfChunk = 0;\n\t\t\t\tlet chunk = chunks[indexOfChunk] ?? oob();\n\t\t\t\twhile (indexWithinChunk >= chunk.topLevelLength) {\n\t\t\t\t\tchunk = chunks[indexOfChunk] ?? oob();\n\t\t\t\t\tindexWithinChunk -= chunk.topLevelLength;\n\t\t\t\t\tindexOfChunk++;\n\t\t\t\t\tif (indexOfChunk === chunks.length) {\n\t\t\t\t\t\tfail(0xaf7 /* missing edited node */);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet found = chunks[indexOfChunk] ?? oob();\n\t\t\t\tif (!(found instanceof BasicChunk)) {\n\t\t\t\t\t// TODO:Perf: support in place editing of other chunk formats when possible:\n\t\t\t\t\t// 1. Support updating values in uniform chunks.\n\t\t\t\t\t// 2. Support traversing sequence chunks.\n\t\t\t\t\t//\n\t\t\t\t\t// Maybe build path when visitor navigates then lazily sync to chunk tree when editing?\n\t\t\t\t\tconst newChunks = mapCursorField(found.cursor(), (cursor) =>\n\t\t\t\t\t\tbasicChunkTree(cursor, {\n\t\t\t\t\t\t\tpolicy: this.forest.chunker,\n\t\t\t\t\t\t\tidCompressor: this.forest.idCompressor,\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t\t// TODO: this could fail for really long chunks being split (due to argument count limits).\n\t\t\t\t\t// Current implementations of chunks shouldn't ever be that long, but it could be an issue if they get bigger.\n\t\t\t\t\tchunks.splice(indexOfChunk, 1, ...newChunks);\n\t\t\t\t\tfound.referenceRemoved();\n\n\t\t\t\t\tfound = newChunks[indexWithinChunk] ?? oob();\n\t\t\t\t}\n\t\t\t\tassert(found instanceof BasicChunk, 0x536 /* chunk should have been normalized */);\n\t\t\t\tif (found.isShared()) {\n\t\t\t\t\tthis.mutableChunk = chunks[indexOfChunk] = found.clone();\n\t\t\t\t\tfound.referenceRemoved();\n\t\t\t\t} else {\n\t\t\t\t\tthis.mutableChunk = found;\n\t\t\t\t}\n\t\t\t},\n\t\t\texitNode(index: number): void {\n\t\t\t\tassert(this.mutableChunk !== undefined, 0x537 /* should be in node */);\n\t\t\t\tthis.mutableChunk = undefined;\n\t\t\t},\n\t\t\tenterField(key: FieldKey): void {\n\t\t\t\tassert(this.mutableChunk !== undefined, 0x538 /* should be in node */);\n\t\t\t\tthis.mutableChunkStack.push({ key, mutableChunk: this.mutableChunk });\n\t\t\t\tthis.mutableChunk = undefined;\n\t\t\t},\n\t\t\texitField(key: FieldKey): void {\n\t\t\t\tconst top = this.mutableChunkStack.pop() ?? fail(0xaf8 /* should not be at root */);\n\t\t\t\tassert(this.mutableChunk === undefined, 0x539 /* should be in field */);\n\t\t\t\tthis.mutableChunk = top.mutableChunk;\n\t\t\t},\n\t\t};\n\n\t\tconst announcedVisitors: AnnouncedVisitor[] = [];\n\t\tfor (const getVisitor of this.deltaVisitors) {\n\t\t\tannouncedVisitors.push(getVisitor());\n\t\t}\n\t\tconst combinedVisitor = combineVisitors([forestVisitor, ...announcedVisitors]);\n\t\tthis.activeVisitor = combinedVisitor;\n\t\treturn combinedVisitor;\n\t}\n\n\tprivate nextDetachedFieldIdentifier = 0;\n\tpublic newDetachedField(): DetachedField {\n\t\tconst field: DetachedField = brand(String(this.nextDetachedFieldIdentifier));\n\t\tassert(\n\t\t\t!this.roots.fields.has(detachedFieldAsKey(field)),\n\t\t\t0x53a /* new field must not already exist */,\n\t\t);\n\t\tthis.nextDetachedFieldIdentifier += 1;\n\t\treturn field;\n\t}\n\n\tpublic allocateCursor(): Cursor {\n\t\treturn new Cursor(\n\t\t\tthis,\n\t\t\tITreeSubscriptionCursorState.Cleared,\n\t\t\t[],\n\t\t\t[],\n\t\t\t[],\n\t\t\t[],\n\t\t\t[],\n\t\t\t[],\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\tundefined,\n\t\t);\n\t}\n\n\tpublic tryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tconst path = this.anchors.locate(destination);\n\t\tif (path === undefined) {\n\t\t\treturn TreeNavigationResult.NotFound;\n\t\t}\n\t\tthis.moveCursorToPath(path, cursorToMove);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic tryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tassert(\n\t\t\tcursorToMove instanceof Cursor,\n\t\t\t0x53b /* ChunkedForest must only be given its own Cursor type */,\n\t\t);\n\t\tif (destination.parent === undefined) {\n\t\t\tcursorToMove.setToDetachedSequence(destination.fieldKey);\n\t\t\treturn TreeNavigationResult.Ok;\n\t\t}\n\t\tconst result = this.tryMoveCursorToNode(destination.parent, cursorToMove);\n\t\tif (result !== TreeNavigationResult.Ok) {\n\t\t\treturn result;\n\t\t}\n\n\t\tcursorToMove.enterField(destination.fieldKey);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic moveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void {\n\t\tassert(\n\t\t\tcursorToMove instanceof Cursor,\n\t\t\t0x53c /* ChunkedForest must only be given its own Cursor type */,\n\t\t);\n\t\tassert(\n\t\t\tcursorToMove.forest === this,\n\t\t\t0x53d /* ChunkedForest must only be given its own Cursor */,\n\t\t);\n\n\t\tconst indexStack: number[] = [];\n\t\tconst keyStack: FieldKey[] = [];\n\n\t\tlet path: UpPath | undefined = destination;\n\t\twhile (path !== undefined) {\n\t\t\tindexStack.push(path.parentIndex);\n\t\t\tkeyStack.push(path.parentField);\n\t\t\tpath = path.parent;\n\t\t}\n\t\tcursorToMove.clear();\n\t\twhile (keyStack.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tconst key = keyStack.pop()!;\n\t\t\tif (cursorToMove.state === ITreeSubscriptionCursorState.Cleared) {\n\t\t\t\tcursorToMove.setToDetachedSequence(key);\n\t\t\t\tcursorToMove.state = ITreeSubscriptionCursorState.Current;\n\t\t\t} else {\n\t\t\t\tcursorToMove.enterField(key);\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterNode(indexStack.pop()!);\n\t\t}\n\t}\n\n\tpublic getCursorAboveDetachedFields(): ITreeCursorSynchronous {\n\t\tconst rootCursor = this.roots.cursor();\n\t\trootCursor.enterNode(0);\n\t\treturn rootCursor;\n\t}\n}\n\nclass Cursor extends BasicChunkCursor implements ITreeSubscriptionCursor {\n\tpublic constructor(\n\t\tpublic readonly forest: ChunkedForest,\n\t\tpublic state: ITreeSubscriptionCursorState,\n\t\troot: readonly TreeChunk[],\n\t\tsiblingStack: SiblingsOrKey[],\n\t\tindexStack: number[],\n\t\tindexOfChunkStack: number[],\n\t\tindexWithinChunkStack: number[],\n\t\tsiblings: SiblingsOrKey,\n\t\tindex: number,\n\t\tindexOfChunk: number,\n\t\tindexWithinChunk: number,\n\t\tnestedCursor: ChunkedCursor | undefined,\n\t) {\n\t\tsuper(\n\t\t\troot,\n\t\t\tsiblingStack,\n\t\t\tindexStack,\n\t\t\tindexOfChunkStack,\n\t\t\tindexWithinChunkStack,\n\t\t\tsiblings,\n\t\t\tindex,\n\t\t\tindexOfChunk,\n\t\t\tindexWithinChunk,\n\t\t\tnestedCursor,\n\t\t);\n\t}\n\n\tpublic setToDetachedSequence(key: FieldKey): void {\n\t\tthis.root = (this.forest.roots.fields.get(key) ?? []) as BasicChunk[];\n\t\tthis.siblingStack.length = 0;\n\t\tthis.indexStack.length = 0;\n\t\tthis.indexOfChunkStack.length = 0;\n\t\tthis.indexWithinChunkStack.length = 0;\n\t\tthis.siblings = [key];\n\t\tthis.index = 0;\n\t\tthis.indexOfChunk = 0;\n\t\tthis.indexWithinChunk = 0;\n\t\tthis.nestedCursor = undefined;\n\t}\n\n\tpublic override fork(): Cursor {\n\t\t// Siblings arrays are not modified during navigation and do not need be be copied.\n\t\t// This allows this copy to be shallow, and `this.siblings` below to not be copied as all.\n\t\treturn new Cursor(\n\t\t\tthis.forest,\n\t\t\tthis.state,\n\t\t\tthis.root,\n\t\t\t[...this.siblingStack],\n\t\t\t[...this.indexStack],\n\t\t\t[...this.indexOfChunkStack],\n\t\t\t[...this.indexWithinChunkStack],\n\t\t\tthis.siblings,\n\t\t\tthis.index,\n\t\t\tthis.indexOfChunk,\n\t\t\tthis.indexWithinChunk,\n\t\t\tthis.nestedCursor?.fork(),\n\t\t);\n\t}\n\n\tpublic buildFieldAnchor(): FieldAnchor {\n\t\tconst path = this.getFieldPath();\n\t\tconst anchor =\n\t\t\tpath.parent === undefined ? undefined : this.forest.anchors.track(path.parent);\n\t\treturn { parent: anchor, fieldKey: path.field };\n\t}\n\n\tpublic free(): void {\n\t\tthis.state = ITreeSubscriptionCursorState.Freed;\n\t}\n\n\tpublic buildAnchor(): Anchor {\n\t\treturn this.forest.anchors.track(this.getPath());\n\t}\n\n\tpublic clear(): void {\n\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\tthis.setToDetachedSequence(rootFieldKey);\n\t}\n}\n\n/**\n * Creates an implementation of {@link IEditableForest} with no data or schema.\n */\nexport function buildChunkedForest(\n\tchunker: IChunker,\n\tanchors?: AnchorSet,\n\tidCompressor?: IIdCompressor,\n): ChunkedForest {\n\treturn new ChunkedForest(makeRoot(), chunker.schema, chunker, anchors, idCompressor);\n}\n"]}
|