@fluidframework/tree 2.118.0 → 3.0.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 +367 -75
- package/README.md +55 -52
- package/{api-extractor.json → api-extractor/api-extractor-model.json} +1 -1
- package/api-report/tree.alpha.api.md +130 -145
- package/api-report/tree.beta.api.md +122 -91
- package/api-report/tree.legacy.beta.api.md +122 -91
- package/api-report/tree.legacy.public.api.md +26 -43
- package/api-report/tree.public.api.md +26 -43
- package/dist/api.d.ts +9 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +2 -3
- package/dist/api.js.map +1 -1
- package/dist/codec/codec.d.ts +2 -2
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +9 -7
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/discriminatedUnions.js +1 -0
- package/dist/codec/discriminatedUnions.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +4 -2
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/componentApi.d.ts.map +1 -1
- package/dist/componentApi.js +20 -17
- package/dist/componentApi.js.map +1 -1
- package/dist/core/change-family/editBuilder.js +1 -0
- package/dist/core/change-family/editBuilder.js.map +1 -1
- package/dist/core/forest/editableForest.js +1 -2
- package/dist/core/forest/editableForest.js.map +1 -1
- package/dist/core/forest/forest.js +3 -3
- package/dist/core/forest/forest.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +9 -5
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.js +5 -5
- package/dist/core/rebase/changeRebaser.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +2 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/revisionTagCodec.d.ts +1 -1
- package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
- package/dist/core/rebase/revisionTagCodec.js +3 -1
- package/dist/core/rebase/revisionTagCodec.js.map +1 -1
- package/dist/core/rebase/types.d.ts +12 -1
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +19 -15
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/rebase/utils.js +9 -10
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/schema-stored/schema.js +9 -4
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js +6 -4
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +1 -1
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +62 -55
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/chunk.js +2 -2
- package/dist/core/tree/chunk.js.map +1 -1
- package/dist/core/tree/cursor.js +12 -12
- package/dist/core/tree/cursor.js.map +1 -1
- package/dist/core/tree/deltaUtil.d.ts +34 -9
- package/dist/core/tree/deltaUtil.d.ts.map +1 -1
- package/dist/core/tree/deltaUtil.js +51 -17
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +23 -21
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +10 -10
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.js +1 -2
- package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
- package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js +3 -2
- package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +3 -3
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/dist/core/tree/index.d.ts +1 -1
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +7 -4
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/mapTree.js +1 -2
- package/dist/core/tree/mapTree.js.map +1 -1
- package/dist/core/tree/pathTree.js +7 -8
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.d.ts +4 -4
- package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/sparseTree.js +17 -13
- package/dist/core/tree/sparseTree.js.map +1 -1
- package/dist/core/tree/treeTextFormat.js +4 -5
- package/dist/core/tree/treeTextFormat.js.map +1 -1
- package/dist/core/tree/types.js +3 -3
- package/dist/core/tree/types.js.map +1 -1
- package/dist/core/tree/visitDelta.js +1 -2
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitorUtils.js +5 -6
- 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 +6 -4
- package/dist/entrypoints/alpha.js.map +1 -1
- package/dist/entrypoints/beta.d.ts +1 -1
- package/dist/entrypoints/beta.d.ts.map +1 -1
- package/dist/entrypoints/beta.js +2 -2
- 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 +2 -2
- package/dist/entrypoints/legacy.js.map +1 -1
- package/dist/entrypoints/public.d.ts +1 -1
- package/dist/entrypoints/public.d.ts.map +1 -1
- package/dist/entrypoints/public.js +1 -2
- package/dist/entrypoints/public.js.map +1 -1
- package/dist/extensibleUnionNode.d.ts.map +1 -1
- package/dist/extensibleUnionNode.js +1 -1
- package/dist/extensibleUnionNode.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.js +3 -4
- package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.js +1 -2
- package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +14 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +28 -20
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +22 -16
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +9 -11
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +15 -7
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +7 -3
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +3 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -0
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +33 -17
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/versions.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +11 -2
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +5 -6
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -3
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js +1 -0
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +73 -15
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/comparison-forest/comparisonForest.js +79 -79
- package/dist/feature-libraries/comparison-forest/comparisonForest.js.map +1 -1
- package/dist/feature-libraries/cursorComparator.d.ts +8 -0
- package/dist/feature-libraries/cursorComparator.d.ts.map +1 -1
- package/dist/feature-libraries/cursorComparator.js +43 -10
- package/dist/feature-libraries/cursorComparator.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +2 -2
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js +2 -0
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/dist/feature-libraries/deltaUtils.js +2 -3
- package/dist/feature-libraries/deltaUtils.js.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +2 -0
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.js +1 -2
- package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +19 -3
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js +2 -2
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.js +14 -14
- package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +28 -30
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +24 -23
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.js +2 -2
- package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.js +5 -5
- package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +122 -117
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +49 -32
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.js +2 -3
- package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.js +35 -31
- package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +6 -7
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.js +2 -3
- package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +6 -7
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +4 -4
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -12
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +63 -10
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +3 -3
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.js +10 -0
- package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/filterEdits.d.ts +13 -0
- package/dist/feature-libraries/modular-schema/filterEdits.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/filterEdits.js +51 -0
- package/dist/feature-libraries/modular-schema/filterEdits.js.map +1 -0
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +7 -4
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +1 -2
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js +1 -2
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/invert.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/invert.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/invert.js +5 -30
- package/dist/feature-libraries/modular-schema/invert.js.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.js +4 -5
- package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +5 -7
- package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/minimizeModularChange.js +459 -10
- package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +14 -15
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -2
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -10
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +30 -97
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +9 -9
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +4 -4
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js +1 -2
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts +13 -1
- package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeUtils.js +115 -12
- package/dist/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -1
- package/dist/feature-libraries/modular-schema/prune.d.ts +2 -3
- package/dist/feature-libraries/modular-schema/prune.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/prune.js +25 -8
- package/dist/feature-libraries/modular-schema/prune.js.map +1 -1
- package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +1 -3
- package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
- package/dist/feature-libraries/node-identifier/nodeIdentifier.js +2 -2
- package/dist/feature-libraries/node-identifier/nodeIdentifier.js.map +1 -1
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js +3 -3
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +274 -267
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +27 -35
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +7 -7
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +8 -8
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +1 -2
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -2
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +3 -0
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/feature-libraries/schemaChecker.js +5 -5
- package/dist/feature-libraries/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +8 -2
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/filterEdits.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/filterEdits.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/filterEdits.js +29 -11
- package/dist/feature-libraries/sequence-field/filterEdits.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV1.d.ts +102 -102
- package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.d.ts +79 -79
- package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV3.d.ts +56 -56
- package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +1 -2
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markListFactory.js +3 -4
- package/dist/feature-libraries/sequence-field/markListFactory.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.js +4 -2
- package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js +9 -9
- package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/dist/feature-libraries/sequence-field/prune.js +1 -2
- package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.js +7 -2
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +1 -2
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.js +1 -2
- package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +2 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +9 -9
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +54 -67
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.js +19 -15
- package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
- package/dist/feature-libraries/treeTextCursor.js +8 -8
- package/dist/feature-libraries/treeTextCursor.js.map +1 -1
- package/dist/feature-libraries/valueUtilities.js +4 -5
- package/dist/feature-libraries/valueUtilities.js.map +1 -1
- package/dist/index.d.ts +4 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -9
- package/dist/index.js.map +1 -1
- package/dist/internalTypes.d.ts +1 -1
- package/dist/internalTypes.d.ts.map +1 -1
- package/dist/internalTypes.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/serializableDomainSchema.d.ts +1 -1
- package/dist/shared-tree/history.d.ts.map +1 -1
- package/dist/shared-tree/history.js +32 -13
- package/dist/shared-tree/history.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts +27 -3
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +36 -7
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +2 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +6 -2
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/isAuditableFromOutcome.js +1 -2
- package/dist/shared-tree/isAuditableFromOutcome.js.map +1 -1
- package/dist/shared-tree/schematizeTree.js +3 -4
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +2 -2
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +59 -26
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +28 -19
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +3 -3
- 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 +12 -4
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +11 -8
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.js +2 -3
- package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +2 -0
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/transactionMinimize.d.ts.map +1 -1
- package/dist/shared-tree/transactionMinimize.js +2 -1
- package/dist/shared-tree/transactionMinimize.js.map +1 -1
- package/dist/shared-tree/transactionPostProcessor.js +2 -3
- package/dist/shared-tree/transactionPostProcessor.js.map +1 -1
- package/dist/shared-tree/tree.js +2 -2
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +5 -16
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +18 -11
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/{lib/simple-tree/api → dist/shared-tree}/treeBeta.d.ts +8 -65
- package/dist/shared-tree/treeBeta.d.ts.map +1 -0
- package/dist/shared-tree/treeBeta.js +70 -0
- package/dist/shared-tree/treeBeta.js.map +1 -0
- package/dist/shared-tree/treeCheckout.d.ts +5 -0
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +986 -907
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/unhydratedTreeContext.js +3 -4
- package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +24 -20
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/branchCommitCounter.js +35 -32
- package/dist/shared-tree-core/branchCommitCounter.js.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.js +9 -8
- package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/dist/shared-tree-core/branchIdCodec.js +2 -3
- package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
- package/dist/shared-tree-core/customMetadataCodec.js +2 -3
- package/dist/shared-tree-core/customMetadataCodec.js.map +1 -1
- package/dist/shared-tree-core/customMetadataFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js +11 -9
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +73 -44
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +3 -3
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +33 -36
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -2
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -2
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +11 -11
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +5 -4
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +10 -9
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +6 -1
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -2
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +1 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +3 -3
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +3 -2
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +44 -22
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/summaryTypes.js +2 -2
- package/dist/shared-tree-core/summaryTypes.js.map +1 -1
- package/dist/shared-tree-core/transaction.js +36 -39
- package/dist/shared-tree-core/transaction.js.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.js +4 -0
- package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
- package/dist/simple-tree/api/cloneTree.d.ts +11 -0
- package/dist/simple-tree/api/cloneTree.d.ts.map +1 -0
- package/dist/simple-tree/api/cloneTree.js +31 -0
- package/dist/simple-tree/api/cloneTree.js.map +1 -0
- package/dist/simple-tree/api/conciseTree.js +2 -3
- package/dist/simple-tree/api/conciseTree.js.map +1 -1
- package/dist/simple-tree/api/configuration.js +21 -2
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/create.js +2 -3
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/customTree.js +6 -6
- package/dist/simple-tree/api/customTree.js.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.js +1 -2
- package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.js +2 -3
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/eraseSchemaDetails.js +2 -3
- package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.js +1 -2
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.js +1 -2
- package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/dist/simple-tree/api/identifierIndex.js +1 -2
- package/dist/simple-tree/api/identifierIndex.js.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +2 -2
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +3 -3
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +4 -7
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +2 -3
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +3 -7
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +6 -9
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +4 -9
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +13 -12
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +20 -22
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +78 -81
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +7 -9
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js +32 -35
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js +1 -2
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +1 -2
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +7 -7
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +2 -3
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -3
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js +1 -2
- package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +46 -2
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +54 -12
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +2 -3
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/transactionTypes.d.ts +4 -4
- package/dist/simple-tree/api/transactionTypes.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +80 -61
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js +3 -5
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/treeChangeEvents.d.ts +16 -4
- 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/treeChangeEventsBeta.d.ts +209 -0
- package/dist/simple-tree/api/treeChangeEventsBeta.d.ts.map +1 -0
- package/dist/simple-tree/api/{treeAlpha.js → treeChangeEventsBeta.js} +1 -1
- package/dist/simple-tree/api/treeChangeEventsBeta.js.map +1 -0
- package/dist/simple-tree/api/treeNodeApi.d.ts +1 -75
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +7 -7
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +8 -6
- 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/api/verboseTree.js +5 -6
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js +22 -13
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/context.js +3 -0
- package/dist/simple-tree/core/context.js.map +1 -1
- package/dist/simple-tree/core/flexList.js +2 -3
- package/dist/simple-tree/core/flexList.js.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.js +2 -3
- package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +1 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +2 -2
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts +3 -4
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +31 -32
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +194 -192
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js +3 -3
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.js +23 -23
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/core/types.js +1 -2
- package/dist/simple-tree/core/types.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +177 -150
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/core/walkSchema.js +2 -3
- package/dist/simple-tree/core/walkSchema.js.map +1 -1
- package/dist/simple-tree/core/withType.d.ts +7 -9
- package/dist/simple-tree/core/withType.d.ts.map +1 -1
- package/dist/simple-tree/core/withType.js +6 -7
- package/dist/simple-tree/core/withType.js.map +1 -1
- package/dist/simple-tree/createContext.js +2 -3
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +33 -15
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/getTreeNodeForField.js +1 -2
- package/dist/simple-tree/getTreeNodeForField.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +5 -8
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +18 -17
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +3 -2
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +31 -33
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js +2 -2
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/common.js +1 -2
- package/dist/simple-tree/node-kinds/common.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts +6 -6
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +10 -16
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.js +2 -2
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +27 -28
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.js +2 -2
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +10 -13
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -2
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.js +2 -2
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +4 -5
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +11 -11
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/treeSchema.js +1 -2
- package/dist/simple-tree/treeSchema.js.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +3 -4
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/simple-tree/walkFieldSchema.js +1 -2
- package/dist/simple-tree/walkFieldSchema.js.map +1 -1
- package/dist/tableSchema.d.ts +2 -87
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +309 -275
- package/dist/tableSchema.js.map +1 -1
- package/dist/text/codePointUtils.d.ts +16 -3
- package/dist/text/codePointUtils.d.ts.map +1 -1
- package/dist/text/codePointUtils.js +24 -13
- package/dist/text/codePointUtils.js.map +1 -1
- package/dist/text/textDomain.d.ts +7 -1
- package/dist/text/textDomain.d.ts.map +1 -1
- package/dist/text/textDomain.js +32 -28
- package/dist/text/textDomain.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts.map +1 -1
- package/dist/text/textDomainFormatted.js +45 -34
- package/dist/text/textDomainFormatted.js.map +1 -1
- package/dist/text/textDomainFormattedDefault.js +2 -5
- package/dist/text/textDomainFormattedDefault.js.map +1 -1
- package/dist/treeDataStore.js +2 -3
- package/dist/treeDataStore.js.map +1 -1
- package/dist/treeFactory.js +7 -7
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/arrayUtilities.js +5 -6
- package/dist/util/arrayUtilities.js.map +1 -1
- package/dist/util/bTreeUtils.js +3 -4
- package/dist/util/bTreeUtils.js.map +1 -1
- package/dist/util/brand.js +6 -5
- package/dist/util/brand.js.map +1 -1
- package/dist/util/brandedMap.js +2 -3
- package/dist/util/brandedMap.js.map +1 -1
- package/dist/util/breakable.d.ts.map +1 -1
- package/dist/util/breakable.js +7 -4
- package/dist/util/breakable.js.map +1 -1
- package/dist/util/cloneWithReplacements.js +1 -2
- package/dist/util/cloneWithReplacements.js.map +1 -1
- package/dist/util/compressedIds.js +29 -7
- package/dist/util/compressedIds.js.map +1 -1
- package/dist/util/idAllocator.js +3 -3
- package/dist/util/idAllocator.js.map +1 -1
- package/dist/util/nestedMap.js +15 -17
- package/dist/util/nestedMap.js.map +1 -1
- package/dist/util/nestedSet.js +2 -3
- package/dist/util/nestedSet.js.map +1 -1
- package/dist/util/offsetList.js +2 -4
- package/dist/util/offsetList.js.map +1 -1
- package/dist/util/opaque.js +2 -3
- package/dist/util/opaque.js.map +1 -1
- package/dist/util/rangeMap.js +6 -2
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/readSnapshotBlob.d.ts.map +1 -1
- package/dist/util/referenceCounting.js +1 -0
- package/dist/util/referenceCounting.js.map +1 -1
- package/dist/util/stackyIterator.js +3 -2
- package/dist/util/stackyIterator.js.map +1 -1
- package/dist/util/typeUtils.js +1 -2
- package/dist/util/typeUtils.js.map +1 -1
- package/dist/util/typeboxBrand.js +2 -3
- package/dist/util/typeboxBrand.js.map +1 -1
- package/dist/util/utils.d.ts +2 -2
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +32 -32
- package/dist/util/utils.js.map +1 -1
- package/lib/api.d.ts +9 -1
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js.map +1 -1
- package/lib/codec/codec.d.ts +2 -2
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +2 -0
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/discriminatedUnions.js +1 -0
- package/lib/codec/discriminatedUnions.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +2 -0
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/componentApi.d.ts.map +1 -1
- package/lib/componentApi.js +20 -17
- package/lib/componentApi.js.map +1 -1
- package/lib/core/change-family/editBuilder.js +1 -0
- package/lib/core/change-family/editBuilder.js.map +1 -1
- package/lib/core/index.d.ts +2 -2
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -2
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/revisionTagCodec.js +3 -1
- package/lib/core/rebase/revisionTagCodec.js.map +1 -1
- package/lib/core/rebase/types.d.ts +12 -1
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +3 -0
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/schema.js +5 -0
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js +4 -2
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/tree/anchorSet.js +61 -54
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/deltaUtil.d.ts +34 -9
- package/lib/core/tree/deltaUtil.d.ts.map +1 -1
- package/lib/core/tree/deltaUtil.js +41 -10
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +23 -21
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +10 -10
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js +2 -0
- package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -0
- package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +3 -3
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/lib/core/tree/index.d.ts +1 -1
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.d.ts +4 -4
- package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/sparseTree.js +15 -11
- package/lib/core/tree/sparseTree.js.map +1 -1
- package/lib/entrypoints/alpha.d.ts +1 -1
- package/lib/entrypoints/alpha.d.ts.map +1 -1
- package/lib/entrypoints/alpha.js +1 -1
- package/lib/entrypoints/alpha.js.map +1 -1
- package/lib/entrypoints/beta.d.ts +1 -1
- package/lib/entrypoints/beta.d.ts.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.d.ts +1 -1
- package/lib/entrypoints/public.d.ts.map +1 -1
- package/lib/entrypoints/public.js +1 -1
- package/lib/entrypoints/public.js.map +1 -1
- package/lib/extensibleUnionNode.d.ts.map +1 -1
- package/lib/extensibleUnionNode.js +2 -2
- package/lib/extensibleUnionNode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +14 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +14 -6
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +18 -12
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +1 -3
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +8 -0
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +4 -0
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +1 -0
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +2 -0
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +28 -12
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +9 -0
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.js +1 -0
- package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +71 -13
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/comparison-forest/comparisonForest.js +79 -79
- package/lib/feature-libraries/comparison-forest/comparisonForest.js.map +1 -1
- package/lib/feature-libraries/cursorComparator.d.ts +8 -0
- package/lib/feature-libraries/cursorComparator.d.ts.map +1 -1
- package/lib/feature-libraries/cursorComparator.js +43 -9
- package/lib/feature-libraries/cursorComparator.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js +2 -0
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +2 -0
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +19 -3
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.js +12 -12
- package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +25 -27
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +22 -21
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +122 -117
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +49 -32
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.js +33 -29
- package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -12
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +63 -10
- 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/fieldKind.js +10 -0
- package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/filterEdits.d.ts +13 -0
- package/lib/feature-libraries/modular-schema/filterEdits.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/filterEdits.js +46 -0
- package/lib/feature-libraries/modular-schema/filterEdits.js.map +1 -0
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +5 -2
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/invert.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/invert.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/invert.js +6 -30
- package/lib/feature-libraries/modular-schema/invert.js.map +1 -1
- package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +5 -7
- package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/minimizeModularChange.js +458 -8
- package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -10
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +20 -85
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts +13 -1
- package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeUtils.js +100 -3
- package/lib/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -1
- package/lib/feature-libraries/modular-schema/prune.d.ts +2 -3
- package/lib/feature-libraries/modular-schema/prune.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/prune.js +25 -7
- package/lib/feature-libraries/modular-schema/prune.js.map +1 -1
- package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +1 -3
- package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js +1 -0
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +273 -266
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +24 -32
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +3 -0
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +6 -0
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/filterEdits.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/filterEdits.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/filterEdits.js +31 -12
- package/lib/feature-libraries/sequence-field/filterEdits.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV1.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/markListFactory.js +3 -4
- package/lib/feature-libraries/sequence-field/markListFactory.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js +4 -2
- package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.js +6 -0
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +9 -9
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +3 -15
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.js +13 -9
- package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
- package/lib/index.d.ts +4 -29
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -17
- package/lib/index.js.map +1 -1
- package/lib/internalTypes.d.ts +1 -1
- package/lib/internalTypes.d.ts.map +1 -1
- package/lib/internalTypes.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/serializableDomainSchema.d.ts +1 -1
- package/lib/shared-tree/history.d.ts.map +1 -1
- package/lib/shared-tree/history.js +32 -13
- package/lib/shared-tree/history.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts +27 -3
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +30 -2
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +2 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +2 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +2 -2
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +60 -27
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +24 -15
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +12 -4
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +6 -3
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +2 -0
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/transactionMinimize.d.ts.map +1 -1
- package/lib/shared-tree/transactionMinimize.js +4 -3
- package/lib/shared-tree/transactionMinimize.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +5 -16
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +13 -6
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/{dist/simple-tree/api → lib/shared-tree}/treeBeta.d.ts +8 -65
- package/lib/shared-tree/treeBeta.d.ts.map +1 -0
- package/lib/shared-tree/treeBeta.js +64 -0
- package/lib/shared-tree/treeBeta.js.map +1 -0
- package/lib/shared-tree/treeCheckout.d.ts +5 -0
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +985 -906
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/unhydratedTreeContext.js +3 -4
- package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +22 -18
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/branchCommitCounter.js +35 -32
- package/lib/shared-tree-core/branchCommitCounter.js.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.js +9 -8
- package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/lib/shared-tree-core/customMetadataFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js +11 -9
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +73 -44
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +32 -34
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +4 -4
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +2 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +6 -1
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +2 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +45 -23
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/transaction.js +36 -39
- package/lib/shared-tree-core/transaction.js.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.js +4 -0
- package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
- package/lib/simple-tree/api/cloneTree.d.ts +11 -0
- package/lib/simple-tree/api/cloneTree.d.ts.map +1 -0
- package/lib/simple-tree/api/cloneTree.js +28 -0
- package/lib/simple-tree/api/cloneTree.js.map +1 -0
- package/lib/simple-tree/api/configuration.js +19 -0
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +3 -3
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +3 -7
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +1 -3
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +4 -9
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +9 -8
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +18 -20
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +78 -81
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +7 -9
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js +32 -35
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +7 -7
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +46 -2
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +48 -6
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/transactionTypes.d.ts +4 -4
- package/lib/simple-tree/api/transactionTypes.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +80 -61
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js +2 -3
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/treeChangeEvents.d.ts +16 -4
- 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/treeChangeEventsBeta.d.ts +209 -0
- package/lib/simple-tree/api/treeChangeEventsBeta.d.ts.map +1 -0
- package/lib/simple-tree/api/{treeAlpha.js → treeChangeEventsBeta.js} +1 -1
- package/lib/simple-tree/api/treeChangeEventsBeta.js.map +1 -0
- package/lib/simple-tree/api/treeNodeApi.d.ts +1 -75
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +1 -1
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +8 -6
- 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/allowedTypes.js +12 -3
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/context.js +3 -0
- package/lib/simple-tree/core/context.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +1 -1
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -1
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts +3 -4
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +29 -30
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +181 -179
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.js +19 -19
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +173 -146
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/core/withType.d.ts +7 -9
- package/lib/simple-tree/core/withType.d.ts.map +1 -1
- package/lib/simple-tree/core/withType.js +5 -6
- package/lib/simple-tree/core/withType.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +23 -5
- 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 +2 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +16 -15
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +3 -2
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +28 -32
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts +6 -6
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +10 -17
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +25 -28
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +10 -14
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -2
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/lib/tableSchema.d.ts +2 -87
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +309 -275
- package/lib/tableSchema.js.map +1 -1
- package/lib/text/codePointUtils.d.ts +16 -3
- package/lib/text/codePointUtils.d.ts.map +1 -1
- package/lib/text/codePointUtils.js +22 -10
- package/lib/text/codePointUtils.js.map +1 -1
- package/lib/text/textDomain.d.ts +7 -1
- package/lib/text/textDomain.d.ts.map +1 -1
- package/lib/text/textDomain.js +21 -17
- package/lib/text/textDomain.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts.map +1 -1
- package/lib/text/textDomainFormatted.js +43 -32
- package/lib/text/textDomainFormatted.js.map +1 -1
- package/lib/text/textDomainFormattedDefault.js +2 -5
- package/lib/text/textDomainFormattedDefault.js.map +1 -1
- package/lib/util/brand.js +1 -0
- package/lib/util/brand.js.map +1 -1
- package/lib/util/breakable.d.ts.map +1 -1
- package/lib/util/breakable.js +3 -0
- package/lib/util/breakable.js.map +1 -1
- package/lib/util/compressedIds.js +22 -0
- package/lib/util/compressedIds.js.map +1 -1
- package/lib/util/nestedMap.js +2 -4
- package/lib/util/nestedMap.js.map +1 -1
- package/lib/util/offsetList.js +2 -4
- package/lib/util/offsetList.js.map +1 -1
- package/lib/util/rangeMap.js +4 -0
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/readSnapshotBlob.d.ts.map +1 -1
- package/lib/util/referenceCounting.js +1 -0
- package/lib/util/referenceCounting.js.map +1 -1
- package/lib/util/stackyIterator.js +3 -2
- package/lib/util/stackyIterator.js.map +1 -1
- package/lib/util/utils.d.ts +2 -2
- package/lib/util/utils.d.ts.map +1 -1
- package/package.json +67 -95
- package/src/api.ts +11 -0
- package/src/core/index.ts +6 -2
- package/src/core/rebase/index.ts +1 -0
- package/src/core/rebase/types.ts +16 -1
- package/src/core/tree/anchorSet.ts +2 -2
- package/src/core/tree/deltaUtil.ts +67 -13
- package/src/core/tree/index.ts +5 -2
- package/src/entrypoints/alpha.ts +19 -21
- package/src/entrypoints/beta.ts +12 -5
- package/src/entrypoints/legacy.ts +12 -5
- package/src/entrypoints/public.ts +1 -5
- package/src/extensibleUnionNode.ts +1 -2
- package/src/feature-libraries/cursorComparator.ts +57 -9
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +77 -12
- package/src/feature-libraries/modular-schema/filterEdits.ts +108 -0
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +7 -4
- package/src/feature-libraries/modular-schema/index.ts +5 -2
- package/src/feature-libraries/modular-schema/invert.ts +16 -61
- package/src/feature-libraries/modular-schema/minimizeModularChange.ts +831 -10
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +10 -124
- package/src/feature-libraries/modular-schema/modularChangeUtils.ts +164 -2
- package/src/feature-libraries/modular-schema/prune.ts +52 -10
- package/src/feature-libraries/optional-field/optionalField.ts +30 -42
- package/src/feature-libraries/sequence-field/filterEdits.ts +62 -26
- package/src/feature-libraries/sequence-field/utils.ts +7 -19
- package/src/index.ts +7 -39
- package/src/internalTypes.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/history.ts +41 -19
- package/src/shared-tree/independentView.ts +40 -3
- package/src/shared-tree/index.ts +5 -1
- package/src/shared-tree/schematizingTreeView.ts +2 -2
- package/src/shared-tree/sharedTree.ts +2 -1
- package/src/shared-tree/transactionMinimize.ts +13 -4
- package/src/shared-tree/treeAlpha.ts +17 -31
- package/src/{simple-tree/api → shared-tree}/treeBeta.ts +56 -167
- package/src/shared-tree/treeCheckout.ts +82 -9
- package/src/shared-tree-core/editManager.ts +16 -8
- package/src/shared-tree-core/editManagerCodecsCommons.ts +30 -34
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
- package/src/simple-tree/api/cloneTree.ts +47 -0
- package/src/simple-tree/api/index.ts +15 -21
- package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +87 -6
- package/src/simple-tree/api/transactionTypes.ts +4 -4
- package/src/simple-tree/api/tree.ts +139 -85
- package/src/simple-tree/api/treeChangeEvents.ts +16 -4
- package/src/simple-tree/api/treeChangeEventsBeta.ts +245 -0
- package/src/simple-tree/api/treeNodeApi.ts +6 -85
- package/src/simple-tree/api/typesUnsafe.ts +8 -6
- package/src/simple-tree/core/index.ts +1 -1
- package/src/simple-tree/core/treeNode.ts +3 -10
- package/src/simple-tree/core/withType.ts +8 -11
- package/src/simple-tree/index.ts +3 -7
- package/src/simple-tree/node-kinds/array/arrayNode.ts +14 -12
- package/src/simple-tree/node-kinds/map/mapNode.ts +14 -15
- package/src/simple-tree/node-kinds/object/objectNode.ts +3 -6
- package/src/simple-tree/node-kinds/record/recordNode.ts +6 -8
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +2 -1
- package/src/tableSchema.ts +8 -187
- package/src/text/codePointUtils.ts +25 -14
- package/src/text/textDomain.ts +15 -2
- package/src/text/textDomainFormatted.ts +9 -4
- package/tsconfig.json +1 -1
- package/alpha.d.ts +0 -11
- package/beta.d.ts +0 -11
- package/dist/simple-tree/api/treeAlpha.d.ts +0 -126
- package/dist/simple-tree/api/treeAlpha.d.ts.map +0 -1
- package/dist/simple-tree/api/treeAlpha.js.map +0 -1
- package/dist/simple-tree/api/treeBeta.d.ts.map +0 -1
- package/dist/simple-tree/api/treeBeta.js +0 -83
- package/dist/simple-tree/api/treeBeta.js.map +0 -1
- package/docs/main/glossary.md +0 -163
- package/internal.d.ts +0 -11
- package/legacy.d.ts +0 -11
- package/lib/simple-tree/api/treeAlpha.d.ts +0 -126
- package/lib/simple-tree/api/treeAlpha.d.ts.map +0 -1
- package/lib/simple-tree/api/treeAlpha.js.map +0 -1
- package/lib/simple-tree/api/treeBeta.d.ts.map +0 -1
- package/lib/simple-tree/api/treeBeta.js +0 -77
- package/lib/simple-tree/api/treeBeta.js.map +0 -1
- package/src/simple-tree/api/treeAlpha.ts +0 -153
- /package/api-extractor/{api-extractor.current.json → api-extractor-report.current.json} +0 -0
- /package/api-extractor/{api-extractor.legacy.json → api-extractor-report.legacy.json} +0 -0
|
@@ -62,7 +62,7 @@ import type { VerboseTree } from "./verboseTree.js";
|
|
|
62
62
|
* Add exportSimpleSchema and exportJsonSchema methods (which should exactly match the concise format, and match the free functions for exporting view schema).
|
|
63
63
|
* Maybe rename "exportJsonSchema" to align on "concise" terminology.
|
|
64
64
|
* Ensure schema exporting APIs here align and reference APIs for exporting view schema to the same formats (which should include stored vs property key choice).
|
|
65
|
-
* Make sure users of
|
|
65
|
+
* Make sure users of createIndependentTreeViewAlpha can use these export APIs (maybe provide a reference back to the ViewableTree from the TreeView to accomplish that).
|
|
66
66
|
* @system @sealed @public
|
|
67
67
|
*/
|
|
68
68
|
export interface ViewableTree {
|
|
@@ -160,7 +160,92 @@ export interface ITreeAlpha extends ITree {
|
|
|
160
160
|
* See {@link UntypedTreeViewAlpha} for additional APIs that are in an earlier stage of development.
|
|
161
161
|
* @sealed @beta
|
|
162
162
|
*/
|
|
163
|
-
export interface UntypedTreeView extends IDisposable {
|
|
163
|
+
export interface UntypedTreeView extends IDisposable, TreeContextBeta {
|
|
164
|
+
runTransaction<TValue>(
|
|
165
|
+
transaction: () => WithValue<TValue>,
|
|
166
|
+
params?: RunTransactionParamsBeta,
|
|
167
|
+
): TransactionValueResult<TValue, TValue>;
|
|
168
|
+
|
|
169
|
+
runTransaction(
|
|
170
|
+
transaction: () => void,
|
|
171
|
+
params?: RunTransactionParamsBeta,
|
|
172
|
+
): TransactionVoidResult;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
|
|
176
|
+
*
|
|
177
|
+
* @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatusBeta | value or rollback signal}.
|
|
178
|
+
* It may optionally return a {@link WithValue | value }, which will be returned by the `runTransaction` call.
|
|
179
|
+
*
|
|
180
|
+
* @param params - Optional {@link RunTransactionParamsBeta | parameters} for the transaction.
|
|
181
|
+
*
|
|
182
|
+
* @returns A {@link TransactionValueResult | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
|
|
183
|
+
*
|
|
184
|
+
* @remarks
|
|
185
|
+
* All of the changes in the transaction are applied synchronously and therefore no other changes from a remote client can be interleaved with those changes.
|
|
186
|
+
* Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.
|
|
187
|
+
*
|
|
188
|
+
* {@link (TreeBeta:interface).on | Change events } will be emitted for changed nodes on this client _as each edit happens_, just as they would be if the changes were made outside of a transaction.
|
|
189
|
+
* Any other/future clients or contexts will process the transaction "squashed", i.e. they will apply its changes all at once, emitting only a single event per node (even if that node was edited multiple times in the transaction).
|
|
190
|
+
* Edits to the tree are not permitted within these event callbacks, therefore no other local changes from this client will be interleaved with the changes in this transaction.
|
|
191
|
+
*
|
|
192
|
+
* Using a transaction has the following additional consequences:
|
|
193
|
+
*
|
|
194
|
+
* - If {@link Revertible | reverted } (e.g. via an "undo" operation), all the changes in the transaction are reverted together.
|
|
195
|
+
* Only the "outermost" transaction commits a change to the synchronized tree state and therefore only the outermost transaction can be reverted.
|
|
196
|
+
* If a transaction is started and completed while another transaction is already in progress, then the inner transaction will be reverted together with the outer transaction.
|
|
197
|
+
* - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.
|
|
198
|
+
*
|
|
199
|
+
* If the transaction is rolled back, a corresponding {@link TreeBranchEvents.changed | `changed`} event will also be emitted for the rollback.
|
|
200
|
+
*/
|
|
201
|
+
runTransaction<
|
|
202
|
+
TOut extends
|
|
203
|
+
| TransactionCallbackStatusBeta<unknown, unknown>
|
|
204
|
+
| VoidTransactionCallbackStatusBeta
|
|
205
|
+
| void,
|
|
206
|
+
>(
|
|
207
|
+
transaction: () => TOut,
|
|
208
|
+
params?: RunTransactionParamsBeta,
|
|
209
|
+
): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue>
|
|
210
|
+
? TransactionValueResult<TSuccessValue, TFailureValue>
|
|
211
|
+
: TransactionVoidResult;
|
|
212
|
+
|
|
213
|
+
runTransactionAsync<TValue>(
|
|
214
|
+
transaction: () => Promise<WithValue<TValue>>,
|
|
215
|
+
params?: RunTransactionParamsBeta,
|
|
216
|
+
): Promise<TransactionValueResult<TValue, TValue>>;
|
|
217
|
+
|
|
218
|
+
runTransactionAsync(
|
|
219
|
+
transaction: () => Promise<void>,
|
|
220
|
+
params?: RunTransactionParamsBeta,
|
|
221
|
+
): Promise<TransactionVoidResult>;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* An asynchronous version of {@link UntypedTreeView.(runTransaction:1) | runTransaction}.
|
|
225
|
+
*
|
|
226
|
+
* @remarks
|
|
227
|
+
* As with synchronous transactions, all of the changes in an asynchronous transaction are treated as a unit.
|
|
228
|
+
* Therefore, no other changes (either from this client or from a remote client) can be interleaved with the transaction changes.
|
|
229
|
+
*
|
|
230
|
+
* Unlike with synchronous transactions, it is possible that other changes (e.g. from a remote client) may be applied to the branch while this transaction is in progress.
|
|
231
|
+
* Those other changes will be not be reflected on the branch until after this transaction completes, at which point the transaction changes will be applied after those other changes.
|
|
232
|
+
*
|
|
233
|
+
* An asynchronous transaction may not be started while any other transaction is in progress in this view.
|
|
234
|
+
*/
|
|
235
|
+
runTransactionAsync<
|
|
236
|
+
TOut extends
|
|
237
|
+
| TransactionCallbackStatusBeta<unknown, unknown>
|
|
238
|
+
| VoidTransactionCallbackStatusBeta
|
|
239
|
+
| void,
|
|
240
|
+
>(
|
|
241
|
+
transaction: () => Promise<TOut>,
|
|
242
|
+
params?: RunTransactionParamsBeta,
|
|
243
|
+
): Promise<
|
|
244
|
+
TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue>
|
|
245
|
+
? TransactionValueResult<TSuccessValue, TFailureValue>
|
|
246
|
+
: TransactionVoidResult
|
|
247
|
+
>;
|
|
248
|
+
|
|
164
249
|
/**
|
|
165
250
|
* Fork a new branch off of this branch which is based off of this branch's current state.
|
|
166
251
|
* @remarks Any changes to the tree on the new view will not apply to this view until the new view is e.g. {@link UntypedTreeView.merge | merged} back into this view.
|
|
@@ -213,15 +298,15 @@ export interface UntypedTreeView extends IDisposable {
|
|
|
213
298
|
export type TreeBranch = UntypedTreeView;
|
|
214
299
|
|
|
215
300
|
/**
|
|
216
|
-
* Provides additional APIs that may be used to interact with a tree node
|
|
217
|
-
* @
|
|
301
|
+
* Provides additional APIs that may be used to interact with a tree node.
|
|
302
|
+
* @sealed @beta
|
|
218
303
|
*/
|
|
219
|
-
export interface
|
|
304
|
+
export interface TreeContextBeta {
|
|
220
305
|
/**
|
|
221
306
|
* Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
|
|
222
307
|
* @param transaction - A callback run during the transaction to perform user-supplied operations.
|
|
223
308
|
* It may optionally return a {@link WithValue | value }, which will be returned by the `runTransaction` call.
|
|
224
|
-
* @param params - Optional {@link
|
|
309
|
+
* @param params - Optional {@link RunTransactionParamsBeta | parameters} for the transaction.
|
|
225
310
|
* @returns A {@link TransactionValueResult | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
|
|
226
311
|
* @remarks
|
|
227
312
|
* All of the changes in the transaction are applied synchronously and therefore no other changes from a remote client can be interleaved with those changes.
|
|
@@ -239,15 +324,15 @@ export interface TreeContextAlpha {
|
|
|
239
324
|
* - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.
|
|
240
325
|
*
|
|
241
326
|
* `runTransaction` may be invoked on the context of a {@link TreeStatus.InDocument | hydrated } or {@link Unhydrated | unhydrated } node.
|
|
242
|
-
* Use {@link
|
|
327
|
+
* Use {@link TreeContextBeta.isView | isView()} to check whether this context is associated with a view and gain {@link UntypedTreeView.(runTransaction:1) | access to more transaction capabilities} if so.
|
|
243
328
|
*/
|
|
244
329
|
runTransaction<TValue>(
|
|
245
330
|
transaction: () => WithValue<TValue>,
|
|
246
|
-
params?:
|
|
331
|
+
params?: RunTransactionParamsBeta,
|
|
247
332
|
): TransactionValueResult<TValue, TValue>;
|
|
248
333
|
|
|
249
334
|
/**
|
|
250
|
-
* An overload of {@link
|
|
335
|
+
* An overload of {@link TreeContextBeta.(runTransaction:1) | runTransaction } which does not return a value.
|
|
251
336
|
*
|
|
252
337
|
* @privateRemarks
|
|
253
338
|
* TODO: Consider updating these methods to avoid the need for overloads.
|
|
@@ -255,11 +340,11 @@ export interface TreeContextAlpha {
|
|
|
255
340
|
*/
|
|
256
341
|
runTransaction(
|
|
257
342
|
transaction: () => void,
|
|
258
|
-
params?:
|
|
343
|
+
params?: RunTransactionParamsBeta,
|
|
259
344
|
): TransactionVoidResult;
|
|
260
345
|
|
|
261
346
|
/**
|
|
262
|
-
* An asynchronous version of {@link
|
|
347
|
+
* An asynchronous version of {@link TreeContextBeta.(runTransaction:1) | runTransaction}.
|
|
263
348
|
* @remarks
|
|
264
349
|
* As with synchronous transactions, all of the changes in an asynchronous transaction are treated as a unit.
|
|
265
350
|
* Therefore, no other changes (either from this client or from a remote client) can be interleaved with the transaction changes.
|
|
@@ -271,16 +356,49 @@ export interface TreeContextAlpha {
|
|
|
271
356
|
*/
|
|
272
357
|
runTransactionAsync<TValue>(
|
|
273
358
|
transaction: () => Promise<WithValue<TValue>>,
|
|
274
|
-
params?:
|
|
359
|
+
params?: RunTransactionParamsBeta,
|
|
275
360
|
): Promise<TransactionValueResult<TValue, TValue>>;
|
|
276
361
|
|
|
277
362
|
/**
|
|
278
|
-
* An overload of {@link
|
|
363
|
+
* An overload of {@link TreeContextBeta.(runTransactionAsync:1) | runTransactionAsync } which does not return a value.
|
|
279
364
|
*
|
|
280
365
|
* @privateRemarks
|
|
281
366
|
* TODO: Consider updating these methods to avoid the need for overloads.
|
|
282
367
|
* See {@link TreeViewBeta.runTransactionAsync} for an example of how to do this.
|
|
283
368
|
*/
|
|
369
|
+
runTransactionAsync(
|
|
370
|
+
transaction: () => Promise<void>,
|
|
371
|
+
params?: RunTransactionParamsBeta,
|
|
372
|
+
): Promise<TransactionVoidResult>;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* True if this context is associated with an {@link UntypedTreeView | untyped view} and false if it is associated with an {@link Unhydrated | unhydrated } node.
|
|
376
|
+
* @remarks If this returns true, the context can be safely inferred or cast to {@link UntypedTreeView} to access additional view-specific APIs.
|
|
377
|
+
* @returns Whether this context is associated with an untyped view.
|
|
378
|
+
*/
|
|
379
|
+
isView(): this is UntypedTreeView;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Provides additional APIs that may be used to interact with a tree node or a tree node's SharedTree.
|
|
384
|
+
* @sealed @alpha
|
|
385
|
+
*/
|
|
386
|
+
export interface TreeContextAlpha extends TreeContextBeta {
|
|
387
|
+
runTransaction<TValue>(
|
|
388
|
+
transaction: () => WithValue<TValue>,
|
|
389
|
+
params?: RunTransactionParamsAlpha,
|
|
390
|
+
): TransactionValueResult<TValue, TValue>;
|
|
391
|
+
|
|
392
|
+
runTransaction(
|
|
393
|
+
transaction: () => void,
|
|
394
|
+
params?: RunTransactionParamsAlpha,
|
|
395
|
+
): TransactionVoidResult;
|
|
396
|
+
|
|
397
|
+
runTransactionAsync<TValue>(
|
|
398
|
+
transaction: () => Promise<WithValue<TValue>>,
|
|
399
|
+
params?: RunTransactionParamsAlpha,
|
|
400
|
+
): Promise<TransactionValueResult<TValue, TValue>>;
|
|
401
|
+
|
|
284
402
|
runTransactionAsync(
|
|
285
403
|
transaction: () => Promise<void>,
|
|
286
404
|
params?: RunTransactionParamsAlpha,
|
|
@@ -385,12 +503,14 @@ export interface TreeBranchHistory {
|
|
|
385
503
|
/**
|
|
386
504
|
* An untyped view of a {@link UntypedTreeView} with alpha-level APIs.
|
|
387
505
|
* @remarks
|
|
388
|
-
* The untyped view for a specific {@link TreeNode} may be acquired by calling
|
|
506
|
+
* The untyped view for a specific {@link TreeNode} may be acquired by calling {@link (TreeAlpha:interface).context} and checking {@link TreeContextAlpha.isView | isView()}.
|
|
389
507
|
*
|
|
390
508
|
* An untyped view does not necessarily know the schema of its SharedTree. To convert it to a {@link TreeViewAlpha | view with a schema}, use {@link UntypedTreeViewAlpha.hasRootSchema | hasRootSchema()}.
|
|
391
509
|
* @sealed @alpha
|
|
392
510
|
*/
|
|
393
|
-
export interface UntypedTreeViewAlpha
|
|
511
|
+
export interface UntypedTreeViewAlpha
|
|
512
|
+
extends Omit<UntypedTreeView, "runTransaction" | "runTransactionAsync" | "isView">,
|
|
513
|
+
TreeContextAlpha {
|
|
394
514
|
/**
|
|
395
515
|
* Events for the view's underlying branch.
|
|
396
516
|
*/
|
|
@@ -560,7 +680,7 @@ export type TreeBranchAlpha = UntypedTreeViewAlpha;
|
|
|
560
680
|
* Thus this design was chosen at the risk of apps blindly accessing `root` then breaking unexpectedly when the document is incompatible.
|
|
561
681
|
*
|
|
562
682
|
* @see {@link TreeViewAlpha}
|
|
563
|
-
* @see {@link
|
|
683
|
+
* @see {@link (asAlpha:1)}
|
|
564
684
|
*
|
|
565
685
|
* @sealed @public
|
|
566
686
|
*/
|
|
@@ -848,71 +968,6 @@ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema>
|
|
|
848
968
|
|
|
849
969
|
// Override the base branch method to return a typed view rather than merely a branch.
|
|
850
970
|
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
* Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
|
|
854
|
-
*
|
|
855
|
-
* @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatusBeta | value or rollback signal}.
|
|
856
|
-
* It may optionally return a {@link WithValue | value }, which will be returned by the `runTransaction` call.
|
|
857
|
-
*
|
|
858
|
-
* @param params - Optional {@link RunTransactionParamsBeta | parameters} for the transaction.
|
|
859
|
-
*
|
|
860
|
-
* @returns A {@link TransactionValueResult | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
|
|
861
|
-
*
|
|
862
|
-
* @remarks
|
|
863
|
-
* All of the changes in the transaction are applied synchronously and therefore no other changes from a remote client can be interleaved with those changes.
|
|
864
|
-
* Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.
|
|
865
|
-
*
|
|
866
|
-
* {@link (TreeBeta:interface).on | Change events } will be emitted for changed nodes on this client _as each edit happens_, just as they would be if the changes were made outside of a transaction.
|
|
867
|
-
* Any other/future clients or contexts will process the transaction "squashed", i.e. they will apply its changes all at once, emitting only a single event per node (even if that node was edited multiple times in the transaction).
|
|
868
|
-
* Edits to the tree are not permitted within these event callbacks, therefore no other local changes from this client will be interleaved with the changes in this transaction.
|
|
869
|
-
*
|
|
870
|
-
* Using a transaction has the following additional consequences:
|
|
871
|
-
*
|
|
872
|
-
* - If {@link Revertible | reverted } (e.g. via an "undo" operation), all the changes in the transaction are reverted together.
|
|
873
|
-
* Only the "outermost" transaction commits a change to the synchronized tree state and therefore only the outermost transaction can be reverted.
|
|
874
|
-
* If a transaction is started and completed while another transaction is already in progress, then the inner transaction will be reverted together with the outer transaction.
|
|
875
|
-
* - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.
|
|
876
|
-
*
|
|
877
|
-
* If the transaction is rolled back, a corresponding {@link TreeBranchEvents.changed | `changed`} event will also be emitted for the rollback.
|
|
878
|
-
*/
|
|
879
|
-
runTransaction<
|
|
880
|
-
TOut extends
|
|
881
|
-
| TransactionCallbackStatusBeta<unknown, unknown>
|
|
882
|
-
| VoidTransactionCallbackStatusBeta
|
|
883
|
-
| void,
|
|
884
|
-
>(
|
|
885
|
-
transaction: () => TOut,
|
|
886
|
-
params?: RunTransactionParamsBeta,
|
|
887
|
-
): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue>
|
|
888
|
-
? TransactionValueResult<TSuccessValue, TFailureValue>
|
|
889
|
-
: TransactionVoidResult;
|
|
890
|
-
|
|
891
|
-
/**
|
|
892
|
-
* An asynchronous version of {@link TreeViewBeta.runTransaction | runTransaction}.
|
|
893
|
-
*
|
|
894
|
-
* @remarks
|
|
895
|
-
* As with synchronous transactions, all of the changes in an asynchronous transaction are treated as a unit.
|
|
896
|
-
* Therefore, no other changes (either from this client or from a remote client) can be interleaved with the transaction changes.
|
|
897
|
-
*
|
|
898
|
-
* Unlike with synchronous transactions, it is possible that other changes (e.g. from a remote client) may be applied to the branch while this transaction is in progress.
|
|
899
|
-
* Those other changes will be not be reflected on the branch until after this transaction completes, at which point the transaction changes will be applied after those other changes.
|
|
900
|
-
*
|
|
901
|
-
* An asynchronous transaction may not be started while any other transaction is in progress in this view.
|
|
902
|
-
*/
|
|
903
|
-
runTransactionAsync<
|
|
904
|
-
TOut extends
|
|
905
|
-
| TransactionCallbackStatusBeta<unknown, unknown>
|
|
906
|
-
| VoidTransactionCallbackStatusBeta
|
|
907
|
-
| void,
|
|
908
|
-
>(
|
|
909
|
-
transaction: () => Promise<TOut>,
|
|
910
|
-
params?: RunTransactionParamsBeta,
|
|
911
|
-
): Promise<
|
|
912
|
-
TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue>
|
|
913
|
-
? TransactionValueResult<TSuccessValue, TFailureValue>
|
|
914
|
-
: TransactionVoidResult
|
|
915
|
-
>;
|
|
916
971
|
}
|
|
917
972
|
|
|
918
973
|
/**
|
|
@@ -923,7 +978,7 @@ export interface TreeViewAlpha<
|
|
|
923
978
|
in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema,
|
|
924
979
|
> extends Omit<
|
|
925
980
|
TreeViewBeta<ReadSchema<TSchema>>,
|
|
926
|
-
"root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync"
|
|
981
|
+
"root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync" | "isView"
|
|
927
982
|
>,
|
|
928
983
|
UntypedTreeViewAlpha {
|
|
929
984
|
get root(): ReadableField<TSchema>;
|
|
@@ -1123,9 +1178,8 @@ export interface TreeViewEvents {
|
|
|
1123
1178
|
|
|
1124
1179
|
/**
|
|
1125
1180
|
* Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.
|
|
1126
|
-
* @
|
|
1127
|
-
*
|
|
1128
|
-
* @privateRemarks Despite being deprecated, this function should be used within the tree package (outside of tests) rather than `asAlpha` in order to avoid circular import dependencies.
|
|
1181
|
+
* @remarks
|
|
1182
|
+
* This function can be used within the tree package (outside of tests) rather than {@link asAlpha} in order to avoid circular import dependencies.
|
|
1129
1183
|
*/
|
|
1130
1184
|
export function asTreeViewAlpha<TSchema extends ImplicitFieldSchema>(
|
|
1131
1185
|
view: TreeView<TSchema>,
|
|
@@ -40,10 +40,14 @@ export interface TreeChangeEvents {
|
|
|
40
40
|
*
|
|
41
41
|
* - Map nodes define a change as when an entry is added, updated, or removed.
|
|
42
42
|
*
|
|
43
|
-
* @param unstable - Future versions of this API (such as the one in beta on
|
|
44
|
-
*
|
|
43
|
+
* @param unstable - Future versions of this API (such as the one in beta on {@link TreeChangeEventsBeta.nodeChanged})
|
|
44
|
+
* may use this argument to provide additional data to the event.
|
|
45
|
+
* Users of this event should ensure that they do not provide a listener callback which has an optional parameter
|
|
46
|
+
* in this position, since unexpected data might get provided to it.
|
|
45
47
|
* This parameter exists to capture this fact in the type system.
|
|
46
|
-
*
|
|
48
|
+
*
|
|
49
|
+
* Using an inline lambda expression as the listener callback is a good pattern to avoid cases like this where
|
|
50
|
+
* arguments are added from breaking due to optional arguments.
|
|
47
51
|
*
|
|
48
52
|
* @remarks
|
|
49
53
|
* This event is not emitted when:
|
|
@@ -91,6 +95,14 @@ export interface TreeChangeEvents {
|
|
|
91
95
|
* the client that made the original edit.
|
|
92
96
|
*
|
|
93
97
|
* When it is emitted, the tree is guaranteed to be in-schema.
|
|
98
|
+
*
|
|
99
|
+
* @param unstable - Future versions of this API may use this argument to provide additional data to the event.
|
|
100
|
+
* Users of this event should ensure that they do not provide a listener callback which has an optional parameter
|
|
101
|
+
* in this position, since unexpected data might get provided to it.
|
|
102
|
+
* This parameter exists to capture this fact in the type system.
|
|
103
|
+
*
|
|
104
|
+
* Using an inline lambda expression as the listener callback is a good pattern to avoid cases like this where
|
|
105
|
+
* arguments are added from breaking due to optional arguments.
|
|
94
106
|
*/
|
|
95
|
-
treeChanged(): void;
|
|
107
|
+
treeChanged(unstable?: unknown): void;
|
|
96
108
|
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { NodeKind, TreeNode, WithType } from "../core/index.js";
|
|
7
|
+
|
|
8
|
+
import type { TreeChangeEvents } from "./treeChangeEvents.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A `"retain"` op in an {@link ArrayNodeDeltaOp} sequence.
|
|
12
|
+
* Represents elements that were neither inserted into nor removed from the array.
|
|
13
|
+
* @sealed @beta
|
|
14
|
+
*/
|
|
15
|
+
export interface ArrayNodeRetainOp {
|
|
16
|
+
readonly type: "retain";
|
|
17
|
+
readonly count: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A `"retain"` op in an {@link ArrayNodeTreeChangedDeltaOp} sequence, used in
|
|
22
|
+
* {@link NodeChangedDataTreeDelta} payloads delivered to
|
|
23
|
+
* {@link TreeChangeEventsBeta.treeChanged} on array nodes.
|
|
24
|
+
*
|
|
25
|
+
* Extends {@link ArrayNodeRetainOp} with a {@link ArrayNodeTreeChangedRetainOp.subtreeChanged}
|
|
26
|
+
* flag that indicates whether any descendant of the retained element changed.
|
|
27
|
+
* @sealed @beta
|
|
28
|
+
*/
|
|
29
|
+
export interface ArrayNodeTreeChangedRetainOp extends ArrayNodeRetainOp {
|
|
30
|
+
/**
|
|
31
|
+
* Whether any descendant of this retained element changed.
|
|
32
|
+
* `true` if the element's subtree changed; `false` if nothing changed within it.
|
|
33
|
+
* @remarks
|
|
34
|
+
* Subscribe to `nodeChanged` or `treeChanged` on the element node itself for details.
|
|
35
|
+
*/
|
|
36
|
+
readonly subtreeChanged: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A single operation in an array-node delta delivered by {@link TreeChangeEventsBeta.treeChanged}.
|
|
41
|
+
* Extends {@link ArrayNodeDeltaOp}: retain ops carry a {@link ArrayNodeTreeChangedRetainOp.subtreeChanged}
|
|
42
|
+
* flag indicating whether any descendant of the retained element changed.
|
|
43
|
+
* @beta
|
|
44
|
+
*/
|
|
45
|
+
export type ArrayNodeTreeChangedDeltaOp =
|
|
46
|
+
| ArrayNodeTreeChangedRetainOp
|
|
47
|
+
| ArrayNodeInsertOp
|
|
48
|
+
| ArrayNodeRemoveOp;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* An `"insert"` op in an {@link ArrayNodeDeltaOp} sequence.
|
|
52
|
+
* Represents elements added to the array.
|
|
53
|
+
* Read the new element values from the current tree at the positions described by this op.
|
|
54
|
+
* @sealed @beta
|
|
55
|
+
*/
|
|
56
|
+
export interface ArrayNodeInsertOp {
|
|
57
|
+
readonly type: "insert";
|
|
58
|
+
readonly count: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* A `"remove"` op in an {@link ArrayNodeDeltaOp} sequence.
|
|
63
|
+
* Represents elements removed from the array.
|
|
64
|
+
* @sealed @beta
|
|
65
|
+
*/
|
|
66
|
+
export interface ArrayNodeRemoveOp {
|
|
67
|
+
readonly type: "remove";
|
|
68
|
+
readonly count: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* A single operation in an array node change delta. Used to efficiently sync an external
|
|
73
|
+
* representation of an array (e.g. a text editor or virtual list) with tree changes without
|
|
74
|
+
* needing to snapshot the old state or diff the entire array. Each op describes a contiguous run
|
|
75
|
+
* of positions in the array before the change. For inserts, read the new element values from the
|
|
76
|
+
* current tree at those positions.
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* There is no dedicated `"move"` op. Moves are represented as `"remove"` + `"insert"`.
|
|
80
|
+
* When an element is moved within the same array it appears
|
|
81
|
+
* as a `"remove"` at the source position followed by an `"insert"` at the destination position.
|
|
82
|
+
* When an element is moved across two different arrays, the source array's delta contains a
|
|
83
|
+
* `"remove"` and the destination array's delta contains an `"insert"` — they cannot be
|
|
84
|
+
* correlated without additional bookkeeping on the caller's side.
|
|
85
|
+
*
|
|
86
|
+
* The operations cover the complete array: trailing elements that were not changed are included
|
|
87
|
+
* in a final `"retain"` op. Applying every operation therefore consumes the entire pre-edit array
|
|
88
|
+
* and produces the entire post-edit array.
|
|
89
|
+
*
|
|
90
|
+
* @sealed @beta
|
|
91
|
+
*/
|
|
92
|
+
export type ArrayNodeDeltaOp = ArrayNodeRetainOp | ArrayNodeInsertOp | ArrayNodeRemoveOp;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Data included for {@link TreeChangeEventsBeta.nodeChanged}.
|
|
96
|
+
* @sealed @beta
|
|
97
|
+
*/
|
|
98
|
+
export interface NodeChangedData<TNode extends TreeNode = TreeNode> {
|
|
99
|
+
/**
|
|
100
|
+
* When the changed node is an object, map, or record node, this lists all the properties which changed.
|
|
101
|
+
* @remarks
|
|
102
|
+
* This only includes changes to the node itself (which would trigger {@link TreeChangeEvents.nodeChanged}).
|
|
103
|
+
*
|
|
104
|
+
* Not present when the {@link NodeKind} does not support this feature (currently just array nodes).
|
|
105
|
+
*
|
|
106
|
+
* When defined, the set should never be empty, since `nodeChanged` will only be triggered when there is a change, and for the supported node types, the only things that can change are properties.
|
|
107
|
+
*/
|
|
108
|
+
readonly changedProperties?: ReadonlySet<
|
|
109
|
+
// For Object nodes, strongly type with the property names from the schema:
|
|
110
|
+
TNode extends WithType<string, NodeKind.Object, infer TInfo>
|
|
111
|
+
? string & keyof TInfo
|
|
112
|
+
: string
|
|
113
|
+
>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* When the changed node is an array node, the sequential operations describing what changed.
|
|
117
|
+
* @remarks
|
|
118
|
+
* Not present for non-array nodes. When present, the value may be `undefined` when the
|
|
119
|
+
* document was updated in a way that required multiple internal change passes in a single
|
|
120
|
+
* operation (for example, a data change combined with a schema upgrade).
|
|
121
|
+
*/
|
|
122
|
+
readonly delta?: readonly ArrayNodeDeltaOp[] | undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Data included for {@link TreeChangeEventsBeta.nodeChanged} when the node is an object, map, or record node.
|
|
127
|
+
* @sealed @beta
|
|
128
|
+
*/
|
|
129
|
+
export interface NodeChangedDataProperties<TNode extends TreeNode = TreeNode>
|
|
130
|
+
extends NodeChangedData<TNode> {
|
|
131
|
+
/**
|
|
132
|
+
* Lists all the properties which changed on the node.
|
|
133
|
+
*/
|
|
134
|
+
readonly changedProperties: ReadonlySet<
|
|
135
|
+
TNode extends WithType<string, NodeKind.Object, infer TInfo>
|
|
136
|
+
? string & keyof TInfo
|
|
137
|
+
: string
|
|
138
|
+
>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Data carried by the {@link TreeChangeEventsBeta.nodeChanged} event for array nodes.
|
|
143
|
+
* @sealed @beta
|
|
144
|
+
*/
|
|
145
|
+
export interface NodeChangedDataDelta extends NodeChangedData {
|
|
146
|
+
/**
|
|
147
|
+
* The sequential operations describing what changed in the array node.
|
|
148
|
+
* @remarks
|
|
149
|
+
* The value may be `undefined` when the document was updated in a way that required multiple
|
|
150
|
+
* internal change passes in a single operation (for example, a data change combined with a
|
|
151
|
+
* schema upgrade).
|
|
152
|
+
*
|
|
153
|
+
* See {@link ArrayNodeDeltaOp} for op semantics.
|
|
154
|
+
*/
|
|
155
|
+
readonly delta: readonly ArrayNodeDeltaOp[] | undefined;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Data carried by the {@link TreeChangeEventsBeta.treeChanged} event for array nodes.
|
|
160
|
+
* @remarks
|
|
161
|
+
* Extends {@link NodeChangedDataDelta}: the retain ops in the delta additionally carry a
|
|
162
|
+
* {@link ArrayNodeTreeChangedRetainOp.subtreeChanged} flag indicating whether any descendant
|
|
163
|
+
* of the retained element changed.
|
|
164
|
+
* @sealed @beta
|
|
165
|
+
*/
|
|
166
|
+
export interface NodeChangedDataTreeDelta {
|
|
167
|
+
/**
|
|
168
|
+
* The sequential operations describing what changed in the array node,
|
|
169
|
+
* including subtree-change information on retain ops.
|
|
170
|
+
* @remarks
|
|
171
|
+
* The value may be `undefined` when the document was updated in a way that required multiple
|
|
172
|
+
* internal change passes in a single operation (for example, a data change combined with a
|
|
173
|
+
* schema upgrade).
|
|
174
|
+
*
|
|
175
|
+
* See {@link ArrayNodeTreeChangedDeltaOp} for op semantics.
|
|
176
|
+
*/
|
|
177
|
+
readonly delta: readonly ArrayNodeTreeChangedDeltaOp[] | undefined;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Extensions to {@link TreeChangeEvents} which are not yet stable.
|
|
182
|
+
*
|
|
183
|
+
* @sealed @beta
|
|
184
|
+
*/
|
|
185
|
+
export interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode>
|
|
186
|
+
extends Omit<TreeChangeEvents, "nodeChanged" | "treeChanged"> {
|
|
187
|
+
/**
|
|
188
|
+
* Emitted by a node after a batch of changes has been applied to the tree, if any of the changes affected the node.
|
|
189
|
+
*
|
|
190
|
+
* - Object nodes define a change as being when the value of one of its properties changes (i.e., the property's value is set, including when set to `undefined`).
|
|
191
|
+
*
|
|
192
|
+
* - Array nodes define a change as when an element is added, removed, moved or replaced.
|
|
193
|
+
*
|
|
194
|
+
* - Map nodes define a change as when an entry is added, updated, or removed.
|
|
195
|
+
*
|
|
196
|
+
* @remarks
|
|
197
|
+
* This event is not emitted when:
|
|
198
|
+
*
|
|
199
|
+
* - Properties of a child node change. Notably, updates to an array node or a map node (like adding or removing
|
|
200
|
+
* elements/entries) will emit this event on the array/map node itself, but not on the node that contains the
|
|
201
|
+
* array/map node as one of its properties.
|
|
202
|
+
*
|
|
203
|
+
* - The node is moved to a different location in the tree or removed from the tree.
|
|
204
|
+
* In this case the event is emitted on the _parent_ node, not the node itself.
|
|
205
|
+
*
|
|
206
|
+
* For remote edits, this event is not guaranteed to occur in the same order or quantity that it did in
|
|
207
|
+
* the client that made the original edit.
|
|
208
|
+
*
|
|
209
|
+
* When the event is emitted, the tree is guaranteed to be in-schema.
|
|
210
|
+
*
|
|
211
|
+
* @privateRemarks
|
|
212
|
+
* This event occurs whenever the apparent contents of the node instance change, regardless of what caused the change.
|
|
213
|
+
* For example, it will fire when the local client reassigns a child, when part of a remote edit is applied to the
|
|
214
|
+
* node, or when the node has to be updated due to resolution of a merge conflict
|
|
215
|
+
* (for example a previously applied local change might be undone, then reapplied differently or not at all).
|
|
216
|
+
*
|
|
217
|
+
* TODO: define and document event ordering (ex: bottom up, with nodeChanged before treeChange on each level).
|
|
218
|
+
*
|
|
219
|
+
* This defines a property which is a function instead of using the method syntax to avoid function bi-variance issues with the input data to the callback.
|
|
220
|
+
*/
|
|
221
|
+
nodeChanged: (
|
|
222
|
+
data: TNode extends WithType<string, NodeKind.Array>
|
|
223
|
+
? NodeChangedDataDelta
|
|
224
|
+
: TNode extends WithType<string, NodeKind.Map | NodeKind.Object | NodeKind.Record>
|
|
225
|
+
? NodeChangedDataProperties<TNode>
|
|
226
|
+
: NodeChangedData<TNode>,
|
|
227
|
+
) => void;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Emitted when something in the subtree rooted at this node changes.
|
|
231
|
+
*
|
|
232
|
+
* @remarks
|
|
233
|
+
* For array nodes, the event data carries a {@link NodeChangedDataTreeDelta.delta | delta}
|
|
234
|
+
* payload describing both shallow and deep changes. Retain operations use
|
|
235
|
+
* {@link ArrayNodeTreeChangedRetainOp.subtreeChanged} to indicate whether an element's
|
|
236
|
+
* descendants changed.
|
|
237
|
+
*
|
|
238
|
+
* For non-array nodes, this has the same signature as {@link TreeChangeEvents.treeChanged}.
|
|
239
|
+
* @privateRemarks
|
|
240
|
+
* This defines a property which is a function instead of using the method syntax to avoid function bi-variance issues with the input data to the callback.
|
|
241
|
+
*/
|
|
242
|
+
treeChanged: TNode extends WithType<string, NodeKind.Array>
|
|
243
|
+
? (data: NodeChangedDataTreeDelta) => void
|
|
244
|
+
: TreeChangeEvents["treeChanged"];
|
|
245
|
+
}
|