@fluidframework/tree 2.73.0 → 2.74.0-365691

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 (176) hide show
  1. package/api-report/tree.alpha.api.md +15 -1
  2. package/dist/alpha.d.ts +4 -0
  3. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
  4. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  5. package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  6. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  7. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +2 -2
  8. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
  9. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
  10. package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -1
  11. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  12. package/dist/feature-libraries/index.d.ts +1 -1
  13. package/dist/feature-libraries/index.d.ts.map +1 -1
  14. package/dist/feature-libraries/index.js +1 -2
  15. package/dist/feature-libraries/index.js.map +1 -1
  16. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  17. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  18. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  19. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  20. package/dist/feature-libraries/sequence-field/formatV2.js +1 -0
  21. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  22. package/dist/feature-libraries/treeCompressionUtils.d.ts +2 -12
  23. package/dist/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
  24. package/dist/feature-libraries/treeCompressionUtils.js +4 -14
  25. package/dist/feature-libraries/treeCompressionUtils.js.map +1 -1
  26. package/dist/index.d.ts +3 -3
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +4 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/packageVersion.d.ts +1 -1
  31. package/dist/packageVersion.d.ts.map +1 -1
  32. package/dist/packageVersion.js +1 -1
  33. package/dist/packageVersion.js.map +1 -1
  34. package/dist/shared-tree/sharedTree.d.ts +7 -10
  35. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  36. package/dist/shared-tree/sharedTree.js +1 -0
  37. package/dist/shared-tree/sharedTree.js.map +1 -1
  38. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  39. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  40. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  41. package/dist/shared-tree/treeCheckout.d.ts +2 -2
  42. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  43. package/dist/shared-tree/treeCheckout.js.map +1 -1
  44. package/dist/shared-tree-core/index.d.ts +1 -1
  45. package/dist/shared-tree-core/index.d.ts.map +1 -1
  46. package/dist/shared-tree-core/index.js.map +1 -1
  47. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +15 -12
  48. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  49. package/dist/simple-tree/api/incrementalAllowedTypes.js +17 -14
  50. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  51. package/dist/simple-tree/api/index.d.ts +1 -1
  52. package/dist/simple-tree/api/index.d.ts.map +1 -1
  53. package/dist/simple-tree/api/index.js +2 -2
  54. package/dist/simple-tree/api/index.js.map +1 -1
  55. package/dist/simple-tree/api/tree.d.ts +1 -1
  56. package/dist/simple-tree/api/tree.js.map +1 -1
  57. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  58. package/dist/simple-tree/core/treeNodeKernel.js +1 -0
  59. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  60. package/dist/simple-tree/index.d.ts +1 -1
  61. package/dist/simple-tree/index.d.ts.map +1 -1
  62. package/dist/simple-tree/index.js +2 -2
  63. package/dist/simple-tree/index.js.map +1 -1
  64. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  65. package/dist/simple-tree/node-kinds/array/arrayNode.js +1 -0
  66. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  67. package/dist/simple-tree/node-kinds/object/objectNode.js +1 -0
  68. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  69. package/dist/treeFactory.d.ts +5 -0
  70. package/dist/treeFactory.d.ts.map +1 -1
  71. package/dist/treeFactory.js +12 -5
  72. package/dist/treeFactory.js.map +1 -1
  73. package/dist/util/breakable.js +3 -3
  74. package/dist/util/breakable.js.map +1 -1
  75. package/dist/util/typeCheckTests.d.ts.map +1 -1
  76. package/dist/util/typeCheckTests.js.map +1 -1
  77. package/lib/alpha.d.ts +4 -0
  78. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
  79. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  80. package/lib/feature-libraries/chunked-forest/codec/codecs.js +2 -2
  81. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  82. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +2 -2
  83. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
  84. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
  85. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -2
  86. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  87. package/lib/feature-libraries/index.d.ts +1 -1
  88. package/lib/feature-libraries/index.d.ts.map +1 -1
  89. package/lib/feature-libraries/index.js +1 -1
  90. package/lib/feature-libraries/index.js.map +1 -1
  91. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  92. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  93. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -1
  94. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  95. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  96. package/lib/feature-libraries/sequence-field/formatV2.js +1 -0
  97. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  98. package/lib/feature-libraries/treeCompressionUtils.d.ts +2 -12
  99. package/lib/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
  100. package/lib/feature-libraries/treeCompressionUtils.js +3 -13
  101. package/lib/feature-libraries/treeCompressionUtils.js.map +1 -1
  102. package/lib/index.d.ts +3 -3
  103. package/lib/index.d.ts.map +1 -1
  104. package/lib/index.js +2 -2
  105. package/lib/index.js.map +1 -1
  106. package/lib/packageVersion.d.ts +1 -1
  107. package/lib/packageVersion.d.ts.map +1 -1
  108. package/lib/packageVersion.js +1 -1
  109. package/lib/packageVersion.js.map +1 -1
  110. package/lib/shared-tree/sharedTree.d.ts +7 -10
  111. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  112. package/lib/shared-tree/sharedTree.js +1 -0
  113. package/lib/shared-tree/sharedTree.js.map +1 -1
  114. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  115. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  116. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  117. package/lib/shared-tree/treeCheckout.d.ts +2 -2
  118. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  119. package/lib/shared-tree/treeCheckout.js.map +1 -1
  120. package/lib/shared-tree-core/index.d.ts +1 -1
  121. package/lib/shared-tree-core/index.d.ts.map +1 -1
  122. package/lib/shared-tree-core/index.js.map +1 -1
  123. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +15 -12
  124. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  125. package/lib/simple-tree/api/incrementalAllowedTypes.js +15 -12
  126. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  127. package/lib/simple-tree/api/index.d.ts +1 -1
  128. package/lib/simple-tree/api/index.d.ts.map +1 -1
  129. package/lib/simple-tree/api/index.js +1 -1
  130. package/lib/simple-tree/api/index.js.map +1 -1
  131. package/lib/simple-tree/api/tree.d.ts +1 -1
  132. package/lib/simple-tree/api/tree.js.map +1 -1
  133. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  134. package/lib/simple-tree/core/treeNodeKernel.js +1 -0
  135. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  136. package/lib/simple-tree/index.d.ts +1 -1
  137. package/lib/simple-tree/index.d.ts.map +1 -1
  138. package/lib/simple-tree/index.js +1 -1
  139. package/lib/simple-tree/index.js.map +1 -1
  140. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  141. package/lib/simple-tree/node-kinds/array/arrayNode.js +1 -0
  142. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  143. package/lib/simple-tree/node-kinds/object/objectNode.js +1 -0
  144. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  145. package/lib/treeFactory.d.ts +5 -0
  146. package/lib/treeFactory.d.ts.map +1 -1
  147. package/lib/treeFactory.js +10 -4
  148. package/lib/treeFactory.js.map +1 -1
  149. package/lib/util/breakable.js +3 -3
  150. package/lib/util/breakable.js.map +1 -1
  151. package/lib/util/typeCheckTests.d.ts.map +1 -1
  152. package/lib/util/typeCheckTests.js.map +1 -1
  153. package/package.json +22 -22
  154. package/src/feature-libraries/chunked-forest/codec/codecs.ts +3 -7
  155. package/src/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.ts +5 -6
  156. package/src/feature-libraries/forest-summary/forestSummarizer.ts +2 -2
  157. package/src/feature-libraries/index.ts +1 -5
  158. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +3 -6
  159. package/src/feature-libraries/sequence-field/formatV2.ts +1 -0
  160. package/src/feature-libraries/treeCompressionUtils.ts +1 -15
  161. package/src/index.ts +4 -0
  162. package/src/packageVersion.ts +1 -1
  163. package/src/shared-tree/sharedTree.ts +12 -18
  164. package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
  165. package/src/shared-tree/treeCheckout.ts +2 -2
  166. package/src/shared-tree-core/index.ts +1 -1
  167. package/src/simple-tree/api/incrementalAllowedTypes.ts +20 -18
  168. package/src/simple-tree/api/index.ts +1 -1
  169. package/src/simple-tree/api/tree.ts +1 -1
  170. package/src/simple-tree/core/treeNodeKernel.ts +1 -0
  171. package/src/simple-tree/index.ts +1 -1
  172. package/src/simple-tree/node-kinds/array/arrayNode.ts +2 -0
  173. package/src/simple-tree/node-kinds/object/objectNode.ts +2 -1
  174. package/src/treeFactory.ts +13 -4
  175. package/src/util/breakable.ts +4 -4
  176. package/src/util/typeCheckTests.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,GAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EAEtB,sBAAsB,EACtB,gBAAgB,GAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,4BAA4B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,mBAAmB,EAEnB,UAAU,EACV,eAAe,EAEf,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,yBAAy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AC;AAE9B,OAAO,EACN,uBAAuB,EACvB,+BAA+B,GAE/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAEN,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAEN,eAAe,EACf,UAAU,GAIV,MAAM,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport {\n\tForestSummarizer,\n\tgetCodecTreeForForestFormat,\n\ttype ForestFormatVersion,\n} from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tencodeTreeSchema,\n\tmakeSchemaCodec,\n\tmakeSchemaCodecs,\n\tgetCodecTreeForSchemaFormat,\n\tclientVersionToSchemaVersion,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangeset,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkField,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tFieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\temptyChunk,\n\tcombineChunks,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n} from \"./default-schema/index.js\";\n\nexport {\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"./schemaChecker.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n\tcurrentObserver,\n\twithObservation,\n\ttype Observer,\n} from \"./flex-tree/index.js\";\n\nexport {\n\tTreeCompressionStrategy,\n\tTreeCompressionStrategyExtended,\n\ttype TreeCompressionStrategyPrivate,\n} from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,GAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EAEtB,sBAAsB,EACtB,gBAAgB,GAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,4BAA4B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,mBAAmB,EAEnB,UAAU,EACV,eAAe,EAEf,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,yBAAyB,EACzB,0BAA0B,EAC1B,sB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AuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAEN,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAEN,eAAe,EACf,UAAU,GAIV,MAAM,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport {\n\tForestSummarizer,\n\tgetCodecTreeForForestFormat,\n\ttype ForestFormatVersion,\n} from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tencodeTreeSchema,\n\tmakeSchemaCodec,\n\tmakeSchemaCodecs,\n\tgetCodecTreeForSchemaFormat,\n\tclientVersionToSchemaVersion,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangeset,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkField,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tFieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\temptyChunk,\n\tcombineChunks,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n} from \"./default-schema/index.js\";\n\nexport {\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"./schemaChecker.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n\tcurrentObserver,\n\twithObservation,\n\ttype Observer,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n"]}
@@ -5,8 +5,8 @@
5
5
  import { type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../../codec/index.js";
6
6
  import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag } from "../../core/index.js";
7
7
  import { type FieldBatchCodec } from "../chunked-forest/index.js";
8
- import { type TreeCompressionStrategyPrivate } from "../treeCompressionUtils.js";
8
+ import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
9
9
  import type { FieldKindConfiguration } from "./fieldKindConfiguration.js";
10
10
  import { type ModularChangeset } from "./modularChangeTypes.js";
