@fluid-experimental/tree 0.58.2001 → 0.59.2000-61729
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/README.md +159 -46
- package/dist/ChangeCompression.d.ts +39 -0
- package/dist/ChangeCompression.d.ts.map +1 -0
- package/dist/ChangeCompression.js +117 -0
- package/dist/ChangeCompression.js.map +1 -0
- package/{lib/default-edits/PersistedTypes.d.ts → dist/ChangeTypes.d.ts} +58 -105
- package/dist/ChangeTypes.d.ts.map +1 -0
- package/dist/{default-edits/PersistedTypes.js → ChangeTypes.js} +21 -76
- package/dist/ChangeTypes.js.map +1 -0
- package/dist/Checkout.d.ts +39 -27
- package/dist/Checkout.d.ts.map +1 -1
- package/dist/Checkout.js +61 -32
- package/dist/Checkout.js.map +1 -1
- package/dist/Common.d.ts +175 -38
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js +240 -103
- package/dist/Common.js.map +1 -1
- package/dist/EagerCheckout.d.ts +24 -0
- package/dist/EagerCheckout.d.ts.map +1 -0
- package/dist/{BasicCheckout.js → EagerCheckout.js} +9 -6
- package/dist/EagerCheckout.js.map +1 -0
- package/dist/EditLog.d.ts +77 -63
- package/dist/EditLog.d.ts.map +1 -1
- package/dist/EditLog.js +85 -48
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.d.ts +168 -0
- package/dist/EditUtilities.d.ts.map +1 -0
- package/dist/EditUtilities.js +373 -0
- package/dist/EditUtilities.js.map +1 -0
- package/dist/EventTypes.d.ts +73 -0
- package/dist/EventTypes.d.ts.map +1 -0
- package/dist/EventTypes.js +78 -0
- package/dist/EventTypes.js.map +1 -0
- package/dist/Forest.d.ts +29 -7
- package/dist/Forest.d.ts.map +1 -1
- package/dist/Forest.js +60 -36
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.d.ts +20 -0
- package/dist/HistoryEditFactory.d.ts.map +1 -0
- package/dist/HistoryEditFactory.js +226 -0
- package/dist/HistoryEditFactory.js.map +1 -0
- package/dist/IdConversion.d.ts +12 -0
- package/dist/IdConversion.d.ts.map +1 -0
- package/dist/IdConversion.js +98 -0
- package/dist/IdConversion.js.map +1 -0
- package/dist/Identifiers.d.ts +89 -2
- package/dist/Identifiers.d.ts.map +1 -1
- package/dist/Identifiers.js +10 -0
- package/dist/Identifiers.js.map +1 -1
- package/dist/InitialTree.d.ts +2 -2
- package/dist/InitialTree.d.ts.map +1 -1
- package/dist/InitialTree.js +2 -1
- package/dist/InitialTree.js.map +1 -1
- package/dist/LazyCheckout.d.ts +28 -0
- package/dist/LazyCheckout.d.ts.map +1 -0
- package/dist/LazyCheckout.js +44 -0
- package/dist/LazyCheckout.js.map +1 -0
- package/dist/LogViewer.d.ts +129 -85
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +111 -85
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.d.ts +221 -0
- package/dist/MergeHealth.d.ts.map +1 -0
- package/dist/MergeHealth.js +263 -0
- package/dist/MergeHealth.js.map +1 -0
- package/dist/NodeIdUtilities.d.ts +105 -0
- package/dist/NodeIdUtilities.d.ts.map +1 -0
- package/dist/NodeIdUtilities.js +60 -0
- package/dist/NodeIdUtilities.js.map +1 -0
- package/dist/PayloadUtilities.d.ts +42 -0
- package/dist/PayloadUtilities.d.ts.map +1 -0
- package/dist/PayloadUtilities.js +114 -0
- package/dist/PayloadUtilities.js.map +1 -0
- package/dist/ReconciliationPath.d.ts +18 -13
- package/dist/ReconciliationPath.d.ts.map +1 -1
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.d.ts +11 -2
- package/dist/RevisionValueCache.d.ts.map +1 -1
- package/dist/RevisionValueCache.js +2 -3
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +83 -0
- package/dist/RevisionView.d.ts.map +1 -0
- package/dist/RevisionView.js +182 -0
- package/dist/RevisionView.js.map +1 -0
- package/dist/SerializationUtilities.d.ts +36 -0
- package/dist/SerializationUtilities.d.ts.map +1 -0
- package/dist/SerializationUtilities.js +102 -0
- package/dist/SerializationUtilities.js.map +1 -0
- package/dist/SharedTree.d.ts +439 -0
- package/dist/SharedTree.d.ts.map +1 -0
- package/dist/SharedTree.js +1109 -0
- package/dist/SharedTree.js.map +1 -0
- package/dist/SharedTreeEncoder.d.ts +102 -0
- package/dist/SharedTreeEncoder.d.ts.map +1 -0
- package/dist/SharedTreeEncoder.js +313 -0
- package/dist/SharedTreeEncoder.js.map +1 -0
- package/dist/StringInterner.d.ts +46 -0
- package/dist/StringInterner.d.ts.map +1 -0
- package/dist/StringInterner.js +61 -0
- package/dist/StringInterner.js.map +1 -0
- package/dist/Summary.d.ts +40 -0
- package/dist/Summary.d.ts.map +1 -0
- package/dist/Summary.js +23 -0
- package/dist/Summary.js.map +1 -0
- package/dist/SummaryBackCompatibility.d.ts +22 -22
- package/dist/SummaryBackCompatibility.d.ts.map +1 -1
- package/dist/SummaryBackCompatibility.js +30 -33
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/SummaryTestUtilities.d.ts +31 -0
- package/dist/SummaryTestUtilities.d.ts.map +1 -0
- package/dist/SummaryTestUtilities.js +37 -0
- package/dist/SummaryTestUtilities.js.map +1 -0
- package/dist/Transaction.d.ts +71 -0
- package/dist/Transaction.d.ts.map +1 -0
- package/dist/Transaction.js +92 -0
- package/dist/Transaction.js.map +1 -0
- package/dist/TransactionInternal.d.ts +540 -0
- package/dist/TransactionInternal.d.ts.map +1 -0
- package/dist/TransactionInternal.js +626 -0
- package/dist/TransactionInternal.js.map +1 -0
- package/dist/TreeCompressor.d.ts +36 -0
- package/dist/TreeCompressor.d.ts.map +1 -0
- package/dist/TreeCompressor.js +137 -0
- package/dist/TreeCompressor.js.map +1 -0
- package/dist/TreeNodeHandle.d.ts +12 -18
- package/dist/TreeNodeHandle.d.ts.map +1 -1
- package/dist/TreeNodeHandle.js +13 -23
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.d.ts +166 -0
- package/dist/TreeView.d.ts.map +1 -0
- package/dist/TreeView.js +218 -0
- package/dist/TreeView.js.map +1 -0
- package/dist/TreeViewUtilities.d.ts +21 -0
- package/dist/TreeViewUtilities.d.ts.map +1 -0
- package/dist/TreeViewUtilities.js +77 -0
- package/dist/TreeViewUtilities.js.map +1 -0
- package/dist/{default-edits/UndoRedoHandler.d.ts → UndoRedoHandler.d.ts} +2 -2
- package/dist/UndoRedoHandler.d.ts.map +1 -0
- package/dist/{default-edits/UndoRedoHandler.js → UndoRedoHandler.js} +5 -9
- package/dist/UndoRedoHandler.js.map +1 -0
- package/dist/id-compressor/AppendOnlySortedMap.d.ts +127 -0
- package/dist/id-compressor/AppendOnlySortedMap.d.ts.map +1 -0
- package/dist/id-compressor/AppendOnlySortedMap.js +283 -0
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -0
- package/dist/id-compressor/IdCompressor.d.ts +389 -0
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -0
- package/dist/id-compressor/IdCompressor.js +1353 -0
- package/dist/id-compressor/IdCompressor.js.map +1 -0
- package/dist/id-compressor/IdRange.d.ts +11 -0
- package/dist/id-compressor/IdRange.d.ts.map +1 -0
- package/dist/id-compressor/IdRange.js +29 -0
- package/dist/id-compressor/IdRange.js.map +1 -0
- package/dist/id-compressor/NumericUuid.d.ts +63 -0
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -0
- package/dist/id-compressor/NumericUuid.js +377 -0
- package/dist/id-compressor/NumericUuid.js.map +1 -0
- package/dist/id-compressor/index.d.ts +12 -0
- package/dist/id-compressor/index.d.ts.map +1 -0
- package/dist/id-compressor/index.js +26 -0
- package/dist/id-compressor/index.js.map +1 -0
- package/dist/id-compressor/persisted-types/0.0.1.d.ts +156 -0
- package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +1 -0
- package/dist/id-compressor/persisted-types/0.0.1.js +7 -0
- package/dist/id-compressor/persisted-types/0.0.1.js.map +1 -0
- package/dist/id-compressor/persisted-types/index.d.ts +6 -0
- package/dist/id-compressor/persisted-types/index.d.ts.map +1 -0
- package/dist/id-compressor/persisted-types/index.js +18 -0
- package/dist/id-compressor/persisted-types/index.js.map +1 -0
- package/dist/index.d.ts +29 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -35
- package/dist/index.js.map +1 -1
- package/dist/persisted-types/0.0.2.d.ts +385 -0
- package/dist/persisted-types/0.0.2.d.ts.map +1 -0
- package/dist/persisted-types/0.0.2.js +113 -0
- package/dist/persisted-types/0.0.2.js.map +1 -0
- package/dist/persisted-types/0.1.1.d.ts +314 -0
- package/dist/persisted-types/0.1.1.d.ts.map +1 -0
- package/dist/persisted-types/0.1.1.js +153 -0
- package/dist/persisted-types/0.1.1.js.map +1 -0
- package/dist/persisted-types/index.d.ts +7 -0
- package/dist/persisted-types/index.d.ts.map +1 -0
- package/dist/persisted-types/index.js +20 -0
- package/dist/persisted-types/index.js.map +1 -0
- package/docs/0-1-1-Compression.md +228 -0
- package/docs/Breaking-Change-Migration.md +52 -0
- package/docs/Compression.md +2 -2
- package/docs/Telemetry.md +43 -0
- package/docs/Write-Format.md +19 -0
- package/lib/ChangeCompression.d.ts +39 -0
- package/lib/ChangeCompression.d.ts.map +1 -0
- package/lib/ChangeCompression.js +111 -0
- package/lib/ChangeCompression.js.map +1 -0
- package/{dist/default-edits/PersistedTypes.d.ts → lib/ChangeTypes.d.ts} +58 -105
- package/lib/ChangeTypes.d.ts.map +1 -0
- package/lib/{default-edits/PersistedTypes.js → ChangeTypes.js} +15 -68
- package/lib/ChangeTypes.js.map +1 -0
- package/lib/Checkout.d.ts +39 -27
- package/lib/Checkout.d.ts.map +1 -1
- package/lib/Checkout.js +53 -24
- package/lib/Checkout.js.map +1 -1
- package/lib/Common.d.ts +175 -38
- package/lib/Common.d.ts.map +1 -1
- package/lib/Common.js +226 -101
- package/lib/Common.js.map +1 -1
- package/lib/EagerCheckout.d.ts +24 -0
- package/lib/EagerCheckout.d.ts.map +1 -0
- package/lib/{BasicCheckout.js → EagerCheckout.js} +7 -4
- package/lib/EagerCheckout.js.map +1 -0
- package/lib/EditLog.d.ts +77 -63
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +83 -47
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +168 -0
- package/lib/EditUtilities.d.ts.map +1 -0
- package/lib/EditUtilities.js +353 -0
- package/lib/EditUtilities.js.map +1 -0
- package/lib/EventTypes.d.ts +73 -0
- package/lib/EventTypes.d.ts.map +1 -0
- package/lib/EventTypes.js +75 -0
- package/lib/EventTypes.js.map +1 -0
- package/lib/Forest.d.ts +29 -7
- package/lib/Forest.d.ts.map +1 -1
- package/lib/Forest.js +58 -35
- package/lib/Forest.js.map +1 -1
- package/lib/HistoryEditFactory.d.ts +20 -0
- package/lib/HistoryEditFactory.d.ts.map +1 -0
- package/lib/{default-edits/HistoryEditFactory.js → HistoryEditFactory.js} +78 -39
- package/lib/HistoryEditFactory.js.map +1 -0
- package/lib/IdConversion.d.ts +12 -0
- package/lib/IdConversion.d.ts.map +1 -0
- package/lib/IdConversion.js +91 -0
- package/lib/IdConversion.js.map +1 -0
- package/lib/Identifiers.d.ts +89 -2
- package/lib/Identifiers.d.ts.map +1 -1
- package/lib/Identifiers.js +8 -1
- package/lib/Identifiers.js.map +1 -1
- package/lib/InitialTree.d.ts +2 -2
- package/lib/InitialTree.d.ts.map +1 -1
- package/lib/InitialTree.js +2 -1
- package/lib/InitialTree.js.map +1 -1
- package/lib/LazyCheckout.d.ts +28 -0
- package/lib/LazyCheckout.d.ts.map +1 -0
- package/lib/LazyCheckout.js +40 -0
- package/lib/LazyCheckout.js.map +1 -0
- package/lib/LogViewer.d.ts +129 -85
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +103 -77
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.d.ts +221 -0
- package/lib/MergeHealth.d.ts.map +1 -0
- package/lib/MergeHealth.js +258 -0
- package/lib/MergeHealth.js.map +1 -0
- package/lib/NodeIdUtilities.d.ts +105 -0
- package/lib/NodeIdUtilities.d.ts.map +1 -0
- package/lib/NodeIdUtilities.js +53 -0
- package/lib/NodeIdUtilities.js.map +1 -0
- package/lib/PayloadUtilities.d.ts +42 -0
- package/lib/PayloadUtilities.d.ts.map +1 -0
- package/lib/PayloadUtilities.js +110 -0
- package/lib/PayloadUtilities.js.map +1 -0
- package/lib/ReconciliationPath.d.ts +18 -13
- package/lib/ReconciliationPath.d.ts.map +1 -1
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.d.ts +11 -2
- package/lib/RevisionValueCache.d.ts.map +1 -1
- package/lib/RevisionValueCache.js +2 -3
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +83 -0
- package/lib/RevisionView.d.ts.map +1 -0
- package/lib/RevisionView.js +175 -0
- package/lib/RevisionView.js.map +1 -0
- package/lib/SerializationUtilities.d.ts +36 -0
- package/lib/SerializationUtilities.d.ts.map +1 -0
- package/lib/SerializationUtilities.js +95 -0
- package/lib/SerializationUtilities.js.map +1 -0
- package/lib/SharedTree.d.ts +439 -0
- package/lib/SharedTree.d.ts.map +1 -0
- package/lib/SharedTree.js +1104 -0
- package/lib/SharedTree.js.map +1 -0
- package/lib/SharedTreeEncoder.d.ts +102 -0
- package/lib/SharedTreeEncoder.d.ts.map +1 -0
- package/lib/SharedTreeEncoder.js +308 -0
- package/lib/SharedTreeEncoder.js.map +1 -0
- package/lib/StringInterner.d.ts +46 -0
- package/lib/StringInterner.d.ts.map +1 -0
- package/lib/StringInterner.js +57 -0
- package/lib/StringInterner.js.map +1 -0
- package/lib/Summary.d.ts +40 -0
- package/lib/Summary.d.ts.map +1 -0
- package/lib/Summary.js +19 -0
- package/lib/Summary.js.map +1 -0
- package/lib/SummaryBackCompatibility.d.ts +22 -22
- package/lib/SummaryBackCompatibility.d.ts.map +1 -1
- package/lib/SummaryBackCompatibility.js +29 -32
- package/lib/SummaryBackCompatibility.js.map +1 -1
- package/lib/SummaryTestUtilities.d.ts +31 -0
- package/lib/SummaryTestUtilities.d.ts.map +1 -0
- package/lib/SummaryTestUtilities.js +32 -0
- package/lib/SummaryTestUtilities.js.map +1 -0
- package/lib/Transaction.d.ts +71 -0
- package/lib/Transaction.d.ts.map +1 -0
- package/lib/Transaction.js +88 -0
- package/lib/Transaction.js.map +1 -0
- package/lib/TransactionInternal.d.ts +540 -0
- package/lib/TransactionInternal.d.ts.map +1 -0
- package/lib/TransactionInternal.js +622 -0
- package/lib/TransactionInternal.js.map +1 -0
- package/lib/TreeCompressor.d.ts +36 -0
- package/lib/TreeCompressor.d.ts.map +1 -0
- package/lib/TreeCompressor.js +133 -0
- package/lib/TreeCompressor.js.map +1 -0
- package/lib/TreeNodeHandle.d.ts +12 -18
- package/lib/TreeNodeHandle.d.ts.map +1 -1
- package/lib/TreeNodeHandle.js +14 -24
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.d.ts +166 -0
- package/lib/TreeView.d.ts.map +1 -0
- package/lib/TreeView.js +214 -0
- package/lib/TreeView.js.map +1 -0
- package/lib/TreeViewUtilities.d.ts +21 -0
- package/lib/TreeViewUtilities.d.ts.map +1 -0
- package/lib/TreeViewUtilities.js +71 -0
- package/lib/TreeViewUtilities.js.map +1 -0
- package/lib/{default-edits/UndoRedoHandler.d.ts → UndoRedoHandler.d.ts} +2 -2
- package/lib/UndoRedoHandler.d.ts.map +1 -0
- package/lib/{default-edits/UndoRedoHandler.js → UndoRedoHandler.js} +3 -7
- package/lib/UndoRedoHandler.js.map +1 -0
- package/lib/id-compressor/AppendOnlySortedMap.d.ts +127 -0
- package/lib/id-compressor/AppendOnlySortedMap.d.ts.map +1 -0
- package/lib/id-compressor/AppendOnlySortedMap.js +278 -0
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -0
- package/lib/id-compressor/IdCompressor.d.ts +389 -0
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -0
- package/lib/id-compressor/IdCompressor.js +1343 -0
- package/lib/id-compressor/IdCompressor.js.map +1 -0
- package/lib/id-compressor/IdRange.d.ts +11 -0
- package/lib/id-compressor/IdRange.d.ts.map +1 -0
- package/lib/id-compressor/IdRange.js +25 -0
- package/lib/id-compressor/IdRange.js.map +1 -0
- package/lib/id-compressor/NumericUuid.d.ts +63 -0
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -0
- package/lib/id-compressor/NumericUuid.js +365 -0
- package/lib/id-compressor/NumericUuid.js.map +1 -0
- package/lib/id-compressor/index.d.ts +12 -0
- package/lib/id-compressor/index.d.ts.map +1 -0
- package/lib/id-compressor/index.js +12 -0
- package/lib/id-compressor/index.js.map +1 -0
- package/lib/id-compressor/persisted-types/0.0.1.d.ts +156 -0
- package/lib/id-compressor/persisted-types/0.0.1.d.ts.map +1 -0
- package/lib/{test/Snapshot.tests.d.ts → id-compressor/persisted-types/0.0.1.js} +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.js.map +1 -0
- package/lib/id-compressor/persisted-types/index.d.ts +6 -0
- package/lib/id-compressor/persisted-types/index.d.ts.map +1 -0
- package/lib/id-compressor/persisted-types/index.js +6 -0
- package/lib/id-compressor/persisted-types/index.js.map +1 -0
- package/lib/index.d.ts +29 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +23 -6
- package/lib/index.js.map +1 -1
- package/lib/persisted-types/0.0.2.d.ts +385 -0
- package/lib/persisted-types/0.0.2.d.ts.map +1 -0
- package/lib/persisted-types/0.0.2.js +110 -0
- package/lib/persisted-types/0.0.2.js.map +1 -0
- package/lib/persisted-types/0.1.1.d.ts +314 -0
- package/lib/persisted-types/0.1.1.d.ts.map +1 -0
- package/lib/persisted-types/0.1.1.js +150 -0
- package/lib/persisted-types/0.1.1.js.map +1 -0
- package/lib/persisted-types/index.d.ts +7 -0
- package/lib/persisted-types/index.d.ts.map +1 -0
- package/lib/persisted-types/index.js +8 -0
- package/lib/persisted-types/index.js.map +1 -0
- package/lib/test/AppendOnlySortedMap.tests.d.ts +6 -0
- package/lib/test/AppendOnlySortedMap.tests.d.ts.map +1 -0
- package/lib/test/AppendOnlySortedMap.tests.js +169 -0
- package/lib/test/AppendOnlySortedMap.tests.js.map +1 -0
- package/lib/test/{SnapshotUtilities.tests.d.ts → ChangeCompression.tests.d.ts} +1 -1
- package/lib/test/ChangeCompression.tests.d.ts.map +1 -0
- package/lib/test/ChangeCompression.tests.js +145 -0
- package/lib/test/ChangeCompression.tests.js.map +1 -0
- package/lib/test/Checkout.tests.d.ts +2 -3
- package/lib/test/Checkout.tests.d.ts.map +1 -1
- package/lib/test/Checkout.tests.js +126 -69
- package/lib/test/Checkout.tests.js.map +1 -1
- package/lib/test/Common.tests.js +60 -2
- package/lib/test/Common.tests.js.map +1 -1
- package/lib/test/{BasicCheckout.tests.d.ts → EagerCheckout.tests.d.ts} +1 -1
- package/lib/test/EagerCheckout.tests.d.ts.map +1 -0
- package/lib/test/EagerCheckout.tests.js +20 -0
- package/lib/test/EagerCheckout.tests.js.map +1 -0
- package/lib/test/Edit.tests.js +22 -14
- package/lib/test/Edit.tests.js.map +1 -1
- package/lib/test/{Anchors.glassBox.tests.d.ts → EditLog.perf.tests.d.ts} +1 -1
- package/lib/test/EditLog.perf.tests.d.ts.map +1 -0
- package/lib/test/EditLog.perf.tests.js +30 -0
- package/lib/test/EditLog.perf.tests.js.map +1 -0
- package/lib/test/EditLog.tests.js +10 -6
- package/lib/test/EditLog.tests.js.map +1 -1
- package/lib/test/EditUtilities.tests.d.ts +6 -0
- package/lib/test/EditUtilities.tests.d.ts.map +1 -0
- package/lib/test/EditUtilities.tests.js +503 -0
- package/lib/test/EditUtilities.tests.js.map +1 -0
- package/lib/test/Forest.perf.tests.d.ts +6 -0
- package/lib/test/Forest.perf.tests.d.ts.map +1 -0
- package/lib/test/Forest.perf.tests.js +133 -0
- package/lib/test/Forest.perf.tests.js.map +1 -0
- package/lib/test/Forest.tests.js +54 -27
- package/lib/test/Forest.tests.js.map +1 -1
- package/lib/test/GenericTransaction.tests.js +12 -3
- package/lib/test/GenericTransaction.tests.js.map +1 -1
- package/lib/test/HistoryEditFactory.tests.d.ts +6 -0
- package/lib/test/HistoryEditFactory.tests.d.ts.map +1 -0
- package/lib/test/HistoryEditFactory.tests.js +90 -0
- package/lib/test/HistoryEditFactory.tests.js.map +1 -0
- package/lib/test/IdCompressor.perf.tests.d.ts +6 -0
- package/lib/test/IdCompressor.perf.tests.d.ts.map +1 -0
- package/lib/test/IdCompressor.perf.tests.js +304 -0
- package/lib/test/IdCompressor.perf.tests.js.map +1 -0
- package/lib/test/IdCompressor.tests.d.ts +6 -0
- package/lib/test/IdCompressor.tests.d.ts.map +1 -0
- package/lib/test/IdCompressor.tests.js +1075 -0
- package/lib/test/IdCompressor.tests.js.map +1 -0
- package/lib/test/IdConversion.tests.d.ts +6 -0
- package/lib/test/IdConversion.tests.d.ts.map +1 -0
- package/lib/test/IdConversion.tests.js +36 -0
- package/lib/test/IdConversion.tests.js.map +1 -0
- package/lib/test/LazyCheckout.tests.d.ts +6 -0
- package/lib/test/LazyCheckout.tests.d.ts.map +1 -0
- package/lib/test/LazyCheckout.tests.js +22 -0
- package/lib/test/LazyCheckout.tests.js.map +1 -0
- package/lib/test/LogViewer.tests.js +276 -191
- package/lib/test/LogViewer.tests.js.map +1 -1
- package/lib/test/{SharedTreeWithAnchors.tests.d.ts → MergeHealthTelemetryHeartbeat.tests.d.ts} +1 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts.map +1 -0
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +342 -0
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +1 -0
- package/lib/test/NumericUuid.perf.tests.d.ts +6 -0
- package/lib/test/NumericUuid.perf.tests.d.ts.map +1 -0
- package/lib/test/NumericUuid.perf.tests.js +68 -0
- package/lib/test/NumericUuid.perf.tests.js.map +1 -0
- package/lib/test/NumericUuid.tests.d.ts +6 -0
- package/lib/test/NumericUuid.tests.d.ts.map +1 -0
- package/lib/test/NumericUuid.tests.js +191 -0
- package/lib/test/NumericUuid.tests.js.map +1 -0
- package/lib/test/RevisionView.tests.d.ts +6 -0
- package/lib/test/RevisionView.tests.d.ts.map +1 -0
- package/lib/test/RevisionView.tests.js +133 -0
- package/lib/test/RevisionView.tests.js.map +1 -0
- package/lib/test/SharedTree.perf.tests.d.ts +6 -0
- package/lib/test/SharedTree.perf.tests.d.ts.map +1 -0
- package/lib/test/SharedTree.perf.tests.js +39 -0
- package/lib/test/SharedTree.perf.tests.js.map +1 -0
- package/lib/test/SharedTree.tests.js +15 -3
- package/lib/test/SharedTree.tests.js.map +1 -1
- package/lib/test/StringInterner.tests.d.ts +6 -0
- package/lib/test/StringInterner.tests.d.ts.map +1 -0
- package/lib/test/StringInterner.tests.js +71 -0
- package/lib/test/StringInterner.tests.js.map +1 -0
- package/lib/test/Summary.tests.d.ts +8 -0
- package/lib/test/Summary.tests.d.ts.map +1 -0
- package/lib/test/Summary.tests.js +407 -0
- package/lib/test/Summary.tests.js.map +1 -0
- package/lib/test/Transaction.tests.js +109 -329
- package/lib/test/Transaction.tests.js.map +1 -1
- package/lib/test/TransactionInternal.tests.d.ts +6 -0
- package/lib/test/TransactionInternal.tests.d.ts.map +1 -0
- package/lib/test/TransactionInternal.tests.js +568 -0
- package/lib/test/TransactionInternal.tests.js.map +1 -0
- package/lib/test/TreeCompression.tests.d.ts +6 -0
- package/lib/test/TreeCompression.tests.d.ts.map +1 -0
- package/lib/test/TreeCompression.tests.js +292 -0
- package/lib/test/TreeCompression.tests.js.map +1 -0
- package/lib/test/TreeView.tests.d.ts +6 -0
- package/lib/test/TreeView.tests.d.ts.map +1 -0
- package/lib/test/TreeView.tests.js +176 -0
- package/lib/test/TreeView.tests.js.map +1 -0
- package/lib/test/UndoRedoHandler.tests.js +2 -2
- package/lib/test/UndoRedoHandler.tests.js.map +1 -1
- package/lib/test/Virtualization.tests.js +146 -62
- package/lib/test/Virtualization.tests.js.map +1 -1
- package/lib/test/fuzz/Generators.d.ts +19 -0
- package/lib/test/fuzz/Generators.d.ts.map +1 -0
- package/lib/test/fuzz/Generators.js +420 -0
- package/lib/test/fuzz/Generators.js.map +1 -0
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +20 -0
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +1 -0
- package/lib/test/fuzz/SharedTreeFuzzTests.js +217 -0
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +1 -0
- package/lib/test/fuzz/Types.d.ts +133 -0
- package/lib/test/fuzz/Types.d.ts.map +1 -0
- package/lib/test/{GenericTransactionWithAnchors.tests.d.ts → fuzz/Types.js} +2 -2
- package/lib/test/fuzz/Types.js.map +1 -0
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +180 -0
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +1 -0
- package/lib/test/utilities/IdCompressorTestUtilities.js +528 -0
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +1 -0
- package/lib/test/utilities/MockTransaction.d.ts +26 -7
- package/lib/test/utilities/MockTransaction.d.ts.map +1 -1
- package/lib/test/utilities/MockTransaction.js +40 -11
- package/lib/test/utilities/MockTransaction.js.map +1 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts +12 -0
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +1 -0
- package/lib/test/utilities/PendingLocalStateTests.js +105 -0
- package/lib/test/utilities/PendingLocalStateTests.js.map +1 -0
- package/lib/test/utilities/SharedTreeTests.d.ts +3 -4
- package/lib/test/utilities/SharedTreeTests.d.ts.map +1 -1
- package/lib/test/utilities/SharedTreeTests.js +696 -439
- package/lib/test/utilities/SharedTreeTests.js.map +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts +11 -0
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +1 -0
- package/lib/test/utilities/SharedTreeVersioningTests.js +370 -0
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +1 -0
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts +10 -0
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts.map +1 -0
- package/lib/test/utilities/SummaryLoadPerfTests.js +102 -0
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +1 -0
- package/lib/test/utilities/SummarySizeTests.d.ts +11 -0
- package/lib/test/utilities/SummarySizeTests.d.ts.map +1 -0
- package/lib/test/utilities/SummarySizeTests.js +158 -0
- package/lib/test/utilities/SummarySizeTests.js.map +1 -0
- package/lib/test/utilities/TestCommon.d.ts +9 -0
- package/lib/test/utilities/TestCommon.d.ts.map +1 -0
- package/lib/test/utilities/TestCommon.js +13 -0
- package/lib/test/utilities/TestCommon.js.map +1 -0
- package/lib/test/utilities/TestNode.d.ts +140 -0
- package/lib/test/utilities/TestNode.d.ts.map +1 -0
- package/lib/test/utilities/TestNode.js +292 -0
- package/lib/test/utilities/TestNode.js.map +1 -0
- package/lib/test/utilities/TestUtilities.d.ts +84 -70
- package/lib/test/utilities/TestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/TestUtilities.js +218 -143
- package/lib/test/utilities/TestUtilities.js.map +1 -1
- package/lib/test/utilities/UndoRedoTests.d.ts +4 -5
- package/lib/test/utilities/UndoRedoTests.d.ts.map +1 -1
- package/lib/test/utilities/UndoRedoTests.js +138 -149
- package/lib/test/utilities/UndoRedoTests.js.map +1 -1
- package/package.json +22 -17
- package/src/ChangeCompression.ts +159 -0
- package/src/{default-edits/PersistedTypes.ts → ChangeTypes.ts} +62 -125
- package/src/Checkout.ts +82 -53
- package/src/Common.ts +317 -117
- package/src/EagerCheckout.ts +38 -0
- package/src/EditLog.ts +153 -100
- package/src/EditUtilities.ts +559 -0
- package/src/EventTypes.ts +74 -0
- package/src/Forest.ts +81 -73
- package/src/{default-edits/HistoryEditFactory.ts → HistoryEditFactory.ts} +103 -53
- package/src/IdConversion.ts +125 -0
- package/src/Identifiers.ts +101 -1
- package/src/InitialTree.ts +5 -4
- package/src/LazyCheckout.ts +51 -0
- package/src/LogViewer.ts +242 -166
- package/src/MergeHealth.ts +447 -0
- package/src/NodeIdUtilities.ts +156 -0
- package/src/PayloadUtilities.ts +124 -0
- package/src/ReconciliationPath.ts +18 -13
- package/src/RevisionValueCache.ts +14 -5
- package/src/RevisionView.ts +252 -0
- package/src/SerializationUtilities.ts +130 -0
- package/src/SharedTree.ts +1501 -0
- package/src/SharedTreeEncoder.ts +493 -0
- package/src/StringInterner.ts +72 -0
- package/src/Summary.ts +48 -0
- package/src/SummaryBackCompatibility.ts +47 -57
- package/src/SummaryTestUtilities.ts +54 -0
- package/src/Transaction.ts +120 -0
- package/src/TransactionInternal.ts +1087 -0
- package/src/TreeCompressor.ts +213 -0
- package/src/TreeNodeHandle.ts +19 -32
- package/src/TreeView.ts +322 -0
- package/src/TreeViewUtilities.ts +77 -0
- package/src/{default-edits/UndoRedoHandler.ts → UndoRedoHandler.ts} +8 -13
- package/src/id-compressor/AppendOnlySortedMap.ts +325 -0
- package/src/id-compressor/IdCompressor.md +3 -0
- package/src/id-compressor/IdCompressor.ts +1848 -0
- package/src/id-compressor/IdRange.ts +33 -0
- package/src/id-compressor/NumericUuid.ts +414 -0
- package/src/id-compressor/index.ts +13 -0
- package/src/id-compressor/persisted-types/0.0.1.ts +179 -0
- package/src/id-compressor/persisted-types/README.md +3 -0
- package/src/id-compressor/persisted-types/index.ts +6 -0
- package/src/index.ts +118 -59
- package/src/persisted-types/0.0.2.ts +442 -0
- package/src/persisted-types/0.1.1.ts +476 -0
- package/src/persisted-types/README.md +22 -0
- package/src/persisted-types/index.ts +9 -0
- package/.mocharc.js +0 -41
- package/api/tree.api.md +0 -729
- package/dist/BasicCheckout.d.ts +0 -23
- package/dist/BasicCheckout.d.ts.map +0 -1
- package/dist/BasicCheckout.js.map +0 -1
- package/dist/Snapshot.d.ts +0 -198
- package/dist/Snapshot.d.ts.map +0 -1
- package/dist/Snapshot.js +0 -267
- package/dist/Snapshot.js.map +0 -1
- package/dist/SnapshotUtilities.d.ts +0 -29
- package/dist/SnapshotUtilities.d.ts.map +0 -1
- package/dist/SnapshotUtilities.js +0 -73
- package/dist/SnapshotUtilities.js.map +0 -1
- package/dist/anchored-edits/AnchorResolution.d.ts +0 -144
- package/dist/anchored-edits/AnchorResolution.d.ts.map +0 -1
- package/dist/anchored-edits/AnchorResolution.js +0 -162
- package/dist/anchored-edits/AnchorResolution.js.map +0 -1
- package/dist/anchored-edits/Factory.d.ts +0 -56
- package/dist/anchored-edits/Factory.d.ts.map +0 -1
- package/dist/anchored-edits/Factory.js +0 -79
- package/dist/anchored-edits/Factory.js.map +0 -1
- package/dist/anchored-edits/PersistedTypes.d.ts +0 -245
- package/dist/anchored-edits/PersistedTypes.d.ts.map +0 -1
- package/dist/anchored-edits/PersistedTypes.js +0 -131
- package/dist/anchored-edits/PersistedTypes.js.map +0 -1
- package/dist/anchored-edits/SharedTreeWithAnchors.d.ts +0 -120
- package/dist/anchored-edits/SharedTreeWithAnchors.d.ts.map +0 -1
- package/dist/anchored-edits/SharedTreeWithAnchors.js +0 -115
- package/dist/anchored-edits/SharedTreeWithAnchors.js.map +0 -1
- package/dist/anchored-edits/TransactionWithAnchors.d.ts +0 -28
- package/dist/anchored-edits/TransactionWithAnchors.d.ts.map +0 -1
- package/dist/anchored-edits/TransactionWithAnchors.js +0 -36
- package/dist/anchored-edits/TransactionWithAnchors.js.map +0 -1
- package/dist/anchored-edits/index.d.ts +0 -10
- package/dist/anchored-edits/index.d.ts.map +0 -1
- package/dist/anchored-edits/index.js +0 -34
- package/dist/anchored-edits/index.js.map +0 -1
- package/dist/default-edits/EditUtilities.d.ts +0 -57
- package/dist/default-edits/EditUtilities.d.ts.map +0 -1
- package/dist/default-edits/EditUtilities.js +0 -192
- package/dist/default-edits/EditUtilities.js.map +0 -1
- package/dist/default-edits/Factory.d.ts +0 -56
- package/dist/default-edits/Factory.d.ts.map +0 -1
- package/dist/default-edits/Factory.js +0 -79
- package/dist/default-edits/Factory.js.map +0 -1
- package/dist/default-edits/HistoryEditFactory.d.ts +0 -19
- package/dist/default-edits/HistoryEditFactory.d.ts.map +0 -1
- package/dist/default-edits/HistoryEditFactory.js +0 -187
- package/dist/default-edits/HistoryEditFactory.js.map +0 -1
- package/dist/default-edits/PersistedTypes.d.ts.map +0 -1
- package/dist/default-edits/PersistedTypes.js.map +0 -1
- package/dist/default-edits/SharedTree.d.ts +0 -111
- package/dist/default-edits/SharedTree.d.ts.map +0 -1
- package/dist/default-edits/SharedTree.js +0 -124
- package/dist/default-edits/SharedTree.js.map +0 -1
- package/dist/default-edits/Summary.d.ts +0 -15
- package/dist/default-edits/Summary.d.ts.map +0 -1
- package/dist/default-edits/Summary.js +0 -35
- package/dist/default-edits/Summary.js.map +0 -1
- package/dist/default-edits/Transaction.d.ts +0 -41
- package/dist/default-edits/Transaction.d.ts.map +0 -1
- package/dist/default-edits/Transaction.js +0 -225
- package/dist/default-edits/Transaction.js.map +0 -1
- package/dist/default-edits/UndoRedoHandler.d.ts.map +0 -1
- package/dist/default-edits/UndoRedoHandler.js.map +0 -1
- package/dist/default-edits/index.d.ts +0 -13
- package/dist/default-edits/index.d.ts.map +0 -1
- package/dist/default-edits/index.js +0 -41
- package/dist/default-edits/index.js.map +0 -1
- package/dist/generic/GenericEditUtilities.d.ts +0 -26
- package/dist/generic/GenericEditUtilities.d.ts.map +0 -1
- package/dist/generic/GenericEditUtilities.js +0 -45
- package/dist/generic/GenericEditUtilities.js.map +0 -1
- package/dist/generic/GenericSharedTree.d.ts +0 -221
- package/dist/generic/GenericSharedTree.d.ts.map +0 -1
- package/dist/generic/GenericSharedTree.js +0 -447
- package/dist/generic/GenericSharedTree.js.map +0 -1
- package/dist/generic/GenericTransaction.d.ts +0 -87
- package/dist/generic/GenericTransaction.d.ts.map +0 -1
- package/dist/generic/GenericTransaction.js +0 -144
- package/dist/generic/GenericTransaction.js.map +0 -1
- package/dist/generic/PersistedTypes.d.ts +0 -194
- package/dist/generic/PersistedTypes.d.ts.map +0 -1
- package/dist/generic/PersistedTypes.js +0 -42
- package/dist/generic/PersistedTypes.js.map +0 -1
- package/dist/generic/Summary.d.ts +0 -63
- package/dist/generic/Summary.d.ts.map +0 -1
- package/dist/generic/Summary.js +0 -64
- package/dist/generic/Summary.js.map +0 -1
- package/dist/generic/index.d.ts +0 -10
- package/dist/generic/index.d.ts.map +0 -1
- package/dist/generic/index.js +0 -26
- package/dist/generic/index.js.map +0 -1
- package/docs/Future.md +0 -155
- package/lib/BasicCheckout.d.ts +0 -23
- package/lib/BasicCheckout.d.ts.map +0 -1
- package/lib/BasicCheckout.js.map +0 -1
- package/lib/Snapshot.d.ts +0 -198
- package/lib/Snapshot.d.ts.map +0 -1
- package/lib/Snapshot.js +0 -263
- package/lib/Snapshot.js.map +0 -1
- package/lib/SnapshotUtilities.d.ts +0 -29
- package/lib/SnapshotUtilities.d.ts.map +0 -1
- package/lib/SnapshotUtilities.js +0 -67
- package/lib/SnapshotUtilities.js.map +0 -1
- package/lib/anchored-edits/AnchorResolution.d.ts +0 -144
- package/lib/anchored-edits/AnchorResolution.d.ts.map +0 -1
- package/lib/anchored-edits/AnchorResolution.js +0 -152
- package/lib/anchored-edits/AnchorResolution.js.map +0 -1
- package/lib/anchored-edits/Factory.d.ts +0 -56
- package/lib/anchored-edits/Factory.d.ts.map +0 -1
- package/lib/anchored-edits/Factory.js +0 -74
- package/lib/anchored-edits/Factory.js.map +0 -1
- package/lib/anchored-edits/PersistedTypes.d.ts +0 -245
- package/lib/anchored-edits/PersistedTypes.d.ts.map +0 -1
- package/lib/anchored-edits/PersistedTypes.js +0 -128
- package/lib/anchored-edits/PersistedTypes.js.map +0 -1
- package/lib/anchored-edits/SharedTreeWithAnchors.d.ts +0 -120
- package/lib/anchored-edits/SharedTreeWithAnchors.d.ts.map +0 -1
- package/lib/anchored-edits/SharedTreeWithAnchors.js +0 -110
- package/lib/anchored-edits/SharedTreeWithAnchors.js.map +0 -1
- package/lib/anchored-edits/TransactionWithAnchors.d.ts +0 -28
- package/lib/anchored-edits/TransactionWithAnchors.d.ts.map +0 -1
- package/lib/anchored-edits/TransactionWithAnchors.js +0 -32
- package/lib/anchored-edits/TransactionWithAnchors.js.map +0 -1
- package/lib/anchored-edits/index.d.ts +0 -10
- package/lib/anchored-edits/index.d.ts.map +0 -1
- package/lib/anchored-edits/index.js +0 -11
- package/lib/anchored-edits/index.js.map +0 -1
- package/lib/default-edits/EditUtilities.d.ts +0 -57
- package/lib/default-edits/EditUtilities.d.ts.map +0 -1
- package/lib/default-edits/EditUtilities.js +0 -181
- package/lib/default-edits/EditUtilities.js.map +0 -1
- package/lib/default-edits/Factory.d.ts +0 -56
- package/lib/default-edits/Factory.d.ts.map +0 -1
- package/lib/default-edits/Factory.js +0 -74
- package/lib/default-edits/Factory.js.map +0 -1
- package/lib/default-edits/HistoryEditFactory.d.ts +0 -19
- package/lib/default-edits/HistoryEditFactory.d.ts.map +0 -1
- package/lib/default-edits/HistoryEditFactory.js.map +0 -1
- package/lib/default-edits/PersistedTypes.d.ts.map +0 -1
- package/lib/default-edits/PersistedTypes.js.map +0 -1
- package/lib/default-edits/SharedTree.d.ts +0 -111
- package/lib/default-edits/SharedTree.d.ts.map +0 -1
- package/lib/default-edits/SharedTree.js +0 -100
- package/lib/default-edits/SharedTree.js.map +0 -1
- package/lib/default-edits/Summary.d.ts +0 -15
- package/lib/default-edits/Summary.d.ts.map +0 -1
- package/lib/default-edits/Summary.js +0 -31
- package/lib/default-edits/Summary.js.map +0 -1
- package/lib/default-edits/Transaction.d.ts +0 -41
- package/lib/default-edits/Transaction.d.ts.map +0 -1
- package/lib/default-edits/Transaction.js +0 -221
- package/lib/default-edits/Transaction.js.map +0 -1
- package/lib/default-edits/UndoRedoHandler.d.ts.map +0 -1
- package/lib/default-edits/UndoRedoHandler.js.map +0 -1
- package/lib/default-edits/index.d.ts +0 -13
- package/lib/default-edits/index.d.ts.map +0 -1
- package/lib/default-edits/index.js +0 -14
- package/lib/default-edits/index.js.map +0 -1
- package/lib/generic/GenericEditUtilities.d.ts +0 -26
- package/lib/generic/GenericEditUtilities.d.ts.map +0 -1
- package/lib/generic/GenericEditUtilities.js +0 -38
- package/lib/generic/GenericEditUtilities.js.map +0 -1
- package/lib/generic/GenericSharedTree.d.ts +0 -221
- package/lib/generic/GenericSharedTree.d.ts.map +0 -1
- package/lib/generic/GenericSharedTree.js +0 -443
- package/lib/generic/GenericSharedTree.js.map +0 -1
- package/lib/generic/GenericTransaction.d.ts +0 -87
- package/lib/generic/GenericTransaction.d.ts.map +0 -1
- package/lib/generic/GenericTransaction.js +0 -140
- package/lib/generic/GenericTransaction.js.map +0 -1
- package/lib/generic/PersistedTypes.d.ts +0 -194
- package/lib/generic/PersistedTypes.d.ts.map +0 -1
- package/lib/generic/PersistedTypes.js +0 -39
- package/lib/generic/PersistedTypes.js.map +0 -1
- package/lib/generic/Summary.d.ts +0 -63
- package/lib/generic/Summary.d.ts.map +0 -1
- package/lib/generic/Summary.js +0 -58
- package/lib/generic/Summary.js.map +0 -1
- package/lib/generic/index.d.ts +0 -10
- package/lib/generic/index.d.ts.map +0 -1
- package/lib/generic/index.js +0 -11
- package/lib/generic/index.js.map +0 -1
- package/lib/test/Anchors.glassBox.tests.d.ts.map +0 -1
- package/lib/test/Anchors.glassBox.tests.js +0 -410
- package/lib/test/Anchors.glassBox.tests.js.map +0 -1
- package/lib/test/BasicCheckout.tests.d.ts.map +0 -1
- package/lib/test/BasicCheckout.tests.js +0 -8
- package/lib/test/BasicCheckout.tests.js.map +0 -1
- package/lib/test/GenericTransactionWithAnchors.tests.d.ts.map +0 -1
- package/lib/test/GenericTransactionWithAnchors.tests.js +0 -25
- package/lib/test/GenericTransactionWithAnchors.tests.js.map +0 -1
- package/lib/test/SharedTreeWithAnchors.tests.d.ts.map +0 -1
- package/lib/test/SharedTreeWithAnchors.tests.js +0 -420
- package/lib/test/SharedTreeWithAnchors.tests.js.map +0 -1
- package/lib/test/Snapshot.tests.d.ts.map +0 -1
- package/lib/test/Snapshot.tests.js +0 -96
- package/lib/test/Snapshot.tests.js.map +0 -1
- package/lib/test/SnapshotUtilities.tests.d.ts.map +0 -1
- package/lib/test/SnapshotUtilities.tests.js +0 -168
- package/lib/test/SnapshotUtilities.tests.js.map +0 -1
- package/lib/test/undoRedoStackManager.d.ts +0 -26
- package/lib/test/undoRedoStackManager.d.ts.map +0 -1
- package/lib/test/undoRedoStackManager.js +0 -176
- package/lib/test/undoRedoStackManager.js.map +0 -1
- package/lib/test/utilities/SummaryFormatCompatibilityTests.d.ts +0 -13
- package/lib/test/utilities/SummaryFormatCompatibilityTests.d.ts.map +0 -1
- package/lib/test/utilities/SummaryFormatCompatibilityTests.js +0 -154
- package/lib/test/utilities/SummaryFormatCompatibilityTests.js.map +0 -1
- package/src/BasicCheckout.ts +0 -34
- package/src/Snapshot.ts +0 -363
- package/src/SnapshotUtilities.ts +0 -88
- package/src/anchored-edits/AnchorResolution.ts +0 -442
- package/src/anchored-edits/Factory.ts +0 -94
- package/src/anchored-edits/PersistedTypes.ts +0 -310
- package/src/anchored-edits/SharedTreeWithAnchors.ts +0 -200
- package/src/anchored-edits/TransactionWithAnchors.ts +0 -39
- package/src/anchored-edits/index.ts +0 -21
- package/src/default-edits/EditUtilities.ts +0 -220
- package/src/default-edits/Factory.ts +0 -94
- package/src/default-edits/SharedTree.ts +0 -174
- package/src/default-edits/Summary.ts +0 -44
- package/src/default-edits/Transaction.ts +0 -262
- package/src/default-edits/index.ts +0 -29
- package/src/generic/GenericEditUtilities.ts +0 -46
- package/src/generic/GenericSharedTree.ts +0 -593
- package/src/generic/GenericTransaction.ts +0 -194
- package/src/generic/PersistedTypes.ts +0 -221
- package/src/generic/Summary.ts +0 -113
- package/src/generic/index.ts +0 -41
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { IFluidDataStoreRuntime, IChannelStorageService, IChannelFactory, IChannelAttributes, IChannelServices, IChannel } from '@fluidframework/datastore-definitions';
|
|
6
|
+
import { IFluidSerializer, ISharedObjectEvents, SharedObject } from '@fluidframework/shared-object-base';
|
|
7
|
+
import { ITelemetryLogger, ITelemetryProperties } from '@fluidframework/common-definitions';
|
|
8
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
9
|
+
import { OrderedEditSet } from './EditLog';
|
|
10
|
+
import { EditId, NodeId, StableNodeId } from './Identifiers';
|
|
11
|
+
import { LogViewer } from './LogViewer';
|
|
12
|
+
import { ReconciliationPath } from './ReconciliationPath';
|
|
13
|
+
import { ChangeInternal, Edit, EditStatus, SharedTreeSummaryBase, WriteFormat } from './persisted-types';
|
|
14
|
+
import { NodeIdContext } from './NodeIdUtilities';
|
|
15
|
+
import { RevisionView } from './RevisionView';
|
|
16
|
+
import { Change } from './ChangeTypes';
|
|
17
|
+
import { TransactionInternal } from './TransactionInternal';
|
|
18
|
+
/**
|
|
19
|
+
* Factory for SharedTree.
|
|
20
|
+
* Includes history in the summary.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export declare class SharedTreeFactory implements IChannelFactory {
|
|
24
|
+
private readonly writeFormat;
|
|
25
|
+
private readonly summarizeHistory;
|
|
26
|
+
private expensiveValidation;
|
|
27
|
+
/**
|
|
28
|
+
* {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory."type"}
|
|
29
|
+
*/
|
|
30
|
+
static Type: string;
|
|
31
|
+
/**
|
|
32
|
+
* {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}
|
|
33
|
+
*/
|
|
34
|
+
static Attributes: IChannelAttributes;
|
|
35
|
+
/**
|
|
36
|
+
* Get a factory for SharedTree to register with the data store.
|
|
37
|
+
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in. See [the write format
|
|
38
|
+
* documentation](../docs/Write-Format.md) for more information.
|
|
39
|
+
* @param summarizeHistory - Determines if the history is included in summaries and if edit chunks are uploaded when they are full.
|
|
40
|
+
* See the [breaking change migration documentation](docs/Breaking-Change-Migration) for more details on this scheme.
|
|
41
|
+
* @param expensiveValidation - Enables expensive asserts on SharedTree.
|
|
42
|
+
* @returns A factory that creates `SharedTree`s and loads them from storage.
|
|
43
|
+
*/
|
|
44
|
+
constructor(writeFormat: WriteFormat, summarizeHistory?: false | {
|
|
45
|
+
uploadEditChunks: boolean;
|
|
46
|
+
}, expensiveValidation?: boolean);
|
|
47
|
+
/**
|
|
48
|
+
* {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory."type"}
|
|
49
|
+
*/
|
|
50
|
+
get type(): string;
|
|
51
|
+
/**
|
|
52
|
+
* {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}
|
|
53
|
+
*/
|
|
54
|
+
get attributes(): IChannelAttributes;
|
|
55
|
+
/**
|
|
56
|
+
* {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.load}
|
|
57
|
+
*/
|
|
58
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, _channelAttributes: Readonly<IChannelAttributes>): Promise<IChannel>;
|
|
59
|
+
/**
|
|
60
|
+
* Create a new SharedTree.
|
|
61
|
+
* @param runtime - data store runtime that owns the new SharedTree
|
|
62
|
+
* @param id - optional name for the SharedTree
|
|
63
|
+
*/
|
|
64
|
+
create(runtime: IFluidDataStoreRuntime, id: string, expensiveValidation?: boolean): SharedTree;
|
|
65
|
+
private createSharedTree;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The arguments included when the EditCommitted SharedTreeEvent is emitted.
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export interface EditCommittedEventArguments {
|
|
72
|
+
/** The ID of the edit committed. */
|
|
73
|
+
readonly editId: EditId;
|
|
74
|
+
/** Whether or not this is a local edit. */
|
|
75
|
+
readonly local: boolean;
|
|
76
|
+
/** The tree the edit was committed on. Required for local edit events handled by SharedTreeUndoRedoHandler. */
|
|
77
|
+
readonly tree: SharedTree;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The arguments included when the {@link SharedTreeEvent.SequencedEditApplied} SharedTreeEvent is emitted.
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export interface SequencedEditAppliedEventArguments {
|
|
84
|
+
/** The ID of the edit committed. */
|
|
85
|
+
readonly edit: Edit<ChangeInternal>;
|
|
86
|
+
/** Whether or not this was a local edit. */
|
|
87
|
+
readonly wasLocal: boolean;
|
|
88
|
+
/** The tree the edit was applied to. */
|
|
89
|
+
readonly tree: SharedTree;
|
|
90
|
+
/** The telemetry logger associated with sequenced edit application. */
|
|
91
|
+
readonly logger: ITelemetryLogger;
|
|
92
|
+
/** The reconciliation path for the edit. See {@link ReconciliationPath} for details. */
|
|
93
|
+
readonly reconciliationPath: ReconciliationPath;
|
|
94
|
+
/** The outcome of the sequenced edit being applied. */
|
|
95
|
+
readonly outcome: EditApplicationOutcome;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The outcome of an edit.
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
101
|
+
export declare type EditApplicationOutcome = {
|
|
102
|
+
/**
|
|
103
|
+
* The revision view resulting from the edit.
|
|
104
|
+
*/
|
|
105
|
+
readonly view: RevisionView;
|
|
106
|
+
/**
|
|
107
|
+
* The status code for the edit that produced the revision.
|
|
108
|
+
*/
|
|
109
|
+
readonly status: EditStatus.Applied;
|
|
110
|
+
} | {
|
|
111
|
+
/**
|
|
112
|
+
* The revision view resulting from the edit.
|
|
113
|
+
*/
|
|
114
|
+
readonly failure: TransactionInternal.Failure;
|
|
115
|
+
/**
|
|
116
|
+
* The status code for the edit that produced the revision.
|
|
117
|
+
*/
|
|
118
|
+
readonly status: EditStatus.Invalid | EditStatus.Malformed;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Events which may be emitted by `SharedTree`. See {@link SharedTreeEvent} for documentation of event semantics.
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
export interface ISharedTreeEvents extends ISharedObjectEvents {
|
|
125
|
+
(event: 'committedEdit', listener: EditCommittedHandler): any;
|
|
126
|
+
(event: 'appliedSequencedEdit', listener: SequencedEditAppliedHandler): any;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Expected type for a handler of the `EditCommitted` event.
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
132
|
+
export declare type EditCommittedHandler = (args: EditCommittedEventArguments) => void;
|
|
133
|
+
/**
|
|
134
|
+
* Expected type for a handler of the {@link SharedTreeEvent.SequencedEditApplied} event.
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
137
|
+
export declare type SequencedEditAppliedHandler = (args: SequencedEditAppliedEventArguments) => void;
|
|
138
|
+
/**
|
|
139
|
+
* A [distributed tree](../Readme.md).
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
export declare class SharedTree extends SharedObject<ISharedTreeEvents> implements NodeIdContext {
|
|
143
|
+
private writeFormat;
|
|
144
|
+
private readonly expensiveValidation;
|
|
145
|
+
/**
|
|
146
|
+
* Create a new SharedTree. It will contain the default value (see initialTree).
|
|
147
|
+
*/
|
|
148
|
+
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedTree;
|
|
149
|
+
/**
|
|
150
|
+
* Get a factory for SharedTree to register with the data store.
|
|
151
|
+
* @param summarizeHistory - Determines if the history is included in summaries and if edit chunks are uploaded when they are full.
|
|
152
|
+
*
|
|
153
|
+
* On 0.1.1 documents, due to current code limitations, this parameter is only impactful for newly created documents.
|
|
154
|
+
* `SharedTree`s which load existing documents will summarize history if and only if the loaded summary included history.
|
|
155
|
+
*
|
|
156
|
+
* The technical limitations here relate to clients with mixed versions collaborating.
|
|
157
|
+
* In the future we may allow modification of whether or not a particular document saves history, but only via a consensus mechanism.
|
|
158
|
+
* See the skipped test in SharedTreeFuzzTests.ts for more details on this issue.
|
|
159
|
+
* See docs/Breaking-Change-Migration for more details on the consensus scheme.
|
|
160
|
+
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in.
|
|
161
|
+
* This format may be updated to a newer (supported) version at runtime if a collaborating shared-tree
|
|
162
|
+
* that was initialized with a newer write version connects to the session. Care must be taken when changing this value,
|
|
163
|
+
* as a staged rollout must of occurred such that all collaborating clients must have the code to read at least the version
|
|
164
|
+
* written.
|
|
165
|
+
* See [the write format documentation](../docs/Write-Format.md) for more information.
|
|
166
|
+
* @returns A factory that creates `SharedTree`s and loads them from storage.
|
|
167
|
+
*/
|
|
168
|
+
static getFactory(writeFormat: WriteFormat, summarizeHistory?: false | {
|
|
169
|
+
uploadEditChunks: boolean;
|
|
170
|
+
}): SharedTreeFactory;
|
|
171
|
+
private idCompressor;
|
|
172
|
+
private readonly idNormalizer;
|
|
173
|
+
private interner;
|
|
174
|
+
/**
|
|
175
|
+
* The log of completed edits for this SharedTree.
|
|
176
|
+
*/
|
|
177
|
+
private editLog;
|
|
178
|
+
/**
|
|
179
|
+
* As an implementation detail, SharedTree uses a log viewer that caches views of different revisions.
|
|
180
|
+
* It is not exposed to avoid accidental correctness issues, but `logViewer` is exposed in order to give clients a way
|
|
181
|
+
* to access the revision history.
|
|
182
|
+
*/
|
|
183
|
+
private cachingLogViewer;
|
|
184
|
+
/**
|
|
185
|
+
* Viewer for trees defined by editLog. This allows access to views of the tree at different revisions (various points in time).
|
|
186
|
+
*/
|
|
187
|
+
get logViewer(): LogViewer;
|
|
188
|
+
protected readonly logger: ITelemetryLogger;
|
|
189
|
+
private readonly sequencedEditAppliedLogger;
|
|
190
|
+
private readonly encoder_0_0_2;
|
|
191
|
+
private encoder_0_1_1;
|
|
192
|
+
/** Indicates if the client is the oldest member of the quorum. */
|
|
193
|
+
private currentIsOldest;
|
|
194
|
+
private readonly processEditResult;
|
|
195
|
+
private readonly processSequencedEditResult;
|
|
196
|
+
private summarizeHistory;
|
|
197
|
+
private uploadEditChunks;
|
|
198
|
+
/**
|
|
199
|
+
* Create a new SharedTreeFactory.
|
|
200
|
+
* @param runtime - The runtime the SharedTree will be associated with
|
|
201
|
+
* @param id - Unique ID for the SharedTree
|
|
202
|
+
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in. See [the write format
|
|
203
|
+
* documentation](../docs/Write-Format.md) for more information.
|
|
204
|
+
* @param summarizeHistory - Determines if the history is included in summaries and if edit chunks are uploaded when they are full.
|
|
205
|
+
* @param expensiveValidation - Enable expensive asserts.
|
|
206
|
+
*/
|
|
207
|
+
constructor(runtime: IFluidDataStoreRuntime, id: string, writeFormat: WriteFormat, summarizeHistory?: false | {
|
|
208
|
+
uploadEditChunks: boolean;
|
|
209
|
+
}, expensiveValidation?: boolean);
|
|
210
|
+
getWriteFormat(): WriteFormat;
|
|
211
|
+
/**
|
|
212
|
+
* Re-computes currentIsOldest and emits an event if it has changed.
|
|
213
|
+
* TODO:#55900: Get rid of copy-pasted OldestClientObserver code
|
|
214
|
+
*/
|
|
215
|
+
private readonly updateOldest;
|
|
216
|
+
/**
|
|
217
|
+
* Computes the oldest client in the quorum, true by default if the container is detached and false by default if the client isn't connected.
|
|
218
|
+
* TODO:#55900: Get rid of copy-pasted OldestClientObserver code
|
|
219
|
+
*/
|
|
220
|
+
private computeIsOldest;
|
|
221
|
+
/**
|
|
222
|
+
* @returns the current view of the tree.
|
|
223
|
+
*/
|
|
224
|
+
get currentView(): RevisionView;
|
|
225
|
+
/**
|
|
226
|
+
* Generates a node identifier.
|
|
227
|
+
* The returned IDs may be used as the identifier of a node in the SharedTree.
|
|
228
|
+
* `NodeId`s are *always* unique and stable within the scope of the tree and session that generated them. They are *not* unique within
|
|
229
|
+
* a Fluid container, and *cannot* be compared across instances of a SharedTree. They are *not* stable across sessions/lifetimes of a
|
|
230
|
+
* SharedTree, and *cannot* be persisted (e.g. stored in payloads, uploaded in blobs, etc.). If stable persistence is needed,
|
|
231
|
+
* NodeIdConverter.convertToStableNodeId may be used to return a corresponding UUID that is globally unique and stable.
|
|
232
|
+
* @param override - if supplied, calls to `convertToStableNodeId` using the returned node ID will return the override instead of
|
|
233
|
+
* the UUID. Calls to `generateNodeId` with the same override always return the same ID. Performance note: passing an override string
|
|
234
|
+
* incurs a storage cost that is significantly higher that a node ID without one, and should be avoided if possible.
|
|
235
|
+
* @public
|
|
236
|
+
*/
|
|
237
|
+
generateNodeId(override?: string): NodeId;
|
|
238
|
+
/**
|
|
239
|
+
* Given a NodeId, returns the corresponding stable ID or throws if the supplied node ID was not generated with this tree (`NodeId`s
|
|
240
|
+
* may not be used across SharedTree instances, see `generateNodeId` for more).
|
|
241
|
+
* The returned value will be a UUID, unless the creation of `id` used an override string (see `generateNodeId` for more).
|
|
242
|
+
* The result is safe to persist and re-use across `SharedTree` instances, unlike `NodeId`.
|
|
243
|
+
* @public
|
|
244
|
+
*/
|
|
245
|
+
convertToStableNodeId(id: NodeId): StableNodeId;
|
|
246
|
+
/**
|
|
247
|
+
* Given a NodeId, attempt to return the corresponding stable ID.
|
|
248
|
+
* The returned value will be a UUID, unless the creation of `id` used an override string (see `generateNodeId` for more).
|
|
249
|
+
* The returned stable ID is undefined if `id` was never created with this SharedTree. If a stable ID is returned, this does not imply
|
|
250
|
+
* that there is a node with `id` in the current revision of the tree, only that `id` was at some point generated by some instance of
|
|
251
|
+
* this tree.
|
|
252
|
+
* @public
|
|
253
|
+
*/
|
|
254
|
+
tryConvertToStableNodeId(id: NodeId): StableNodeId | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* Given a stable ID, return the corresponding NodeId or throws if the supplied stable ID was never generated with this tree, either
|
|
257
|
+
* as a UUID corresponding to a `NodeId` or as an override passed to `generateNodeId`.
|
|
258
|
+
* If a stable ID is returned, this does not imply that there is a node with `id` in the current revision of the tree, only that
|
|
259
|
+
* `id` was at some point generated by an instance of this SharedTree.
|
|
260
|
+
* @public
|
|
261
|
+
*/
|
|
262
|
+
convertToNodeId(id: StableNodeId): NodeId;
|
|
263
|
+
/**
|
|
264
|
+
* Given a stable ID, return the corresponding NodeId or return undefined if the supplied stable ID was never generated with this tree,
|
|
265
|
+
* either as a UUID corresponding to a `NodeId` or as an override passed to `generateNodeId`.
|
|
266
|
+
* If a stable ID is returned, this does not imply that there is a node with `id` in the current revision of the tree, only that
|
|
267
|
+
* `id` was at some point generated by an instance of this SharedTree.
|
|
268
|
+
* @public
|
|
269
|
+
*/
|
|
270
|
+
tryConvertToNodeId(id: StableNodeId): NodeId | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* @returns the edit history of the tree.
|
|
273
|
+
* @public
|
|
274
|
+
*/
|
|
275
|
+
get edits(): OrderedEditSet;
|
|
276
|
+
/**
|
|
277
|
+
* @returns the edit history of the tree. The format of the contents of edits are subject to change and should not be relied upon.
|
|
278
|
+
* @internal
|
|
279
|
+
*/
|
|
280
|
+
get editsInternal(): OrderedEditSet<ChangeInternal>;
|
|
281
|
+
private deserializeHandle;
|
|
282
|
+
/**
|
|
283
|
+
* Uploads the edit chunk and sends the chunk starting revision along with the resulting handle as an op.
|
|
284
|
+
*/
|
|
285
|
+
private uploadEditChunk;
|
|
286
|
+
/**
|
|
287
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
|
|
288
|
+
*/
|
|
289
|
+
summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
|
|
290
|
+
/**
|
|
291
|
+
* Saves this SharedTree into a serialized summary. This is used for testing.
|
|
292
|
+
*
|
|
293
|
+
* @param summarizer - Optional summarizer to use. If not passed in, SharedTree's summarizer is used.
|
|
294
|
+
* @internal
|
|
295
|
+
*/
|
|
296
|
+
saveSerializedSummary(options?: {
|
|
297
|
+
serializer?: IFluidSerializer;
|
|
298
|
+
}): string;
|
|
299
|
+
/**
|
|
300
|
+
* Initialize shared tree with a serialized summary. This is used for testing.
|
|
301
|
+
* @returns - statistics about the loaded summary.
|
|
302
|
+
* @internal
|
|
303
|
+
*/
|
|
304
|
+
loadSerializedSummary(blobData: string): ITelemetryProperties;
|
|
305
|
+
/**
|
|
306
|
+
* Saves this SharedTree into a deserialized summary.
|
|
307
|
+
* @internal
|
|
308
|
+
*/
|
|
309
|
+
saveSummary(): SharedTreeSummaryBase;
|
|
310
|
+
/**
|
|
311
|
+
* Generates a SharedTree summary for the current state of the tree.
|
|
312
|
+
* Will never be called when local edits are present.
|
|
313
|
+
*/
|
|
314
|
+
private generateSummary;
|
|
315
|
+
/**
|
|
316
|
+
* Initialize shared tree with a deserialized summary.
|
|
317
|
+
* @internal
|
|
318
|
+
*/
|
|
319
|
+
loadSummary(summary: SharedTreeSummaryBase): void;
|
|
320
|
+
private static eventFromEditResult;
|
|
321
|
+
/**
|
|
322
|
+
* Initializes a new `EditLog` and `CachingLogViewer` on this `SharedTree`, replacing and disposing of any previously existing ones.
|
|
323
|
+
* @returns the initialized values (this is mostly to keep the constructor happy)
|
|
324
|
+
*/
|
|
325
|
+
private initializeNewEditLogFromSummary;
|
|
326
|
+
/**
|
|
327
|
+
* Upload any full chunks that have yet to be uploaded.
|
|
328
|
+
*/
|
|
329
|
+
private uploadCatchUpBlobs;
|
|
330
|
+
/**
|
|
331
|
+
* Compares this shared tree to another for equality. Should only be used for internal correctness testing.
|
|
332
|
+
*
|
|
333
|
+
* Equality means that the histories as captured by the EditLogs are equivalent.
|
|
334
|
+
*
|
|
335
|
+
* Equality does not include:
|
|
336
|
+
* - if an edit is open
|
|
337
|
+
* - the shared tree's id
|
|
338
|
+
* - local vs sequenced status of edits
|
|
339
|
+
* - registered event listeners
|
|
340
|
+
* - state of caches
|
|
341
|
+
*
|
|
342
|
+
* @internal
|
|
343
|
+
* */
|
|
344
|
+
equals(sharedTree: SharedTree): boolean;
|
|
345
|
+
/**
|
|
346
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
|
|
347
|
+
*/
|
|
348
|
+
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
349
|
+
/**
|
|
350
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
|
|
351
|
+
*/
|
|
352
|
+
protected processCore(message: unknown, local: boolean): void;
|
|
353
|
+
/**
|
|
354
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.registerCore}
|
|
355
|
+
*/
|
|
356
|
+
protected registerCore(): void;
|
|
357
|
+
/**
|
|
358
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
|
|
359
|
+
*/
|
|
360
|
+
protected onDisconnect(): void;
|
|
361
|
+
/**
|
|
362
|
+
* Parses a sequenced edit. This is only invoked for ops with version matching the current `writeFormat`.
|
|
363
|
+
*/
|
|
364
|
+
private parseSequencedEdit;
|
|
365
|
+
private encodeSemiSerializedEdit;
|
|
366
|
+
private processSequencedEdit;
|
|
367
|
+
/**
|
|
368
|
+
* Updates SharedTree to the provided version if the version is a valid write version newer than the current version.
|
|
369
|
+
* @param version - The version to update to.
|
|
370
|
+
*/
|
|
371
|
+
private processVersionUpdate;
|
|
372
|
+
private upgradeFrom_0_0_2_to_0_1_1;
|
|
373
|
+
/**
|
|
374
|
+
* Applies a set of changes to this tree. The result will be reflected in `SharedTree.currentView`.
|
|
375
|
+
* This method does not allow for snapshot isolation, as the changes are always applied to the most recent revision.
|
|
376
|
+
* If it is desireable to read from and apply changes to a fixed view that does not change when remote changes arrive, `Checkout`
|
|
377
|
+
* should be used instead.
|
|
378
|
+
* @public
|
|
379
|
+
*/
|
|
380
|
+
applyEdit(...changes: Change[]): Edit<unknown>;
|
|
381
|
+
applyEdit(changes: Change[]): Edit<unknown>;
|
|
382
|
+
/**
|
|
383
|
+
* Applies a set of internal changes to this tree. The result will be reflected in `SharedTree.currentView`.
|
|
384
|
+
* External users should use one of the more specialized functions, like `applyEdit` which handles constructing the actual `Edit`
|
|
385
|
+
* and uses public Change types.
|
|
386
|
+
* This is exposed for internal use only.
|
|
387
|
+
* @internal
|
|
388
|
+
*/
|
|
389
|
+
applyEditInternal(editOrChanges: Edit<ChangeInternal> | readonly ChangeInternal[]): Edit<ChangeInternal>;
|
|
390
|
+
/**
|
|
391
|
+
* Converts a public Change type to an internal representation.
|
|
392
|
+
* This is exposed for internal use only.
|
|
393
|
+
* @internal
|
|
394
|
+
*/
|
|
395
|
+
internalizeChange(change: Change): ChangeInternal;
|
|
396
|
+
private applyEditLocally;
|
|
397
|
+
/**
|
|
398
|
+
* Reverts a previous edit by applying a new edit containing the inverse of the original edit's changes.
|
|
399
|
+
* @param editId - the edit to revert
|
|
400
|
+
* @returns the id of the new edit, or undefined if the original edit could not be inverted given the current tree state.
|
|
401
|
+
* @public
|
|
402
|
+
*/
|
|
403
|
+
revert(editId: EditId): EditId | undefined;
|
|
404
|
+
/**
|
|
405
|
+
* Revert the given changes
|
|
406
|
+
* @param changes - the changes to revert
|
|
407
|
+
* @param before - the revision view before the changes were originally applied
|
|
408
|
+
* @returns the inverse of `changes` or undefined if the changes could not be inverted for the given tree state.
|
|
409
|
+
* @internal
|
|
410
|
+
*/
|
|
411
|
+
revertChanges(changes: readonly ChangeInternal[], before: RevisionView): ChangeInternal[] | undefined;
|
|
412
|
+
/**
|
|
413
|
+
* Submits an edit by the local client to the runtime.
|
|
414
|
+
*/
|
|
415
|
+
private submitEditOp;
|
|
416
|
+
private serializeEdit;
|
|
417
|
+
/** A type-safe `submitLocalMessage` wrapper to enforce op format */
|
|
418
|
+
private submitOp;
|
|
419
|
+
getRuntime(): IFluidDataStoreRuntime;
|
|
420
|
+
/**
|
|
421
|
+
* "Pending local state" refers to ops submitted to the runtime that have not yet been acked.
|
|
422
|
+
* When closing a container, hosts have the option to stash this pending local state somewhere to be reapplied
|
|
423
|
+
* later (to avoid data loss).
|
|
424
|
+
* If a host then loads a container using that stashed state, this function is called for each stashed op, and is expected to:
|
|
425
|
+
* 1. Update this DDS to reflect that state locally.
|
|
426
|
+
* 2. Return any `localOpMetadata` that would have been associated with this op.
|
|
427
|
+
*
|
|
428
|
+
* @param content - op to apply locally.
|
|
429
|
+
*/
|
|
430
|
+
protected applyStashedOp(op: unknown): void;
|
|
431
|
+
private changeWriteFormat;
|
|
432
|
+
/**
|
|
433
|
+
* Interns all Definitions and TraitLabel_s referenced by the provided edit.
|
|
434
|
+
*
|
|
435
|
+
* Clients must have consensus on the interned values to guarantee the interned ID is valid.
|
|
436
|
+
*/
|
|
437
|
+
private internStringsFromEdit;
|
|
438
|
+
}
|
|
439
|
+
//# sourceMappingURL=SharedTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedTree.d.ts","sourceRoot":"","sources":["../src/SharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAEN,gBAAgB,EAChB,mBAAmB,EAEnB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAA6D,cAAc,EAAE,MAAM,WAAW,CAAC;AACtG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAA2D,MAAM,eAAe,CAAC;AAEtH,OAAO,EAIN,SAAS,EAGT,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAEN,cAAc,EAKd,IAAI,EAGJ,UAAU,EAWV,qBAAqB,EAIrB,WAAW,EAEX,MAAM,mBAAmB,CAAC;AAW3B,OAAO,EAAoB,aAAa,EAA2C,MAAM,mBAAmB,CAAC;AAE7G,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAA4B,MAAM,EAAc,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;A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