@fluidframework/tree 2.90.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 +365 -0
- package/alpha.d.ts +2 -2
- package/api-extractor/api-extractor-lint-alpha.cjs.json +1 -1
- package/api-extractor/api-extractor-lint-alpha.esm.json +1 -1
- package/api-extractor/api-extractor-lint-beta.cjs.json +1 -1
- package/api-extractor/api-extractor-lint-beta.esm.json +1 -1
- package/api-extractor/api-extractor-lint-bundle.json +1 -1
- package/api-extractor/api-extractor-lint-legacy.cjs.json +1 -1
- package/api-extractor/api-extractor-lint-legacy.esm.json +1 -1
- package/api-extractor/api-extractor-lint-public.cjs.json +1 -1
- package/api-extractor/api-extractor-lint-public.esm.json +1 -1
- package/api-extractor/api-extractor.current.json +1 -1
- package/api-extractor/api-extractor.legacy.json +2 -1
- package/api-extractor.json +1 -0
- package/api-report/tree.alpha.api.md +141 -37
- package/beta.d.ts +2 -2
- 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 +6 -0
- package/dist/entrypoints/alpha.d.ts.map +1 -0
- package/dist/entrypoints/alpha.js +91 -0
- package/dist/entrypoints/alpha.js.map +1 -0
- package/dist/entrypoints/beta.d.ts +6 -0
- package/dist/entrypoints/beta.d.ts.map +1 -0
- package/dist/entrypoints/beta.js +43 -0
- package/dist/entrypoints/beta.js.map +1 -0
- package/dist/entrypoints/internal.d.ts +6 -0
- package/dist/entrypoints/internal.d.ts.map +1 -0
- package/dist/entrypoints/internal.js +28 -0
- package/dist/entrypoints/internal.js.map +1 -0
- package/dist/entrypoints/legacy.d.ts +6 -0
- package/dist/entrypoints/legacy.d.ts.map +1 -0
- package/dist/entrypoints/legacy.js +49 -0
- package/dist/entrypoints/legacy.js.map +1 -0
- package/dist/entrypoints/public.d.ts +6 -0
- package/dist/entrypoints/public.d.ts.map +1 -0
- package/dist/entrypoints/public.js +27 -0
- package/dist/entrypoints/public.js.map +1 -0
- 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/crossFieldQueries.d.ts +3 -3
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +1 -0
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -6
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.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 +11 -6
- 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/moveEffectTable.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.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 +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -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 -677
- 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/eraseSchemaDetails.d.ts +43 -0
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
- package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +4 -2
- 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 +126 -29
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +72 -7
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +10 -11
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaStatics.js +13 -7
- package/dist/simple-tree/api/schemaStatics.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/api/typesUnsafe.d.ts +23 -2
- package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.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/fieldSchema.d.ts +3 -2
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +3 -4
- package/dist/simple-tree/fieldSchema.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 +2 -2
- 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/simple-tree/node-kinds/object/index.d.ts +2 -2
- package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts +43 -7
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +26 -2
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +321 -13
- 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/rangeMap.d.ts +25 -18
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +24 -30
- package/dist/util/rangeMap.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/dist/util/typeCheck.d.ts.map +1 -1
- package/dist/util/typeCheck.js.map +1 -1
- package/dist/util/typeUtils.d.ts.map +1 -1
- package/dist/util/typeUtils.js.map +1 -1
- package/eslint.config.mts +10 -2
- package/internal.d.ts +2 -2
- package/legacy.d.ts +2 -2
- 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 +6 -0
- package/lib/entrypoints/alpha.d.ts.map +1 -0
- package/lib/entrypoints/alpha.js +12 -0
- package/lib/entrypoints/alpha.js.map +1 -0
- package/lib/entrypoints/beta.d.ts +6 -0
- package/lib/entrypoints/beta.d.ts.map +1 -0
- package/lib/entrypoints/beta.js +12 -0
- package/lib/entrypoints/beta.js.map +1 -0
- package/lib/entrypoints/internal.d.ts +6 -0
- package/lib/entrypoints/internal.d.ts.map +1 -0
- package/lib/entrypoints/internal.js +12 -0
- package/lib/entrypoints/internal.js.map +1 -0
- package/lib/entrypoints/legacy.d.ts +6 -0
- package/lib/entrypoints/legacy.d.ts.map +1 -0
- package/lib/entrypoints/legacy.js +15 -0
- package/lib/entrypoints/legacy.js.map +1 -0
- package/lib/entrypoints/public.d.ts +6 -0
- package/lib/entrypoints/public.d.ts.map +1 -0
- package/lib/entrypoints/public.js +10 -0
- package/lib/entrypoints/public.js.map +1 -0
- 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/crossFieldQueries.d.ts +3 -3
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +1 -0
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -6
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.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 +11 -6
- 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/moveEffectTable.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.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 +8 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -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 -682
- 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/eraseSchemaDetails.d.ts +43 -0
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
- package/lib/simple-tree/api/eraseSchemaDetails.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +4 -2
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +126 -29
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +66 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +10 -11
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaStatics.js +14 -8
- package/lib/simple-tree/api/schemaStatics.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/api/typesUnsafe.d.ts +23 -2
- package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.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/fieldSchema.d.ts +3 -2
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +3 -4
- package/lib/simple-tree/fieldSchema.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 +2 -2
- 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/simple-tree/node-kinds/object/index.d.ts +2 -2
- package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts +43 -7
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +26 -2
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +321 -13
- 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/rangeMap.d.ts +25 -18
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +25 -31
- package/lib/util/rangeMap.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/lib/util/typeCheck.d.ts.map +1 -1
- package/lib/util/typeCheck.js.map +1 -1
- package/lib/util/typeUtils.d.ts.map +1 -1
- package/lib/util/typeUtils.js.map +1 -1
- package/package.json +50 -50
- package/scripts/generate-entrypoint-sources.sh +31 -0
- 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/{dist/alpha.d.ts → src/entrypoints/alpha.ts} +25 -11
- package/{lib/beta.d.ts → src/entrypoints/beta.ts} +4 -7
- package/src/entrypoints/internal.ts +13 -0
- package/{lib/legacy.d.ts → src/entrypoints/legacy.ts} +13 -8
- package/{dist/public.d.ts → src/entrypoints/public.ts} +3 -6
- 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/crossFieldQueries.ts +3 -8
- package/src/feature-libraries/modular-schema/defaultRevisionReplacer.ts +16 -8
- 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 +15 -6
- 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/moveEffectTable.ts +1 -1
- 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 +29 -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 +277 -100
- 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/eraseSchemaDetails.ts +60 -0
- package/src/simple-tree/api/index.ts +22 -1
- package/src/simple-tree/api/schemaFactory.ts +8 -3
- package/src/simple-tree/api/schemaFactoryAlpha.ts +275 -27
- package/src/simple-tree/api/schemaFactoryBeta.ts +10 -1
- package/src/simple-tree/api/schemaStatics.ts +79 -21
- 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/api/typesUnsafe.ts +49 -1
- package/src/simple-tree/core/treeNodeKernel.ts +53 -7
- package/src/simple-tree/core/unhydratedFlexTree.ts +5 -1
- package/src/simple-tree/fieldSchema.ts +29 -5
- package/src/simple-tree/index.ts +20 -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 +5 -0
- package/src/simple-tree/node-kinds/object/index.ts +3 -0
- package/src/simple-tree/node-kinds/object/objectNode.ts +69 -11
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +33 -2
- package/src/text/textDomainFormatted.ts +113 -11
- package/src/treeFactory.ts +10 -5
- package/src/util/rangeMap.ts +54 -50
- package/src/util/referenceCounting.ts +0 -1
- package/src/util/typeCheck.ts +1 -0
- package/src/util/typeUtils.ts +4 -7
- package/dist/beta.d.ts +0 -152
- 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/dist/legacy.d.ts +0 -159
- package/lib/alpha.d.ts +0 -304
- 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/lib/public.d.ts +0 -94
- /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
|
@@ -27,11 +27,11 @@ import { TreeCompressionStrategy } from "../../treeCompressionUtils.js";
|
|
|
27
27
|
import { decode } from "./chunkDecoding.js";
|
|
28
28
|
import type { FieldBatch } from "./fieldBatch.js";
|
|
29
29
|
import {
|
|
30
|
-
type EncodedFieldBatch,
|
|
31
|
-
FieldBatchFormatVersion,
|
|
32
30
|
EncodedFieldBatchV1,
|
|
33
31
|
EncodedFieldBatchV2,
|
|
34
|
-
|
|
32
|
+
FieldBatchFormatVersion,
|
|
33
|
+
type EncodedFieldBatchV1OrV2,
|
|
34
|
+
} from "./format/index.js";
|
|
35
35
|
import type { IncrementalEncodingPolicy } from "./incrementalEncodingPolicy.js";
|
|
36
36
|
import { schemaCompressedEncodeV1, schemaCompressedEncodeV2 } from "./schemaBasedEncode.js";
|
|
37
37
|
import { uncompressedEncodeV1, uncompressedEncodeV2 } from "./uncompressedEncode.js";
|
|
@@ -67,7 +67,7 @@ export interface IncrementalEncoder {
|
|
|
67
67
|
*/
|
|
68
68
|
encodeIncrementalField(
|
|
69
69
|
cursor: ITreeCursorSynchronous,
|
|
70
|
-
chunkEncoder: (chunk: TreeChunk) =>
|
|
70
|
+
chunkEncoder: (chunk: TreeChunk) => EncodedFieldBatchV2,
|
|
71
71
|
): ChunkReferenceId[];
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -87,7 +87,7 @@ export interface IncrementalDecoder {
|
|
|
87
87
|
*/
|
|
88
88
|
decodeIncrementalChunk(
|
|
89
89
|
referenceId: ChunkReferenceId,
|
|
90
|
-
chunkDecoder: (encoded:
|
|
90
|
+
chunkDecoder: (encoded: EncodedFieldBatchV2) => TreeChunk,
|
|
91
91
|
): TreeChunk;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
@@ -117,25 +117,28 @@ export type FieldBatchCodec = ReturnType<typeof fieldBatchCodecBuilder.build>;
|
|
|
117
117
|
*/
|
|
118
118
|
function makeFieldBatchCodecForVersion(
|
|
119
119
|
version: FieldBatchFormatVersion,
|
|
120
|
-
uncompressedEncodeFn: (batch: FieldBatch) =>
|
|
120
|
+
uncompressedEncodeFn: (batch: FieldBatch) => EncodedFieldBatchV1OrV2,
|
|
121
121
|
schemaCompressedEncodeFn: (
|
|
122
122
|
schema: StoredSchemaCollection,
|
|
123
123
|
policy: SchemaPolicy,
|
|
124
124
|
fieldBatch: FieldBatch,
|
|
125
125
|
idCompressor: IIdCompressor,
|
|
126
126
|
incrementalEncoder: IncrementalEncoder | undefined,
|
|
127
|
-
) =>
|
|
127
|
+
) => EncodedFieldBatchV1OrV2,
|
|
128
128
|
encodedFieldBatchType: TSchema,
|
|
129
129
|
): CodecAndSchema<FieldBatch, FieldBatchEncodingContext> {
|
|
130
130
|
return {
|
|
131
|
-
encode: (
|
|
131
|
+
encode: (
|
|
132
|
+
data: FieldBatch,
|
|
133
|
+
context: FieldBatchEncodingContext,
|
|
134
|
+
): EncodedFieldBatchV1OrV2 => {
|
|
132
135
|
for (const cursor of data) {
|
|
133
136
|
assert(
|
|
134
137
|
cursor.mode === CursorLocationType.Fields,
|
|
135
138
|
0x8a3 /* FieldBatch expects fields cursors */,
|
|
136
139
|
);
|
|
137
140
|
}
|
|
138
|
-
let encoded:
|
|
141
|
+
let encoded: EncodedFieldBatchV1OrV2;
|
|
139
142
|
let incrementalEncoder: IncrementalEncoder | undefined;
|
|
140
143
|
switch (context.encodeType) {
|
|
141
144
|
case TreeCompressionStrategy.Uncompressed: {
|
|
@@ -176,7 +179,10 @@ function makeFieldBatchCodecForVersion(
|
|
|
176
179
|
// TODO: consider checking input data was in schema.
|
|
177
180
|
return encoded;
|
|
178
181
|
},
|
|
179
|
-
decode: (
|
|
182
|
+
decode: (
|
|
183
|
+
data: EncodedFieldBatchV1OrV2,
|
|
184
|
+
context: FieldBatchEncodingContext,
|
|
185
|
+
): FieldBatch => {
|
|
180
186
|
// TODO: consider checking data is in schema.
|
|
181
187
|
return decode(
|
|
182
188
|
data,
|
|
@@ -30,13 +30,15 @@ import type { IncrementalEncoder } from "./codecs.js";
|
|
|
30
30
|
import type { FieldBatch } from "./fieldBatch.js";
|
|
31
31
|
import {
|
|
32
32
|
type EncodedAnyShape,
|
|
33
|
-
type
|
|
34
|
-
type
|
|
33
|
+
type EncodedChunkShapeV1,
|
|
34
|
+
type EncodedChunkShapeV1OrV2,
|
|
35
|
+
type EncodedChunkShapeV2,
|
|
36
|
+
type EncodedFieldBatchV1OrV2,
|
|
35
37
|
type EncodedNestedArrayShape,
|
|
36
38
|
type EncodedValueShape,
|
|
37
39
|
FieldBatchFormatVersion,
|
|
38
40
|
SpecialField,
|
|
39
|
-
} from "./format.js";
|
|
41
|
+
} from "./format/index.js";
|
|
40
42
|
|
|
41
43
|
/**
|
|
42
44
|
* Encode data from `FieldBatch` into an `EncodedFieldBatch`.
|
|
@@ -48,7 +50,7 @@ import {
|
|
|
48
50
|
export function compressedEncode(
|
|
49
51
|
fieldBatch: FieldBatch,
|
|
50
52
|
context: EncoderContext,
|
|
51
|
-
):
|
|
53
|
+
): EncodedFieldBatchV1OrV2 {
|
|
52
54
|
const batchBuffer: BufferFormat[] = [];
|
|
53
55
|
|
|
54
56
|
// Populate buffer, including shape and identifier references
|
|
@@ -60,8 +62,8 @@ export function compressedEncode(
|
|
|
60
62
|
return updateShapesAndIdentifiersEncoding(context.version, batchBuffer);
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
export type BufferFormat = BufferFormatGeneric<
|
|
64
|
-
export type Shape = ShapeGeneric<
|
|
65
|
+
export type BufferFormat = BufferFormatGeneric<EncodedChunkShapeV1OrV2>;
|
|
66
|
+
export type Shape = ShapeGeneric<EncodedChunkShapeV1OrV2>;
|
|
65
67
|
|
|
66
68
|
/**
|
|
67
69
|
* Like {@link FieldEncoder}, except data will be prefixed with the key.
|
|
@@ -163,7 +165,7 @@ export function asNodesEncoder(encoder: NodeEncoder): NodesEncoder {
|
|
|
163
165
|
/**
|
|
164
166
|
* Encodes a chunk with {@link EncodedAnyShape} by prefixing the data with its shape.
|
|
165
167
|
*/
|
|
166
|
-
export class AnyShape extends ShapeGeneric<
|
|
168
|
+
export class AnyShape extends ShapeGeneric<EncodedChunkShapeV1OrV2> {
|
|
167
169
|
private constructor() {
|
|
168
170
|
super();
|
|
169
171
|
}
|
|
@@ -172,7 +174,7 @@ export class AnyShape extends ShapeGeneric<EncodedChunkShape> {
|
|
|
172
174
|
public encodeShape(
|
|
173
175
|
identifiers: DeduplicationTable<string>,
|
|
174
176
|
shapes: DeduplicationTable<Shape>,
|
|
175
|
-
):
|
|
177
|
+
): EncodedChunkShapeV1 {
|
|
176
178
|
const encodedAnyShape: EncodedAnyShape = 0;
|
|
177
179
|
return { d: encodedAnyShape };
|
|
178
180
|
}
|
|
@@ -268,7 +270,7 @@ export const anyFieldEncoder: FieldEncoder = {
|
|
|
268
270
|
* which is an easy way to keep all the related code together without extra objects.
|
|
269
271
|
*/
|
|
270
272
|
export class InlineArrayEncoder
|
|
271
|
-
extends ShapeGeneric<
|
|
273
|
+
extends ShapeGeneric<EncodedChunkShapeV1OrV2>
|
|
272
274
|
implements NodesEncoder, FieldEncoder
|
|
273
275
|
{
|
|
274
276
|
public static readonly empty: InlineArrayEncoder = new InlineArrayEncoder(0, {
|
|
@@ -328,7 +330,7 @@ export class InlineArrayEncoder
|
|
|
328
330
|
public encodeShape(
|
|
329
331
|
identifiers: DeduplicationTable<string>,
|
|
330
332
|
shapes: DeduplicationTable<Shape>,
|
|
331
|
-
):
|
|
333
|
+
): EncodedChunkShapeV1 {
|
|
332
334
|
return {
|
|
333
335
|
b: {
|
|
334
336
|
length: this.length,
|
|
@@ -352,7 +354,7 @@ export class InlineArrayEncoder
|
|
|
352
354
|
/**
|
|
353
355
|
* Encodes the shape for a nested array as {@link EncodedNestedArrayShape} shape.
|
|
354
356
|
*/
|
|
355
|
-
export class NestedArrayShape extends ShapeGeneric<
|
|
357
|
+
export class NestedArrayShape extends ShapeGeneric<EncodedChunkShapeV1OrV2> {
|
|
356
358
|
/**
|
|
357
359
|
* @param innerShape - The shape of each item in this nested array.
|
|
358
360
|
*/
|
|
@@ -363,7 +365,7 @@ export class NestedArrayShape extends ShapeGeneric<EncodedChunkShape> {
|
|
|
363
365
|
public encodeShape(
|
|
364
366
|
identifiers: DeduplicationTable<string>,
|
|
365
367
|
shapes: DeduplicationTable<Shape>,
|
|
366
|
-
):
|
|
368
|
+
): EncodedChunkShapeV1OrV2 {
|
|
367
369
|
const shape: EncodedNestedArrayShape =
|
|
368
370
|
shapes.valueToIndex.get(this.innerShape) ??
|
|
369
371
|
fail(0xb4f /* index for shape not found in table */);
|
|
@@ -422,11 +424,11 @@ export class NestedArrayEncoder implements FieldEncoder {
|
|
|
422
424
|
/**
|
|
423
425
|
* Encodes the shape for an incremental chunk as {@link EncodedIncrementalChunkShape} shape.
|
|
424
426
|
*/
|
|
425
|
-
export class IncrementalChunkShape extends ShapeGeneric<
|
|
427
|
+
export class IncrementalChunkShape extends ShapeGeneric<EncodedChunkShapeV2> {
|
|
426
428
|
public encodeShape(
|
|
427
429
|
identifiers: DeduplicationTable<string>,
|
|
428
430
|
shapes: DeduplicationTable<Shape>,
|
|
429
|
-
):
|
|
431
|
+
): EncodedChunkShapeV2 {
|
|
430
432
|
return {
|
|
431
433
|
e: 0 /* EncodedIncrementalChunkShape */,
|
|
432
434
|
};
|
package/src/feature-libraries/chunked-forest/codec/{formatGeneric.ts → format/formatGeneric.ts}
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { type Static, type TSchema, Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
|
-
import type { FieldBatchFormatVersion } from "./
|
|
8
|
+
import type { FieldBatchFormatVersion } from "./versions.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Identifier OR Index of an identifier in the identifier list.
|
|
@@ -5,49 +5,21 @@
|
|
|
5
5
|
|
|
6
6
|
import { type Static, Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
|
-
import { unionOptions } from "
|
|
9
|
-
import { strictEnum, type Values } from "../../../util/index.js";
|
|
8
|
+
import { unionOptions } from "../../../../codec/index.js";
|
|
10
9
|
|
|
11
|
-
import {
|
|
12
|
-
Count,
|
|
13
|
-
EncodedFieldBatchGeneric,
|
|
14
|
-
IdentifierOrIndex,
|
|
15
|
-
ShapeIndex,
|
|
16
|
-
} from "./formatGeneric.js";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The format version for the field batch.
|
|
20
|
-
*/
|
|
21
|
-
export const FieldBatchFormatVersion = strictEnum("FieldBatchFormatVersion", {
|
|
22
|
-
/**
|
|
23
|
-
* Initial version.
|
|
24
|
-
* @remarks
|
|
25
|
-
* For simplicity of implementation the format for this version allows the same chunk shapes as v2, but must not use {@link EncodedIncrementalChunkShape}
|
|
26
|
-
* as older clients will not know how to handle that shape but think they can handle this format.
|
|
27
|
-
*/
|
|
28
|
-
v1: 1,
|
|
29
|
-
/**
|
|
30
|
-
* Adds support for incremental encoding of chunks.
|
|
31
|
-
* @remarks
|
|
32
|
-
* {@link EncodedIncrementalChunkShape} was added in this version.
|
|
33
|
-
*/
|
|
34
|
-
v2: 2,
|
|
35
|
-
});
|
|
36
|
-
export type FieldBatchFormatVersion = Values<typeof FieldBatchFormatVersion>;
|
|
37
|
-
|
|
38
|
-
// Compatible versions used for format/version validation.
|
|
39
|
-
// TODO: A proper version update policy will need to be documented.
|
|
40
|
-
export const validVersions = new Set([...Object.values(FieldBatchFormatVersion)]);
|
|
10
|
+
import { Count, IdentifierOrIndex, ShapeIndex } from "./formatGeneric.js";
|
|
41
11
|
|
|
42
12
|
/**
|
|
43
13
|
* Top level length is implied from length of data array.
|
|
44
14
|
* All content are of this shape.
|
|
45
15
|
*/
|
|
16
|
+
export type EncodedNestedArrayShape = Static<typeof EncodedNestedArrayShape>;
|
|
46
17
|
export const EncodedNestedArrayShape = ShapeIndex;
|
|
47
18
|
|
|
48
19
|
/**
|
|
49
20
|
* Inline array.
|
|
50
21
|
*/
|
|
22
|
+
export type EncodedInlineArrayShape = Static<typeof EncodedInlineArrayShape>;
|
|
51
23
|
export const EncodedInlineArrayShape = Type.Object(
|
|
52
24
|
{
|
|
53
25
|
length: Count,
|
|
@@ -64,18 +36,14 @@ export const EncodedInlineArrayShape = Type.Object(
|
|
|
64
36
|
*
|
|
65
37
|
* Used for polymorphism.
|
|
66
38
|
*/
|
|
39
|
+
export type EncodedAnyShape = Static<typeof EncodedAnyShape>;
|
|
67
40
|
export const EncodedAnyShape = Type.Literal(0);
|
|
68
41
|
|
|
69
|
-
/**
|
|
70
|
-
* Encoded content is a {@link ChunkReferenceId}.
|
|
71
|
-
* This represents the shape of a chunk that is encoded separately and is referenced by its {@link ChunkReferenceId}.
|
|
72
|
-
*/
|
|
73
|
-
export const EncodedIncrementalChunkShape = Type.Literal(0);
|
|
74
|
-
|
|
75
42
|
/**
|
|
76
43
|
* Content of the encoded field is specified by the Shape referenced by the ShapeIndex.
|
|
77
44
|
* This is a tuple for conciseness.
|
|
78
45
|
*/
|
|
46
|
+
export type EncodedFieldShape = Static<typeof EncodedFieldShape>;
|
|
79
47
|
export const EncodedFieldShape = Type.Tuple([
|
|
80
48
|
/**
|
|
81
49
|
* Field key for this field.
|
|
@@ -87,33 +55,6 @@ export const EncodedFieldShape = Type.Tuple([
|
|
|
87
55
|
ShapeIndex,
|
|
88
56
|
]);
|
|
89
57
|
|
|
90
|
-
export type EncodedFieldShape = Static<typeof EncodedFieldShape>;
|
|
91
|
-
|
|
92
|
-
enum CounterRelativeTo {
|
|
93
|
-
// Relative to previous node of same type in depth first pre-order traversal.
|
|
94
|
-
PreviousNodeOfType_DepthFirstPreOrder,
|
|
95
|
-
// TODO: add alternative relative mode relative to previous note at a path to allow delta encoded sequences (like points where x and y are delta encoded relative to previous points).
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
enum CounterMode {
|
|
99
|
-
Number,
|
|
100
|
-
// TODO: document wrap modes and bit skipping. Note UUID subVersion here (ex: UUIDv4)
|
|
101
|
-
UUID,
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Delta encoded value relative to a previous node's value.
|
|
106
|
-
*/
|
|
107
|
-
export const EncodedCounter = Type.Object(
|
|
108
|
-
{
|
|
109
|
-
relativeTo: Type.Enum(CounterRelativeTo),
|
|
110
|
-
// If not provided, delta inline in data.
|
|
111
|
-
delta: Type.Optional(Type.Number()),
|
|
112
|
-
mode: Type.Enum(CounterMode),
|
|
113
|
-
},
|
|
114
|
-
{ additionalProperties: false },
|
|
115
|
-
);
|
|
116
|
-
|
|
117
58
|
/**
|
|
118
59
|
* Used in {@link EncodedValueShape} for special field kind handling.
|
|
119
60
|
*/
|
|
@@ -159,6 +100,10 @@ export const EncodedValueShape = Type.Union([
|
|
|
159
100
|
]);
|
|
160
101
|
export type EncodedValueShape = undefined | Static<typeof EncodedValueShape>;
|
|
161
102
|
|
|
103
|
+
/**
|
|
104
|
+
* The encoded form of a {@link Shape} for a node.
|
|
105
|
+
*/
|
|
106
|
+
export type EncodedNodeShape = Static<typeof EncodedNodeShape>;
|
|
162
107
|
export const EncodedNodeShape = Type.Object(
|
|
163
108
|
{
|
|
164
109
|
/**
|
|
@@ -181,6 +126,30 @@ export const EncodedNodeShape = Type.Object(
|
|
|
181
126
|
{ additionalProperties: false },
|
|
182
127
|
);
|
|
183
128
|
|
|
129
|
+
/**
|
|
130
|
+
* The chunk shapes supported by the V1 format.
|
|
131
|
+
* @remarks
|
|
132
|
+
* See {@link EncodedChunkShapeV1}.
|
|
133
|
+
*/
|
|
134
|
+
export const shapesV1 = {
|
|
135
|
+
/**
|
|
136
|
+
* {@link EncodedNestedArrayShape} union member.
|
|
137
|
+
*/
|
|
138
|
+
a: Type.Optional(EncodedNestedArrayShape),
|
|
139
|
+
/**
|
|
140
|
+
* {@link EncodedInlineArrayShape} union member.
|
|
141
|
+
*/
|
|
142
|
+
b: Type.Optional(EncodedInlineArrayShape),
|
|
143
|
+
/**
|
|
144
|
+
* {@link EncodedNodeShape} union member.
|
|
145
|
+
*/
|
|
146
|
+
c: Type.Optional(EncodedNodeShape),
|
|
147
|
+
/**
|
|
148
|
+
* {@link EncodedAnyShape} union member.
|
|
149
|
+
*/
|
|
150
|
+
d: Type.Optional(EncodedAnyShape),
|
|
151
|
+
} as const;
|
|
152
|
+
|
|
184
153
|
/**
|
|
185
154
|
* Discriminated union that represents the shapes of chunks in the encoded data.
|
|
186
155
|
* "Chunk" here refers to a chunk of tree data, rooted at a range of nodes, that is encoded as a
|
|
@@ -191,52 +160,13 @@ export const EncodedNodeShape = Type.Object(
|
|
|
191
160
|
* This is similar to other such concepts in the system.
|
|
192
161
|
*
|
|
193
162
|
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
163
|
+
* @privateRemarks
|
|
164
|
+
* Because the TypeScript types for how we model these unions don't require exactly one property,
|
|
165
|
+
* to prevent a union with more options from being assignable to this one, we include Never.
|
|
166
|
+
* This matters in this case because the V2 format only differs in that it has another entry in this Union.
|
|
194
167
|
*/
|
|
195
|
-
export
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
* {@link EncodedNestedArrayShape} union member.
|
|
199
|
-
*/
|
|
200
|
-
a: Type.Optional(EncodedNestedArrayShape),
|
|
201
|
-
/**
|
|
202
|
-
* {@link EncodedInlineArrayShape} union member.
|
|
203
|
-
*/
|
|
204
|
-
b: Type.Optional(EncodedInlineArrayShape),
|
|
205
|
-
/**
|
|
206
|
-
* {@link EncodedNodeShape} union member.
|
|
207
|
-
*/
|
|
208
|
-
c: Type.Optional(EncodedNodeShape),
|
|
209
|
-
/**
|
|
210
|
-
* {@link EncodedAnyShape} union member.
|
|
211
|
-
*/
|
|
212
|
-
d: Type.Optional(EncodedAnyShape),
|
|
213
|
-
/**
|
|
214
|
-
* {@link EncodedIncrementalChunkShape} union member.
|
|
215
|
-
*/
|
|
216
|
-
e: Type.Optional(EncodedIncrementalChunkShape),
|
|
217
|
-
},
|
|
168
|
+
export type EncodedChunkShapeV1 = Static<typeof EncodedChunkShapeV1>;
|
|
169
|
+
export const EncodedChunkShapeV1 = Type.Object(
|
|
170
|
+
{ ...shapesV1, e: Type.Optional(Type.Never()) },
|
|
218
171
|
unionOptions,
|
|
219
172
|
);
|
|
220
|
-
|
|
221
|
-
export type EncodedChunkShape = Static<typeof EncodedChunkShape>;
|
|
222
|
-
|
|
223
|
-
export type EncodedNestedArrayShape = Static<typeof EncodedNestedArrayShape>;
|
|
224
|
-
export type EncodedInlineArrayShape = Static<typeof EncodedInlineArrayShape>;
|
|
225
|
-
export type EncodedNodeShape = Static<typeof EncodedNodeShape>;
|
|
226
|
-
export type EncodedAnyShape = Static<typeof EncodedAnyShape>;
|
|
227
|
-
export type EncodedIncrementalChunkShape = Static<typeof EncodedIncrementalChunkShape>;
|
|
228
|
-
|
|
229
|
-
export const EncodedFieldBatchV1 = EncodedFieldBatchGeneric(
|
|
230
|
-
FieldBatchFormatVersion.v1,
|
|
231
|
-
EncodedChunkShape,
|
|
232
|
-
);
|
|
233
|
-
export type EncodedFieldBatchV1 = Static<typeof EncodedFieldBatchV1>;
|
|
234
|
-
|
|
235
|
-
export const EncodedFieldBatchV2 = EncodedFieldBatchGeneric(
|
|
236
|
-
FieldBatchFormatVersion.v2,
|
|
237
|
-
EncodedChunkShape,
|
|
238
|
-
);
|
|
239
|
-
export type EncodedFieldBatchV2 = Static<typeof EncodedFieldBatchV2>;
|
|
240
|
-
|
|
241
|
-
export const EncodedFieldBatch = Type.Union([EncodedFieldBatchV1, EncodedFieldBatchV2]);
|
|
242
|
-
export type EncodedFieldBatch = Static<typeof EncodedFieldBatch>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { type Static, Type } from "@sinclair/typebox";
|
|
7
|
+
|
|
8
|
+
import { unionOptions } from "../../../../codec/index.js";
|
|
9
|
+
|
|
10
|
+
import { shapesV1 } from "./formatV1.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Encoded content is a {@link ChunkReferenceId}.
|
|
14
|
+
* This represents the shape of a chunk that is encoded separately and is referenced by its {@link ChunkReferenceId}.
|
|
15
|
+
*/
|
|
16
|
+
export type EncodedIncrementalChunkShape = Static<typeof EncodedIncrementalChunkShape>;
|
|
17
|
+
export const EncodedIncrementalChunkShape = Type.Literal(0);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* V2 extension of {@link EncodedChunkShapeV1}.
|
|
21
|
+
* @remarks
|
|
22
|
+
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
23
|
+
*/
|
|
24
|
+
export type EncodedChunkShapeV2 = Static<typeof EncodedChunkShapeV2>;
|
|
25
|
+
export const EncodedChunkShapeV2 = Type.Object(
|
|
26
|
+
{
|
|
27
|
+
...shapesV1,
|
|
28
|
+
e: Type.Optional(EncodedIncrementalChunkShape),
|
|
29
|
+
},
|
|
30
|
+
unionOptions,
|
|
31
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type {
|
|
7
|
+
EncodedChunkShapeV1,
|
|
8
|
+
EncodedInlineArrayShape,
|
|
9
|
+
EncodedNestedArrayShape,
|
|
10
|
+
EncodedNodeShape,
|
|
11
|
+
EncodedValueShape,
|
|
12
|
+
EncodedFieldShape,
|
|
13
|
+
} from "./formatV1.js";
|
|
14
|
+
export {
|
|
15
|
+
EncodedAnyShape,
|
|
16
|
+
SpecialField,
|
|
17
|
+
} from "./formatV1.js";
|
|
18
|
+
export { EncodedIncrementalChunkShape, EncodedChunkShapeV2 } from "./formatV2.js";
|
|
19
|
+
export {
|
|
20
|
+
FieldBatchFormatVersion,
|
|
21
|
+
EncodedFieldBatchV1,
|
|
22
|
+
EncodedFieldBatchV2,
|
|
23
|
+
type EncodedFieldBatchV1OrV2,
|
|
24
|
+
type EncodedFieldBatchV1AndV2,
|
|
25
|
+
type EncodedChunkShapeV1OrV2,
|
|
26
|
+
} from "./versions.js";
|
|
27
|
+
export type {
|
|
28
|
+
ShapeIndex,
|
|
29
|
+
IdentifierOrIndex,
|
|
30
|
+
EncodedFieldBatchGeneric,
|
|
31
|
+
} from "./formatGeneric.js";
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Static } from "@sinclair/typebox";
|
|
7
|
+
|
|
8
|
+
import { strictEnum, type Values } from "../../../../util/index.js";
|
|
9
|
+
|
|
10
|
+
import { EncodedFieldBatchGeneric } from "./formatGeneric.js";
|
|
11
|
+
import { EncodedChunkShapeV1 } from "./formatV1.js";
|
|
12
|
+
import { EncodedChunkShapeV2 } from "./formatV2.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The format version for the field batch.
|
|
16
|
+
*/
|
|
17
|
+
export type FieldBatchFormatVersion = Values<typeof FieldBatchFormatVersion>;
|
|
18
|
+
export const FieldBatchFormatVersion = strictEnum("FieldBatchFormatVersion", {
|
|
19
|
+
/**
|
|
20
|
+
* Initial version.
|
|
21
|
+
* @remarks
|
|
22
|
+
* For simplicity of implementation the format for this version allows the same chunk shapes as v2, but must not use {@link EncodedIncrementalChunkShape}
|
|
23
|
+
* as older clients will not know how to handle that shape but think they can handle this format.
|
|
24
|
+
*/
|
|
25
|
+
v1: 1,
|
|
26
|
+
/**
|
|
27
|
+
* Adds support for incremental encoding of chunks.
|
|
28
|
+
* @remarks
|
|
29
|
+
* {@link EncodedIncrementalChunkShape} was added in this version.
|
|
30
|
+
*/
|
|
31
|
+
v2: 2,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Encoded {@link FieldBatch} using V1 format.
|
|
36
|
+
* @remarks
|
|
37
|
+
* Does not support {@link EncodedIncrementalChunkShape}.
|
|
38
|
+
*/
|
|
39
|
+
export type EncodedFieldBatchV1 = Static<typeof EncodedFieldBatchV1>;
|
|
40
|
+
export const EncodedFieldBatchV1 = EncodedFieldBatchGeneric(
|
|
41
|
+
FieldBatchFormatVersion.v1,
|
|
42
|
+
EncodedChunkShapeV1,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Encoded {@link FieldBatch} using V2 format.
|
|
47
|
+
* @remarks
|
|
48
|
+
* Adds support for {@link EncodedIncrementalChunkShape}.
|
|
49
|
+
*/
|
|
50
|
+
export type EncodedFieldBatchV2 = Static<typeof EncodedFieldBatchV2>;
|
|
51
|
+
export const EncodedFieldBatchV2 = EncodedFieldBatchGeneric(
|
|
52
|
+
FieldBatchFormatVersion.v2,
|
|
53
|
+
EncodedChunkShapeV2,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Encoded {@link FieldBatch}, which might use V2 features, but might also have been from a V1 encoder.
|
|
58
|
+
* @remarks
|
|
59
|
+
* Type wise, equivalent to V2, as that is a superset of V1.
|
|
60
|
+
* Used instead of just V2 for clarity.
|
|
61
|
+
*/
|
|
62
|
+
export type EncodedFieldBatchV1OrV2 = EncodedFieldBatchV1 | EncodedFieldBatchV2;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Encoded data, compatible with both V1 and V2 formats.
|
|
66
|
+
* @remarks
|
|
67
|
+
* This is the intersection of the two versions, which is possible because V2 is a non-breaking extension of V1.
|
|
68
|
+
* This type can be used when the code is compatible with both versions and does not need to distinguish between them.
|
|
69
|
+
*
|
|
70
|
+
* Type wise, equivalent to V1, as that is a subset of V2.
|
|
71
|
+
* Used instead of just V1 for clarity.
|
|
72
|
+
*/
|
|
73
|
+
export type EncodedFieldBatchV1AndV2 = EncodedFieldBatchV1 & EncodedFieldBatchV2;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Encoded chunk shape, which might use V2 features, but might also have been from a V1 encoder.
|
|
77
|
+
* @remarks
|
|
78
|
+
* Type wise, equivalent to V2, as that is a superset of V1.
|
|
79
|
+
* Used instead of just V2 for clarity.
|
|
80
|
+
*/
|
|
81
|
+
export type EncodedChunkShapeV1OrV2 = EncodedChunkShapeV1 | EncodedChunkShapeV2;
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export type {
|
|
7
|
-
|
|
6
|
+
export type {
|
|
7
|
+
EncodedFieldBatchV1,
|
|
8
|
+
EncodedFieldBatchV1OrV2,
|
|
9
|
+
EncodedFieldBatchV2,
|
|
10
|
+
} from "./format/index.js";
|
|
11
|
+
export { FieldBatchFormatVersion } from "./format/index.js";
|
|
8
12
|
export type { FieldBatch } from "./fieldBatch.js";
|
|
9
13
|
export {
|
|
10
14
|
type FieldBatchCodec,
|
|
@@ -24,7 +24,11 @@ import {
|
|
|
24
24
|
type NodeEncoder,
|
|
25
25
|
encodeValue,
|
|
26
26
|
} from "./compressedEncode.js";
|
|
27
|
-
import type {
|
|
27
|
+
import type {
|
|
28
|
+
EncodedChunkShapeV1OrV2,
|
|
29
|
+
EncodedFieldShape,
|
|
30
|
+
EncodedValueShape,
|
|
31
|
+
} from "./format/index.js";
|
|
28
32
|
|
|
29
33
|
/**
|
|
30
34
|
* Encodes a node with the {@link EncodedNodeShape} shape.
|
|
@@ -32,7 +36,10 @@ import type { EncodedChunkShape, EncodedFieldShape, EncodedValueShape } from "./
|
|
|
32
36
|
* The fact this is also a Shape is an implementation detail of the encoder: that allows the shape it uses to be itself,
|
|
33
37
|
* which is an easy way to keep all the related code together without extra objects.
|
|
34
38
|
*/
|
|
35
|
-
export class NodeShapeBasedEncoder
|
|
39
|
+
export class NodeShapeBasedEncoder
|
|
40
|
+
extends Shape<EncodedChunkShapeV1OrV2>
|
|
41
|
+
implements NodeEncoder
|
|
42
|
+
{
|
|
36
43
|
/**
|
|
37
44
|
* Set of keys for fields that are encoded using {@link NodeShapeBasedEncoder.specializedFieldEncoders}.
|
|
38
45
|
* TODO: Ensure uniform chunks, encoding and identifier generation sort fields the same.
|
|
@@ -80,7 +87,7 @@ export class NodeShapeBasedEncoder extends Shape<EncodedChunkShape> implements N
|
|
|
80
87
|
public encodeNode(
|
|
81
88
|
cursor: ITreeCursorSynchronous,
|
|
82
89
|
context: EncoderContext,
|
|
83
|
-
outputBuffer: BufferFormat<
|
|
90
|
+
outputBuffer: BufferFormat<EncodedChunkShapeV1OrV2>,
|
|
84
91
|
): void {
|
|
85
92
|
if (this.type === undefined) {
|
|
86
93
|
outputBuffer.push(new IdentifierToken(cursor.type));
|
|
@@ -94,7 +101,7 @@ export class NodeShapeBasedEncoder extends Shape<EncodedChunkShape> implements N
|
|
|
94
101
|
cursor.exitField();
|
|
95
102
|
}
|
|
96
103
|
|
|
97
|
-
const otherFieldsBuffer: BufferFormat<
|
|
104
|
+
const otherFieldsBuffer: BufferFormat<EncodedChunkShapeV1OrV2> = [];
|
|
98
105
|
|
|
99
106
|
forEachField(cursor, () => {
|
|
100
107
|
const key = cursor.getFieldKey();
|
|
@@ -115,8 +122,8 @@ export class NodeShapeBasedEncoder extends Shape<EncodedChunkShape> implements N
|
|
|
115
122
|
|
|
116
123
|
public encodeShape(
|
|
117
124
|
identifiers: DeduplicationTable<string>,
|
|
118
|
-
shapes: DeduplicationTable<Shape<
|
|
119
|
-
):
|
|
125
|
+
shapes: DeduplicationTable<Shape<EncodedChunkShapeV1OrV2>>,
|
|
126
|
+
): EncodedChunkShapeV1OrV2 {
|
|
120
127
|
return {
|
|
121
128
|
c: {
|
|
122
129
|
type: encodeOptionalIdentifier(this.type, identifiers),
|
|
@@ -129,7 +136,7 @@ export class NodeShapeBasedEncoder extends Shape<EncodedChunkShape> implements N
|
|
|
129
136
|
|
|
130
137
|
public countReferencedShapesAndIdentifiers(
|
|
131
138
|
identifiers: Counter<string>,
|
|
132
|
-
shapeDiscovered: (shape: Shape<
|
|
139
|
+
shapeDiscovered: (shape: Shape<EncodedChunkShapeV1OrV2>) => void,
|
|
133
140
|
): void {
|
|
134
141
|
if (this.type !== undefined) {
|
|
135
142
|
identifiers.add(this.type);
|
|
@@ -145,7 +152,7 @@ export class NodeShapeBasedEncoder extends Shape<EncodedChunkShape> implements N
|
|
|
145
152
|
}
|
|
146
153
|
}
|
|
147
154
|
|
|
148
|
-
public get shape(): Shape<
|
|
155
|
+
public get shape(): Shape<EncodedChunkShapeV1OrV2> {
|
|
149
156
|
return this;
|
|
150
157
|
}
|
|
151
158
|
}
|
|
@@ -153,7 +160,7 @@ export class NodeShapeBasedEncoder extends Shape<EncodedChunkShape> implements N
|
|
|
153
160
|
export function encodeFieldShapes(
|
|
154
161
|
fieldEncoders: readonly KeyedFieldEncoder[],
|
|
155
162
|
identifiers: DeduplicationTable<string>,
|
|
156
|
-
shapes: DeduplicationTable<Shape<
|
|
163
|
+
shapes: DeduplicationTable<Shape<EncodedChunkShapeV1OrV2>>,
|
|
157
164
|
): EncodedFieldShape[] | undefined {
|
|
158
165
|
if (fieldEncoders.length === 0) {
|
|
159
166
|
return undefined;
|
|
@@ -182,14 +189,14 @@ function encodeOptionalIdentifier(
|
|
|
182
189
|
|
|
183
190
|
function encodeOptionalFieldShape(
|
|
184
191
|
encoder: FieldEncoder | undefined,
|
|
185
|
-
shapes: DeduplicationTable<Shape<
|
|
192
|
+
shapes: DeduplicationTable<Shape<EncodedChunkShapeV1OrV2>>,
|
|
186
193
|
): number | undefined {
|
|
187
194
|
return encoder === undefined ? undefined : dedupShape(encoder.shape, shapes);
|
|
188
195
|
}
|
|
189
196
|
|
|
190
197
|
function dedupShape(
|
|
191
|
-
shape: Shape<
|
|
192
|
-
shapes: DeduplicationTable<Shape<
|
|
198
|
+
shape: Shape<EncodedChunkShapeV1OrV2>,
|
|
199
|
+
shapes: DeduplicationTable<Shape<EncodedChunkShapeV1OrV2>>,
|
|
193
200
|
): number {
|
|
194
201
|
return shapes.valueToIndex.get(shape) ?? fail(0xb51 /* missing shape */);
|
|
195
202
|
}
|