@fluid-experimental/tree 2.0.0-internal.8.0.0 → 2.0.0-rc.1.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.
Files changed (215) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/api-extractor-lint.json +1 -10
  3. package/api-extractor.json +0 -9
  4. package/api-report/experimental-tree.api.md +131 -130
  5. package/dist/ChangeTypes.d.ts +15 -15
  6. package/dist/ChangeTypes.js +4 -4
  7. package/dist/ChangeTypes.js.map +1 -1
  8. package/dist/Checkout.d.ts +4 -4
  9. package/dist/Checkout.js +3 -3
  10. package/dist/Checkout.js.map +1 -1
  11. package/dist/Common.d.ts +1 -1
  12. package/dist/Common.d.ts.map +1 -1
  13. package/dist/Common.js.map +1 -1
  14. package/dist/EagerCheckout.d.ts +1 -1
  15. package/dist/EagerCheckout.js +1 -1
  16. package/dist/EagerCheckout.js.map +1 -1
  17. package/dist/EditLog.d.ts +3 -2
  18. package/dist/EditLog.d.ts.map +1 -1
  19. package/dist/EditLog.js +3 -5
  20. package/dist/EditLog.js.map +1 -1
  21. package/dist/EditUtilities.d.ts +5 -5
  22. package/dist/EditUtilities.js +2 -2
  23. package/dist/EditUtilities.js.map +1 -1
  24. package/dist/EventTypes.d.ts +1 -1
  25. package/dist/EventTypes.js +1 -1
  26. package/dist/EventTypes.js.map +1 -1
  27. package/dist/Forest.d.ts +4 -4
  28. package/dist/Forest.js +3 -6
  29. package/dist/Forest.js.map +1 -1
  30. package/dist/Identifiers.d.ts +14 -14
  31. package/dist/Identifiers.js.map +1 -1
  32. package/dist/InitialTree.d.ts +1 -1
  33. package/dist/InitialTree.js +1 -1
  34. package/dist/InitialTree.js.map +1 -1
  35. package/dist/LogViewer.d.ts +2 -2
  36. package/dist/LogViewer.js +1 -1
  37. package/dist/LogViewer.js.map +1 -1
  38. package/dist/NodeIdUtilities.d.ts +3 -3
  39. package/dist/NodeIdUtilities.js.map +1 -1
  40. package/dist/PayloadUtilities.d.ts +1 -1
  41. package/dist/PayloadUtilities.js +1 -1
  42. package/dist/PayloadUtilities.js.map +1 -1
  43. package/dist/ReconciliationPath.d.ts +3 -3
  44. package/dist/ReconciliationPath.js.map +1 -1
  45. package/dist/RevisionValueCache.d.ts +1 -1
  46. package/dist/RevisionValueCache.js +2 -2
  47. package/dist/RevisionValueCache.js.map +1 -1
  48. package/dist/RevisionView.d.ts +2 -2
  49. package/dist/RevisionView.js +2 -2
  50. package/dist/RevisionView.js.map +1 -1
  51. package/dist/SharedTree.d.ts +14 -14
  52. package/dist/SharedTree.js +2 -2
  53. package/dist/SharedTree.js.map +1 -1
  54. package/dist/Transaction.d.ts +3 -3
  55. package/dist/Transaction.js +2 -2
  56. package/dist/Transaction.js.map +1 -1
  57. package/dist/TransactionInternal.d.ts +17 -17
  58. package/dist/TransactionInternal.js +3 -3
  59. package/dist/TransactionInternal.js.map +1 -1
  60. package/dist/TreeView.d.ts +7 -7
  61. package/dist/TreeView.js +1 -1
  62. package/dist/TreeView.js.map +1 -1
  63. package/dist/id-compressor/IdCompressor.js +2 -5
  64. package/dist/id-compressor/IdCompressor.js.map +1 -1
  65. package/dist/migration-shim/migrationShim.d.ts +3 -3
  66. package/dist/migration-shim/migrationShim.d.ts.map +1 -1
  67. package/dist/migration-shim/migrationShim.js +9 -5
  68. package/dist/migration-shim/migrationShim.js.map +1 -1
  69. package/dist/migration-shim/migrationShimFactory.d.ts +2 -2
  70. package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
  71. package/dist/migration-shim/migrationShimFactory.js.map +1 -1
  72. package/dist/migration-shim/sharedTreeShim.d.ts +4 -4
  73. package/dist/migration-shim/sharedTreeShim.d.ts.map +1 -1
  74. package/dist/migration-shim/sharedTreeShim.js +1 -1
  75. package/dist/migration-shim/sharedTreeShim.js.map +1 -1
  76. package/dist/migration-shim/sharedTreeShimFactory.d.ts +1 -2
  77. package/dist/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
  78. package/dist/migration-shim/sharedTreeShimFactory.js.map +1 -1
  79. package/dist/migration-shim/shimDeltaConnection.d.ts +16 -0
  80. package/dist/migration-shim/shimDeltaConnection.d.ts.map +1 -1
  81. package/dist/migration-shim/shimDeltaConnection.js +16 -2
  82. package/dist/migration-shim/shimDeltaConnection.js.map +1 -1
  83. package/dist/migration-shim/types.d.ts +1 -1
  84. package/dist/migration-shim/types.d.ts.map +1 -1
  85. package/dist/migration-shim/types.js.map +1 -1
  86. package/dist/persisted-types/0.0.2.d.ts +24 -24
  87. package/dist/persisted-types/0.0.2.js +5 -5
  88. package/dist/persisted-types/0.0.2.js.map +1 -1
  89. package/dist/persisted-types/0.1.1.d.ts +14 -14
  90. package/dist/persisted-types/0.1.1.js +3 -3
  91. package/dist/persisted-types/0.1.1.js.map +1 -1
  92. package/dist/tree-alpha.d.ts +2674 -119
  93. package/dist/tree-beta.d.ts +1 -50
  94. package/dist/tree-public.d.ts +1 -52
  95. package/dist/tree-untrimmed.d.ts +142 -143
  96. package/lib/ChangeTypes.d.ts +15 -15
  97. package/lib/ChangeTypes.js +4 -4
  98. package/lib/ChangeTypes.js.map +1 -1
  99. package/lib/Checkout.d.ts +4 -4
  100. package/lib/Checkout.js +3 -3
  101. package/lib/Checkout.js.map +1 -1
  102. package/lib/Common.d.ts +1 -1
  103. package/lib/Common.d.ts.map +1 -1
  104. package/lib/Common.js.map +1 -1
  105. package/lib/EagerCheckout.d.ts +1 -1
  106. package/lib/EagerCheckout.js +1 -1
  107. package/lib/EagerCheckout.js.map +1 -1
  108. package/lib/EditLog.d.ts +3 -2
  109. package/lib/EditLog.d.ts.map +1 -1
  110. package/lib/EditLog.js +2 -1
  111. package/lib/EditLog.js.map +1 -1
  112. package/lib/EditUtilities.d.ts +5 -5
  113. package/lib/EditUtilities.js +2 -2
  114. package/lib/EditUtilities.js.map +1 -1
  115. package/lib/EventTypes.d.ts +1 -1
  116. package/lib/EventTypes.js +1 -1
  117. package/lib/EventTypes.js.map +1 -1
  118. package/lib/Forest.d.ts +4 -4
  119. package/lib/Forest.js +2 -2
  120. package/lib/Forest.js.map +1 -1
  121. package/lib/Identifiers.d.ts +14 -14
  122. package/lib/Identifiers.js.map +1 -1
  123. package/lib/InitialTree.d.ts +1 -1
  124. package/lib/InitialTree.js +1 -1
  125. package/lib/InitialTree.js.map +1 -1
  126. package/lib/LogViewer.d.ts +2 -2
  127. package/lib/LogViewer.js +1 -1
  128. package/lib/LogViewer.js.map +1 -1
  129. package/lib/NodeIdUtilities.d.ts +3 -3
  130. package/lib/NodeIdUtilities.js.map +1 -1
  131. package/lib/PayloadUtilities.d.ts +1 -1
  132. package/lib/PayloadUtilities.js +1 -1
  133. package/lib/PayloadUtilities.js.map +1 -1
  134. package/lib/ReconciliationPath.d.ts +3 -3
  135. package/lib/ReconciliationPath.js.map +1 -1
  136. package/lib/RevisionValueCache.d.ts +1 -1
  137. package/lib/RevisionValueCache.js +1 -1
  138. package/lib/RevisionValueCache.js.map +1 -1
  139. package/lib/RevisionView.d.ts +2 -2
  140. package/lib/RevisionView.js +2 -2
  141. package/lib/RevisionView.js.map +1 -1
  142. package/lib/SharedTree.d.ts +14 -14
  143. package/lib/SharedTree.js +2 -2
  144. package/lib/SharedTree.js.map +1 -1
  145. package/lib/Transaction.d.ts +3 -3
  146. package/lib/Transaction.js +2 -2
  147. package/lib/Transaction.js.map +1 -1
  148. package/lib/TransactionInternal.d.ts +17 -17
  149. package/lib/TransactionInternal.js +3 -3
  150. package/lib/TransactionInternal.js.map +1 -1
  151. package/lib/TreeView.d.ts +7 -7
  152. package/lib/TreeView.js +1 -1
  153. package/lib/TreeView.js.map +1 -1
  154. package/lib/id-compressor/IdCompressor.js +1 -1
  155. package/lib/id-compressor/IdCompressor.js.map +1 -1
  156. package/lib/migration-shim/migrationShim.d.ts +3 -3
  157. package/lib/migration-shim/migrationShim.d.ts.map +1 -1
  158. package/lib/migration-shim/migrationShim.js +9 -5
  159. package/lib/migration-shim/migrationShim.js.map +1 -1
  160. package/lib/migration-shim/migrationShimFactory.d.ts +2 -2
  161. package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
  162. package/lib/migration-shim/migrationShimFactory.js.map +1 -1
  163. package/lib/migration-shim/sharedTreeShim.d.ts +4 -4
  164. package/lib/migration-shim/sharedTreeShim.d.ts.map +1 -1
  165. package/lib/migration-shim/sharedTreeShim.js +1 -1
  166. package/lib/migration-shim/sharedTreeShim.js.map +1 -1
  167. package/lib/migration-shim/sharedTreeShimFactory.d.ts +1 -2
  168. package/lib/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
  169. package/lib/migration-shim/sharedTreeShimFactory.js.map +1 -1
  170. package/lib/migration-shim/shimDeltaConnection.d.ts +16 -0
  171. package/lib/migration-shim/shimDeltaConnection.d.ts.map +1 -1
  172. package/lib/migration-shim/shimDeltaConnection.js +16 -2
  173. package/lib/migration-shim/shimDeltaConnection.js.map +1 -1
  174. package/lib/migration-shim/types.d.ts +1 -1
  175. package/lib/migration-shim/types.d.ts.map +1 -1
  176. package/lib/migration-shim/types.js.map +1 -1
  177. package/lib/persisted-types/0.0.2.d.ts +24 -24
  178. package/lib/persisted-types/0.0.2.js +5 -5
  179. package/lib/persisted-types/0.0.2.js.map +1 -1
  180. package/lib/persisted-types/0.1.1.d.ts +14 -14
  181. package/lib/persisted-types/0.1.1.js +3 -3
  182. package/lib/persisted-types/0.1.1.js.map +1 -1
  183. package/lib/test/utilities/TestUtilities.d.ts +1 -2
  184. package/lib/test/utilities/TestUtilities.d.ts.map +1 -1
  185. package/lib/test/utilities/TestUtilities.js.map +1 -1
  186. package/package.json +25 -25
  187. package/src/ChangeTypes.ts +15 -15
  188. package/src/Checkout.ts +4 -4
  189. package/src/Common.ts +1 -1
  190. package/src/EagerCheckout.ts +1 -1
  191. package/src/EditLog.ts +4 -3
  192. package/src/EditUtilities.ts +5 -5
  193. package/src/EventTypes.ts +1 -1
  194. package/src/Forest.ts +5 -5
  195. package/src/Identifiers.ts +14 -14
  196. package/src/InitialTree.ts +1 -1
  197. package/src/LogViewer.ts +2 -2
  198. package/src/NodeIdUtilities.ts +3 -3
  199. package/src/PayloadUtilities.ts +1 -1
  200. package/src/ReconciliationPath.ts +3 -3
  201. package/src/RevisionValueCache.ts +2 -2
  202. package/src/RevisionView.ts +2 -2
  203. package/src/SharedTree.ts +14 -14
  204. package/src/Transaction.ts +3 -3
  205. package/src/TransactionInternal.ts +17 -17
  206. package/src/TreeView.ts +7 -7
  207. package/src/id-compressor/IdCompressor.ts +1 -1
  208. package/src/migration-shim/migrationShim.ts +17 -9
  209. package/src/migration-shim/migrationShimFactory.ts +2 -2
  210. package/src/migration-shim/sharedTreeShim.ts +6 -5
  211. package/src/migration-shim/sharedTreeShimFactory.ts +1 -2
  212. package/src/migration-shim/shimDeltaConnection.ts +16 -2
  213. package/src/migration-shim/types.ts +1 -1
  214. package/src/persisted-types/0.0.2.ts +24 -24
  215. package/src/persisted-types/0.1.1.ts +14 -14