11
- export declare function makeModularChangeCodecFamily(fieldKindConfigurations: ReadonlyMap<number, FieldKindConfiguration>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, fieldsCodec: FieldBatchCodec, codecOptions: ICodecOptions, chunkCompressionStrategy?: TreeCompressionStrategyPrivate): ICodecFamily<ModularChangeset, ChangeEncodingContext>;
11
+ export declare function makeModularChangeCodecFamily(fieldKindConfigurations: ReadonlyMap<number, FieldKindConfiguration>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, fieldsCodec: FieldBatchCodec, codecOptions: ICodecOptions, chunkCompressionStrategy?: TreeCompressionStrategy): ICodecFamily<ModularChangeset, ChangeEncodingContext>;
12
12
  //# sourceMappingURL=modularChangeCodecs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modularChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAMf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,qBAAqB,EAErB,kBAAkB,EAKlB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EACN,KAAK,eAAe,EAIpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEN,KAAK,8BAA8B,EACnC,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EACX,sBAAsB,EAEtB,MAAM,6BAA6B,CAAC;AAWrC,OAAO,EAMN,KAAK,gBAAgB,EAGrB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,4BAA4B,CAC3C,uBAAuB,EAAE,WAAW,CAAC,MAAM,EAAE,sBAAsB,CAAC,EACpE,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,aAAa,EAC3B,wBAAwB,GAAE,8BAAmE,GAC3F,YAAY,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAavD"}
1
+ {"version":3,"file":"modularChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAMf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,qBAAqB,EAErB,kBAAkB,EAKlB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EACN,KAAK,eAAe,EAIpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,KAAK,EACX,sBAAsB,EAEtB,MAAM,6BAA6B,CAAC;AAWrC,OAAO,EAMN,KAAK,gBAAgB,EAGrB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,4BAA4B,CAC3C,uBAAuB,EAAE,WAAW,CAAC,MAAM,EAAE,sBAAsB,CAAC,EACpE,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,aAAa,EAC3B,wBAAwB,GAAE,uBAA4D,GACpF,YAAY,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAavD"}
@@ -6,7 +6,7 @@ import { assert, oob, fail } from "@fluidframework/core-utils/internal";
6
6
  import { extractJsonValidator, makeCodecFamily, withSchemaValidation, } from "../../codec/index.js";
7
7
  import { brand, idAllocatorFromMaxId, newTupleBTree, } from "../../util/index.js";
8
8
  import { chunkFieldSingle, defaultChunkPolicy, } from "../chunked-forest/index.js";
9
- import { TreeCompressionStrategy, } from "../treeCompressionUtils.js";
9
+ import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
10
10
  import { genericFieldKind } from "./genericFieldKind.js";
11
11
  import { EncodedModularChangeset, } from "./modularChangeFormat.js";
12
12
  import { newCrossFieldKeyTable, } from "./modularChangeTypes.js";
@@ -1 +1 @@
1
- {"version":3,"file":"modularChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,EAMN,oBAAoB,EACpB,eAAe,EACf,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAW9B,OAAO,EAIN,KAAK,EACL,oBAAoB,EAC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ACD,OAAO,OAAO,CAAC;QAChB,CAAC;KACD,CAAC;IAEF,OAAO,oBAAoB,CAC1B,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,CAAC,aAAa,CAC1B,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CACxB,UAAkC,EAClC,SAA8B;IAE9B,IAAI,SAAS,KAAK,gBAAgB,CAAC,UAAU,EAAE,CAAC;QAC/C,OAAO,gBAAgB,CAAC,aAAa,CAAC;IACvC,CAAC;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC;IAC9D,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC9D,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,SAAS,iBAAiB,CACzB,aAKC,EACD,QAAiC,EACjC,OAA8B;IAE9B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,QAAQ,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, oob, fail } from \"@fluidframework/core-utils/internal\";\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\ttype IMultiFormatCodec,\n\ttype SchemaValidationFunction,\n\textractJsonValidator,\n\tmakeCodecFamily,\n\twithSchemaValidation,\n} from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tChangesetLocalId,\n\tEncodedRevisionTag,\n\tFieldKey,\n\tFieldKindIdentifier,\n\tITreeCursorSynchronous,\n\tRevisionInfo,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport {\n\ttype IdAllocator,\n\ttype JsonCompatibleReadOnly,\n\ttype Mutable,\n\tbrand,\n\tidAllocatorFromMaxId,\n\tnewTupleBTree,\n} from \"../../util/index.js\";\nimport {\n\ttype FieldBatchCodec,\n\ttype TreeChunk,\n\tchunkFieldSingle,\n\tdefaultChunkPolicy,\n} from \"../chunked-forest/index.js\";\nimport {\n\tTreeCompressionStrategy,\n\ttype TreeCompressionStrategyPrivate,\n} from \"../treeCompressionUtils.js\";\n\nimport type { FieldChangeEncodingContext, FieldChangeHandler } from \"./fieldChangeHandler.js\";\nimport type {\n\tFieldKindConfiguration,\n\tFieldKindConfigurationEntry,\n} from \"./fieldKindConfiguration.js\";\nimport { genericFieldKind } from \"./genericFieldKind.js\";\nimport {\n\ttype EncodedBuilds,\n\ttype EncodedBuildsArray,\n\ttype EncodedFieldChange,\n\ttype EncodedFieldChangeMap,\n\tEncodedModularChangeset,\n\ttype EncodedNodeChangeset,\n\ttype EncodedRevisionInfo,\n} from \"./modularChangeFormat.js\";\nimport {\n\tnewCrossFieldKeyTable,\n\ttype ChangeAtomIdBTree,\n\ttype FieldChangeMap,\n\ttype FieldChangeset,\n\ttype FieldId,\n\ttype ModularChangeset,\n\ttype NodeChangeset,\n\ttype NodeId,\n} from \"./modularChangeTypes.js\";\n\nexport function makeModularChangeCodecFamily(\n\tfieldKindConfigurations: ReadonlyMap<number, FieldKindConfiguration>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tfieldsCodec: FieldBatchCodec,\n\tcodecOptions: ICodecOptions,\n\tchunkCompressionStrategy: TreeCompressionStrategyPrivate = TreeCompressionStrategy.Compressed,\n): ICodecFamily<ModularChangeset, ChangeEncodingContext> {\n\treturn makeCodecFamily(\n\t\tArray.from(fieldKindConfigurations.entries(), ([version, fieldKinds]) => [\n\t\t\tversion,\n\t\t\tmakeModularChangeCodec(\n\t\t\t\tfieldKinds,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tfieldsCodec,\n\t\t\t\tcodecOptions,\n\t\t\t\tchunkCompressionStrategy,\n\t\t\t),\n\t\t]),\n\t);\n}\n\ntype ModularChangeCodec = IJsonCodec<\n\tModularChangeset,\n\tEncodedModularChangeset,\n\tEncodedModularChangeset,\n\tChangeEncodingContext\n>;\n\ntype FieldCodec = IMultiFormatCodec<\n\tFieldChangeset,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tFieldChangeEncodingContext\n>;\n\nfunction makeModularChangeCodec(\n\tfieldKinds: FieldKindConfiguration,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tfieldsCodec: FieldBatchCodec,\n\tcodecOptions: ICodecOptions,\n\tchunkCompressionStrategy: TreeCompressionStrategyPrivate = TreeCompressionStrategy.Compressed,\n): ModularChangeCodec {\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tconst getMapEntry = ({ kind, formatVersion }: FieldKindConfigurationEntry) => {\n\t\tconst codec = kind.changeHandler.codecsFactory(revisionTagCodec).resolve(formatVersion);\n\t\treturn {\n\t\t\tcodec,\n\t\t\tcompiledSchema: codec.json.encodedSchema\n\t\t\t\t? extractJsonValidator(codecOptions.jsonValidator).compile(codec.json.encodedSchema)\n\t\t\t\t: undefined,\n\t\t};\n\t};\n\n\t/**\n\t * The codec version for the generic field kind.\n\t */\n\tconst genericFieldKindFormatVersion = 1;\n\tconst fieldChangesetCodecs: Map<\n\t\tFieldKindIdentifier,\n\t\t{\n\t\t\tcompiledSchema?: SchemaValidationFunction<TAnySchema>;\n\t\t\tcodec: FieldCodec;\n\t\t}\n\t> = new Map([\n\t\t[\n\t\t\tgenericFieldKind.identifier,\n\t\t\tgetMapEntry({ kind: genericFieldKind, formatVersion: genericFieldKindFormatVersion }),\n\t\t],\n\t]);\n\n\tfieldKinds.forEach((entry, identifier) => {\n\t\tfieldChangesetCodecs.set(identifier, getMapEntry(entry));\n\t});\n\n\tconst getFieldChangesetCodec = (\n\t\tfieldKind: FieldKindIdentifier,\n\t): {\n\t\tcompiledSchema?: SchemaValidationFunction<TAnySchema>;\n\t\tcodec: FieldCodec;\n\t} => {\n\t\tconst entry = fieldChangesetCodecs.get(fieldKind);\n\t\tassert(entry !== undefined, 0x5ea /* Tried to encode unsupported fieldKind */);\n\t\treturn entry;\n\t};\n\n\tfunction encodeFieldChangesForJson(\n\t\tchange: FieldChangeMap,\n\t\tcontext: ChangeEncodingContext,\n\t\tnodeChanges: ChangeAtomIdBTree<NodeChangeset>,\n\t): EncodedFieldChangeMap {\n\t\tconst fieldContext: FieldChangeEncodingContext = {\n\t\t\tbaseContext: context,\n\n\t\t\tencodeNode: (nodeId: NodeId): EncodedNodeChangeset => {\n\t\t\t\tconst node = nodeChanges.get([nodeId.revision, nodeId.localId]);\n\t\t\t\tassert(node !== undefined, 0x92e /* Unknown node ID */);\n\t\t\t\treturn encodeNodeChangesForJson(node, fieldContext);\n\t\t\t},\n\n\t\t\tdecodeNode: () => fail(0xb1e /* Should not decode nodes during field encoding */),\n\t\t};\n\n\t\treturn encodeFieldChangesForJsonI(change, fieldContext);\n\t}\n\n\tfunction encodeFieldChangesForJsonI(\n\t\tchange: FieldChangeMap,\n\t\tcontext: FieldChangeEncodingContext,\n\t): EncodedFieldChangeMap {\n\t\tconst encodedFields: EncodedFieldChangeMap = [];\n\n\t\tfor (const [field, fieldChange] of change) {\n\t\t\tconst { codec, compiledSchema } = getFieldChangesetCodec(fieldChange.fieldKind);\n\t\t\tconst encodedChange = codec.json.encode(fieldChange.change, context);\n\t\t\tif (compiledSchema !== undefined && !compiledSchema.check(encodedChange)) {\n\t\t\t\tfail(0xb1f /* Encoded change didn't pass schema validation. */);\n\t\t\t}\n\n\t\t\tconst fieldKey: FieldKey = field;\n\t\t\tconst encodedField: EncodedFieldChange = {\n\t\t\t\tfieldKey,\n\t\t\t\tfieldKind: fieldChange.fieldKind,\n\t\t\t\tchange: encodedChange,\n\t\t\t};\n\n\t\t\tencodedFields.push(encodedField);\n\t\t}\n\n\t\treturn encodedFields;\n\t}\n\n\tfunction encodeNodeChangesForJson(\n\t\tchange: NodeChangeset,\n\t\tcontext: FieldChangeEncodingContext,\n\t): EncodedNodeChangeset {\n\t\tconst encodedChange: EncodedNodeChangeset = {};\n\t\t// Note: revert constraints are ignored for now because they would only be needed if we supported reverting changes made by peers.\n\t\tconst { fieldChanges, nodeExistsConstraint } = change;\n\n\t\tif (fieldChanges !== undefined) {\n\t\t\tencodedChange.fieldChanges = encodeFieldChangesForJsonI(fieldChanges, context);\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tencodedChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn encodedChange;\n\t}\n\n\tfunction decodeFieldChangesFromJson(\n\t\tencodedChange: EncodedFieldChangeMap,\n\t\tparentId: NodeId | undefined,\n\t\tdecoded: ModularChangeset,\n\t\tcontext: ChangeEncodingContext,\n\t\tidAllocator: IdAllocator,\n\t): FieldChangeMap {\n\t\tconst decodedFields: FieldChangeMap = new Map();\n\t\tfor (const field of encodedChange) {\n\t\t\tconst { codec, compiledSchema } = getFieldChangesetCodec(field.fieldKind);\n\t\t\tif (compiledSchema !== undefined && !compiledSchema.check(field.change)) {\n\t\t\t\tfail(0xb20 /* Encoded change didn't pass schema validation. */);\n\t\t\t}\n\n\t\t\tconst fieldId: FieldId = {\n\t\t\t\tnodeId: parentId,\n\t\t\t\tfield: field.fieldKey,\n\t\t\t};\n\n\t\t\tconst fieldContext: FieldChangeEncodingContext = {\n\t\t\t\tbaseContext: context,\n\n\t\t\t\tencodeNode: () => fail(0xb21 /* Should not encode nodes during field decoding */),\n\n\t\t\t\tdecodeNode: (encodedNode: EncodedNodeChangeset): NodeId => {\n\t\t\t\t\tconst nodeId: NodeId = {\n\t\t\t\t\t\trevision: context.revision,\n\t\t\t\t\t\tlocalId: brand(idAllocator.allocate()),\n\t\t\t\t\t};\n\n\t\t\t\t\tconst node = decodeNodeChangesetFromJson(\n\t\t\t\t\t\tencodedNode,\n\t\t\t\t\t\tnodeId,\n\t\t\t\t\t\tdecoded,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tidAllocator,\n\t\t\t\t\t);\n\n\t\t\t\t\tdecoded.nodeChanges.set([nodeId.revision, nodeId.localId], node);\n\t\t\t\t\tdecoded.nodeToParent.set([nodeId.revision, nodeId.localId], fieldId);\n\t\t\t\t\treturn nodeId;\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst fieldChangeset = codec.json.decode(field.change, fieldContext);\n\n\t\t\tconst crossFieldKeys = getChangeHandler(fieldKinds, field.fieldKind).getCrossFieldKeys(\n\t\t\t\tfieldChangeset,\n\t\t\t);\n\n\t\t\tfor (const { key, count } of crossFieldKeys) {\n\t\t\t\tdecoded.crossFieldKeys.set(key, count, fieldId);\n\t\t\t}\n\n\t\t\tconst fieldKey: FieldKey = brand<FieldKey>(field.fieldKey);\n\n\t\t\tdecodedFields.set(fieldKey, {\n\t\t\t\tfieldKind: field.fieldKind,\n\t\t\t\tchange: brand(fieldChangeset),\n\t\t\t});\n\t\t}\n\n\t\treturn decodedFields;\n\t}\n\n\tfunction decodeNodeChangesetFromJson(\n\t\tencodedChange: EncodedNodeChangeset,\n\t\tid: NodeId,\n\t\tdecoded: ModularChangeset,\n\t\tcontext: ChangeEncodingContext,\n\t\tidAllocator: IdAllocator,\n\t): NodeChangeset {\n\t\tconst decodedChange: NodeChangeset = {};\n\t\tconst { fieldChanges, nodeExistsConstraint } = encodedChange;\n\n\t\tif (fieldChanges !== undefined) {\n\t\t\tdecodedChange.fieldChanges = decodeFieldChangesFromJson(\n\t\t\t\tfieldChanges,\n\t\t\t\tid,\n\t\t\t\tdecoded,\n\t\t\t\tcontext,\n\t\t\t\tidAllocator,\n\t\t\t);\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tdecodedChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn decodedChange;\n\t}\n\n\tfunction encodeDetachedNodes(\n\t\tdetachedNodes: ChangeAtomIdBTree<TreeChunk> | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): EncodedBuilds | undefined {\n\t\tif (detachedNodes === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst treesToEncode: ITreeCursorSynchronous[] = [];\n\t\tconst buildsArray: EncodedBuildsArray = [];\n\n\t\tlet buildsForRevision:\n\t\t\t| [[ChangesetLocalId, number][], EncodedRevisionTag]\n\t\t\t| [[ChangesetLocalId, number][]]\n\t\t\t| undefined;\n\n\t\tfor (const [[revision, id], chunk] of detachedNodes.entries()) {\n\t\t\tconst encodedRevision = encodeRevisionOpt(revisionTagCodec, revision, context);\n\n\t\t\tif (buildsForRevision === undefined || buildsForRevision[1] !== encodedRevision) {\n\t\t\t\tif (buildsForRevision !== undefined) {\n\t\t\t\t\tbuildsArray.push(buildsForRevision);\n\t\t\t\t}\n\n\t\t\t\tbuildsForRevision = encodedRevision !== undefined ? [[], encodedRevision] : [[]];\n\t\t\t}\n\n\t\t\ttreesToEncode.push(chunk.cursor());\n\t\t\tconst treeIndexInBatch = treesToEncode.length - 1;\n\t\t\tbuildsForRevision?.[0].push([id, treeIndexInBatch]);\n\t\t}\n\n\t\tif (buildsForRevision !== undefined) {\n\t\t\tbuildsArray.push(buildsForRevision);\n\t\t}\n\n\t\treturn buildsArray.length === 0\n\t\t\t? undefined\n\t\t\t: {\n\t\t\t\t\tbuilds: buildsArray,\n\t\t\t\t\ttrees: fieldsCodec.encode(treesToEncode, {\n\t\t\t\t\t\tencodeType: chunkCompressionStrategy,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\toriginatorId: context.originatorId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t}),\n\t\t\t\t};\n\t}\n\n\tfunction decodeDetachedNodes(\n\t\tencoded: EncodedBuilds | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): ChangeAtomIdBTree<TreeChunk> | undefined {\n\t\tif (encoded === undefined || encoded.builds.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst chunks = fieldsCodec.decode(encoded.trees, {\n\t\t\tencodeType: chunkCompressionStrategy,\n\t\t\toriginatorId: context.originatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t});\n\t\tconst getChunk = (index: number): TreeChunk => {\n\t\t\tassert(index < chunks.length, 0x898 /* out of bounds index for build chunk */);\n\t\t\treturn chunkFieldSingle(chunks[index] ?? oob(), {\n\t\t\t\tpolicy: defaultChunkPolicy,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t});\n\t\t};\n\n\t\tconst map: ModularChangeset[\"builds\"] = newTupleBTree();\n\t\tencoded.builds.forEach((build) => {\n\t\t\t// EncodedRevisionTag cannot be an array so this ensures that we can isolate the tuple\n\t\t\tconst revision =\n\t\t\t\tbuild[1] === undefined ? context.revision : revisionTagCodec.decode(build[1], context);\n\n\t\t\tconst decodedChunks: [ChangesetLocalId, TreeChunk][] = build[0].map(([i, n]) => [\n\t\t\t\ti,\n\t\t\t\tgetChunk(n),\n\t\t\t]);\n\n\t\t\tfor (const [id, chunk] of decodedChunks) {\n\t\t\t\tmap.set([revision, id], chunk);\n\t\t\t}\n\t\t});\n\n\t\treturn map;\n\t}\n\n\tfunction encodeRevisionInfos(\n\t\trevisions: readonly RevisionInfo[],\n\t\tcontext: ChangeEncodingContext,\n\t): EncodedRevisionInfo[] | undefined {\n\t\tif (context.revision !== undefined) {\n\t\t\tassert(\n\t\t\t\trevisions.length === 1 &&\n\t\t\t\t\trevisions[0] !== undefined &&\n\t\t\t\t\trevisions[0].revision === context.revision &&\n\t\t\t\t\trevisions[0].rollbackOf === undefined,\n\t\t\t\t0x964 /* A tagged change should only contain the tagged revision */,\n\t\t\t);\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst encodedRevisions = [];\n\t\tfor (const revision of revisions) {\n\t\t\tconst encodedRevision: Mutable<EncodedRevisionInfo> = {\n\t\t\t\trevision: revisionTagCodec.encode(revision.revision, context),\n\t\t\t};\n\n\t\t\tif (revision.rollbackOf !== undefined) {\n\t\t\t\tencodedRevision.rollbackOf = revisionTagCodec.encode(revision.rollbackOf, context);\n\t\t\t}\n\n\t\t\tencodedRevisions.push(encodedRevision);\n\t\t}\n\n\t\treturn encodedRevisions;\n\t}\n\n\tfunction decodeRevisionInfos(\n\t\trevisions: readonly EncodedRevisionInfo[] | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): RevisionInfo[] | undefined {\n\t\tif (revisions === undefined) {\n\t\t\treturn context.revision !== undefined ? [{ revision: context.revision }] : undefined;\n\t\t}\n\n\t\tconst decodedRevisions = [];\n\t\tfor (const revision of revisions) {\n\t\t\tconst decodedRevision: Mutable<RevisionInfo> = {\n\t\t\t\trevision: revisionTagCodec.decode(revision.revision, context),\n\t\t\t};\n\n\t\t\tif (revision.rollbackOf !== undefined) {\n\t\t\t\tdecodedRevision.rollbackOf = revisionTagCodec.decode(revision.rollbackOf, context);\n\t\t\t}\n\n\t\t\tdecodedRevisions.push(decodedRevision);\n\t\t}\n\n\t\treturn decodedRevisions;\n\t}\n\n\tconst modularChangeCodec: ModularChangeCodec = {\n\t\tencode: (change, context) => {\n\t\t\t// Destroys only exist in rollback changesets, which are never sent.\n\t\t\tassert(change.destroys === undefined, 0x899 /* Unexpected changeset with destroys */);\n\t\t\treturn {\n\t\t\t\tmaxId: change.maxId,\n\t\t\t\trevisions:\n\t\t\t\t\tchange.revisions === undefined\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: encodeRevisionInfos(change.revisions, context),\n\t\t\t\tchanges: encodeFieldChangesForJson(change.fieldChanges, context, change.nodeChanges),\n\t\t\t\tbuilds: encodeDetachedNodes(change.builds, context),\n\t\t\t\trefreshers: encodeDetachedNodes(change.refreshers, context),\n\t\t\t\tviolations: change.constraintViolationCount,\n\t\t\t};\n\t\t},\n\n\t\tdecode: (encodedChange: EncodedModularChangeset, context) => {\n\t\t\tconst decoded: Mutable<ModularChangeset> = {\n\t\t\t\tfieldChanges: new Map(),\n\t\t\t\tnodeChanges: newTupleBTree(),\n\t\t\t\tnodeToParent: newTupleBTree(),\n\t\t\t\tnodeAliases: newTupleBTree(),\n\t\t\t\tcrossFieldKeys: newCrossFieldKeyTable(),\n\t\t\t};\n\n\t\t\tdecoded.fieldChanges = decodeFieldChangesFromJson(\n\t\t\t\tencodedChange.changes,\n\t\t\t\tundefined,\n\t\t\t\tdecoded,\n\t\t\t\tcontext,\n\t\t\t\tidAllocatorFromMaxId(encodedChange.maxId),\n\t\t\t);\n\n\t\t\tif (encodedChange.builds !== undefined) {\n\t\t\t\tdecoded.builds = decodeDetachedNodes(encodedChange.builds, context);\n\t\t\t}\n\t\t\tif (encodedChange.refreshers !== undefined) {\n\t\t\t\tdecoded.refreshers = decodeDetachedNodes(encodedChange.refreshers, context);\n\t\t\t}\n\n\t\t\tif (encodedChange.violations !== undefined) {\n\t\t\t\tdecoded.constraintViolationCount = encodedChange.violations;\n\t\t\t}\n\n\t\t\tconst decodedRevInfos = decodeRevisionInfos(encodedChange.revisions, context);\n\t\t\tif (decodedRevInfos !== undefined) {\n\t\t\t\tdecoded.revisions = decodedRevInfos;\n\t\t\t}\n\t\t\tif (encodedChange.maxId !== undefined) {\n\t\t\t\tdecoded.maxId = encodedChange.maxId;\n\t\t\t}\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn withSchemaValidation(\n\t\tEncodedModularChangeset,\n\t\tmodularChangeCodec,\n\t\tcodecOptions.jsonValidator,\n\t);\n}\n\nfunction getChangeHandler(\n\tfieldKinds: FieldKindConfiguration,\n\tfieldKind: FieldKindIdentifier,\n): FieldChangeHandler<unknown> {\n\tif (fieldKind === genericFieldKind.identifier) {\n\t\treturn genericFieldKind.changeHandler;\n\t}\n\n\tconst handler = fieldKinds.get(fieldKind)?.kind.changeHandler;\n\tassert(handler !== undefined, 0x9c1 /* Unknown field kind */);\n\treturn handler;\n}\n\nfunction encodeRevisionOpt(\n\trevisionCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\trevision: RevisionTag | undefined,\n\tcontext: ChangeEncodingContext,\n): EncodedRevisionTag | undefined {\n\tif (revision === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn revision === context.revision ? undefined : revisionCodec.encode(revision, context);\n}\n"]}
1
+ {"version":3,"file":"modularChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,EAMN,oBAAoB,EACpB,eAAe,EACf,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAW9B,OAAO,EAIN,KAAK,EACL,oBAAoB,EACpB,aAAa,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGN,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAOrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAKN,uBAAuB,GAGvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,qBAAqB,GAQrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,4BAA4B,CAC3C,uBAAoE,EACpE,gBAKC,EACD,WAA4B,EAC5B,YAA2B,EAC3B,2BAAoD,uBAAuB,CAAC,UAAU;IAEtF,OAAO,eAAe,CACrB,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,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,aAKC,EACD,QAAiC,EACjC,OAA8B;IAE9B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,QAAQ,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, oob, fail } from \"@fluidframework/core-utils/internal\";\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\ttype IMultiFormatCodec,\n\ttype SchemaValidationFunction,\n\textractJsonValidator,\n\tmakeCodecFamily,\n\twithSchemaValidation,\n} from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tChangesetLocalId,\n\tEncodedRevisionTag,\n\tFieldKey,\n\tFieldKindIdentifier,\n\tITreeCursorSynchronous,\n\tRevisionInfo,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport {\n\ttype IdAllocator,\n\ttype JsonCompatibleReadOnly,\n\ttype Mutable,\n\tbrand,\n\tidAllocatorFromMaxId,\n\tnewTupleBTree,\n} from \"../../util/index.js\";\nimport {\n\ttype FieldBatchCodec,\n\ttype TreeChunk,\n\tchunkFieldSingle,\n\tdefaultChunkPolicy,\n} from \"../chunked-forest/index.js\";\nimport { TreeCompressionStrategy } from \"../treeCompressionUtils.js\";\n\nimport type { FieldChangeEncodingContext, FieldChangeHandler } from \"./fieldChangeHandler.js\";\nimport type {\n\tFieldKindConfiguration,\n\tFieldKindConfigurationEntry,\n} from \"./fieldKindConfiguration.js\";\nimport { genericFieldKind } from \"./genericFieldKind.js\";\nimport {\n\ttype EncodedBuilds,\n\ttype EncodedBuildsArray,\n\ttype EncodedFieldChange,\n\ttype EncodedFieldChangeMap,\n\tEncodedModularChangeset,\n\ttype EncodedNodeChangeset,\n\ttype EncodedRevisionInfo,\n} from \"./modularChangeFormat.js\";\nimport {\n\tnewCrossFieldKeyTable,\n\ttype ChangeAtomIdBTree,\n\ttype FieldChangeMap,\n\ttype FieldChangeset,\n\ttype FieldId,\n\ttype ModularChangeset,\n\ttype NodeChangeset,\n\ttype NodeId,\n} from \"./modularChangeTypes.js\";\n\nexport function makeModularChangeCodecFamily(\n\tfieldKindConfigurations: ReadonlyMap<number, FieldKindConfiguration>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tfieldsCodec: FieldBatchCodec,\n\tcodecOptions: ICodecOptions,\n\tchunkCompressionStrategy: TreeCompressionStrategy = TreeCompressionStrategy.Compressed,\n): ICodecFamily<ModularChangeset, ChangeEncodingContext> {\n\treturn makeCodecFamily(\n\t\tArray.from(fieldKindConfigurations.entries(), ([version, fieldKinds]) => [\n\t\t\tversion,\n\t\t\tmakeModularChangeCodec(\n\t\t\t\tfieldKinds,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tfieldsCodec,\n\t\t\t\tcodecOptions,\n\t\t\t\tchunkCompressionStrategy,\n\t\t\t),\n\t\t]),\n\t);\n}\n\ntype ModularChangeCodec = IJsonCodec<\n\tModularChangeset,\n\tEncodedModularChangeset,\n\tEncodedModularChangeset,\n\tChangeEncodingContext\n>;\n\ntype FieldCodec = IMultiFormatCodec<\n\tFieldChangeset,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tFieldChangeEncodingContext\n>;\n\nfunction makeModularChangeCodec(\n\tfieldKinds: FieldKindConfiguration,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tfieldsCodec: FieldBatchCodec,\n\tcodecOptions: ICodecOptions,\n\tchunkCompressionStrategy: TreeCompressionStrategy = TreeCompressionStrategy.Compressed,\n): ModularChangeCodec {\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tconst getMapEntry = ({ kind, formatVersion }: FieldKindConfigurationEntry) => {\n\t\tconst codec = kind.changeHandler.codecsFactory(revisionTagCodec).resolve(formatVersion);\n\t\treturn {\n\t\t\tcodec,\n\t\t\tcompiledSchema: codec.json.encodedSchema\n\t\t\t\t? extractJsonValidator(codecOptions.jsonValidator).compile(codec.json.encodedSchema)\n\t\t\t\t: undefined,\n\t\t};\n\t};\n\n\t/**\n\t * The codec version for the generic field kind.\n\t */\n\tconst genericFieldKindFormatVersion = 1;\n\tconst fieldChangesetCodecs: Map<\n\t\tFieldKindIdentifier,\n\t\t{\n\t\t\tcompiledSchema?: SchemaValidationFunction<TAnySchema>;\n\t\t\tcodec: FieldCodec;\n\t\t}\n\t> = new Map([\n\t\t[\n\t\t\tgenericFieldKind.identifier,\n\t\t\tgetMapEntry({ kind: genericFieldKind, formatVersion: genericFieldKindFormatVersion }),\n\t\t],\n\t]);\n\n\tfieldKinds.forEach((entry, identifier) => {\n\t\tfieldChangesetCodecs.set(identifier, getMapEntry(entry));\n\t});\n\n\tconst getFieldChangesetCodec = (\n\t\tfieldKind: FieldKindIdentifier,\n\t): {\n\t\tcompiledSchema?: SchemaValidationFunction<TAnySchema>;\n\t\tcodec: FieldCodec;\n\t} => {\n\t\tconst entry = fieldChangesetCodecs.get(fieldKind);\n\t\tassert(entry !== undefined, 0x5ea /* Tried to encode unsupported fieldKind */);\n\t\treturn entry;\n\t};\n\n\tfunction encodeFieldChangesForJson(\n\t\tchange: FieldChangeMap,\n\t\tcontext: ChangeEncodingContext,\n\t\tnodeChanges: ChangeAtomIdBTree<NodeChangeset>,\n\t): EncodedFieldChangeMap {\n\t\tconst fieldContext: FieldChangeEncodingContext = {\n\t\t\tbaseContext: context,\n\n\t\t\tencodeNode: (nodeId: NodeId): EncodedNodeChangeset => {\n\t\t\t\tconst node = nodeChanges.get([nodeId.revision, nodeId.localId]);\n\t\t\t\tassert(node !== undefined, 0x92e /* Unknown node ID */);\n\t\t\t\treturn encodeNodeChangesForJson(node, fieldContext);\n\t\t\t},\n\n\t\t\tdecodeNode: () => fail(0xb1e /* Should not decode nodes during field encoding */),\n\t\t};\n\n\t\treturn encodeFieldChangesForJsonI(change, fieldContext);\n\t}\n\n\tfunction encodeFieldChangesForJsonI(\n\t\tchange: FieldChangeMap,\n\t\tcontext: FieldChangeEncodingContext,\n\t): EncodedFieldChangeMap {\n\t\tconst encodedFields: EncodedFieldChangeMap = [];\n\n\t\tfor (const [field, fieldChange] of change) {\n\t\t\tconst { codec, compiledSchema } = getFieldChangesetCodec(fieldChange.fieldKind);\n\t\t\tconst encodedChange = codec.json.encode(fieldChange.change, context);\n\t\t\tif (compiledSchema !== undefined && !compiledSchema.check(encodedChange)) {\n\t\t\t\tfail(0xb1f /* Encoded change didn't pass schema validation. */);\n\t\t\t}\n\n\t\t\tconst fieldKey: FieldKey = field;\n\t\t\tconst encodedField: EncodedFieldChange = {\n\t\t\t\tfieldKey,\n\t\t\t\tfieldKind: fieldChange.fieldKind,\n\t\t\t\tchange: encodedChange,\n\t\t\t};\n\n\t\t\tencodedFields.push(encodedField);\n\t\t}\n\n\t\treturn encodedFields;\n\t}\n\n\tfunction encodeNodeChangesForJson(\n\t\tchange: NodeChangeset,\n\t\tcontext: FieldChangeEncodingContext,\n\t): EncodedNodeChangeset {\n\t\tconst encodedChange: EncodedNodeChangeset = {};\n\t\t// Note: revert constraints are ignored for now because they would only be needed if we supported reverting changes made by peers.\n\t\tconst { fieldChanges, nodeExistsConstraint } = change;\n\n\t\tif (fieldChanges !== undefined) {\n\t\t\tencodedChange.fieldChanges = encodeFieldChangesForJsonI(fieldChanges, context);\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tencodedChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn encodedChange;\n\t}\n\n\tfunction decodeFieldChangesFromJson(\n\t\tencodedChange: EncodedFieldChangeMap,\n\t\tparentId: NodeId | undefined,\n\t\tdecoded: ModularChangeset,\n\t\tcontext: ChangeEncodingContext,\n\t\tidAllocator: IdAllocator,\n\t): FieldChangeMap {\n\t\tconst decodedFields: FieldChangeMap = new Map();\n\t\tfor (const field of encodedChange) {\n\t\t\tconst { codec, compiledSchema } = getFieldChangesetCodec(field.fieldKind);\n\t\t\tif (compiledSchema !== undefined && !compiledSchema.check(field.change)) {\n\t\t\t\tfail(0xb20 /* Encoded change didn't pass schema validation. */);\n\t\t\t}\n\n\t\t\tconst fieldId: FieldId = {\n\t\t\t\tnodeId: parentId,\n\t\t\t\tfield: field.fieldKey,\n\t\t\t};\n\n\t\t\tconst fieldContext: FieldChangeEncodingContext = {\n\t\t\t\tbaseContext: context,\n\n\t\t\t\tencodeNode: () => fail(0xb21 /* Should not encode nodes during field decoding */),\n\n\t\t\t\tdecodeNode: (encodedNode: EncodedNodeChangeset): NodeId => {\n\t\t\t\t\tconst nodeId: NodeId = {\n\t\t\t\t\t\trevision: context.revision,\n\t\t\t\t\t\tlocalId: brand(idAllocator.allocate()),\n\t\t\t\t\t};\n\n\t\t\t\t\tconst node = decodeNodeChangesetFromJson(\n\t\t\t\t\t\tencodedNode,\n\t\t\t\t\t\tnodeId,\n\t\t\t\t\t\tdecoded,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tidAllocator,\n\t\t\t\t\t);\n\n\t\t\t\t\tdecoded.nodeChanges.set([nodeId.revision, nodeId.localId], node);\n\t\t\t\t\tdecoded.nodeToParent.set([nodeId.revision, nodeId.localId], fieldId);\n\t\t\t\t\treturn nodeId;\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst fieldChangeset = codec.json.decode(field.change, fieldContext);\n\n\t\t\tconst crossFieldKeys = getChangeHandler(fieldKinds, field.fieldKind).getCrossFieldKeys(\n\t\t\t\tfieldChangeset,\n\t\t\t);\n\n\t\t\tfor (const { key, count } of crossFieldKeys) {\n\t\t\t\tdecoded.crossFieldKeys.set(key, count, fieldId);\n\t\t\t}\n\n\t\t\tconst fieldKey: FieldKey = brand<FieldKey>(field.fieldKey);\n\n\t\t\tdecodedFields.set(fieldKey, {\n\t\t\t\tfieldKind: field.fieldKind,\n\t\t\t\tchange: brand(fieldChangeset),\n\t\t\t});\n\t\t}\n\n\t\treturn decodedFields;\n\t}\n\n\tfunction decodeNodeChangesetFromJson(\n\t\tencodedChange: EncodedNodeChangeset,\n\t\tid: NodeId,\n\t\tdecoded: ModularChangeset,\n\t\tcontext: ChangeEncodingContext,\n\t\tidAllocator: IdAllocator,\n\t): NodeChangeset {\n\t\tconst decodedChange: NodeChangeset = {};\n\t\tconst { fieldChanges, nodeExistsConstraint } = encodedChange;\n\n\t\tif (fieldChanges !== undefined) {\n\t\t\tdecodedChange.fieldChanges = decodeFieldChangesFromJson(\n\t\t\t\tfieldChanges,\n\t\t\t\tid,\n\t\t\t\tdecoded,\n\t\t\t\tcontext,\n\t\t\t\tidAllocator,\n\t\t\t);\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tdecodedChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn decodedChange;\n\t}\n\n\tfunction encodeDetachedNodes(\n\t\tdetachedNodes: ChangeAtomIdBTree<TreeChunk> | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): EncodedBuilds | undefined {\n\t\tif (detachedNodes === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst treesToEncode: ITreeCursorSynchronous[] = [];\n\t\tconst buildsArray: EncodedBuildsArray = [];\n\n\t\tlet buildsForRevision:\n\t\t\t| [[ChangesetLocalId, number][], EncodedRevisionTag]\n\t\t\t| [[ChangesetLocalId, number][]]\n\t\t\t| undefined;\n\n\t\tfor (const [[revision, id], chunk] of detachedNodes.entries()) {\n\t\t\tconst encodedRevision = encodeRevisionOpt(revisionTagCodec, revision, context);\n\n\t\t\tif (buildsForRevision === undefined || buildsForRevision[1] !== encodedRevision) {\n\t\t\t\tif (buildsForRevision !== undefined) {\n\t\t\t\t\tbuildsArray.push(buildsForRevision);\n\t\t\t\t}\n\n\t\t\t\tbuildsForRevision = encodedRevision !== undefined ? [[], encodedRevision] : [[]];\n\t\t\t}\n\n\t\t\ttreesToEncode.push(chunk.cursor());\n\t\t\tconst treeIndexInBatch = treesToEncode.length - 1;\n\t\t\tbuildsForRevision?.[0].push([id, treeIndexInBatch]);\n\t\t}\n\n\t\tif (buildsForRevision !== undefined) {\n\t\t\tbuildsArray.push(buildsForRevision);\n\t\t}\n\n\t\treturn buildsArray.length === 0\n\t\t\t? undefined\n\t\t\t: {\n\t\t\t\t\tbuilds: buildsArray,\n\t\t\t\t\ttrees: fieldsCodec.encode(treesToEncode, {\n\t\t\t\t\t\tencodeType: chunkCompressionStrategy,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\toriginatorId: context.originatorId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t}),\n\t\t\t\t};\n\t}\n\n\tfunction decodeDetachedNodes(\n\t\tencoded: EncodedBuilds | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): ChangeAtomIdBTree<TreeChunk> | undefined {\n\t\tif (encoded === undefined || encoded.builds.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst chunks = fieldsCodec.decode(encoded.trees, {\n\t\t\tencodeType: chunkCompressionStrategy,\n\t\t\toriginatorId: context.originatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t});\n\t\tconst getChunk = (index: number): TreeChunk => {\n\t\t\tassert(index < chunks.length, 0x898 /* out of bounds index for build chunk */);\n\t\t\treturn chunkFieldSingle(chunks[index] ?? oob(), {\n\t\t\t\tpolicy: defaultChunkPolicy,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t});\n\t\t};\n\n\t\tconst map: ModularChangeset[\"builds\"] = newTupleBTree();\n\t\tencoded.builds.forEach((build) => {\n\t\t\t// EncodedRevisionTag cannot be an array so this ensures that we can isolate the tuple\n\t\t\tconst revision =\n\t\t\t\tbuild[1] === undefined ? context.revision : revisionTagCodec.decode(build[1], context);\n\n\t\t\tconst decodedChunks: [ChangesetLocalId, TreeChunk][] = build[0].map(([i, n]) => [\n\t\t\t\ti,\n\t\t\t\tgetChunk(n),\n\t\t\t]);\n\n\t\t\tfor (const [id, chunk] of decodedChunks) {\n\t\t\t\tmap.set([revision, id], chunk);\n\t\t\t}\n\t\t});\n\n\t\treturn map;\n\t}\n\n\tfunction encodeRevisionInfos(\n\t\trevisions: readonly RevisionInfo[],\n\t\tcontext: ChangeEncodingContext,\n\t): EncodedRevisionInfo[] | undefined {\n\t\tif (context.revision !== undefined) {\n\t\t\tassert(\n\t\t\t\trevisions.length === 1 &&\n\t\t\t\t\trevisions[0] !== undefined &&\n\t\t\t\t\trevisions[0].revision === context.revision &&\n\t\t\t\t\trevisions[0].rollbackOf === undefined,\n\t\t\t\t0x964 /* A tagged change should only contain the tagged revision */,\n\t\t\t);\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst encodedRevisions = [];\n\t\tfor (const revision of revisions) {\n\t\t\tconst encodedRevision: Mutable<EncodedRevisionInfo> = {\n\t\t\t\trevision: revisionTagCodec.encode(revision.revision, context),\n\t\t\t};\n\n\t\t\tif (revision.rollbackOf !== undefined) {\n\t\t\t\tencodedRevision.rollbackOf = revisionTagCodec.encode(revision.rollbackOf, context);\n\t\t\t}\n\n\t\t\tencodedRevisions.push(encodedRevision);\n\t\t}\n\n\t\treturn encodedRevisions;\n\t}\n\n\tfunction decodeRevisionInfos(\n\t\trevisions: readonly EncodedRevisionInfo[] | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): RevisionInfo[] | undefined {\n\t\tif (revisions === undefined) {\n\t\t\treturn context.revision !== undefined ? [{ revision: context.revision }] : undefined;\n\t\t}\n\n\t\tconst decodedRevisions = [];\n\t\tfor (const revision of revisions) {\n\t\t\tconst decodedRevision: Mutable<RevisionInfo> = {\n\t\t\t\trevision: revisionTagCodec.decode(revision.revision, context),\n\t\t\t};\n\n\t\t\tif (revision.rollbackOf !== undefined) {\n\t\t\t\tdecodedRevision.rollbackOf = revisionTagCodec.decode(revision.rollbackOf, context);\n\t\t\t}\n\n\t\t\tdecodedRevisions.push(decodedRevision);\n\t\t}\n\n\t\treturn decodedRevisions;\n\t}\n\n\tconst modularChangeCodec: ModularChangeCodec = {\n\t\tencode: (change, context) => {\n\t\t\t// Destroys only exist in rollback changesets, which are never sent.\n\t\t\tassert(change.destroys === undefined, 0x899 /* Unexpected changeset with destroys */);\n\t\t\treturn {\n\t\t\t\tmaxId: change.maxId,\n\t\t\t\trevisions:\n\t\t\t\t\tchange.revisions === undefined\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: encodeRevisionInfos(change.revisions, context),\n\t\t\t\tchanges: encodeFieldChangesForJson(change.fieldChanges, context, change.nodeChanges),\n\t\t\t\tbuilds: encodeDetachedNodes(change.builds, context),\n\t\t\t\trefreshers: encodeDetachedNodes(change.refreshers, context),\n\t\t\t\tviolations: change.constraintViolationCount,\n\t\t\t};\n\t\t},\n\n\t\tdecode: (encodedChange: EncodedModularChangeset, context) => {\n\t\t\tconst decoded: Mutable<ModularChangeset> = {\n\t\t\t\tfieldChanges: new Map(),\n\t\t\t\tnodeChanges: newTupleBTree(),\n\t\t\t\tnodeToParent: newTupleBTree(),\n\t\t\t\tnodeAliases: newTupleBTree(),\n\t\t\t\tcrossFieldKeys: newCrossFieldKeyTable(),\n\t\t\t};\n\n\t\t\tdecoded.fieldChanges = decodeFieldChangesFromJson(\n\t\t\t\tencodedChange.changes,\n\t\t\t\tundefined,\n\t\t\t\tdecoded,\n\t\t\t\tcontext,\n\t\t\t\tidAllocatorFromMaxId(encodedChange.maxId),\n\t\t\t);\n\n\t\t\tif (encodedChange.builds !== undefined) {\n\t\t\t\tdecoded.builds = decodeDetachedNodes(encodedChange.builds, context);\n\t\t\t}\n\t\t\tif (encodedChange.refreshers !== undefined) {\n\t\t\t\tdecoded.refreshers = decodeDetachedNodes(encodedChange.refreshers, context);\n\t\t\t}\n\n\t\t\tif (encodedChange.violations !== undefined) {\n\t\t\t\tdecoded.constraintViolationCount = encodedChange.violations;\n\t\t\t}\n\n\t\t\tconst decodedRevInfos = decodeRevisionInfos(encodedChange.revisions, context);\n\t\t\tif (decodedRevInfos !== undefined) {\n\t\t\t\tdecoded.revisions = decodedRevInfos;\n\t\t\t}\n\t\t\tif (encodedChange.maxId !== undefined) {\n\t\t\t\tdecoded.maxId = encodedChange.maxId;\n\t\t\t}\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn withSchemaValidation(\n\t\tEncodedModularChangeset,\n\t\tmodularChangeCodec,\n\t\tcodecOptions.jsonValidator,\n\t);\n}\n\nfunction getChangeHandler(\n\tfieldKinds: FieldKindConfiguration,\n\tfieldKind: FieldKindIdentifier,\n): FieldChangeHandler<unknown> {\n\tif (fieldKind === genericFieldKind.identifier) {\n\t\treturn genericFieldKind.changeHandler;\n\t}\n\n\tconst handler = fieldKinds.get(fieldKind)?.kind.changeHandler;\n\tassert(handler !== undefined, 0x9c1 /* Unknown field kind */);\n\treturn handler;\n}\n\nfunction encodeRevisionOpt(\n\trevisionCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\trevision: RevisionTag | undefined,\n\tcontext: ChangeEncodingContext,\n): EncodedRevisionTag | undefined {\n\tif (revision === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn revision === context.revision ? undefined : revisionCodec.encode(revision, context);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,OAAO,EA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C,KAAY,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC;IAC3C,KAAY,eAAe,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;IAC7D,KAAY,UAAU,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;IAEnD,KAAY,QAAQ,CAAC,MAAM,SAAS,OAAO,EAAE,WAAW,SAAS,OAAO,IAAI,MAAM,CACjF,UAAU,CAAC,OAAO,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAChD,CAAC;IACF,KAAY,IAAI,CAAC,MAAM,SAAS,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACnF,KAAY,SAAS,CAAC,MAAM,SAAS,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC7F"}
@@ -10,6 +10,7 @@ const noAdditionalProps = { additionalProperties: false };
10
10
  const CellCount = Type.Number({ multipleOf: 1, minimum: 1 });