@@ -20,7 +20,7 @@ import type { EditId, Definition, NodeId, StableNodeId, TraitLabel, DetachedSequ
20
20
  * Each place can be specified, (aka 'anchored') in two ways (relative to the sibling before or after):
21
21
  * the choice of which way to anchor a place only matters when the kept across an edit, and thus evaluated in multiple contexts where the
22
22
  * two place description may no longer evaluate to the same place.
23
- * @internal
23
+ * @alpha
24
24
  */
25
25
  export declare enum Side {
26
26
  Before = 0,
@@ -29,7 +29,7 @@ export declare enum Side {
29
29
  /**
30
30
  * A collection of changes to the tree that are applied atomically along with a unique identifier for the edit.
31
31
  * If any individual change fails to apply, the entire Edit will fail to apply.
32
- * @internal
32
+ * @alpha
33
33
  */
34
34
  export interface Edit<TChange> extends EditBase<TChange> {
35
35
  /**
@@ -51,7 +51,7 @@ export interface EditWithoutId<TChange> extends EditBase<TChange> {
51
51
  }
52
52
  /**
53
53
  * The information included in an edit.
54
- * @internal
54
+ * @alpha
55
55
  */
56
56
  export interface EditBase<TChange> {
57
57
  /**
@@ -73,33 +73,33 @@ export interface EditBase<TChange> {
73
73
  * See {@link comparePayloads} for equality semantics and related details (like what is allowed to be lost when serializing)
74
74
  *
75
75
  * TODO:#51984: Allow opting into heuristic blobbing in snapshots with a special IFluid key.
76
- * @internal
76
+ * @alpha
77
77
  */
78
78
  export type Payload = any;
79
79
  /**
80
80
  * Json compatible map as object.
81
81
  * Keys are TraitLabels,
82
82
  * Values are the content of the trait specified by the key.
83
- * @internal
83
+ * @alpha
84
84
  */
85
85
  export interface TraitMap<TChild> {
86
86
  readonly [key: string]: TreeNodeSequence<TChild>;
87
87
  }
88
88
  /**
89
89
  * A sequence of Nodes that make up a trait under a Node
90
- * @internal
90
+ * @alpha
91
91
  */
92
92
  export type TreeNodeSequence<TChild> = readonly TChild[];
93
93
  /**
94
94
  * An object which may have traits with children of the given type underneath it
95
- * @internal
95
+ * @alpha
96
96
  */
97
97
  export interface HasTraits<TChild> {
98
98
  readonly traits: TraitMap<TChild>;
99
99
  }
100
100
  /**
101
101
  * The fields required by a node in a tree
102
- * @internal
102
+ * @alpha
103
103
  */
104
104
  export interface NodeData<TId> {
105
105
  /**
@@ -119,7 +119,7 @@ export interface NodeData<TId> {
119
119
  }
120
120
  /**
121
121
  * Satisfies `NodeData` and may contain children under traits (which may or may not be `TreeNodes`)
122
- * @internal
122
+ * @alpha
123
123
  */
124
124
  export interface TreeNode<TChild, TId> extends NodeData<TId>, HasTraits<TChild> {
125
125
  }
@@ -130,7 +130,7 @@ export interface TreeNode<TChild, TId> extends NodeData<TId>, HasTraits<TChild>
130
130
  export type PlaceholderTree<TPlaceholder = never> = TreeNode<PlaceholderTree<TPlaceholder>, NodeId> | TPlaceholder;
131
131
  /**
132
132
  * Specifies the location of a trait (a labeled sequence of nodes) within the tree.
133
- * @internal
133
+ * @alpha
134
134
  */
135
135
  export interface TraitLocationInternal_0_0_2 {
136
136
  readonly parent: StableNodeId;
@@ -138,12 +138,12 @@ export interface TraitLocationInternal_0_0_2 {
138
138
  }
139
139
  /**
140
140
  * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.
141
- * @internal
141
+ * @alpha
142
142
  */
143
143
  export type ChangeNode_0_0_2 = TreeNode<ChangeNode_0_0_2, StableNodeId>;
144
144
  /**
145
145
  * The status code of an attempt to apply the changes in an Edit.
146
- * @internal
146
+ * @alpha
147
147
  */
148
148
  export declare enum EditStatus {
149
149
  /**
@@ -211,7 +211,7 @@ export interface SharedTreeEditOp_0_0_2 extends VersionedOp<WriteFormat.v0_0_2>
211
211
  }
212
212
  /**
213
213
  * Format versions that SharedTree supports writing. Changes to op or summary formats necessitate updates.
214
- * @internal
214
+ * @alpha
215
215
  */
216
216
  export declare enum WriteFormat {
217
217
  /** Stores all edits in their raw format. */
@@ -221,7 +221,7 @@ export declare enum WriteFormat {
221
221
  }
222
222
  /**
223
223
  * The minimal information on a SharedTree summary. Contains the summary format version.
224
- * @internal
224
+ * @alpha
225
225
  */
226
226
  export interface SharedTreeSummaryBase {
227
227
  /**
@@ -244,7 +244,7 @@ export interface SharedTreeSummary_0_0_2 extends SharedTreeSummaryBase {
244
244
  }
245
245
  /**
246
246
  * {@inheritdoc ChangeType}
247
- * @internal
247
+ * @alpha
248
248
  */
249
249
  export declare enum ChangeTypeInternal {
250
250
  Insert = 0,
@@ -261,12 +261,12 @@ export declare enum ChangeTypeInternal {
261
261
  export type ChangeInternal_0_0_2 = InsertInternal_0_0_2 | DetachInternal_0_0_2 | BuildInternal_0_0_2 | SetValueInternal_0_0_2 | ConstraintInternal_0_0_2;
262
262
  /**
263
263
  * {@inheritdoc BuildNode}
264
- * @internal
264
+ * @alpha
265
265
  */
266
266
  export type BuildNodeInternal_0_0_2 = TreeNode<BuildNodeInternal_0_0_2, StableNodeId> | DetachedSequenceId;
267
267
  /**
268
268
  * {@inheritdoc Build}
269
- * @internal
269
+ * @alpha
270
270
  */
271
271
  export interface BuildInternal_0_0_2 {
272
272
  /** {@inheritdoc Build.destination } */
@@ -278,7 +278,7 @@ export interface BuildInternal_0_0_2 {
278
278
  }
279
279
  /**
280
280
  * {@inheritdoc (Insert:interface)}
281
- * @internal
281
+ * @alpha
282
282
  */
283
283
  export interface InsertInternal_0_0_2 {
284
284
  /** {@inheritdoc (Insert:interface).destination } */
@@ -290,7 +290,7 @@ export interface InsertInternal_0_0_2 {
290
290
  }
291
291
  /**
292
292
  * {@inheritdoc Detach}
293
- * @internal
293
+ * @alpha
294
294
  */
295
295
  export interface DetachInternal_0_0_2 {
296
296
  /** {@inheritdoc Detach.destination } */
@@ -302,7 +302,7 @@ export interface DetachInternal_0_0_2 {
302
302
  }
303
303
  /**
304
304
  * {@inheritdoc SetValue}
305
- * @internal
305
+ * @alpha
306
306
  */
307
307
  export interface SetValueInternal_0_0_2 {
308
308
  /** {@inheritdoc SetValue.nodeToModify } */
@@ -314,7 +314,7 @@ export interface SetValueInternal_0_0_2 {
314
314
  }
315
315
  /**
316
316
  * What to do when a Constraint is violated.
317
- * @internal
317
+ * @alpha
318
318
  */
319
319
  export declare enum ConstraintEffect {
320
320
  /**
@@ -334,7 +334,7 @@ export declare enum ConstraintEffect {
334
334
  }
335
335
  /**
336
336
  * {@inheritdoc Constraint}
337
- * @internal
337
+ * @alpha
338
338
  */
339
339
  export interface ConstraintInternal_0_0_2 {
340
340
  /** {@inheritdoc Constraint.toConstrain } */
@@ -356,7 +356,7 @@ export interface ConstraintInternal_0_0_2 {
356
356
  }
357
357
  /**
358
358
  * {@inheritdoc (StablePlace:interface) }
359
- * @internal
359
+ * @alpha
360
360
  */
361
361
  export interface StablePlaceInternal_0_0_2 {
362
362
  /**
@@ -374,7 +374,7 @@ export interface StablePlaceInternal_0_0_2 {
374
374
  }
375
375
  /**
376
376
  * {@inheritdoc (StableRange:interface) }
377
- * @internal
377
+ * @alpha
378
378
  */
379
379
  export interface StableRangeInternal_0_0_2 {
380
380
  /** {@inheritdoc (StableRange:interface).start } */
@@ -19,7 +19,7 @@
19
19
  * Each place can be specified, (aka 'anchored') in two ways (relative to the sibling before or after):
20
20
  * the choice of which way to anchor a place only matters when the kept across an edit, and thus evaluated in multiple contexts where the
21
21
  * two place description may no longer evaluate to the same place.
22
- * @internal
22
+ * @alpha
23
23
  */
24
24
  export var Side;
25
25
  (function (Side) {
@@ -28,7 +28,7 @@ export var Side;
28
28
  })(Side || (Side = {}));
29
29
  /**
30
30
  * The status code of an attempt to apply the changes in an Edit.
31
- * @internal
31
+ * @alpha
32
32
  */
33
33
  export var EditStatus;
34
34
  (function (EditStatus) {
@@ -64,7 +64,7 @@ export var SharedTreeOpType;
64
64
  })(SharedTreeOpType || (SharedTreeOpType = {}));
65
65
  /**
66
66
  * Format versions that SharedTree supports writing. Changes to op or summary formats necessitate updates.
67
- * @internal
67
+ * @alpha
68
68
  */
69
69
  export var WriteFormat;
70
70
  (function (WriteFormat) {
@@ -75,7 +75,7 @@ export var WriteFormat;
75
75
  })(WriteFormat || (WriteFormat = {}));
76
76
  /**
77
77
  * {@inheritdoc ChangeType}
78
- * @internal
78
+ * @alpha
79
79
  */
80
80
  export var ChangeTypeInternal;
81
81
  (function (ChangeTypeInternal) {
@@ -88,7 +88,7 @@ export var ChangeTypeInternal;
88
88
  })(ChangeTypeInternal || (ChangeTypeInternal = {}));
89
89
  /**
90
90
  * What to do when a Constraint is violated.
91
- * @internal
91
+ * @alpha
92
92
  */
93
93
  export var ConstraintEffect;
94
94
  (function (ConstraintEffect) {
@@ -1 +1 @@
1
- {"version":3,"file":"0.0.2.js","sourceRoot":"","sources":["../../src/persisted-types/0.0.2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAN,IAAY,IAGX;AAHD,WAAY,IAAI;IACf,mCAAU,CAAA;IACV,iCAAS,CAAA;AACV,CAAC,EAHW,IAAI,KAAJ,IAAI,QAGf;AAqID;;;GAGG;AACH,MAAM,CAAN,IAAY,UAgBX;AAhBD,WAAY,UAAU;IACrB;;;;OAIG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,iDAAO,CAAA;IACP;;OAEG;IACH,iDAAO,CAAA;AACR,CAAC,EAhBW,UAAU,KAAV,UAAU,QAgBrB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,4CAA4C;IAC5C,uDAAI,CAAA;IACJ,iEAAiE;IACjE,2DAAM,CAAA;IACN,mDAAmD;IACnD,uDAAI,CAAA;IACJ,sFAAsF;IACtF,2DAAM,CAAA;AACP,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAyCD;;;GAGG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACtB,4CAA4C;IAC5C,+BAAgB,CAAA;IAChB,2GAA2G;IAC3G,+BAAgB,CAAA;AACjB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AA4BD;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC7B,+DAAM,CAAA;IACN,+DAAM,CAAA;IACN,6DAAK,CAAA;IACL,mEAAQ,CAAA;IACR,uEAAU,CAAA;IACV,iFAAe,CAAA;AAChB,CAAC,EAPW,kBAAkB,KAAlB,kBAAkB,QAO7B;AAwED;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAiBX;AAjBD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,iFAAiB,CAAA;IAEjB;;;OAGG;IACH,uEAAY,CAAA;IAEZ;;;OAGG;IACH,mEAAU,CAAA;AACX,CAAC,EAjBW,gBAAgB,KAAhB,gBAAgB,QAiB3B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tEditId,\n\tDefinition,\n\tNodeId,\n\tStableNodeId,\n\tTraitLabel,\n\tDetachedSequenceId,\n\tUuidString,\n} from '../Identifiers';\n\n/**\n * Defines a place relative to sibling.\n * The \"outside\" of a trait is the `undefined` sibling,\n * so After `undefined` is the beginning of the trait, and before `undefined` is the end.\n *\n * For this purpose, traits look like:\n *\n * `{undefined} - {Node 0} - {Node 1} - ... - {Node N} - {undefined}`\n *\n * Each `{value}` in the diagram is a possible sibling, which is either a Node or undefined.\n * Each `-` in the above diagram is a `Place`, and can be describe as being `After` a particular `{sibling}` or `Before` it.\n * This means that `After` `{undefined}` means the same `Place` as before the first node\n * and `Before` `{undefined}` means the `Place` after the last Node.\n *\n * Each place can be specified, (aka 'anchored') in two ways (relative to the sibling before or after):\n * the choice of which way to anchor a place only matters when the kept across an edit, and thus evaluated in multiple contexts where the\n * two place description may no longer evaluate to the same place.\n * @internal\n */\nexport enum Side {\n\tBefore = 0,\n\tAfter = 1,\n}\n\n/**\n * A collection of changes to the tree that are applied atomically along with a unique identifier for the edit.\n * If any individual change fails to apply, the entire Edit will fail to apply.\n * @internal\n */\nexport interface Edit<TChange> extends EditBase<TChange> {\n\t/**\n\t * Unique identifier for this edit. Must never be reused.\n\t * Used for referencing and de-duplicating edits.\n\t */\n\treadonly id: EditId;\n}\n\n/**\n * A collection of changes to the tree that are applied atomically. If any individual change fails to apply,\n * the entire Edit will fail to apply.\n * @internal\n */\nexport interface EditWithoutId<TChange> extends EditBase<TChange> {\n\t/**\n\t * Used to explicitly state that EditWithoutId cannot contain an id and prevents type Edit from being assigned to type EditWithoutId.\n\t */\n\treadonly id?: never;\n}\n\n/**\n * The information included in an edit.\n * @internal\n */\nexport interface EditBase<TChange> {\n\t/**\n\t * Actual changes to apply.\n\t * Applied in order as part of a single transaction.\n\t */\n\treadonly changes: readonly TChange[];\n\n\t/**\n\t * For edits which are being re-issued due to a conflict, the number of times this edit has already been attempted.\n\t * Undefined means 0.\n\t */\n\treadonly pastAttemptCount?: number;\n\n\t// Add more metadata fields as needed in the future.\n\t// Include \"high level\"/\"Domain Specific\"/\"Hierarchal\" edits for application/domain use in implementing domain aware merge heuristics.\n}\n\n/**\n * Json compatible representation of a payload storing arbitrary Serializable data.\n *\n * Keys starting with \"IFluid\" are reserved for special use such as the JavaScript feature detection pattern and should not be used.\n *\n * See {@link comparePayloads} for equality semantics and related details (like what is allowed to be lost when serializing)\n *\n * TODO:#51984: Allow opting into heuristic blobbing in snapshots with a special IFluid key.\n * @internal\n */\nexport type Payload = any;\n\n/**\n * Json compatible map as object.\n * Keys are TraitLabels,\n * Values are the content of the trait specified by the key.\n * @internal\n */\nexport interface TraitMap<TChild> {\n\treadonly [key: string]: TreeNodeSequence<TChild>;\n}\n\n/**\n * A sequence of Nodes that make up a trait under a Node\n * @internal\n */\nexport type TreeNodeSequence<TChild> = readonly TChild[];\n\n/**\n * An object which may have traits with children of the given type underneath it\n * @internal\n */\nexport interface HasTraits<TChild> {\n\treadonly traits: TraitMap<TChild>;\n}\n\n/**\n * The fields required by a node in a tree\n * @internal\n */\nexport interface NodeData<TId> {\n\t/**\n\t * A payload of arbitrary serializable data\n\t */\n\treadonly payload?: Payload;\n\n\t/**\n\t * The meaning of this node.\n\t * Provides contexts/semantics for this node and its content.\n\t * Typically use to associate a node with metadata (including a schema) and source code (types, behaviors, etc).\n\t */\n\treadonly definition: Definition;\n\t/**\n\t * Identifier which can be used to refer to this Node.\n\t */\n\treadonly identifier: TId;\n}\n\n/**\n * Satisfies `NodeData` and may contain children under traits (which may or may not be `TreeNodes`)\n * @internal\n */\nexport interface TreeNode<TChild, TId> extends NodeData<TId>, HasTraits<TChild> {}\n\n/**\n * A tree whose nodes are either TreeNodes or a placeholder\n * @internal\n */\nexport type PlaceholderTree<TPlaceholder = never> = TreeNode<PlaceholderTree<TPlaceholder>, NodeId> | TPlaceholder;\n\n/**\n * Specifies the location of a trait (a labeled sequence of nodes) within the tree.\n * @internal\n */\nexport interface TraitLocationInternal_0_0_2 {\n\treadonly parent: StableNodeId;\n\treadonly label: TraitLabel;\n}\n\n/**\n * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.\n * @internal\n */\nexport type ChangeNode_0_0_2 = TreeNode<ChangeNode_0_0_2, StableNodeId>;\n\n/**\n * The status code of an attempt to apply the changes in an Edit.\n * @internal\n */\nexport enum EditStatus {\n\t/**\n\t * The edit contained one or more malformed changes (e.g. was missing required fields such as `id`),\n\t * or contained a sequence of changes that could not possibly be applied sequentially without error\n\t * (e.g. an edit which tries to insert the same detached node twice).\n\t */\n\tMalformed,\n\t/**\n\t * The edit contained a well-formed sequence of changes that couldn't be applied to the current view,\n\t * generally because concurrent changes caused one or more merge conflicts.\n\t */\n\tInvalid,\n\t/**\n\t * The edit was applied to the current view successfully.\n\t */\n\tApplied,\n}\n\n/**\n * Types of ops handled by SharedTree.\n */\nexport enum SharedTreeOpType {\n\t/** An op that includes edit information. */\n\tEdit,\n\t/** Includes a Fluid handle that corresponds to an edit chunk. */\n\tHandle,\n\t/** An op that does not affect the tree's state. */\n\tNoOp,\n\t/** Signals that SharedTree contents should be updated to match a new write format. */\n\tUpdate,\n}\n\n/**\n * SharedTreeOp containing a version stamp marking the write format of the tree which submitted it.\n */\nexport interface VersionedOp<Version extends WriteFormat = WriteFormat> {\n\t/** The supported SharedTree write version, see {@link WriteFormat}. */\n\treadonly version: Version;\n}\n\n/**\n * Requirements for SharedTree ops.\n */\nexport type SharedTreeOp_0_0_2 = SharedTreeEditOp_0_0_2 | SharedTreeNoOp | SharedTreeUpdateOp;\n\n/**\n * Op which has no application semantics. This op can be useful for triggering other\n */\nexport interface SharedTreeNoOp extends VersionedOp {\n\treadonly type: SharedTreeOpType.NoOp;\n}\n\n/**\n * Op indicating this SharedTree should upgrade its write format to the specified version.\n * The `version` field of this op reflects the version which should be upgraded to, not\n * the current version.\n * See docs/Breaking-Change-Migration.md for more details on the semantics of this op.\n */\nexport interface SharedTreeUpdateOp extends VersionedOp {\n\treadonly type: SharedTreeOpType.Update;\n}\n\n/**\n * A SharedTree op that includes edit information, and optionally a list of interned strings.\n */\nexport interface SharedTreeEditOp_0_0_2 extends VersionedOp<WriteFormat.v0_0_2> {\n\treadonly type: SharedTreeOpType.Edit;\n\t/** The collection of changes to apply. */\n\treadonly edit: Edit<ChangeInternal_0_0_2>;\n}\n\n/**\n * Format versions that SharedTree supports writing. Changes to op or summary formats necessitate updates.\n * @internal\n */\nexport enum WriteFormat {\n\t/** Stores all edits in their raw format. */\n\tv0_0_2 = '0.0.2',\n\t/** Supports history virtualization, tree compression, string interning, and makes currentView optional. */\n\tv0_1_1 = '0.1.1',\n}\n\n/**\n * The minimal information on a SharedTree summary. Contains the summary format version.\n * @internal\n */\nexport interface SharedTreeSummaryBase {\n\t/**\n\t * Field on summary under which version is stored.\n\t */\n\treadonly version: WriteFormat;\n}\n\n/**\n * Legacy summary format currently still used for writing.\n * TODO:#49901: Remove export when this format is no longer written.\n * @internal\n */\nexport interface SharedTreeSummary_0_0_2 extends SharedTreeSummaryBase {\n\treadonly version: WriteFormat.v0_0_2;\n\n\treadonly currentTree: ChangeNode_0_0_2;\n\t/**\n\t * A list of edits.\n\t */\n\treadonly sequencedEdits: readonly Edit<ChangeInternal_0_0_2>[];\n}\n\n/**\n * {@inheritdoc ChangeType}\n * @internal\n */\nexport enum ChangeTypeInternal {\n\tInsert,\n\tDetach,\n\tBuild,\n\tSetValue,\n\tConstraint,\n\tCompressedBuild,\n}\n\n/**\n * {@inheritdoc (Change:type)}\n * @public\n */\nexport type ChangeInternal_0_0_2 =\n\t| InsertInternal_0_0_2\n\t| DetachInternal_0_0_2\n\t| BuildInternal_0_0_2\n\t| SetValueInternal_0_0_2\n\t| ConstraintInternal_0_0_2;\n\n/**\n * {@inheritdoc BuildNode}\n * @internal\n */\nexport type BuildNodeInternal_0_0_2 = TreeNode<BuildNodeInternal_0_0_2, StableNodeId> | DetachedSequenceId;\n\n/**\n * {@inheritdoc Build}\n * @internal\n */\nexport interface BuildInternal_0_0_2 {\n\t/** {@inheritdoc Build.destination } */\n\treadonly destination: DetachedSequenceId;\n\t/** {@inheritdoc Build.source } */\n\treadonly source: TreeNodeSequence<BuildNodeInternal_0_0_2>;\n\t/** {@inheritdoc Build.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Build;\n}\n\n/**\n * {@inheritdoc (Insert:interface)}\n * @internal\n */\nexport interface InsertInternal_0_0_2 {\n\t/** {@inheritdoc (Insert:interface).destination } */\n\treadonly destination: StablePlaceInternal_0_0_2;\n\t/** {@inheritdoc (Insert:interface).source } */\n\treadonly source: DetachedSequenceId;\n\t/** {@inheritdoc (Insert:interface).\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Insert;\n}\n\n/**\n * {@inheritdoc Detach}\n * @internal\n */\nexport interface DetachInternal_0_0_2 {\n\t/** {@inheritdoc Detach.destination } */\n\treadonly destination?: DetachedSequenceId;\n\t/** {@inheritdoc Detach.source } */\n\treadonly source: StableRangeInternal_0_0_2;\n\t/** {@inheritdoc Detach.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Detach;\n}\n\n/**\n * {@inheritdoc SetValue}\n * @internal\n */\nexport interface SetValueInternal_0_0_2 {\n\t/** {@inheritdoc SetValue.nodeToModify } */\n\treadonly nodeToModify: StableNodeId;\n\t/** {@inheritdoc SetValue.payload } */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\treadonly payload: Payload | null;\n\t/** {@inheritdoc SetValue.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.SetValue;\n}\n\n/**\n * What to do when a Constraint is violated.\n * @internal\n */\nexport enum ConstraintEffect {\n\t/**\n\t * Discard Edit.\n\t */\n\tInvalidAndDiscard,\n\n\t/**\n\t * Discard Edit, but record metadata that application may want to try and recover this change by recreating it.\n\t * Should this be the default policy for when another (non Constraint) change is invalid?\n\t */\n\tInvalidRetry,\n\n\t/**\n\t * Apply the change, but flag it for possible reconsideration by the app\n\t * (applying it is better than not, but perhaps the high level logic could produce something better).\n\t */\n\tValidRetry,\n}\n\n/**\n * {@inheritdoc Constraint}\n * @internal\n */\nexport interface ConstraintInternal_0_0_2 {\n\t/** {@inheritdoc Constraint.toConstrain } */\n\treadonly toConstrain: StableRangeInternal_0_0_2;\n\t/** {@inheritdoc Constraint.identityHash } */\n\treadonly identityHash?: UuidString;\n\t/** {@inheritdoc Constraint.length } */\n\treadonly length?: number;\n\t/** {@inheritdoc Constraint.contentHash } */\n\treadonly contentHash?: UuidString;\n\t/** {@inheritdoc Constraint.parentNode } */\n\treadonly parentNode?: StableNodeId;\n\t/** {@inheritdoc Constraint.label } */\n\treadonly label?: TraitLabel;\n\t/** {@inheritdoc Constraint.effect } */\n\treadonly effect: ConstraintEffect;\n\t/** {@inheritdoc Constraint.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Constraint;\n}\n\n/**\n * {@inheritdoc (StablePlace:interface) }\n * @internal\n */\nexport interface StablePlaceInternal_0_0_2 {\n\t/**\n\t * {@inheritdoc (StablePlace:interface).side }\n\t */\n\treadonly side: Side;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceSibling }\n\t */\n\treadonly referenceSibling?: StableNodeId;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceTrait }\n\t */\n\treadonly referenceTrait?: TraitLocationInternal_0_0_2;\n}\n\n/**\n * {@inheritdoc (StableRange:interface) }\n * @internal\n */\nexport interface StableRangeInternal_0_0_2 {\n\t/** {@inheritdoc (StableRange:interface).start } */\n\treadonly start: StablePlaceInternal_0_0_2;\n\t/** {@inheritdoc (StableRange:interface).end } */\n\treadonly end: StablePlaceInternal_0_0_2;\n}\n"]}
1
+ {"version":3,"file":"0.0.2.js","sourceRoot":"","sources":["../../src/persisted-types/0.0.2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAN,IAAY,IAGX;AAHD,WAAY,IAAI;IACf,mCAAU,CAAA;IACV,iCAAS,CAAA;AACV,CAAC,EAHW,IAAI,KAAJ,IAAI,QAGf;AAqID;;;GAGG;AACH,MAAM,CAAN,IAAY,UAgBX;AAhBD,WAAY,UAAU;IACrB;;;;OAIG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,iDAAO,CAAA;IACP;;OAEG;IACH,iDAAO,CAAA;AACR,CAAC,EAhBW,UAAU,KAAV,UAAU,QAgBrB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,4CAA4C;IAC5C,uDAAI,CAAA;IACJ,iEAAiE;IACjE,2DAAM,CAAA;IACN,mDAAmD;IACnD,uDAAI,CAAA;IACJ,sFAAsF;IACtF,2DAAM,CAAA;AACP,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAyCD;;;GAGG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACtB,4CAA4C;IAC5C,+BAAgB,CAAA;IAChB,2GAA2G;IAC3G,+BAAgB,CAAA;AACjB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AA4BD;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC7B,+DAAM,CAAA;IACN,+DAAM,CAAA;IACN,6DAAK,CAAA;IACL,mEAAQ,CAAA;IACR,uEAAU,CAAA;IACV,iFAAe,CAAA;AAChB,CAAC,EAPW,kBAAkB,KAAlB,kBAAkB,QAO7B;AAwED;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAiBX;AAjBD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,iFAAiB,CAAA;IAEjB;;;OAGG;IACH,uEAAY,CAAA;IAEZ;;;OAGG;IACH,mEAAU,CAAA;AACX,CAAC,EAjBW,gBAAgB,KAAhB,gBAAgB,QAiB3B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tEditId,\n\tDefinition,\n\tNodeId,\n\tStableNodeId,\n\tTraitLabel,\n\tDetachedSequenceId,\n\tUuidString,\n} from '../Identifiers';\n\n/**\n * Defines a place relative to sibling.\n * The \"outside\" of a trait is the `undefined` sibling,\n * so After `undefined` is the beginning of the trait, and before `undefined` is the end.\n *\n * For this purpose, traits look like:\n *\n * `{undefined} - {Node 0} - {Node 1} - ... - {Node N} - {undefined}`\n *\n * Each `{value}` in the diagram is a possible sibling, which is either a Node or undefined.\n * Each `-` in the above diagram is a `Place`, and can be describe as being `After` a particular `{sibling}` or `Before` it.\n * This means that `After` `{undefined}` means the same `Place` as before the first node\n * and `Before` `{undefined}` means the `Place` after the last Node.\n *\n * Each place can be specified, (aka 'anchored') in two ways (relative to the sibling before or after):\n * the choice of which way to anchor a place only matters when the kept across an edit, and thus evaluated in multiple contexts where the\n * two place description may no longer evaluate to the same place.\n * @alpha\n */\nexport enum Side {\n\tBefore = 0,\n\tAfter = 1,\n}\n\n/**\n * A collection of changes to the tree that are applied atomically along with a unique identifier for the edit.\n * If any individual change fails to apply, the entire Edit will fail to apply.\n * @alpha\n */\nexport interface Edit<TChange> extends EditBase<TChange> {\n\t/**\n\t * Unique identifier for this edit. Must never be reused.\n\t * Used for referencing and de-duplicating edits.\n\t */\n\treadonly id: EditId;\n}\n\n/**\n * A collection of changes to the tree that are applied atomically. If any individual change fails to apply,\n * the entire Edit will fail to apply.\n * @internal\n */\nexport interface EditWithoutId<TChange> extends EditBase<TChange> {\n\t/**\n\t * Used to explicitly state that EditWithoutId cannot contain an id and prevents type Edit from being assigned to type EditWithoutId.\n\t */\n\treadonly id?: never;\n}\n\n/**\n * The information included in an edit.\n * @alpha\n */\nexport interface EditBase<TChange> {\n\t/**\n\t * Actual changes to apply.\n\t * Applied in order as part of a single transaction.\n\t */\n\treadonly changes: readonly TChange[];\n\n\t/**\n\t * For edits which are being re-issued due to a conflict, the number of times this edit has already been attempted.\n\t * Undefined means 0.\n\t */\n\treadonly pastAttemptCount?: number;\n\n\t// Add more metadata fields as needed in the future.\n\t// Include \"high level\"/\"Domain Specific\"/\"Hierarchal\" edits for application/domain use in implementing domain aware merge heuristics.\n}\n\n/**\n * Json compatible representation of a payload storing arbitrary Serializable data.\n *\n * Keys starting with \"IFluid\" are reserved for special use such as the JavaScript feature detection pattern and should not be used.\n *\n * See {@link comparePayloads} for equality semantics and related details (like what is allowed to be lost when serializing)\n *\n * TODO:#51984: Allow opting into heuristic blobbing in snapshots with a special IFluid key.\n * @alpha\n */\nexport type Payload = any;\n\n/**\n * Json compatible map as object.\n * Keys are TraitLabels,\n * Values are the content of the trait specified by the key.\n * @alpha\n */\nexport interface TraitMap<TChild> {\n\treadonly [key: string]: TreeNodeSequence<TChild>;\n}\n\n/**\n * A sequence of Nodes that make up a trait under a Node\n * @alpha\n */\nexport type TreeNodeSequence<TChild> = readonly TChild[];\n\n/**\n * An object which may have traits with children of the given type underneath it\n * @alpha\n */\nexport interface HasTraits<TChild> {\n\treadonly traits: TraitMap<TChild>;\n}\n\n/**\n * The fields required by a node in a tree\n * @alpha\n */\nexport interface NodeData<TId> {\n\t/**\n\t * A payload of arbitrary serializable data\n\t */\n\treadonly payload?: Payload;\n\n\t/**\n\t * The meaning of this node.\n\t * Provides contexts/semantics for this node and its content.\n\t * Typically use to associate a node with metadata (including a schema) and source code (types, behaviors, etc).\n\t */\n\treadonly definition: Definition;\n\t/**\n\t * Identifier which can be used to refer to this Node.\n\t */\n\treadonly identifier: TId;\n}\n\n/**\n * Satisfies `NodeData` and may contain children under traits (which may or may not be `TreeNodes`)\n * @alpha\n */\nexport interface TreeNode<TChild, TId> extends NodeData<TId>, HasTraits<TChild> {}\n\n/**\n * A tree whose nodes are either TreeNodes or a placeholder\n * @internal\n */\nexport type PlaceholderTree<TPlaceholder = never> = TreeNode<PlaceholderTree<TPlaceholder>, NodeId> | TPlaceholder;\n\n/**\n * Specifies the location of a trait (a labeled sequence of nodes) within the tree.\n * @alpha\n */\nexport interface TraitLocationInternal_0_0_2 {\n\treadonly parent: StableNodeId;\n\treadonly label: TraitLabel;\n}\n\n/**\n * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.\n * @alpha\n */\nexport type ChangeNode_0_0_2 = TreeNode<ChangeNode_0_0_2, StableNodeId>;\n\n/**\n * The status code of an attempt to apply the changes in an Edit.\n * @alpha\n */\nexport enum EditStatus {\n\t/**\n\t * The edit contained one or more malformed changes (e.g. was missing required fields such as `id`),\n\t * or contained a sequence of changes that could not possibly be applied sequentially without error\n\t * (e.g. an edit which tries to insert the same detached node twice).\n\t */\n\tMalformed,\n\t/**\n\t * The edit contained a well-formed sequence of changes that couldn't be applied to the current view,\n\t * generally because concurrent changes caused one or more merge conflicts.\n\t */\n\tInvalid,\n\t/**\n\t * The edit was applied to the current view successfully.\n\t */\n\tApplied,\n}\n\n/**\n * Types of ops handled by SharedTree.\n */\nexport enum SharedTreeOpType {\n\t/** An op that includes edit information. */\n\tEdit,\n\t/** Includes a Fluid handle that corresponds to an edit chunk. */\n\tHandle,\n\t/** An op that does not affect the tree's state. */\n\tNoOp,\n\t/** Signals that SharedTree contents should be updated to match a new write format. */\n\tUpdate,\n}\n\n/**\n * SharedTreeOp containing a version stamp marking the write format of the tree which submitted it.\n */\nexport interface VersionedOp<Version extends WriteFormat = WriteFormat> {\n\t/** The supported SharedTree write version, see {@link WriteFormat}. */\n\treadonly version: Version;\n}\n\n/**\n * Requirements for SharedTree ops.\n */\nexport type SharedTreeOp_0_0_2 = SharedTreeEditOp_0_0_2 | SharedTreeNoOp | SharedTreeUpdateOp;\n\n/**\n * Op which has no application semantics. This op can be useful for triggering other\n */\nexport interface SharedTreeNoOp extends VersionedOp {\n\treadonly type: SharedTreeOpType.NoOp;\n}\n\n/**\n * Op indicating this SharedTree should upgrade its write format to the specified version.\n * The `version` field of this op reflects the version which should be upgraded to, not\n * the current version.\n * See docs/Breaking-Change-Migration.md for more details on the semantics of this op.\n */\nexport interface SharedTreeUpdateOp extends VersionedOp {\n\treadonly type: SharedTreeOpType.Update;\n}\n\n/**\n * A SharedTree op that includes edit information, and optionally a list of interned strings.\n */\nexport interface SharedTreeEditOp_0_0_2 extends VersionedOp<WriteFormat.v0_0_2> {\n\treadonly type: SharedTreeOpType.Edit;\n\t/** The collection of changes to apply. */\n\treadonly edit: Edit<ChangeInternal_0_0_2>;\n}\n\n/**\n * Format versions that SharedTree supports writing. Changes to op or summary formats necessitate updates.\n * @alpha\n */\nexport enum WriteFormat {\n\t/** Stores all edits in their raw format. */\n\tv0_0_2 = '0.0.2',\n\t/** Supports history virtualization, tree compression, string interning, and makes currentView optional. */\n\tv0_1_1 = '0.1.1',\n}\n\n/**\n * The minimal information on a SharedTree summary. Contains the summary format version.\n * @alpha\n */\nexport interface SharedTreeSummaryBase {\n\t/**\n\t * Field on summary under which version is stored.\n\t */\n\treadonly version: WriteFormat;\n}\n\n/**\n * Legacy summary format currently still used for writing.\n * TODO:#49901: Remove export when this format is no longer written.\n * @internal\n */\nexport interface SharedTreeSummary_0_0_2 extends SharedTreeSummaryBase {\n\treadonly version: WriteFormat.v0_0_2;\n\n\treadonly currentTree: ChangeNode_0_0_2;\n\t/**\n\t * A list of edits.\n\t */\n\treadonly sequencedEdits: readonly Edit<ChangeInternal_0_0_2>[];\n}\n\n/**\n * {@inheritdoc ChangeType}\n * @alpha\n */\nexport enum ChangeTypeInternal {\n\tInsert,\n\tDetach,\n\tBuild,\n\tSetValue,\n\tConstraint,\n\tCompressedBuild,\n}\n\n/**\n * {@inheritdoc (Change:type)}\n * @public\n */\nexport type ChangeInternal_0_0_2 =\n\t| InsertInternal_0_0_2\n\t| DetachInternal_0_0_2\n\t| BuildInternal_0_0_2\n\t| SetValueInternal_0_0_2\n\t| ConstraintInternal_0_0_2;\n\n/**\n * {@inheritdoc BuildNode}\n * @alpha\n */\nexport type BuildNodeInternal_0_0_2 = TreeNode<BuildNodeInternal_0_0_2, StableNodeId> | DetachedSequenceId;\n\n/**\n * {@inheritdoc Build}\n * @alpha\n */\nexport interface BuildInternal_0_0_2 {\n\t/** {@inheritdoc Build.destination } */\n\treadonly destination: DetachedSequenceId;\n\t/** {@inheritdoc Build.source } */\n\treadonly source: TreeNodeSequence<BuildNodeInternal_0_0_2>;\n\t/** {@inheritdoc Build.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Build;\n}\n\n/**\n * {@inheritdoc (Insert:interface)}\n * @alpha\n */\nexport interface InsertInternal_0_0_2 {\n\t/** {@inheritdoc (Insert:interface).destination } */\n\treadonly destination: StablePlaceInternal_0_0_2;\n\t/** {@inheritdoc (Insert:interface).source } */\n\treadonly source: DetachedSequenceId;\n\t/** {@inheritdoc (Insert:interface).\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Insert;\n}\n\n/**\n * {@inheritdoc Detach}\n * @alpha\n */\nexport interface DetachInternal_0_0_2 {\n\t/** {@inheritdoc Detach.destination } */\n\treadonly destination?: DetachedSequenceId;\n\t/** {@inheritdoc Detach.source } */\n\treadonly source: StableRangeInternal_0_0_2;\n\t/** {@inheritdoc Detach.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Detach;\n}\n\n/**\n * {@inheritdoc SetValue}\n * @alpha\n */\nexport interface SetValueInternal_0_0_2 {\n\t/** {@inheritdoc SetValue.nodeToModify } */\n\treadonly nodeToModify: StableNodeId;\n\t/** {@inheritdoc SetValue.payload } */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\treadonly payload: Payload | null;\n\t/** {@inheritdoc SetValue.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.SetValue;\n}\n\n/**\n * What to do when a Constraint is violated.\n * @alpha\n */\nexport enum ConstraintEffect {\n\t/**\n\t * Discard Edit.\n\t */\n\tInvalidAndDiscard,\n\n\t/**\n\t * Discard Edit, but record metadata that application may want to try and recover this change by recreating it.\n\t * Should this be the default policy for when another (non Constraint) change is invalid?\n\t */\n\tInvalidRetry,\n\n\t/**\n\t * Apply the change, but flag it for possible reconsideration by the app\n\t * (applying it is better than not, but perhaps the high level logic could produce something better).\n\t */\n\tValidRetry,\n}\n\n/**\n * {@inheritdoc Constraint}\n * @alpha\n */\nexport interface ConstraintInternal_0_0_2 {\n\t/** {@inheritdoc Constraint.toConstrain } */\n\treadonly toConstrain: StableRangeInternal_0_0_2;\n\t/** {@inheritdoc Constraint.identityHash } */\n\treadonly identityHash?: UuidString;\n\t/** {@inheritdoc Constraint.length } */\n\treadonly length?: number;\n\t/** {@inheritdoc Constraint.contentHash } */\n\treadonly contentHash?: UuidString;\n\t/** {@inheritdoc Constraint.parentNode } */\n\treadonly parentNode?: StableNodeId;\n\t/** {@inheritdoc Constraint.label } */\n\treadonly label?: TraitLabel;\n\t/** {@inheritdoc Constraint.effect } */\n\treadonly effect: ConstraintEffect;\n\t/** {@inheritdoc Constraint.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.Constraint;\n}\n\n/**\n * {@inheritdoc (StablePlace:interface) }\n * @alpha\n */\nexport interface StablePlaceInternal_0_0_2 {\n\t/**\n\t * {@inheritdoc (StablePlace:interface).side }\n\t */\n\treadonly side: Side;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceSibling }\n\t */\n\treadonly referenceSibling?: StableNodeId;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceTrait }\n\t */\n\treadonly referenceTrait?: TraitLocationInternal_0_0_2;\n}\n\n/**\n * {@inheritdoc (StableRange:interface) }\n * @alpha\n */\nexport interface StableRangeInternal_0_0_2 {\n\t/** {@inheritdoc (StableRange:interface).start } */\n\treadonly start: StablePlaceInternal_0_0_2;\n\t/** {@inheritdoc (StableRange:interface).end } */\n\treadonly end: StablePlaceInternal_0_0_2;\n}\n"]}
@@ -8,7 +8,7 @@ import type { Definition, DetachedSequenceId, EditId, FinalNodeId, InternedStrin
8
8
  import { BuildInternal_0_0_2, ChangeTypeInternal, ConstraintEffect, ConstraintInternal_0_0_2, DetachInternal_0_0_2, Edit, EditWithoutId, InsertInternal_0_0_2, NodeData, Payload, SetValueInternal_0_0_2, SharedTreeNoOp, SharedTreeOpType, SharedTreeSummaryBase, SharedTreeUpdateOp, StablePlaceInternal_0_0_2, TraitLocationInternal_0_0_2, TreeNode, TreeNodeSequence, VersionedOp, WriteFormat } from './0.0.2';
9
9
  /**
10
10
  * Specifies the location of a trait (a labeled sequence of nodes) within the tree.
11
- * @internal
11
+ * @alpha
12
12
  */
13
13
  export interface TraitLocationInternal extends Omit<TraitLocationInternal_0_0_2, 'parent'> {
14
14
  readonly parent: NodeId;
@@ -139,31 +139,31 @@ export type CompressedBuildNode<TId extends OpSpaceNodeId> = CompressedPlacehold
139
139
  * This type should be used as an opaque handle in the public API for `ChangeInternal` objects.
140
140
  * This is useful for supporting public APIs which involve working with a tree's edit history,
141
141
  * which will involve changes that have already been internalized.
142
- * @internal
142
+ * @alpha
143
143
  */
144
144
  export interface InternalizedChange {
145
145
  InternalChangeBrand: '2cae1045-61cf-4ef7-a6a3-8ad920cb7ab3';
146
146
  }
147
147
  /**
148
148
  * {@inheritdoc (Change:type)}
149
- * @internal
149
+ * @alpha
150
150
  */
151
151
  export type ChangeInternal = InsertInternal | DetachInternal | BuildInternal | SetValueInternal | ConstraintInternal;
152
152
  /**
153
153
  * {@inheritdoc BuildNode}
154
- * @internal
154
+ * @alpha
155
155
  */
156
156
  export type BuildNodeInternal = TreeNode<BuildNodeInternal, NodeId> | DetachedSequenceId;
157
157
  /**
158
158
  * {@inheritdoc Build}
159
- * @internal
159
+ * @alpha
160
160
  */
161
161
  export interface BuildInternal extends Omit<BuildInternal_0_0_2, 'source'> {
162
162
  readonly source: TreeNodeSequence<BuildNodeInternal>;
163
163
  }
164
164
  /**
165
165
  * {@inheritdoc (Insert:interface)}
166
- * @internal
166
+ * @alpha
167
167
  */
168
168
  export interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'> {
169
169
  /** {@inheritdoc (Insert:interface).destination } */
@@ -171,7 +171,7 @@ export interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'
171
171
  }
172
172
  /**
173
173
  * {@inheritdoc Detach}
174
- * @internal
174
+ * @alpha
175
175
  */
176
176
  export interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {
177
177
  /** {@inheritdoc Detach.source } */
@@ -179,7 +179,7 @@ export interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {
179
179
  }
180
180
  /**
181
181
  * {@inheritdoc SetValue}
182
- * @internal
182
+ * @alpha
183
183
  */
184
184
  export interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToModify'> {
185
185
  /** {@inheritdoc SetValue.nodeToModify } */
@@ -187,7 +187,7 @@ export interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToMo
187
187
  }
188
188
  /**
189
189
  * {@inheritdoc Constraint}
190
- * @internal
190
+ * @alpha
191
191
  */
192
192
  export interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toConstrain' | 'parentNode'> {
193
193
  /** {@inheritdoc Constraint.toConstrain } */
@@ -196,7 +196,7 @@ export interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toCo
196
196
  readonly parentNode?: NodeId;
197
197
  }
198
198
  /**
199
- * @internal
199
+ * @alpha
200
200
  */
201
201
  export declare const ChangeInternal: {
202
202
  build: (source: TreeNodeSequence<BuildNodeInternal>, destination: DetachedSequenceId) => BuildInternal;
@@ -214,7 +214,7 @@ export declare const ChangeInternal: {
214
214
  };
215
215
  /**
216
216
  * {@inheritdoc (StablePlace:interface) }
217
- * @internal
217
+ * @alpha
218
218
  */
219
219
  export interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 'referenceSibling' | 'referenceTrait'> {
220
220
  /**
@@ -228,7 +228,7 @@ export interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 're
228
228
  }
229
229
  /**
230
230
  * {@inheritdoc (StableRange:interface) }
231
- * @internal
231
+ * @alpha
232
232
  */
233
233
  export interface StableRangeInternal {
234
234
  /** {@inheritdoc (StableRange:interface).start } */
@@ -241,7 +241,7 @@ export interface StableRangeInternal {
241
241
  * the new persisted version of SharedTree ops/summaries is rolled out.
242
242
  */
243
243
  /**
244
- * @internal
244
+ * @alpha
245
245
  */
246
246
  export declare const StablePlaceInternal: {
247
247
  /**
@@ -262,7 +262,7 @@ export declare const StablePlaceInternal: {
262
262
  atEndOf: (trait: TraitLocationInternal) => StablePlaceInternal;
263
263
  };
264
264
  /**
265
- * @internal
265
+ * @alpha
266
266
  */
267
267
  export declare const StableRangeInternal: {
268
268
  /**
@@ -7,7 +7,7 @@ import { assertNotUndefined } from '../Common';
7
7
  import { ChangeTypeInternal, Side, } from './0.0.2';
8
8
  // Note: Documentation of this constant is merged with documentation of the `ChangeInternal` interface.
9
9
  /**
10
- * @internal
10
+ * @alpha
11
11
  */
12
12
  export const ChangeInternal = {
13
13
  build: (source, destination) => ({
@@ -64,7 +64,7 @@ export const ChangeInternal = {
64
64
  * the new persisted version of SharedTree ops/summaries is rolled out.
65
65
  */
66
66
  /**
67
- * @internal
67
+ * @alpha
68
68
  */
69
69
  export const StablePlaceInternal = {
70
70
  /**
@@ -97,7 +97,7 @@ export const StablePlaceInternal = {
97
97
  }),
98
98
  };
99
99
  /**
100
- * @internal
100
+ * @alpha
101
101
  */
102
102
  export const StableRangeInternal = {
103
103
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"0.1.1.js","sourceRoot":"","sources":["../../src/persisted-types/0.1.1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAoB,MAAM,WAAW,CAAC;AAmBjE,OAAO,EAEN,kBAAkB,EAclB,IAAI,GAOJ,MAAM,SAAS,CAAC;AAgOjB,uGAAuG;AACvG;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,KAAK,EAAE,CAAC,MAA2C,EAAE,WAA+B,EAAiB,EAAE,CAAC,CAAC;QACxG,WAAW;QACX,MAAM;QACN,IAAI,EAAE,kBAAkB,CAAC,KAAK;KAC9B,CAAC;IAEF,MAAM,EAAE,CAAC,MAA0B,EAAE,WAAgC,EAAkB,EAAE,CAAC,CAAC;QAC1F,WAAW;QACX,MAAM;QACN,IAAI,EAAE,kBAAkB,CAAC,MAAM;KAC/B,CAAC;IAEF,MAAM,EAAE,CAAC,MAA2B,EAAE,WAA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AAC,KAAK,KAAK,GAAG,CAAC,cAAc,CAAC,KAAK,EACvD,KAAK,CAAC,wEAAwE,CAC9E,CAAC;aACF;YACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;QACvB,CAAC;KACD,CAAC;IACF;;;OAGG;IACH,IAAI,EAAE,CAAC,IAA+B,EAAuB,EAAE,CAAC,CAAC;QAChE,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC;QACvC,GAAG,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC;KACpC,CAAC;IACF;;;;OAIG;IACH,GAAG,EAAE,CAAC,KAA4B,EAAuB,EAAE,CAAC,CAAC;QAC5D,KAAK,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,CAAC;QAC3C,GAAG,EAAE,mBAAmB,CAAC,OAAO,CAAC,KAAK,CAAC;KACvC,CAAC;CACF,CAAC;AA2BF,sFAAsF;AACtF,+BAA+B;AAC/B,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,2CAA2C;AAC3C,8BAA8B;AAC9B,MAAM,CAAC,MAAM,cAAc,GAAG,sCAAmD,CAAC;AAElF,+EAA+E;AAC/E,SAAS,SAAS,CAAM,IAAyB;IAChD,OAAQ,IAAsB,CAAC,UAAU,IAAK,IAAY,CAAC;AAC5D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils';\nimport { assertNotUndefined, ReplaceRecursive } from '../Common';\n// These are re-exported from a persisted-types file.\nimport type {\n\tIdCreationRange,\n\tSerializedIdCompressorWithNoSession,\n\tSerializedIdCompressorWithOngoingSession,\n} from '../id-compressor';\nimport type {\n\tDefinition,\n\tDetachedSequenceId,\n\tEditId,\n\tFinalNodeId,\n\tInternedStringId,\n\tNodeId,\n\tOpSpaceNodeId,\n\tSessionId,\n\tTraitLabel,\n\tUuidString,\n} from '../Identifiers';\nimport {\n\tBuildInternal_0_0_2,\n\tChangeTypeInternal,\n\tConstraintEffect,\n\tConstraintInternal_0_0_2,\n\tDetachInternal_0_0_2,\n\tEdit,\n\tEditWithoutId,\n\tInsertInternal_0_0_2,\n\tNodeData,\n\tPayload,\n\tSetValueInternal_0_0_2,\n\tSharedTreeNoOp,\n\tSharedTreeOpType,\n\tSharedTreeSummaryBase,\n\tSharedTreeUpdateOp,\n\tSide,\n\tStablePlaceInternal_0_0_2,\n\tTraitLocationInternal_0_0_2,\n\tTreeNode,\n\tTreeNodeSequence,\n\tVersionedOp,\n\tWriteFormat,\n} from './0.0.2';\n\n/**\n * Specifies the location of a trait (a labeled sequence of nodes) within the tree.\n * @internal\n */\nexport interface TraitLocationInternal extends Omit<TraitLocationInternal_0_0_2, 'parent'> {\n\treadonly parent: NodeId;\n}\n\n/**\n * Alternating list of label then children list under that label.\n * The label may be interned, and children are {@link CompressedPlaceholderTree}.\n */\nexport type CompressedTraits<TId extends OpSpaceNodeId, TPlaceholder extends number | never> = (\n\t| InternedStringId\n\t| TraitLabel\n\t| (CompressedPlaceholderTree<TId, TPlaceholder> | TPlaceholder)[]\n)[];\n\n/**\n * A TreeNode that has been compressed into the following array format:\n * [identifier, definition, traits, payload],\n * where traits is also an array of [label, [trait], label, [trait], ...].\n * Payload is omitted if empty, and traits will be an empty subarray if no traits exist but a payload exists.\n * If both traits and payload does not exist, then both are omitted.\n * All trait labels and node definitions may also be string interned.\n * @internal\n */\nexport type CompressedPlaceholderTree<TId extends OpSpaceNodeId, TPlaceholder extends number | never> =\n\t| TPlaceholder\n\t| [InternedStringId | Definition] // The node Definition's interned string ID\n\t| [InternedStringId | Definition, TId]\n\t| [\n\t\t\tInternedStringId | Definition,\n\t\t\t[Payload, ...CompressedTraits<TId, TPlaceholder>] | CompressedTraits<TId, TPlaceholder>,\n\t ]\n\t| [\n\t\t\tInternedStringId | Definition,\n\t\t\tTId,\n\t\t\t[Payload, ...CompressedTraits<TId, TPlaceholder>] | CompressedTraits<TId, TPlaceholder>,\n\t ];\n\n/**\n * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.\n * @internal\n */\nexport type ChangeNode = TreeNode<ChangeNode, NodeId>;\n\n/**\n * A ChangeNode that has been compressed into a {@link CompressedPlaceholderTree}.\n */\nexport type CompressedChangeNode<TId extends OpSpaceNodeId> = CompressedPlaceholderTree<TId, never>;\n\n/**\n * The contents of a SharedTree summary for write format 0.1.1.\n * Contains the current tree in a compressed format,\n * the edits needed to get from `initialTree` to the current tree,\n * and the interned strings that can be used to retrieve the interned summary.\n */\nexport interface SharedTreeSummary extends SharedTreeSummaryBase {\n\treadonly version: WriteFormat.v0_1_1;\n\n\treadonly currentTree?: CompressedChangeNode<FinalNodeId>;\n\n\t/**\n\t * Information that can populate an edit log.\n\t */\n\treadonly editHistory: EditLogSummary<CompressedChangeInternal<FinalNodeId>, FluidEditHandle>;\n\n\t/**\n\t * List of interned strings.\n\t * In 0.1.1, definitions and trait labels are interned deterministically on sequenced ops,\n\t * and each client maintains a string interner whose lifetime is tied to the SharedTree.\n\t */\n\treadonly internedStrings: readonly string[];\n\n\t/**\n\t * Information about all IDs compressed in the summary\n\t */\n\treadonly idCompressor: SerializedIdCompressorWithNoSession | SerializedIdCompressorWithOngoingSession;\n}\n\n/**\n * Information used to populate an edit log.\n * In 0.1.1, this is a persisted type only for `EditLogSummary<CompressedChangeInternal, FluidEditHandle>`,\n * where calling `FluidEditHandle.get` returns an array buffer of compressed `editChunk` contents.\n * The type is parameterized to avoid nearly identical type definitions for uncompressed forms of the edit\n * log, and abstracting away the fact that handle fetching needs to invoke decompression.\n * @internal\n */\nexport interface EditLogSummary<TChange, THandle> {\n\t/**\n\t * A of list of serialized chunks and their corresponding keys.\n\t * Start revision is the index of the first edit in the chunk in relation to the edit log.\n\t */\n\treadonly editChunks: readonly {\n\t\treadonly startRevision: number;\n\t\t/**\n\t\t * Either a chunk of edits or a handle that can be used to load that chunk.\n\t\t */\n\t\treadonly chunk: THandle | readonly EditWithoutId<TChange>[];\n\t}[];\n\n\t/**\n\t * A list of edits IDs for all sequenced edits.\n\t */\n\treadonly editIds: readonly EditId[];\n}\n\n/**\n * FluidEditHandles are used to load edit chunks stored outside of the EditLog.\n * Can be satisfied by IFluidHandle<ArrayBufferLike>.\n * Note that though this is in `PersistedTypes`, it isn't directly serializable (e.g. `get` is a function).\n * Its serialization relies on being encoded via an IFluidSerializer.\n * @internal\n */\nexport interface FluidEditHandle {\n\treadonly get: () => Promise<ArrayBuffer>;\n\treadonly absolutePath: string;\n}\n\n// Future write formats should make this a union type and append to it (e.g. `EditChunkContents_0_1_1 | EditChunkContents_2_0_0`).\nexport type EditChunkContents = EditChunkContents_0_1_1;\n\nexport interface EditChunkContents_0_1_1 {\n\tversion: WriteFormat.v0_1_1;\n\tedits: readonly EditWithoutId<CompressedChangeInternal<FinalNodeId>>[];\n}\n\n/**\n * Compressed change format type.\n * Encodes the same information as a {@link ChangeInternal}, but uses a more compact object format for `build` changes.\n */\nexport type CompressedChangeInternal<TId extends OpSpaceNodeId> =\n\t| ReplaceRecursive<Exclude<ChangeInternal, BuildInternal>, NodeId, TId>\n\t| CompressedBuildInternal<TId>;\n\n/**\n * A compressed version of {@link BuildInternal} where the source is a sequence of compressed nodes.\n */\nexport interface CompressedBuildInternal<TId extends OpSpaceNodeId> {\n\t/** {@inheritdoc Build.destination } */\n\treadonly destination: DetachedSequenceId;\n\t/** A sequence of nodes to build in some compressed format. */\n\treadonly source: TreeNodeSequence<CompressedBuildNode<TId>>;\n\t/** {@inheritdoc Build.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.CompressedBuild;\n}\n\n/**\n * A BuildNode that has been compressed into a {@link CompressedPlaceholderTree}.\n */\nexport type CompressedBuildNode<TId extends OpSpaceNodeId> = CompressedPlaceholderTree<TId, DetachedSequenceId>;\n\n// TODO: `ChangeInternal`s should be assignable to this type without casting; this will require some test refactoring.\n/**\n * This type should be used as an opaque handle in the public API for `ChangeInternal` objects.\n * This is useful for supporting public APIs which involve working with a tree's edit history,\n * which will involve changes that have already been internalized.\n * @internal\n */\nexport interface InternalizedChange {\n\tInternalChangeBrand: '2cae1045-61cf-4ef7-a6a3-8ad920cb7ab3';\n}\n\n/**\n * {@inheritdoc (Change:type)}\n * @internal\n */\nexport type ChangeInternal = InsertInternal | DetachInternal | BuildInternal | SetValueInternal | ConstraintInternal;\n\n/**\n * {@inheritdoc BuildNode}\n * @internal\n */\nexport type BuildNodeInternal = TreeNode<BuildNodeInternal, NodeId> | DetachedSequenceId;\n\n/**\n * {@inheritdoc Build}\n * @internal\n */\nexport interface BuildInternal extends Omit<BuildInternal_0_0_2, 'source'> {\n\treadonly source: TreeNodeSequence<BuildNodeInternal>;\n}\n\n/**\n * {@inheritdoc (Insert:interface)}\n * @internal\n */\nexport interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'> {\n\t/** {@inheritdoc (Insert:interface).destination } */\n\treadonly destination: StablePlaceInternal;\n}\n\n/**\n * {@inheritdoc Detach}\n * @internal\n */\nexport interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {\n\t/** {@inheritdoc Detach.source } */\n\treadonly source: StableRangeInternal;\n}\n\n/**\n * {@inheritdoc SetValue}\n * @internal\n */\nexport interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToModify'> {\n\t/** {@inheritdoc SetValue.nodeToModify } */\n\treadonly nodeToModify: NodeId;\n}\n\n/**\n * {@inheritdoc Constraint}\n * @internal\n */\nexport interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toConstrain' | 'parentNode'> {\n\t/** {@inheritdoc Constraint.toConstrain } */\n\treadonly toConstrain: StableRangeInternal;\n\t/** {@inheritdoc Constraint.parentNode } */\n\treadonly parentNode?: NodeId;\n}\n\n// Note: Documentation of this constant is merged with documentation of the `ChangeInternal` interface.\n/**\n * @internal\n */\nexport const ChangeInternal = {\n\tbuild: (source: TreeNodeSequence<BuildNodeInternal>, destination: DetachedSequenceId): BuildInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Build,\n\t}),\n\n\tinsert: (source: DetachedSequenceId, destination: StablePlaceInternal): InsertInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Insert,\n\t}),\n\n\tdetach: (source: StableRangeInternal, destination?: DetachedSequenceId): DetachInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Detach,\n\t}),\n\n\tsetPayload: (nodeToModify: NodeData<NodeId> | NodeId, payload: Payload): SetValueInternal => ({\n\t\tnodeToModify: getNodeId(nodeToModify),\n\t\tpayload,\n\t\ttype: ChangeTypeInternal.SetValue,\n\t}),\n\n\tclearPayload: (nodeToModify: NodeData<NodeId> | NodeId): SetValueInternal => ({\n\t\tnodeToModify: getNodeId(nodeToModify),\n\t\t// Rationale: 'undefined' is reserved for future use (see 'SetValue' interface above.)\n\t\tpayload: null,\n\t\ttype: ChangeTypeInternal.SetValue,\n\t}),\n\n\tconstraint: (\n\t\ttoConstrain: StableRangeInternal,\n\t\teffect: ConstraintEffect,\n\t\tidentityHash?: UuidString,\n\t\tlength?: number,\n\t\tcontentHash?: UuidString,\n\t\tparentNode?: NodeId,\n\t\tlabel?: TraitLabel\n\t): ConstraintInternal => ({\n\t\ttoConstrain,\n\t\teffect,\n\t\tidentityHash,\n\t\tlength,\n\t\tcontentHash,\n\t\tparentNode,\n\t\tlabel,\n\t\ttype: ChangeTypeInternal.Constraint,\n\t}),\n\n\t/** {@inheritdoc (Change:variable).delete } */\n\tdelete: (stableRange: StableRangeInternal): ChangeInternal => ChangeInternal.detach(stableRange),\n\n\t/** {@inheritdoc (Change:variable).insertTree } */\n\tinsertTree: (nodes: TreeNodeSequence<BuildNodeInternal>, destination: StablePlaceInternal): ChangeInternal[] => {\n\t\tconst build = ChangeInternal.build(nodes, 0 as DetachedSequenceId);\n\t\treturn [build, ChangeInternal.insert(build.destination, destination)];\n\t},\n\n\t/** {@inheritdoc (Change:variable).move } */\n\tmove: (source: StableRangeInternal, destination: StablePlaceInternal): ChangeInternal[] => {\n\t\tconst detach = ChangeInternal.detach(source, 0 as DetachedSequenceId);\n\t\treturn [detach, ChangeInternal.insert(assertNotUndefined(detach.destination), destination)];\n\t},\n};\n\n/**\n * {@inheritdoc (StablePlace:interface) }\n * @internal\n */\nexport interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 'referenceSibling' | 'referenceTrait'> {\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceSibling }\n\t */\n\treadonly referenceSibling?: NodeId;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceTrait }\n\t */\n\treadonly referenceTrait?: TraitLocationInternal;\n}\n\n/**\n * {@inheritdoc (StableRange:interface) }\n * @internal\n */\nexport interface StableRangeInternal {\n\t/** {@inheritdoc (StableRange:interface).start } */\n\treadonly start: StablePlaceInternal;\n\t/** {@inheritdoc (StableRange:interface).end } */\n\treadonly end: StablePlaceInternal;\n}\n\n/**\n * The remainder of this file consists of factory methods duplicated with those for StableRange/StablePlace and are maintained while\n * the new persisted version of SharedTree ops/summaries is rolled out.\n */\n\n/**\n * @internal\n */\nexport const StablePlaceInternal = {\n\t/**\n\t * @returns The location directly before `node`.\n\t */\n\tbefore: (node: NodeData<NodeId> | NodeId): StablePlaceInternal => ({\n\t\tside: Side.Before,\n\t\treferenceSibling: getNodeId(node),\n\t}),\n\t/**\n\t * @returns The location directly after `node`.\n\t */\n\tafter: (node: NodeData<NodeId> | NodeId): StablePlaceInternal => ({\n\t\tside: Side.After,\n\t\treferenceSibling: getNodeId(node),\n\t}),\n\t/**\n\t * @returns The location at the start of `trait`.\n\t */\n\tatStartOf: (trait: TraitLocationInternal): StablePlaceInternal => ({\n\t\tside: Side.After,\n\t\treferenceTrait: trait,\n\t}),\n\t/**\n\t * @returns The location at the end of `trait`.\n\t */\n\tatEndOf: (trait: TraitLocationInternal): StablePlaceInternal => ({\n\t\tside: Side.Before,\n\t\treferenceTrait: trait,\n\t}),\n};\n\n/**\n * @internal\n */\nexport const StableRangeInternal = {\n\t/**\n\t * Factory for producing a `StableRange` from a start `StablePlace` to an end `StablePlace`.\n\t *\n\t * @example\n\t *\n\t * ```typescript\n\t * StableRange.from(StablePlace.before(startNode)).to(StablePlace.after(endNode))\n\t * ```\n\t */\n\tfrom: (start: StablePlaceInternal): { to: (end: StablePlaceInternal) => StableRangeInternal } => ({\n\t\tto: (end: StablePlaceInternal): StableRangeInternal => {\n\t\t\tif (start.referenceTrait && end.referenceTrait) {\n\t\t\t\tassert(\n\t\t\t\t\tstart.referenceTrait.parent === end.referenceTrait.parent,\n\t\t\t\t\t0x65e /* StableRange must be constructed with endpoints from the same trait */\n\t\t\t\t);\n\t\t\t\tassert(\n\t\t\t\t\tstart.referenceTrait.label === end.referenceTrait.label,\n\t\t\t\t\t0x65f /* StableRange must be constructed with endpoints from the same trait */\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn { start, end };\n\t\t},\n\t}),\n\t/**\n\t * @returns a `StableRange` which contains only the provided `node`.\n\t * Both the start and end `StablePlace` objects used to anchor this `StableRange` are in terms of the passed in node.\n\t */\n\tonly: (node: NodeData<NodeId> | NodeId): StableRangeInternal => ({\n\t\tstart: StablePlaceInternal.before(node),\n\t\tend: StablePlaceInternal.after(node),\n\t}),\n\t/**\n\t * @returns a `StableRange` which contains everything in the trait.\n\t * This is anchored using the provided `trait`, and is independent of the actual contents of the trait:\n\t * it does not use sibling anchoring.\n\t */\n\tall: (trait: TraitLocationInternal): StableRangeInternal => ({\n\t\tstart: StablePlaceInternal.atStartOf(trait),\n\t\tend: StablePlaceInternal.atEndOf(trait),\n\t}),\n};\n\n/**\n * Discriminated union of valid 0.0.1 SharedTree op types.\n */\nexport type SharedTreeOp = SharedTreeEditOp | SharedTreeHandleOp | SharedTreeUpdateOp | SharedTreeNoOp;\n\nexport interface SharedTreeEditOp extends VersionedOp<WriteFormat.v0_1_1> {\n\treadonly type: SharedTreeOpType.Edit;\n\t/** The collection of changes to apply. */\n\treadonly edit: Edit<CompressedChangeInternal<OpSpaceNodeId>>;\n\t/** Contains all the IDs generated by the originating client since the last sent op */\n\treadonly idRange: IdCreationRange;\n}\n\n/**\n * A SharedTree op that includes edit handle information.\n * The handle corresponds to an edit chunk in the edit log.\n */\nexport interface SharedTreeHandleOp extends VersionedOp<WriteFormat.v0_1_1> {\n\treadonly type: SharedTreeOpType.Handle;\n\t/** The serialized handle to an uploaded edit chunk. */\n\treadonly editHandle: string;\n\t/** The index of the first edit in the chunk that corresponds to the handle. */\n\treadonly startRevision: number;\n}\n\n/** The number of IDs that a SharedTree reserves for current or future internal use */\n// This value must never change\nexport const reservedIdCount = 10;\n\n/** The SessionID of the Upgrade Session */\n// This UUID must never change\nexport const ghostSessionId = '79590933-1c70-4fda-817a-adab57c20318' as SessionId;\n\n/** Accepts either a node or a node's identifier, and returns the identifier */\nfunction getNodeId<TId>(node: TId | NodeData<TId>): TId {\n\treturn (node as NodeData<TId>).identifier ?? (node as TId);\n}\n"]}
1
+ {"version":3,"file":"0.1.1.js","sourceRoot":"","sources":["../../src/persisted-types/0.1.1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAoB,MAAM,WAAW,CAAC;AAmBjE,OAAO,EAEN,kBAAkB,EAclB,IAAI,GAOJ,MAAM,SAAS,CAAC;AAgOjB,uGAAuG;AACvG;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,KAAK,EAAE,CAAC,MAA2C,EAAE,WAA+B,EAAiB,EAAE,CAAC,CAAC;QACxG,WAAW;QACX,MAAM;QACN,IAAI,EAAE,kBAAkB,CAAC,KAAK;KAC9B,CAAC;IAEF,MAAM,EAAE,CAAC,MAA0B,EAAE,WAAgC,EAAkB,EAAE,CAAC,CAAC;QAC1F,WAAW;QACX,MAAM;QACN,IAAI,E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AM,EACzD,KAAK,CAAC,wEAAwE,CAC9E,CAAC;gBACF,MAAM,CACL,KAAK,CAAC,cAAc,CAAC,KAAK,KAAK,GAAG,CAAC,cAAc,CAAC,KAAK,EACvD,KAAK,CAAC,wEAAwE,CAC9E,CAAC;aACF;YACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;QACvB,CAAC;KACD,CAAC;IACF;;;OAGG;IACH,IAAI,EAAE,CAAC,IAA+B,EAAuB,EAAE,CAAC,CAAC;QAChE,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC;QACvC,GAAG,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC;KACpC,CAAC;IACF;;;;OAIG;IACH,GAAG,EAAE,CAAC,KAA4B,EAAuB,EAAE,CAAC,CAAC;QAC5D,KAAK,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,CAAC;QAC3C,GAAG,EAAE,mBAAmB,CAAC,OAAO,CAAC,KAAK,CAAC;KACvC,CAAC;CACF,CAAC;AA2BF,sFAAsF;AACtF,+BAA+B;AAC/B,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,2CAA2C;AAC3C,8BAA8B;AAC9B,MAAM,CAAC,MAAM,cAAc,GAAG,sCAAmD,CAAC;AAElF,+EAA+E;AAC/E,SAAS,SAAS,CAAM,IAAyB;IAChD,OAAQ,IAAsB,CAAC,UAAU,IAAK,IAAY,CAAC;AAC5D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils';\nimport { assertNotUndefined, ReplaceRecursive } from '../Common';\n// These are re-exported from a persisted-types file.\nimport type {\n\tIdCreationRange,\n\tSerializedIdCompressorWithNoSession,\n\tSerializedIdCompressorWithOngoingSession,\n} from '../id-compressor';\nimport type {\n\tDefinition,\n\tDetachedSequenceId,\n\tEditId,\n\tFinalNodeId,\n\tInternedStringId,\n\tNodeId,\n\tOpSpaceNodeId,\n\tSessionId,\n\tTraitLabel,\n\tUuidString,\n} from '../Identifiers';\nimport {\n\tBuildInternal_0_0_2,\n\tChangeTypeInternal,\n\tConstraintEffect,\n\tConstraintInternal_0_0_2,\n\tDetachInternal_0_0_2,\n\tEdit,\n\tEditWithoutId,\n\tInsertInternal_0_0_2,\n\tNodeData,\n\tPayload,\n\tSetValueInternal_0_0_2,\n\tSharedTreeNoOp,\n\tSharedTreeOpType,\n\tSharedTreeSummaryBase,\n\tSharedTreeUpdateOp,\n\tSide,\n\tStablePlaceInternal_0_0_2,\n\tTraitLocationInternal_0_0_2,\n\tTreeNode,\n\tTreeNodeSequence,\n\tVersionedOp,\n\tWriteFormat,\n} from './0.0.2';\n\n/**\n * Specifies the location of a trait (a labeled sequence of nodes) within the tree.\n * @alpha\n */\nexport interface TraitLocationInternal extends Omit<TraitLocationInternal_0_0_2, 'parent'> {\n\treadonly parent: NodeId;\n}\n\n/**\n * Alternating list of label then children list under that label.\n * The label may be interned, and children are {@link CompressedPlaceholderTree}.\n */\nexport type CompressedTraits<TId extends OpSpaceNodeId, TPlaceholder extends number | never> = (\n\t| InternedStringId\n\t| TraitLabel\n\t| (CompressedPlaceholderTree<TId, TPlaceholder> | TPlaceholder)[]\n)[];\n\n/**\n * A TreeNode that has been compressed into the following array format:\n * [identifier, definition, traits, payload],\n * where traits is also an array of [label, [trait], label, [trait], ...].\n * Payload is omitted if empty, and traits will be an empty subarray if no traits exist but a payload exists.\n * If both traits and payload does not exist, then both are omitted.\n * All trait labels and node definitions may also be string interned.\n * @internal\n */\nexport type CompressedPlaceholderTree<TId extends OpSpaceNodeId, TPlaceholder extends number | never> =\n\t| TPlaceholder\n\t| [InternedStringId | Definition] // The node Definition's interned string ID\n\t| [InternedStringId | Definition, TId]\n\t| [\n\t\t\tInternedStringId | Definition,\n\t\t\t[Payload, ...CompressedTraits<TId, TPlaceholder>] | CompressedTraits<TId, TPlaceholder>,\n\t ]\n\t| [\n\t\t\tInternedStringId | Definition,\n\t\t\tTId,\n\t\t\t[Payload, ...CompressedTraits<TId, TPlaceholder>] | CompressedTraits<TId, TPlaceholder>,\n\t ];\n\n/**\n * JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.\n * @internal\n */\nexport type ChangeNode = TreeNode<ChangeNode, NodeId>;\n\n/**\n * A ChangeNode that has been compressed into a {@link CompressedPlaceholderTree}.\n */\nexport type CompressedChangeNode<TId extends OpSpaceNodeId> = CompressedPlaceholderTree<TId, never>;\n\n/**\n * The contents of a SharedTree summary for write format 0.1.1.\n * Contains the current tree in a compressed format,\n * the edits needed to get from `initialTree` to the current tree,\n * and the interned strings that can be used to retrieve the interned summary.\n */\nexport interface SharedTreeSummary extends SharedTreeSummaryBase {\n\treadonly version: WriteFormat.v0_1_1;\n\n\treadonly currentTree?: CompressedChangeNode<FinalNodeId>;\n\n\t/**\n\t * Information that can populate an edit log.\n\t */\n\treadonly editHistory: EditLogSummary<CompressedChangeInternal<FinalNodeId>, FluidEditHandle>;\n\n\t/**\n\t * List of interned strings.\n\t * In 0.1.1, definitions and trait labels are interned deterministically on sequenced ops,\n\t * and each client maintains a string interner whose lifetime is tied to the SharedTree.\n\t */\n\treadonly internedStrings: readonly string[];\n\n\t/**\n\t * Information about all IDs compressed in the summary\n\t */\n\treadonly idCompressor: SerializedIdCompressorWithNoSession | SerializedIdCompressorWithOngoingSession;\n}\n\n/**\n * Information used to populate an edit log.\n * In 0.1.1, this is a persisted type only for `EditLogSummary<CompressedChangeInternal, FluidEditHandle>`,\n * where calling `FluidEditHandle.get` returns an array buffer of compressed `editChunk` contents.\n * The type is parameterized to avoid nearly identical type definitions for uncompressed forms of the edit\n * log, and abstracting away the fact that handle fetching needs to invoke decompression.\n * @internal\n */\nexport interface EditLogSummary<TChange, THandle> {\n\t/**\n\t * A of list of serialized chunks and their corresponding keys.\n\t * Start revision is the index of the first edit in the chunk in relation to the edit log.\n\t */\n\treadonly editChunks: readonly {\n\t\treadonly startRevision: number;\n\t\t/**\n\t\t * Either a chunk of edits or a handle that can be used to load that chunk.\n\t\t */\n\t\treadonly chunk: THandle | readonly EditWithoutId<TChange>[];\n\t}[];\n\n\t/**\n\t * A list of edits IDs for all sequenced edits.\n\t */\n\treadonly editIds: readonly EditId[];\n}\n\n/**\n * FluidEditHandles are used to load edit chunks stored outside of the EditLog.\n * Can be satisfied by IFluidHandle<ArrayBufferLike>.\n * Note that though this is in `PersistedTypes`, it isn't directly serializable (e.g. `get` is a function).\n * Its serialization relies on being encoded via an IFluidSerializer.\n * @internal\n */\nexport interface FluidEditHandle {\n\treadonly get: () => Promise<ArrayBuffer>;\n\treadonly absolutePath: string;\n}\n\n// Future write formats should make this a union type and append to it (e.g. `EditChunkContents_0_1_1 | EditChunkContents_2_0_0`).\nexport type EditChunkContents = EditChunkContents_0_1_1;\n\nexport interface EditChunkContents_0_1_1 {\n\tversion: WriteFormat.v0_1_1;\n\tedits: readonly EditWithoutId<CompressedChangeInternal<FinalNodeId>>[];\n}\n\n/**\n * Compressed change format type.\n * Encodes the same information as a {@link ChangeInternal}, but uses a more compact object format for `build` changes.\n */\nexport type CompressedChangeInternal<TId extends OpSpaceNodeId> =\n\t| ReplaceRecursive<Exclude<ChangeInternal, BuildInternal>, NodeId, TId>\n\t| CompressedBuildInternal<TId>;\n\n/**\n * A compressed version of {@link BuildInternal} where the source is a sequence of compressed nodes.\n */\nexport interface CompressedBuildInternal<TId extends OpSpaceNodeId> {\n\t/** {@inheritdoc Build.destination } */\n\treadonly destination: DetachedSequenceId;\n\t/** A sequence of nodes to build in some compressed format. */\n\treadonly source: TreeNodeSequence<CompressedBuildNode<TId>>;\n\t/** {@inheritdoc Build.\"type\" } */\n\treadonly type: typeof ChangeTypeInternal.CompressedBuild;\n}\n\n/**\n * A BuildNode that has been compressed into a {@link CompressedPlaceholderTree}.\n */\nexport type CompressedBuildNode<TId extends OpSpaceNodeId> = CompressedPlaceholderTree<TId, DetachedSequenceId>;\n\n// TODO: `ChangeInternal`s should be assignable to this type without casting; this will require some test refactoring.\n/**\n * This type should be used as an opaque handle in the public API for `ChangeInternal` objects.\n * This is useful for supporting public APIs which involve working with a tree's edit history,\n * which will involve changes that have already been internalized.\n * @alpha\n */\nexport interface InternalizedChange {\n\tInternalChangeBrand: '2cae1045-61cf-4ef7-a6a3-8ad920cb7ab3';\n}\n\n/**\n * {@inheritdoc (Change:type)}\n * @alpha\n */\nexport type ChangeInternal = InsertInternal | DetachInternal | BuildInternal | SetValueInternal | ConstraintInternal;\n\n/**\n * {@inheritdoc BuildNode}\n * @alpha\n */\nexport type BuildNodeInternal = TreeNode<BuildNodeInternal, NodeId> | DetachedSequenceId;\n\n/**\n * {@inheritdoc Build}\n * @alpha\n */\nexport interface BuildInternal extends Omit<BuildInternal_0_0_2, 'source'> {\n\treadonly source: TreeNodeSequence<BuildNodeInternal>;\n}\n\n/**\n * {@inheritdoc (Insert:interface)}\n * @alpha\n */\nexport interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'> {\n\t/** {@inheritdoc (Insert:interface).destination } */\n\treadonly destination: StablePlaceInternal;\n}\n\n/**\n * {@inheritdoc Detach}\n * @alpha\n */\nexport interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {\n\t/** {@inheritdoc Detach.source } */\n\treadonly source: StableRangeInternal;\n}\n\n/**\n * {@inheritdoc SetValue}\n * @alpha\n */\nexport interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToModify'> {\n\t/** {@inheritdoc SetValue.nodeToModify } */\n\treadonly nodeToModify: NodeId;\n}\n\n/**\n * {@inheritdoc Constraint}\n * @alpha\n */\nexport interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toConstrain' | 'parentNode'> {\n\t/** {@inheritdoc Constraint.toConstrain } */\n\treadonly toConstrain: StableRangeInternal;\n\t/** {@inheritdoc Constraint.parentNode } */\n\treadonly parentNode?: NodeId;\n}\n\n// Note: Documentation of this constant is merged with documentation of the `ChangeInternal` interface.\n/**\n * @alpha\n */\nexport const ChangeInternal = {\n\tbuild: (source: TreeNodeSequence<BuildNodeInternal>, destination: DetachedSequenceId): BuildInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Build,\n\t}),\n\n\tinsert: (source: DetachedSequenceId, destination: StablePlaceInternal): InsertInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Insert,\n\t}),\n\n\tdetach: (source: StableRangeInternal, destination?: DetachedSequenceId): DetachInternal => ({\n\t\tdestination,\n\t\tsource,\n\t\ttype: ChangeTypeInternal.Detach,\n\t}),\n\n\tsetPayload: (nodeToModify: NodeData<NodeId> | NodeId, payload: Payload): SetValueInternal => ({\n\t\tnodeToModify: getNodeId(nodeToModify),\n\t\tpayload,\n\t\ttype: ChangeTypeInternal.SetValue,\n\t}),\n\n\tclearPayload: (nodeToModify: NodeData<NodeId> | NodeId): SetValueInternal => ({\n\t\tnodeToModify: getNodeId(nodeToModify),\n\t\t// Rationale: 'undefined' is reserved for future use (see 'SetValue' interface above.)\n\t\tpayload: null,\n\t\ttype: ChangeTypeInternal.SetValue,\n\t}),\n\n\tconstraint: (\n\t\ttoConstrain: StableRangeInternal,\n\t\teffect: ConstraintEffect,\n\t\tidentityHash?: UuidString,\n\t\tlength?: number,\n\t\tcontentHash?: UuidString,\n\t\tparentNode?: NodeId,\n\t\tlabel?: TraitLabel\n\t): ConstraintInternal => ({\n\t\ttoConstrain,\n\t\teffect,\n\t\tidentityHash,\n\t\tlength,\n\t\tcontentHash,\n\t\tparentNode,\n\t\tlabel,\n\t\ttype: ChangeTypeInternal.Constraint,\n\t}),\n\n\t/** {@inheritdoc (Change:variable).delete } */\n\tdelete: (stableRange: StableRangeInternal): ChangeInternal => ChangeInternal.detach(stableRange),\n\n\t/** {@inheritdoc (Change:variable).insertTree } */\n\tinsertTree: (nodes: TreeNodeSequence<BuildNodeInternal>, destination: StablePlaceInternal): ChangeInternal[] => {\n\t\tconst build = ChangeInternal.build(nodes, 0 as DetachedSequenceId);\n\t\treturn [build, ChangeInternal.insert(build.destination, destination)];\n\t},\n\n\t/** {@inheritdoc (Change:variable).move } */\n\tmove: (source: StableRangeInternal, destination: StablePlaceInternal): ChangeInternal[] => {\n\t\tconst detach = ChangeInternal.detach(source, 0 as DetachedSequenceId);\n\t\treturn [detach, ChangeInternal.insert(assertNotUndefined(detach.destination), destination)];\n\t},\n};\n\n/**\n * {@inheritdoc (StablePlace:interface) }\n * @alpha\n */\nexport interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 'referenceSibling' | 'referenceTrait'> {\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceSibling }\n\t */\n\treadonly referenceSibling?: NodeId;\n\n\t/**\n\t * {@inheritdoc (StablePlace:interface).referenceTrait }\n\t */\n\treadonly referenceTrait?: TraitLocationInternal;\n}\n\n/**\n * {@inheritdoc (StableRange:interface) }\n * @alpha\n */\nexport interface StableRangeInternal {\n\t/** {@inheritdoc (StableRange:interface).start } */\n\treadonly start: StablePlaceInternal;\n\t/** {@inheritdoc (StableRange:interface).end } */\n\treadonly end: StablePlaceInternal;\n}\n\n/**\n * The remainder of this file consists of factory methods duplicated with those for StableRange/StablePlace and are maintained while\n * the new persisted version of SharedTree ops/summaries is rolled out.\n */\n\n/**\n * @alpha\n */\nexport const StablePlaceInternal = {\n\t/**\n\t * @returns The location directly before `node`.\n\t */\n\tbefore: (node: NodeData<NodeId> | NodeId): StablePlaceInternal => ({\n\t\tside: Side.Before,\n\t\treferenceSibling: getNodeId(node),\n\t}),\n\t/**\n\t * @returns The location directly after `node`.\n\t */\n\tafter: (node: NodeData<NodeId> | NodeId): StablePlaceInternal => ({\n\t\tside: Side.After,\n\t\treferenceSibling: getNodeId(node),\n\t}),\n\t/**\n\t * @returns The location at the start of `trait`.\n\t */\n\tatStartOf: (trait: TraitLocationInternal): StablePlaceInternal => ({\n\t\tside: Side.After,\n\t\treferenceTrait: trait,\n\t}),\n\t/**\n\t * @returns The location at the end of `trait`.\n\t */\n\tatEndOf: (trait: TraitLocationInternal): StablePlaceInternal => ({\n\t\tside: Side.Before,\n\t\treferenceTrait: trait,\n\t}),\n};\n\n/**\n * @alpha\n */\nexport const StableRangeInternal = {\n\t/**\n\t * Factory for producing a `StableRange` from a start `StablePlace` to an end `StablePlace`.\n\t *\n\t * @example\n\t *\n\t * ```typescript\n\t * StableRange.from(StablePlace.before(startNode)).to(StablePlace.after(endNode))\n\t * ```\n\t */\n\tfrom: (start: StablePlaceInternal): { to: (end: StablePlaceInternal) => StableRangeInternal } => ({\n\t\tto: (end: StablePlaceInternal): StableRangeInternal => {\n\t\t\tif (start.referenceTrait && end.referenceTrait) {\n\t\t\t\tassert(\n\t\t\t\t\tstart.referenceTrait.parent === end.referenceTrait.parent,\n\t\t\t\t\t0x65e /* StableRange must be constructed with endpoints from the same trait */\n\t\t\t\t);\n\t\t\t\tassert(\n\t\t\t\t\tstart.referenceTrait.label === end.referenceTrait.label,\n\t\t\t\t\t0x65f /* StableRange must be constructed with endpoints from the same trait */\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn { start, end };\n\t\t},\n\t}),\n\t/**\n\t * @returns a `StableRange` which contains only the provided `node`.\n\t * Both the start and end `StablePlace` objects used to anchor this `StableRange` are in terms of the passed in node.\n\t */\n\tonly: (node: NodeData<NodeId> | NodeId): StableRangeInternal => ({\n\t\tstart: StablePlaceInternal.before(node),\n\t\tend: StablePlaceInternal.after(node),\n\t}),\n\t/**\n\t * @returns a `StableRange` which contains everything in the trait.\n\t * This is anchored using the provided `trait`, and is independent of the actual contents of the trait:\n\t * it does not use sibling anchoring.\n\t */\n\tall: (trait: TraitLocationInternal): StableRangeInternal => ({\n\t\tstart: StablePlaceInternal.atStartOf(trait),\n\t\tend: StablePlaceInternal.atEndOf(trait),\n\t}),\n};\n\n/**\n * Discriminated union of valid 0.0.1 SharedTree op types.\n */\nexport type SharedTreeOp = SharedTreeEditOp | SharedTreeHandleOp | SharedTreeUpdateOp | SharedTreeNoOp;\n\nexport interface SharedTreeEditOp extends VersionedOp<WriteFormat.v0_1_1> {\n\treadonly type: SharedTreeOpType.Edit;\n\t/** The collection of changes to apply. */\n\treadonly edit: Edit<CompressedChangeInternal<OpSpaceNodeId>>;\n\t/** Contains all the IDs generated by the originating client since the last sent op */\n\treadonly idRange: IdCreationRange;\n}\n\n/**\n * A SharedTree op that includes edit handle information.\n * The handle corresponds to an edit chunk in the edit log.\n */\nexport interface SharedTreeHandleOp extends VersionedOp<WriteFormat.v0_1_1> {\n\treadonly type: SharedTreeOpType.Handle;\n\t/** The serialized handle to an uploaded edit chunk. */\n\treadonly editHandle: string;\n\t/** The index of the first edit in the chunk that corresponds to the handle. */\n\treadonly startRevision: number;\n}\n\n/** The number of IDs that a SharedTree reserves for current or future internal use */\n// This value must never change\nexport const reservedIdCount = 10;\n\n/** The SessionID of the Upgrade Session */\n// This UUID must never change\nexport const ghostSessionId = '79590933-1c70-4fda-817a-adab57c20318' as SessionId;\n\n/** Accepts either a node or a node's identifier, and returns the identifier */\nfunction getNodeId<TId>(node: TId | NodeData<TId>): TId {\n\treturn (node as NodeData<TId>).identifier ?? (node as TId);\n}\n"]}
@@ -6,8 +6,7 @@ import { IContainerExperimental } from '@fluidframework/container-loader';
6
6
  import { MockContainerRuntimeFactory, MockFluidDataStoreRuntime } from '@fluidframework/test-runtime-utils';
7
7
  import { TestObjectProvider, ITestObjectProvider } from '@fluidframework/test-utils';
8
8
  import type { IContainer } from '@fluidframework/container-definitions';
9
- import type { IFluidHandle, IRequestHeader } from '@fluidframework/core-interfaces';
10
- import { ConfigTypes } from '@fluidframework/telemetry-utils';
9
+ import type { ConfigTypes, IFluidHandle, IRequestHeader } from '@fluidframework/core-interfaces';
11
10
  import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
11
  import { AttributionId, EditId, NodeId, OpSpaceNodeId, StableNodeId } from '../../Identifiers';
13
12
  import { ReplaceRecursive } from '../../Common';
@@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