11
11
  const MoveId = ChangesetLocalIdSchema;
12
12
  const HasMoveId = Type.Object({ id: MoveId });
13
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
14
  const IdRange = Type.Tuple([ChangesetLocalIdSchema, CellCount]);
14
15
  export const CellId = EncodedChangeAtomId;
15
16
  const HasRevisionTag = Type.Object({ revision: Type.Optional(RevisionTagSchema) });
@@ -1 +1 @@
1
- {"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiD,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,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AQ,CAAC,MAAM,CAAC;IAC7B,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;IACnC,KAAK,EAAE,SAAS;CAChB,EACD,iBAAiB,CACjB,CAAC;AAEH,wCAAwC;AACxC,4EAA4E;AAC5E,MAAM,IAAI,GAAG,CAAyB,WAAmB,EAAE,EAAE,CAC5D,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAEnC,wCAAwC;AACxC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAyB,WAAmB,EAAE,EAAE,CACxE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { RevisionTagSchema } from \"../../core/index.js\";\nimport { ChangesetLocalIdSchema, EncodedChangeAtomId } from \"../modular-schema/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nconst CellCount = Type.Number({ multipleOf: 1, minimum: 1 });\n\nconst MoveId = ChangesetLocalIdSchema;\nconst HasMoveId = Type.Object({ id: MoveId });\n\nconst IdRange = Type.Tuple([ChangesetLocalIdSchema, CellCount]);\n\nexport const CellId = EncodedChangeAtomId;\n\nconst HasRevisionTag = Type.Object({ revision: Type.Optional(RevisionTagSchema) });\n\nconst Insert = Type.Composite([HasMoveId, HasRevisionTag], noAdditionalProps);\n\nconst HasMoveFields = Type.Composite([\n\tHasMoveId,\n\tHasRevisionTag,\n\tType.Object({ finalEndpoint: Type.Optional(EncodedChangeAtomId) }),\n]);\n\nconst MoveIn = Type.Composite([HasMoveFields], noAdditionalProps);\n\nconst DetachFields = Type.Object({\n\tidOverride: Type.Optional(CellId),\n});\n\nconst Remove = Type.Composite(\n\t[\n\t\tType.Object({\n\t\t\tid: ChangesetLocalIdSchema,\n\t\t}),\n\t\tHasRevisionTag,\n\t\tDetachFields,\n\t],\n\tnoAdditionalProps,\n);\n\nconst MoveOut = Type.Composite([HasMoveFields, DetachFields], noAdditionalProps);\n\nconst Attach = Type.Object(\n\t{\n\t\tinsert: Type.Optional(Insert),\n\t\tmoveIn: Type.Optional(MoveIn),\n\t},\n\tunionOptions,\n);\n\nconst Detach = Type.Object(\n\t{\n\t\tremove: Type.Optional(Remove),\n\t\tmoveOut: Type.Optional(MoveOut),\n\t},\n\tunionOptions,\n);\n\nconst AttachAndDetach = Type.Object({\n\tattach: Attach,\n\tdetach: Detach,\n});\n\nexport const MarkEffect = Type.Object(\n\t{\n\t\t// Note: `noop` is encoded by omitting `effect` from the encoded cell mark, so is not included here.\n\t\tinsert: Type.Optional(Insert),\n\t\tmoveIn: Type.Optional(MoveIn),\n\t\tremove: Type.Optional(Remove),\n\t\tmoveOut: Type.Optional(MoveOut),\n\t\tattachAndDetach: Type.Optional(AttachAndDetach),\n\t},\n\tunionOptions,\n);\n\nexport const CellMark = <TMark extends TSchema, TNodeChange extends TSchema>(\n\ttMark: TMark,\n\ttNodeChange: TNodeChange,\n\t// Return type is intentionally derived.\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n) =>\n\tType.Object(\n\t\t{\n\t\t\t// If undefined, indicates a Noop mark.\n\t\t\teffect: Type.Optional(tMark),\n\t\t\tcellId: Type.Optional(CellId),\n\t\t\tchanges: Type.Optional(tNodeChange),\n\t\t\tcount: CellCount,\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst Mark = <Schema extends TSchema>(tNodeChange: Schema) =>\n\tCellMark(MarkEffect, tNodeChange);\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Changeset = <Schema extends TSchema>(tNodeChange: Schema) =>\n\tType.Array(Mark(tNodeChange));\n\n/**\n * @privateRemarks Many of these names are currently used in the sequence-field types. Putting them in a namespace makes codec code more readable.\n */\nexport namespace Encoded {\n\texport type CellCount = Static<typeof CellCount>;\n\n\texport type MoveId = Static<typeof MoveId>;\n\texport type IdRange = Static<typeof IdRange>;\n\n\texport type CellId = Static<typeof CellId>;\n\n\texport type Insert = Static<typeof Insert>;\n\texport type MoveIn = Static<typeof MoveIn>;\n\texport type Remove = Static<typeof Remove>;\n\texport type MoveOut = Static<typeof MoveOut>;\n\texport type Attach = Static<typeof Attach>;\n\texport type Detach = Static<typeof Detach>;\n\texport type AttachAndDetach = Static<typeof AttachAndDetach>;\n\texport type MarkEffect = Static<typeof MarkEffect>;\n\n\texport type CellMark<Schema extends TSchema, TNodeChange extends TSchema> = Static<\n\t\tReturnType<typeof CellMark<Schema, TNodeChange>>\n\t>;\n\texport type Mark<Schema extends TSchema> = Static<ReturnType<typeof Mark<Schema>>>;\n\texport type Changeset<Schema extends TSchema> = Static<ReturnType<typeof Changeset<Schema>>>;\n}\n"]}
1
+ {"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiD,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEzF,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAE7D,MAAM,MAAM,GAAG,sBAAsB,CAAC;AACtC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,EAA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wCAAwC;AACxC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAyB,WAAmB,EAAE,EAAE,CACxE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { RevisionTagSchema } from \"../../core/index.js\";\nimport { ChangesetLocalIdSchema, EncodedChangeAtomId } from \"../modular-schema/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nconst CellCount = Type.Number({ multipleOf: 1, minimum: 1 });\n\nconst MoveId = ChangesetLocalIdSchema;\nconst HasMoveId = Type.Object({ id: MoveId });\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst IdRange = Type.Tuple([ChangesetLocalIdSchema, CellCount]);\n\nexport const CellId = EncodedChangeAtomId;\n\nconst HasRevisionTag = Type.Object({ revision: Type.Optional(RevisionTagSchema) });\n\nconst Insert = Type.Composite([HasMoveId, HasRevisionTag], noAdditionalProps);\n\nconst HasMoveFields = Type.Composite([\n\tHasMoveId,\n\tHasRevisionTag,\n\tType.Object({ finalEndpoint: Type.Optional(EncodedChangeAtomId) }),\n]);\n\nconst MoveIn = Type.Composite([HasMoveFields], noAdditionalProps);\n\nconst DetachFields = Type.Object({\n\tidOverride: Type.Optional(CellId),\n});\n\nconst Remove = Type.Composite(\n\t[\n\t\tType.Object({\n\t\t\tid: ChangesetLocalIdSchema,\n\t\t}),\n\t\tHasRevisionTag,\n\t\tDetachFields,\n\t],\n\tnoAdditionalProps,\n);\n\nconst MoveOut = Type.Composite([HasMoveFields, DetachFields], noAdditionalProps);\n\nconst Attach = Type.Object(\n\t{\n\t\tinsert: Type.Optional(Insert),\n\t\tmoveIn: Type.Optional(MoveIn),\n\t},\n\tunionOptions,\n);\n\nconst Detach = Type.Object(\n\t{\n\t\tremove: Type.Optional(Remove),\n\t\tmoveOut: Type.Optional(MoveOut),\n\t},\n\tunionOptions,\n);\n\nconst AttachAndDetach = Type.Object({\n\tattach: Attach,\n\tdetach: Detach,\n});\n\nexport const MarkEffect = Type.Object(\n\t{\n\t\t// Note: `noop` is encoded by omitting `effect` from the encoded cell mark, so is not included here.\n\t\tinsert: Type.Optional(Insert),\n\t\tmoveIn: Type.Optional(MoveIn),\n\t\tremove: Type.Optional(Remove),\n\t\tmoveOut: Type.Optional(MoveOut),\n\t\tattachAndDetach: Type.Optional(AttachAndDetach),\n\t},\n\tunionOptions,\n);\n\nexport const CellMark = <TMark extends TSchema, TNodeChange extends TSchema>(\n\ttMark: TMark,\n\ttNodeChange: TNodeChange,\n\t// Return type is intentionally derived.\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n) =>\n\tType.Object(\n\t\t{\n\t\t\t// If undefined, indicates a Noop mark.\n\t\t\teffect: Type.Optional(tMark),\n\t\t\tcellId: Type.Optional(CellId),\n\t\t\tchanges: Type.Optional(tNodeChange),\n\t\t\tcount: CellCount,\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst Mark = <Schema extends TSchema>(tNodeChange: Schema) =>\n\tCellMark(MarkEffect, tNodeChange);\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Changeset = <Schema extends TSchema>(tNodeChange: Schema) =>\n\tType.Array(Mark(tNodeChange));\n\n/**\n * @privateRemarks Many of these names are currently used in the sequence-field types. Putting them in a namespace makes codec code more readable.\n */\nexport namespace Encoded {\n\texport type CellCount = Static<typeof CellCount>;\n\n\texport type MoveId = Static<typeof MoveId>;\n\texport type IdRange = Static<typeof IdRange>;\n\n\texport type CellId = Static<typeof CellId>;\n\n\texport type Insert = Static<typeof Insert>;\n\texport type MoveIn = Static<typeof MoveIn>;\n\texport type Remove = Static<typeof Remove>;\n\texport type MoveOut = Static<typeof MoveOut>;\n\texport type Attach = Static<typeof Attach>;\n\texport type Detach = Static<typeof Detach>;\n\texport type AttachAndDetach = Static<typeof AttachAndDetach>;\n\texport type MarkEffect = Static<typeof MarkEffect>;\n\n\texport type CellMark<Schema extends TSchema, TNodeChange extends TSchema> = Static<\n\t\tReturnType<typeof CellMark<Schema, TNodeChange>>\n\t>;\n\texport type Mark<Schema extends TSchema> = Static<ReturnType<typeof Mark<Schema>>>;\n\texport type Changeset<Schema extends TSchema> = Static<ReturnType<typeof Changeset<Schema>>>;\n}\n"]}
@@ -18,21 +18,11 @@ export declare enum TreeCompressionStrategy {
18
18
  * Optimized for human readability.
19
19
  * Use this when debugging or testing and needing to inspect encoded tree content.
20
20
  */
21
- Uncompressed = 1
22
- }
23
- /**
24
- * A private extension of {@link TreeCompressionStrategy} for strategies that are not intended for public use just yet.
25
- */
26
- export declare enum TreeCompressionStrategyExtended {
21
+ Uncompressed = 1,
27
22
  /**
28
- * Optimized for encoded size, same as TreeCompressionStrategy.Compressed. It also enables incremental encoding
23
+ * Optimized for encoded size, same as TreeCompressionStrategy.Compressed but it enables incremental encoding
29
24
  * of the data.
30
- * @remarks
31
- * TODO: AB#41865
32
- * This needs to be stabilized to allow opting into it.
33
- * It could possibly be made the default instead of {@link TreeCompressionStrategy.Compressed}.
34
25
  */
35
26
  CompressedIncremental = 2
36
27
  }
37
- export type TreeCompressionStrategyPrivate = TreeCompressionStrategy | TreeCompressionStrategyExtended;
38
28
  //# sourceMappingURL=treeCompressionUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"treeCompressionUtils.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/treeCompressionUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,oBAAY,uBAAuB;IAClC;;;OAGG;IACH,UAAU,IAAI;IACd;;;OAGG;IACH,YAAY,IAAI;CAChB;AAED;;GAEG;AACH,oBAAY,+BAA+B;IAC1C;;;;;;;OAOG;IACH,qBAAqB,IAAI;CACzB;AAED,MAAM,MAAM,8BAA8B,GACvC,uBAAuB,GACvB,+BAA+B,CAAC"}
1
+ {"version":3,"file":"treeCompressionUtils.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/treeCompressionUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,oBAAY,uBAAuB;IAClC;;;OAGG;IACH,UAAU,IAAI;IACd;;;OAGG;IACH,YAAY,IAAI;IAChB;;;OAGG;IACH,qBAAqB,IAAI;CACzB"}
@@ -20,20 +20,10 @@ export var TreeCompressionStrategy;
20
20
  * Use this when debugging or testing and needing to inspect encoded tree content.
21
21
  */
22
22
  TreeCompressionStrategy[TreeCompressionStrategy["Uncompressed"] = 1] = "Uncompressed";
23
- })(TreeCompressionStrategy || (TreeCompressionStrategy = {}));
24
- /**
25
- * A private extension of {@link TreeCompressionStrategy} for strategies that are not intended for public use just yet.
26
- */
27
- export var TreeCompressionStrategyExtended;
28
- (function (TreeCompressionStrategyExtended) {
29
23
  /**
30
- * Optimized for encoded size, same as TreeCompressionStrategy.Compressed. It also enables incremental encoding
24
+ * Optimized for encoded size, same as TreeCompressionStrategy.Compressed but it enables incremental encoding
31
25
  * of the data.
32
- * @remarks
33
- * TODO: AB#41865
34
- * This needs to be stabilized to allow opting into it.
35
- * It could possibly be made the default instead of {@link TreeCompressionStrategy.Compressed}.
36
26
  */
37
- TreeCompressionStrategyExtended[TreeCompressionStrategyExtended["CompressedIncremental"] = 2] = "CompressedIncremental";
38
- })(TreeCompressionStrategyExtended || (TreeCompressionStrategyExtended = {}));
27
+ TreeCompressionStrategy[TreeCompressionStrategy["CompressedIncremental"] = 2] = "CompressedIncremental";
28
+ })(TreeCompressionStrategy || (TreeCompressionStrategy = {}));
39
29
  //# sourceMappingURL=treeCompressionUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"treeCompressionUtils.js","sourceRoot":"","sources":["../../src/feature-libraries/treeCompressionUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,uBAWX;AAXD,WAAY,uBAAuB;IAClC;;;OAGG;IACH,iFAAc,CAAA;IACd;;;OAGG;IACH,qFAAgB,CAAA;AACjB,CAAC,EAXW,uBAAuB,KAAvB,uBAAuB,QAWlC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,+BAUX;AAVD,WAAY,+BAA+B;IAC1C;;;;;;;OAOG;IACH,uHAAyB,CAAA;AAC1B,CAAC,EAVW,+BAA+B,KAA/B,+BAA+B,QAU1C","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Selects which heuristics to use when encoding tree content.\n * All encoding options here are compatible with the same decoder:\n * the selection here does not impact compatibility.\n * @alpha\n */\nexport enum TreeCompressionStrategy {\n\t/**\n\t * Optimized for encoded size.\n\t * Use this in production to reduce bandwidth and storage use.\n\t */\n\tCompressed = 0,\n\t/**\n\t * Optimized for human readability.\n\t * Use this when debugging or testing and needing to inspect encoded tree content.\n\t */\n\tUncompressed = 1,\n}\n\n/**\n * A private extension of {@link TreeCompressionStrategy} for strategies that are not intended for public use just yet.\n */\nexport enum TreeCompressionStrategyExtended {\n\t/**\n\t * Optimized for encoded size, same as TreeCompressionStrategy.Compressed. It also enables incremental encoding\n\t * of the data.\n\t * @remarks\n\t * TODO: AB#41865\n\t * This needs to be stabilized to allow opting into it.\n\t * It could possibly be made the default instead of {@link TreeCompressionStrategy.Compressed}.\n\t */\n\tCompressedIncremental = 2,\n}\n\nexport type TreeCompressionStrategyPrivate =\n\t| TreeCompressionStrategy\n\t| TreeCompressionStrategyExtended;\n"]}
1
+ {"version":3,"file":"treeCompressionUtils.js","sourceRoot":"","sources":["../../src/feature-libraries/treeCompressionUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,uBAgBX;AAhBD,WAAY,uBAAuB;IAClC;;;OAGG;IACH,iFAAc,CAAA;IACd;;;OAGG;IACH,qFAAgB,CAAA;IAChB;;;OAGG;IACH,uGAAyB,CAAA;AAC1B,CAAC,EAhBW,uBAAuB,KAAvB,uBAAuB,QAgBlC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Selects which heuristics to use when encoding tree content.\n * All encoding options here are compatible with the same decoder:\n * the selection here does not impact compatibility.\n * @alpha\n */\nexport enum TreeCompressionStrategy {\n\t/**\n\t * Optimized for encoded size.\n\t * Use this in production to reduce bandwidth and storage use.\n\t */\n\tCompressed = 0,\n\t/**\n\t * Optimized for human readability.\n\t * Use this when debugging or testing and needing to inspect encoded tree content.\n\t */\n\tUncompressed = 1,\n\t/**\n\t * Optimized for encoded size, same as TreeCompressionStrategy.Compressed but it enables incremental encoding\n\t * of the data.\n\t */\n\tCompressedIncremental = 2,\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -28,10 +28,10 @@ export type Listenable<T extends object> = EventListenable<T>;
28
28
  * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.
29
29
  */
30
30
  export type Off = EventOff;
31
- export { TreeStatus, TreeCompressionStrategy, type TreeIndex, type TreeIndexKey, type TreeIndexNodes, } from "./feature-libraries/index.js";
31
+ export { TreeStatus, TreeCompressionStrategy, type TreeIndex, type TreeIndexKey, type TreeIndexNodes, type IncrementalEncodingPolicy, } from "./feature-libraries/index.js";
32
32
  export { type ITreeInternal, type SharedTreeOptions, type SharedTreeOptionsBeta, type ForestType, type SharedTreeFormatOptions, Tree, type RunTransaction, type ForestOptions, getBranch, type BranchableTree, type TreeBranchFork, independentInitializedView, type ViewContent, TreeAlpha, type ObservationResults, type TreeIdentifierUtils, independentView, createIndependentTreeBeta, createIndependentTreeAlpha, ForestTypeOptimized, ForestTypeExpensiveDebug, ForestTypeReference, } from "./shared-tree/index.js";
33
- export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryBeta, type SchemaStaticsBeta, SchemaFactoryAlpha, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, type InternalTreeNode, type WithType, type NodeChangedData, type SchemaUpgrade, contentSchemaSymbol, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type UnannotateAllowedTypeUnsafe, type AnnotatedAllowedTypeUnsafe, type AnnotatedAllowedTypesUnsafe, type AllowedTypesFullUnsafe, type AllowedTypesFullFromMixedUnsafe, type UnannotateAllowedTypesListUnsafe, type AnnotateAllowedTypesListUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, type DirtyTreeStatus, trackDirtyNodes, type DirtyTreeMap, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type TreeViewBeta, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type AllowedTypesFullEvaluated, type AllowedTypeMetadata, type AllowedTypesMetadata, type UnannotateAllowedTypesList, type AnnotateAllowedTypesList, type AllowedTypesFull, type AllowedTypesFullFromMixed, TreeBeta, type TreeChangeEventsBeta, type VerboseTreeNode, type TreeEncodingOptions, type TreeSchemaEncodingOptions, type TreeSchema, TreeViewConfigurationAlpha, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, type JsonTreeSchema, type JsonSchemaId, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonLeafNodeSchema, type JsonMapNodeSchema, type JsonArrayNodeSchema, type JsonObjectNodeSchema, type JsonFieldSchema, type JsonSchemaRef, type JsonRefPath, type JsonSchemaType, type JsonLeafSchemaType, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, getJsonSchema, type LazyItem, type Unenforced, type SimpleNodeSchemaBase, type SimpleNodeSchemaBaseAlpha, type SimpleTreeSchema, type SimpleNodeSchema, type SimpleFieldSchema, type SimpleLeafNodeSchema, type SimpleMapNodeSchema, type SimpleArrayNodeSchema, type SimpleObjectNodeSchema, type SimpleObjectFieldSchema, type SimpleRecordNodeSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, getSimpleSchema, type ReadonlyArrayNode, type InsertableTreeNodeFromAllowedTypes, type Input, type TreeBranch, type TreeBranchAlpha, type TreeBranchEvents, asTreeViewAlpha, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type NodeSchemaMetadata, type SchemaStatics, type ITreeAlpha, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type LeafSchema, type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, type ObjectFromSchemaRecord, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, RecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, type TreeRecordNode, KeyEncodingOptions, type TreeParsingOptions, type SchemaFactory_base, type NumberKeys, type SimpleAllowedTypeAttributes, encodeSimpleSchema, decodeSimpleSchema, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, } from "./simple-tree/index.js";
34
- export { SharedTree, configuredSharedTree, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
33
+ export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryBeta, type SchemaStaticsBeta, SchemaFactoryAlpha, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, type InternalTreeNode, type WithType, type NodeChangedData, type SchemaUpgrade, contentSchemaSymbol, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type UnannotateAllowedTypeUnsafe, type AnnotatedAllowedTypeUnsafe, type AnnotatedAllowedTypesUnsafe, type AllowedTypesFullUnsafe, type AllowedTypesFullFromMixedUnsafe, type UnannotateAllowedTypesListUnsafe, type AnnotateAllowedTypesListUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, type DirtyTreeStatus, trackDirtyNodes, type DirtyTreeMap, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type TreeViewBeta, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type AllowedTypesFullEvaluated, type AllowedTypeMetadata, type AllowedTypesMetadata, type UnannotateAllowedTypesList, type AnnotateAllowedTypesList, type AllowedTypesFull, type AllowedTypesFullFromMixed, TreeBeta, type TreeChangeEventsBeta, type VerboseTreeNode, type TreeEncodingOptions, type TreeSchemaEncodingOptions, type TreeSchema, TreeViewConfigurationAlpha, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, type JsonTreeSchema, type JsonSchemaId, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonLeafNodeSchema, type JsonMapNodeSchema, type JsonArrayNodeSchema, type JsonObjectNodeSchema, type JsonFieldSchema, type JsonSchemaRef, type JsonRefPath, type JsonSchemaType, type JsonLeafSchemaType, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, getJsonSchema, type LazyItem, type Unenforced, type SimpleNodeSchemaBase, type SimpleNodeSchemaBaseAlpha, type SimpleTreeSchema, type SimpleNodeSchema, type SimpleFieldSchema, type SimpleLeafNodeSchema, type SimpleMapNodeSchema, type SimpleArrayNodeSchema, type SimpleObjectNodeSchema, type SimpleObjectFieldSchema, type SimpleRecordNodeSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, getSimpleSchema, type ReadonlyArrayNode, type InsertableTreeNodeFromAllowedTypes, type Input, type TreeBranch, type TreeBranchAlpha, type TreeBranchEvents, asTreeViewAlpha, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type NodeSchemaMetadata, type SchemaStatics, type ITreeAlpha, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type LeafSchema, type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, type ObjectFromSchemaRecord, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, RecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, type TreeRecordNode, KeyEncodingOptions, type TreeParsingOptions, type SchemaFactory_base, type NumberKeys, type SimpleAllowedTypeAttributes, encodeSimpleSchema, decodeSimpleSchema, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, incrementalSummaryHint, incrementalEncodingPolicyForAllowedTypes, } from "./simple-tree/index.js";
34
+ export { SharedTree, configuredSharedTree, configuredSharedTreeAlpha, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
35
35
  export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
36
36
  export { persistedToSimpleSchema } from "./shared-tree/index.js";
37
37
  export { type ICodecOptions, type CodecWriteOptions, FluidClientVersion, type FormatValidator, FormatValidatorNoOp, } from "./codec/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sour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mBAAmB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,YAAY,EAEX,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,KAAK,EACL,WAAW,EAEX,yBAAyB,EACzB,uBAAuB,EACvB,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,4BAA4B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO;AACN;;;GAGG;AACH,aAAa,GACb,CAAC;AAKF,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
package/lib/index.js CHANGED
@@ -9,8 +9,8 @@ export { TreeArrayNode, IterableTreeArrayContent, TreeNode, TreeViewConfiguratio
9
9
  // experimental @alpha APIs:
10
10
  adaptEnum, enumFromStrings, singletonSchema,
11
11
  // Beta APIs
12
- TreeBeta, TreeViewConfigurationAlpha, extractPersistedSchema, comparePersistedSchema, getJsonSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, getSimpleSchema, asTreeViewAlpha, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, allowUnused, ArrayNodeSchema, MapNodeSchema, RecordNodeSchema, KeyEncodingOptions, encodeSimpleSchema, decodeSimpleSchema, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, } from "./simple-tree/index.js";
13
- export { SharedTree, configuredSharedTree, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
12
+ TreeBeta, TreeViewConfigurationAlpha, extractPersistedSchema, comparePersistedSchema, getJsonSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, getSimpleSchema, asTreeViewAlpha, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, allowUnused, ArrayNodeSchema, MapNodeSchema, RecordNodeSchema, KeyEncodingOptions, encodeSimpleSchema, decodeSimpleSchema, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, incrementalSummaryHint, incrementalEncodingPolicyForAllowedTypes, } from "./simple-tree/index.js";
13
+ export { SharedTree, configuredSharedTree, configuredSharedTreeAlpha, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
14
14
  export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
15
15
  export { persistedToSimpleSchema } from "./shared-tree/index.js";
16
16
  export { FluidClientVersion, FormatValidatorNoOp, } from "./codec/index.js";
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EAEX,UAAU,EACV,gBAAgB,GAKhB,MAAM,iBAAiB,CAAC;AAkCzB,OAAO,EACN,UAAU,EACV,uBAAuB,GAIvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAMN,IAAI,EAGJ,SAAS,EAGT,0BAA0B,EAE1B,SAAS,EAGT,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AA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AO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype SharedTreeOptionsBeta,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\ttype ObservationResults,\n\ttype TreeIdentifierUtils,\n\tindependentView,\n\tcreateIndependentTreeBeta,\n\tcreateIndependentTreeAlpha,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\ttype SchemaUpgrade,\n\tcontentSchemaSymbol,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// Index APIs\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype AnnotatedAllowedType,\n\ttype AnnotatedAllowedTypes,\n\ttype AllowedTypesFullEvaluated,\n\ttype AllowedTypeMetadata,\n\ttype AllowedTypesMetadata,\n\ttype UnannotateAllowedTypesList,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleNodeSchemaBaseAlpha,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleRecordNodeSchema,\n\tnormalizeAllowedTypes,\n\twalkFieldSchema,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\ttype TreeRecordNode,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\ttype SchemaFactory_base,\n\ttype NumberKeys,\n\ttype SimpleAllowedTypeAttributes,\n\tencodeSimpleSchema,\n\tdecodeSimpleSchema,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n\tconfiguredSharedTreeBeta,\n\tconfiguredSharedTreeBetaLegacy,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\nexport { persistedToSimpleSchema } from \"./shared-tree/index.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\tFluidClientVersion,\n\ttype FormatValidator,\n\tFormatValidatorNoOp,\n} from \"./codec/index.js\";\nexport { FormatValidatorBasic } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlyObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\nexport {\n\t/**\n\t * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n\t * They are used internally to implement API aspects, but are not intended for use by external consumers.\n\t */\n\tInternalTypes,\n};\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema, type System_TableSchema } from \"./tableSchema.js\";\nexport { asAlpha, asBeta } from \"./api.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EAEX,UAAU,EACV,gBAAgB,GAKhB,MAAM,iBAAiB,CAAC;AAkCzB,OAAO,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kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAwBrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO;AACN;;;GAGG;AACH,aAAa,GACb,CAAC;AAOF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n\ttype IncrementalEncodingPolicy,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype SharedTreeOptionsBeta,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\ttype ObservationResults,\n\ttype TreeIdentifierUtils,\n\tindependentView,\n\tcreateIndependentTreeBeta,\n\tcreateIndependentTreeAlpha,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\ttype SchemaUpgrade,\n\tcontentSchemaSymbol,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// Index APIs\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype AnnotatedAllowedType,\n\ttype AnnotatedAllowedTypes,\n\ttype AllowedTypesFullEvaluated,\n\ttype AllowedTypeMetadata,\n\ttype AllowedTypesMetadata,\n\ttype UnannotateAllowedTypesList,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleNodeSchemaBaseAlpha,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleRecordNodeSchema,\n\tnormalizeAllowedTypes,\n\twalkFieldSchema,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\ttype TreeRecordNode,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\ttype SchemaFactory_base,\n\ttype NumberKeys,\n\ttype SimpleAllowedTypeAttributes,\n\tencodeSimpleSchema,\n\tdecodeSimpleSchema,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\tincrementalSummaryHint,\n\tincrementalEncodingPolicyForAllowedTypes,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n\tconfiguredSharedTreeAlpha,\n\tconfiguredSharedTreeBeta,\n\tconfiguredSharedTreeBetaLegacy,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\nexport { persistedToSimpleSchema } from \"./shared-tree/index.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\tFluidClientVersion,\n\ttype FormatValidator,\n\tFormatValidatorNoOp,\n} from \"./codec/index.js\";\nexport { FormatValidatorBasic } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlyObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\nexport {\n\t/**\n\t * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n\t * They are used internally to implement API aspects, but are not intended for use by external consumers.\n\t */\n\tInternalTypes,\n};\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema, type System_TableSchema } from \"./tableSchema.js\";\nexport { asAlpha, asBeta } from \"./api.js\";\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/tree";
8
- export declare const pkgVersion = "2.73.0";
8
+ export declare const pkgVersion = "2.74.0-365691";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,yBAAyB,CAAC;AAC9C,eAAO,MAAM,UAAU,WAAW,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,yBAAyB,CAAC;AAC9C,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/tree";
8
- export const pkgVersion = "2.73.0";
8
+ export const pkgVersion = "2.74.0-365691";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"2.73.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"2.74.0-365691\";\n"]}
@@ -10,8 +10,8 @@ import type { IChannelView, IFluidSerializer, SharedKernel } from "@fluidframewo
10
10
  import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
11
11
  import { type CodecTree, type CodecWriteOptions, type ICodecOptions } from "../codec/index.js";
12
12
  import { type GraphCommit, type IEditableForest, type JsonableTree, type TreeStoredSchema, TreeStoredSchemaRepository, type TreeStoredSchemaSubscription } from "../core/index.js";
13
- import { TreeCompressionStrategy, type IncrementalEncodingPolicy, type TreeCompressionStrategyPrivate } from "../feature-libraries/index.js";
14
- import { type BranchId, type ClonableSchemaAndPolicy, type SharedTreCoreOptionsInternal, MessageFormatVersion, SharedTreeCore, EditManagerFormatVersion } from "../shared-tree-core/index.js";
13
+ import { TreeCompressionStrategy, type IncrementalEncodingPolicy } from "../feature-libraries/index.js";
14
+ import { type BranchId, type ClonableSchemaAndPolicy, type SharedTreeCoreOptionsInternal, MessageFormatVersion, SharedTreeCore, EditManagerFormatVersion } from "../shared-tree-core/index.js";
15
15
  import { type ITree, type ImplicitFieldSchema, type ReadSchema, type SimpleTreeSchema, type TreeView, type TreeViewAlpha, type TreeViewConfiguration, type UnsafeUnknownSchema, type VerboseTree, type ITreeAlpha } from "../simple-tree/index.js";
16
16
  import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
17
17
  import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
@@ -160,19 +160,16 @@ export declare function getCodecTreeForSharedTreeFormat(clientVersion: MinimumVe
160
160
  */
161
161
  export type SharedTreeOptionsBeta = ForestOptions;
162
162
  /**
163
- * Configuration options for SharedTree.
163
+ * Configuration options for SharedTree with alpha features.
164
164
  * @alpha @input
165
165
  */
166
- export interface SharedTreeOptions extends Partial<CodecWriteOptions>, Partial<SharedTreeFormatOptions>, SharedTreeOptionsBeta {
166
+ export interface SharedTreeOptions extends SharedTreeOptionsBeta, Partial<CodecWriteOptions>, Partial<SharedTreeFormatOptions> {
167
167
  /**
168
168
  * Experimental feature flag to enable shared branches.
169
169
  * This feature is not yet complete and should not be used in production.
170
170
  * Defaults to false.
171
171
  */
172
172
  readonly enableSharedBranches?: boolean;
173
- }
174
- export interface SharedTreeOptionsInternal extends Partial<SharedTreCoreOptionsInternal>, Partial<ForestOptions>, Partial<SharedTreeFormatOptionsInternal> {
175
- disposeForksAfterTransaction?: boolean;
176
173
  /**
177
174
  * Returns whether a node / field should be incrementally encoded.
178
175
  * @remarks
@@ -180,6 +177,9 @@ export interface SharedTreeOptionsInternal extends Partial<SharedTreCoreOptionsI
180
177
  */
181
178
  shouldEncodeIncrementally?: IncrementalEncodingPolicy;
182
179
  }
180
+ export interface SharedTreeOptionsInternal extends SharedTreeOptions, Partial<SharedTreeCoreOptionsInternal> {
181
+ disposeForksAfterTransaction?: boolean;
182
+ }
183
183
  /**
184
184
  * Configuration options for SharedTree's internal tree storage.
185
185
  * @beta @input
@@ -201,9 +201,6 @@ export interface SharedTreeFormatOptions {
201
201
  */
202
202
  treeEncodeType: TreeCompressionStrategy;
203
203
  }
204
- export interface SharedTreeFormatOptionsInternal extends Omit<SharedTreeFormatOptions, "treeEncodeType"> {
205
- treeEncodeType: TreeCompressionStrategyPrivate;
206
- }
207
204
  /**
208
205
  * Used to distinguish between different forest types.
209
206
  * @remarks