@fluidframework/tree 2.0.2 → 2.1.0-276326

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 (157) hide show
  1. package/.vscode/settings.json +16 -0
  2. package/README.md +6 -9
  3. package/api-report/tree.alpha.api.md +0 -15
  4. package/api-report/tree.beta.api.md +0 -12
  5. package/api-report/tree.public.api.md +0 -12
  6. package/dist/core/tree/anchorSet.js +2 -2
  7. package/dist/core/tree/anchorSet.js.map +1 -1
  8. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +1 -1
  9. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  10. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  11. package/dist/feature-libraries/flex-tree/lazyField.d.ts +1 -1
  12. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  13. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  14. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +4 -0
  15. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  16. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +4 -0
  17. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  18. package/dist/feature-libraries/modular-schema/modularChangeFormat.js +4 -0
  19. package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/packageVersion.d.ts +1 -1
  24. package/dist/packageVersion.d.ts.map +1 -1
  25. package/dist/packageVersion.js +1 -1
  26. package/dist/packageVersion.js.map +1 -1
  27. package/dist/shared-tree/index.d.ts +1 -1
  28. package/dist/shared-tree/index.d.ts.map +1 -1
  29. package/dist/shared-tree/index.js.map +1 -1
  30. package/dist/shared-tree/schematizingTreeView.d.ts +4 -6
  31. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  32. package/dist/shared-tree/schematizingTreeView.js +16 -12
  33. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  34. package/dist/shared-tree/sharedTree.d.ts +1 -2
  35. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  36. package/dist/shared-tree/sharedTree.js +0 -10
  37. package/dist/shared-tree/sharedTree.js.map +1 -1
  38. package/dist/shared-tree/treeApi.js.map +1 -1
  39. package/dist/shared-tree/treeView.d.ts +13 -6
  40. package/dist/shared-tree/treeView.d.ts.map +1 -1
  41. package/dist/shared-tree/treeView.js +0 -2
  42. package/dist/shared-tree/treeView.js.map +1 -1
  43. package/dist/simple-tree/index.d.ts +4 -3
  44. package/dist/simple-tree/index.d.ts.map +1 -1
  45. package/dist/simple-tree/index.js +5 -3
  46. package/dist/simple-tree/index.js.map +1 -1
  47. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  48. package/dist/simple-tree/objectNode.js +4 -0
  49. package/dist/simple-tree/objectNode.js.map +1 -1
  50. package/dist/simple-tree/proxies.d.ts.map +1 -1
  51. package/dist/simple-tree/proxies.js +13 -16
  52. package/dist/simple-tree/proxies.js.map +1 -1
  53. package/dist/simple-tree/schemaFactory.d.ts.map +1 -1
  54. package/dist/simple-tree/schemaFactory.js +2 -24
  55. package/dist/simple-tree/schemaFactory.js.map +1 -1
  56. package/dist/simple-tree/toFlexSchema.d.ts +0 -15
  57. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  58. package/dist/simple-tree/toFlexSchema.js +1 -35
  59. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  60. package/dist/simple-tree/tree.d.ts +0 -29
  61. package/dist/simple-tree/tree.d.ts.map +1 -1
  62. package/dist/simple-tree/tree.js +1 -24
  63. package/dist/simple-tree/tree.js.map +1 -1
  64. package/dist/treeFactory.d.ts +1 -1
  65. package/dist/treeFactory.js +1 -1
  66. package/dist/treeFactory.js.map +1 -1
  67. package/dist/util/brandedMap.d.ts +9 -2
  68. package/dist/util/brandedMap.d.ts.map +1 -1
  69. package/dist/util/brandedMap.js +3 -4
  70. package/dist/util/brandedMap.js.map +1 -1
  71. package/lib/core/tree/anchorSet.js +2 -2
  72. package/lib/core/tree/anchorSet.js.map +1 -1
  73. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +1 -1
  74. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  75. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  76. package/lib/feature-libraries/flex-tree/lazyField.d.ts +1 -1
  77. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  78. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  79. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +4 -0
  80. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  81. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +4 -0
  82. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  83. package/lib/feature-libraries/modular-schema/modularChangeFormat.js +4 -0
  84. package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  85. package/lib/index.d.ts +1 -1
  86. package/lib/index.d.ts.map +1 -1
  87. package/lib/index.js.map +1 -1
  88. package/lib/packageVersion.d.ts +1 -1
  89. package/lib/packageVersion.d.ts.map +1 -1
  90. package/lib/packageVersion.js +1 -1
  91. package/lib/packageVersion.js.map +1 -1
  92. package/lib/shared-tree/index.d.ts +1 -1
  93. package/lib/shared-tree/index.d.ts.map +1 -1
  94. package/lib/shared-tree/index.js +1 -1
  95. package/lib/shared-tree/index.js.map +1 -1
  96. package/lib/shared-tree/schematizingTreeView.d.ts +4 -6
  97. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  98. package/lib/shared-tree/schematizingTreeView.js +19 -15
  99. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  100. package/lib/shared-tree/sharedTree.d.ts +1 -2
  101. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  102. package/lib/shared-tree/sharedTree.js +0 -10
  103. package/lib/shared-tree/sharedTree.js.map +1 -1
  104. package/lib/shared-tree/treeApi.js.map +1 -1
  105. package/lib/shared-tree/treeView.d.ts +13 -6
  106. package/lib/shared-tree/treeView.d.ts.map +1 -1
  107. package/lib/shared-tree/treeView.js +0 -2
  108. package/lib/shared-tree/treeView.js.map +1 -1
  109. package/lib/simple-tree/index.d.ts +4 -3
  110. package/lib/simple-tree/index.d.ts.map +1 -1
  111. package/lib/simple-tree/index.js +4 -3
  112. package/lib/simple-tree/index.js.map +1 -1
  113. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  114. package/lib/simple-tree/objectNode.js +4 -0
  115. package/lib/simple-tree/objectNode.js.map +1 -1
  116. package/lib/simple-tree/proxies.d.ts.map +1 -1
  117. package/lib/simple-tree/proxies.js +14 -17
  118. package/lib/simple-tree/proxies.js.map +1 -1
  119. package/lib/simple-tree/schemaFactory.d.ts.map +1 -1
  120. package/lib/simple-tree/schemaFactory.js +3 -25
  121. package/lib/simple-tree/schemaFactory.js.map +1 -1
  122. package/lib/simple-tree/toFlexSchema.d.ts +0 -15
  123. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  124. package/lib/simple-tree/toFlexSchema.js +0 -33
  125. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  126. package/lib/simple-tree/tree.d.ts +0 -29
  127. package/lib/simple-tree/tree.d.ts.map +1 -1
  128. package/lib/simple-tree/tree.js +0 -22
  129. package/lib/simple-tree/tree.js.map +1 -1
  130. package/lib/treeFactory.d.ts +1 -1
  131. package/lib/treeFactory.js +1 -1
  132. package/lib/treeFactory.js.map +1 -1
  133. package/lib/util/brandedMap.d.ts +9 -2
  134. package/lib/util/brandedMap.d.ts.map +1 -1
  135. package/lib/util/brandedMap.js +3 -4
  136. package/lib/util/brandedMap.js.map +1 -1
  137. package/package.json +23 -23
  138. package/src/core/tree/anchorSet.ts +3 -3
  139. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +5 -1
  140. package/src/feature-libraries/flex-tree/lazyField.ts +8 -5
  141. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +5 -0
  142. package/src/feature-libraries/modular-schema/modularChangeFormat.ts +4 -0
  143. package/src/index.ts +1 -0
  144. package/src/packageVersion.ts +1 -1
  145. package/src/shared-tree/index.ts +6 -1
  146. package/src/shared-tree/schematizingTreeView.ts +32 -26
  147. package/src/shared-tree/sharedTree.ts +0 -18
  148. package/src/shared-tree/treeApi.ts +2 -2
  149. package/src/shared-tree/treeView.ts +14 -8
  150. package/src/simple-tree/index.ts +7 -3
  151. package/src/simple-tree/objectNode.ts +6 -0
  152. package/src/simple-tree/proxies.ts +22 -20
  153. package/src/simple-tree/schemaFactory.ts +5 -41
  154. package/src/simple-tree/toFlexSchema.ts +0 -47
  155. package/src/simple-tree/tree.ts +0 -37
  156. package/src/treeFactory.ts +1 -1
  157. package/src/util/brandedMap.ts +18 -11
@@ -1 +1 @@
1
- {"version":3,"file":"modularChangeFormat.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,KAAK,gBAAgB,EAAqB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EACN,KAAK,sBAAsB,EAG3B,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,sBAAsB,uDAEjC,CAAC;AAEH,eAAO,MAAM,mBAAmB,2aAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAErE,QAAA,MAAM,kBAAkB;;;;EAUvB,CAAC;AAEF,MAAM,WAAW,kBAAmB,SAAQ,MAAM,CAAC,OAAO,kBAAkB,CAAC;IAC5E;;OAEG;IACH,MAAM,EAAE,sBAAsB,CAAC;CAC/B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;;QAXlC;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;QAHH;;;WAGG;;;;;;;;;;;;;;;;;;;;;IAeH;;OAEG;;EAIJ,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -66,5 +66,9 @@ exports.EncodedModularChangeset = typebox_1.Type.Object({
66
66
  revisions: typebox_1.Type.ReadonlyOptional(typebox_1.Type.Array(exports.EncodedRevisionInfo)),
67
67
  builds: typebox_1.Type.Optional(exports.EncodedBuilds),
68
68
  refreshers: typebox_1.Type.Optional(exports.EncodedBuilds),
69
+ /**
70
+ * The number of constraints within this changeset that are violated.
71
+ */
72
+ violations: typebox_1.Type.Optional(typebox_1.Type.Number({ minimum: 0, multipleOf: 1 })),
69
73
  }, noAdditionalProps);
70
74
  //# sourceMappingURL=modularChangeFormat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modularChangeFormat.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,kDAA6F;AAC7F,kDAI6B;AAC7B,yDAA+D;AAE/D,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAE5D,QAAA,sBAAsB,GAAG,IAAA,4BAAiB,EAAmB;IACzE,UAAU,EAAE,CAAC;CACb,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG,cAAI,CAAC,KAAK,CAAC;IAC7C,cAAI,CAAC,KAAK,CAAC,CAAC,8BAAsB,EAAE,4BAAiB,CAAC,CAAC;IACvD,8BAAsB;CACtB,CAAC,CAAC;AAGH,MAAM,kBAAkB,GAAG,cAAI,CAAC,MAAM,CACrC;IACC,QAAQ,EAAE,uBAAY,CAAC,cAAc;IACrC,SAAS,EAAE,uBAAY,CAAC,yBAAyB;IACjD,6EAA6E;IAC7E,0FAA0F;IAC1F,0GAA0G;IAC1G,MA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0BAAkB;IAC1B;;;OAGG;IACH,KAAK,EAAE,4BAAiB;CACxB,EACD,iBAAiB,CACjB,CAAC;AAIW,QAAA,uBAAuB,GAAG,cAAI,CAAC,MAAM,CACjD;IACC,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,8BAAsB,CAAC;IAC5C,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,cAAI,CAAC,gBAAgB,CAAC,cAAI,CAAC,KAAK,CAAC,2BAAmB,CAAC,CAAC;IACjE,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,qBAAa,CAAC;IACpC,UAAU,EAAE,cAAI,CAAC,QAAQ,CAAC,qBAAa,CAAC;CACxC,EACD,iBAAiB,CACjB,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 } from \"@sinclair/typebox\";\n\nimport { type ChangesetLocalId, RevisionTagSchema, schemaFormat } from \"../../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlySchema,\n\tbrandedNumberType,\n} from \"../../util/index.js\";\nimport { EncodedFieldBatch } from \"../chunked-forest/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const ChangesetLocalIdSchema = brandedNumberType<ChangesetLocalId>({\n\tmultipleOf: 1,\n});\n\nexport const EncodedChangeAtomId = Type.Union([\n\tType.Tuple([ChangesetLocalIdSchema, RevisionTagSchema]),\n\tChangesetLocalIdSchema,\n]);\nexport type EncodedChangeAtomId = Static<typeof EncodedChangeAtomId>;\n\nconst EncodedFieldChange = Type.Object(\n\t{\n\t\tfieldKey: schemaFormat.FieldKeySchema,\n\t\tfieldKind: schemaFormat.FieldKindIdentifierSchema,\n\t\t// Implementation note: node and field change encoding is mutually recursive.\n\t\t// This field marks a boundary in that recursion to avoid constructing excessively complex\n\t\t// recursive types. Encoded changes are validated at this boundary at runtime--see modularChangeCodecs.ts.\n\t\tchange: JsonCompatibleReadOnlySchema,\n\t},\n\tnoAdditionalProps,\n);\n\nexport interface EncodedFieldChange extends Static<typeof EncodedFieldChange> {\n\t/**\n\t * Encoded in format selected by `fieldKind`\n\t */\n\tchange: JsonCompatibleReadOnly;\n}\n\nconst EncodedFieldChangeMap = Type.Array(EncodedFieldChange);\n\n/**\n * Format for encoding as json.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n */\nexport type EncodedFieldChangeMap = Static<typeof EncodedFieldChangeMap>;\n\nconst EncodedNodeExistsConstraint = Type.Object(\n\t{\n\t\tviolated: Type.Boolean(),\n\t},\n\tnoAdditionalProps,\n);\ntype EncodedNodeExistsConstraint = Static<typeof EncodedNodeExistsConstraint>;\n\nexport const EncodedNodeChangeset = Type.Object(\n\t{\n\t\tfieldChanges: Type.Optional(EncodedFieldChangeMap),\n\t\tnodeExistsConstraint: Type.Optional(EncodedNodeExistsConstraint),\n\t},\n\tnoAdditionalProps,\n);\n\n/**\n * Format for encoding as json.\n */\nexport type EncodedNodeChangeset = Static<typeof EncodedNodeChangeset>;\n\nexport const EncodedRevisionInfo = Type.Object(\n\t{\n\t\trevision: Type.Readonly(RevisionTagSchema),\n\t\trollbackOf: Type.ReadonlyOptional(RevisionTagSchema),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedRevisionInfo = Static<typeof EncodedRevisionInfo>;\n\n/**\n * Index of field in an EncodedFieldBatch.\n */\nexport const EncodedTreeIndex = Type.Number({ multipleOf: 1, minimum: 0 });\n\nexport const CommitBuilds = Type.Array(\n\tType.Tuple([\n\t\t// ID for first node\n\t\tChangesetLocalIdSchema,\n\t\t// Index for a TreeChunk that represents all the nodes\n\t\tEncodedTreeIndex,\n\t]),\n);\nexport type CommitBuilds = Static<typeof CommitBuilds>;\n\nexport const EncodedBuildsArray = Type.Array(\n\tType.Union([\n\t\tType.Tuple([CommitBuilds, RevisionTagSchema]),\n\t\t// Revision is omitted when undefined\n\t\tType.Tuple([CommitBuilds]),\n\t]),\n);\n\nexport type EncodedBuildsArray = Static<typeof EncodedBuildsArray>;\n\nexport const EncodedBuilds = Type.Object(\n\t{\n\t\tbuilds: EncodedBuildsArray,\n\t\t/**\n\t\t * Fields indexed by the EncodedTreeIndexes above.\n\t\t * TODO: Strongly typing this here may result in redundant schema validation of this data.\n\t\t */\n\t\ttrees: EncodedFieldBatch,\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedBuilds = Static<typeof EncodedBuilds>;\n\nexport const EncodedModularChangeset = Type.Object(\n\t{\n\t\tmaxId: Type.Optional(ChangesetLocalIdSchema),\n\t\tchanges: EncodedFieldChangeMap,\n\t\trevisions: Type.ReadonlyOptional(Type.Array(EncodedRevisionInfo)),\n\t\tbuilds: Type.Optional(EncodedBuilds),\n\t\trefreshers: Type.Optional(EncodedBuilds),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedModularChangeset = Static<typeof EncodedModularChangeset>;\n"]}
1
+ {"version":3,"file":"modularChangeFormat.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,kDAA6F;AAC7F,kDAI6B;AAC7B,yDAA+D;AAE/D,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAE5D,QAAA,sBAAsB,GAAG,IAAA,4BAAiB,EAAmB;IACzE,UAAU,EAAE,CAAC;CACb,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG,cAAI,CAAC,KAAK,CAAC;IAC7C,cAAI,CAAC,KAAK,CAAC,CAAC,8BAAsB,EAAE,4BAAiB,CAAC,CAAC;IACvD,8BAAsB;CACtB,CAAC,CAAC;AAGH,MAAM,kBAAkB,GAAG,cAAI,CAAC,MAAM,CACrC;IACC,QAAQ,EAAE,uBAAY,CAAC,cAA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C,CAAC;CAC1B,CAAC,CACF,CAAC;AAIW,QAAA,aAAa,GAAG,cAAI,CAAC,MAAM,CACvC;IACC,MAAM,EAAE,0BAAkB;IAC1B;;;OAGG;IACH,KAAK,EAAE,4BAAiB;CACxB,EACD,iBAAiB,CACjB,CAAC;AAIW,QAAA,uBAAuB,GAAG,cAAI,CAAC,MAAM,CACjD;IACC,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,8BAAsB,CAAC;IAC5C,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,cAAI,CAAC,gBAAgB,CAAC,cAAI,CAAC,KAAK,CAAC,2BAAmB,CAAC,CAAC;IACjE,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,qBAAa,CAAC;IACpC,UAAU,EAAE,cAAI,CAAC,QAAQ,CAAC,qBAAa,CAAC;IACxC;;OAEG;IACH,UAAU,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;CACrE,EACD,iBAAiB,CACjB,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 } from \"@sinclair/typebox\";\n\nimport { type ChangesetLocalId, RevisionTagSchema, schemaFormat } from \"../../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlySchema,\n\tbrandedNumberType,\n} from \"../../util/index.js\";\nimport { EncodedFieldBatch } from \"../chunked-forest/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const ChangesetLocalIdSchema = brandedNumberType<ChangesetLocalId>({\n\tmultipleOf: 1,\n});\n\nexport const EncodedChangeAtomId = Type.Union([\n\tType.Tuple([ChangesetLocalIdSchema, RevisionTagSchema]),\n\tChangesetLocalIdSchema,\n]);\nexport type EncodedChangeAtomId = Static<typeof EncodedChangeAtomId>;\n\nconst EncodedFieldChange = Type.Object(\n\t{\n\t\tfieldKey: schemaFormat.FieldKeySchema,\n\t\tfieldKind: schemaFormat.FieldKindIdentifierSchema,\n\t\t// Implementation note: node and field change encoding is mutually recursive.\n\t\t// This field marks a boundary in that recursion to avoid constructing excessively complex\n\t\t// recursive types. Encoded changes are validated at this boundary at runtime--see modularChangeCodecs.ts.\n\t\tchange: JsonCompatibleReadOnlySchema,\n\t},\n\tnoAdditionalProps,\n);\n\nexport interface EncodedFieldChange extends Static<typeof EncodedFieldChange> {\n\t/**\n\t * Encoded in format selected by `fieldKind`\n\t */\n\tchange: JsonCompatibleReadOnly;\n}\n\nconst EncodedFieldChangeMap = Type.Array(EncodedFieldChange);\n\n/**\n * Format for encoding as json.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n */\nexport type EncodedFieldChangeMap = Static<typeof EncodedFieldChangeMap>;\n\nconst EncodedNodeExistsConstraint = Type.Object(\n\t{\n\t\tviolated: Type.Boolean(),\n\t},\n\tnoAdditionalProps,\n);\ntype EncodedNodeExistsConstraint = Static<typeof EncodedNodeExistsConstraint>;\n\nexport const EncodedNodeChangeset = Type.Object(\n\t{\n\t\tfieldChanges: Type.Optional(EncodedFieldChangeMap),\n\t\tnodeExistsConstraint: Type.Optional(EncodedNodeExistsConstraint),\n\t},\n\tnoAdditionalProps,\n);\n\n/**\n * Format for encoding as json.\n */\nexport type EncodedNodeChangeset = Static<typeof EncodedNodeChangeset>;\n\nexport const EncodedRevisionInfo = Type.Object(\n\t{\n\t\trevision: Type.Readonly(RevisionTagSchema),\n\t\trollbackOf: Type.ReadonlyOptional(RevisionTagSchema),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedRevisionInfo = Static<typeof EncodedRevisionInfo>;\n\n/**\n * Index of field in an EncodedFieldBatch.\n */\nexport const EncodedTreeIndex = Type.Number({ multipleOf: 1, minimum: 0 });\n\nexport const CommitBuilds = Type.Array(\n\tType.Tuple([\n\t\t// ID for first node\n\t\tChangesetLocalIdSchema,\n\t\t// Index for a TreeChunk that represents all the nodes\n\t\tEncodedTreeIndex,\n\t]),\n);\nexport type CommitBuilds = Static<typeof CommitBuilds>;\n\nexport const EncodedBuildsArray = Type.Array(\n\tType.Union([\n\t\tType.Tuple([CommitBuilds, RevisionTagSchema]),\n\t\t// Revision is omitted when undefined\n\t\tType.Tuple([CommitBuilds]),\n\t]),\n);\n\nexport type EncodedBuildsArray = Static<typeof EncodedBuildsArray>;\n\nexport const EncodedBuilds = Type.Object(\n\t{\n\t\tbuilds: EncodedBuildsArray,\n\t\t/**\n\t\t * Fields indexed by the EncodedTreeIndexes above.\n\t\t * TODO: Strongly typing this here may result in redundant schema validation of this data.\n\t\t */\n\t\ttrees: EncodedFieldBatch,\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedBuilds = Static<typeof EncodedBuilds>;\n\nexport const EncodedModularChangeset = Type.Object(\n\t{\n\t\tmaxId: Type.Optional(ChangesetLocalIdSchema),\n\t\tchanges: EncodedFieldChangeMap,\n\t\trevisions: Type.ReadonlyOptional(Type.Array(EncodedRevisionInfo)),\n\t\tbuilds: Type.Optional(EncodedBuilds),\n\t\trefreshers: Type.Optional(EncodedBuilds),\n\t\t/**\n\t\t * The number of constraints within this changeset that are violated.\n\t\t */\n\t\tviolations: Type.Optional(Type.Number({ minimum: 0, multipleOf: 1 })),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedModularChangeset = Static<typeof EncodedModularChangeset>;\n"]}
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export { type Brand, type Opaque, extractFromOpaque, brand, type ValueFromBrande
7
7
  export { type Listeners, type IsListener, type Listenable, type Off, createEmitter, type IEmitter, type NoListenersCallback, type HasListeners, } from "./events/index.js";
8
8
  export { leaf } from "./domains/index.js";
9
9
  export { FlexFieldKind, isNeverField, type FullSchemaPolicy, valueSymbol, type ContextuallyTypedNodeDataObject, type ContextuallyTypedNodeData, type MarkedArrayLike, isContextuallyTypedNodeDataObject, defaultSchemaPolicy, jsonableTreeFromCursor, type StableNodeKey, type LocalNodeKey, compareLocalNodeKeys, type IDefaultEditBuilder, type ValueFieldEditBuilder, type OptionalFieldEditBuilder, type SequenceFieldEditBuilder, prefixPath, prefixFieldPath, cursorForJsonableTreeNode, stackTreeNodeCursor, type CursorAdapter, type CursorWithNode, type FlexTreeNodeEvents, type ArrayLikeMut, FieldKinds, type ContextuallyTypedFieldData, cursorFromContextualData, type FlexAllowedTypes, type FlexTreeNodeSchema, type FlexTreeSchema, type SchemaLibrary, type SchemaLibraryData, FlexFieldSchema, Any, type NewFieldContent, type NodeExistsConstraint, cursorForTypedTreeData, type LazyTreeNodeSchema, type FieldGenerator, type TreeDataContext, type SchemaLintConfiguration, TreeStatus, type FlexTreeFieldNode, type FlexibleFieldContent, type FlexibleNodeContent, type FlexTreeLeafNode, type FlexTreeMapNode, type FlexTreeOptionalField, type FlexTreeRequiredField, type FlexTreeSequenceField, type FlexTreeObjectNode, type FlexTreeObjectNodeTyped, type AssignableFieldKinds, type FlexTreeContext, type FlexTreeTypedField, type FlexTreeTypedNode, type FlexTreeTypedNodeUnion, type FlexTreeEntity, type FlexTreeField, type FlexTreeNode, TreeNodeSchemaBase, FlexFieldNodeSchema, LeafNodeSchema, FlexMapNodeSchema, FlexObjectNodeSchema, type CheckTypesOverlap, SchemaBuilderBase, type FlexImplicitFieldSchema, type FlexImplicitAllowedTypes, type Unenforced, schemaIsFieldNode, schemaIsLeaf, schemaIsMap, schemaIsObjectNode, type AllowedTypeSet, type SchemaBuilderOptions, type SchemaCollection, TreeCompressionStrategy, treeSchemaFromStoredSchema, encodeTreeSchema, stackTreeFieldCursor, type FlexTreeUnknownUnboxed, type InsertableFlexNode, type InsertableFlexField, type AllowedTypesToFlexInsertableTree, type ApplyMultiplicity, type NormalizeObjectNodeFields, type NormalizeFieldSchema, type FlexObjectNodeFields, type FlexMapFieldSchema, type LazyItem, type PropertyNameFromFieldKey, type ReservedObjectNodeFieldPropertyNames, type ReservedObjectNodeFieldPropertyNamePrefixes, reservedObjectNodeFieldPropertyNames, reservedObjectNodeFieldPropertyNamePrefixes, type FlexTreeObjectNodeFieldsInner, } from "./feature-libraries/index.js";
10
- export { type ISharedTree, type ITreeCheckout, type ITransaction, runSynchronous, type SharedTreeOptions, type ITreeCheckoutFork, type CheckoutEvents, type SchematizeConfiguration, type TreeContent, type InitializeAndSchematizeConfiguration, type SchemaConfiguration, ForestType, type SharedTreeContentSnapshot, type FlexTreeView, type ITreeViewFork, buildTreeConfiguration, type ISharedTreeEditor, type ISchemaEditor, type RevertibleFactory, type SharedTreeFormatOptions, SharedTreeFormatVersion, Tree, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransaction, rollback, } from "./shared-tree/index.js";
10
+ export { type ISharedTree, type ITreeCheckout, type ITransaction, runSynchronous, type SharedTreeOptions, type ITreeCheckoutFork, type CheckoutEvents, type SchematizeConfiguration, type TreeContent, type InitializeAndSchematizeConfiguration, type SchemaConfiguration, ForestType, type SharedTreeContentSnapshot, type FlexTreeView, type FlexTreeViewGeneric, type ITreeViewFork, buildTreeConfiguration, type ISharedTreeEditor, type ISchemaEditor, type RevertibleFactory, type SharedTreeFormatOptions, SharedTreeFormatVersion, Tree, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransaction, rollback, } from "./shared-tree/index.js";
11
11
  export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type InternalTreeNode, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type WithType, type TreeObjectNodeUnsafe, type InsertableTreeNodeFromImplicitAllowedTypesUnsafe, type TreeArrayNodeUnsafe, type TreeMapNodeUnsafe, type InsertableObjectFromSchemaRecordUnsafe, type InsertableTreeFieldFromImplicitFieldUnsafe, type FieldSchemaUnsafe, type ValidateRecursiveSchema, adaptEnum, enumFromStrings, singletonSchema, typedObjectValues, test_RecursiveObject, test_RecursiveObject_base, test_RecursiveObjectPojoMode, } from "./simple-tree/index.js";
12
12
  export { SharedTree, configuredSharedTree } from "./treeFactory.js";
13
13
  export type { ICodecOptions, JsonValidator, SchemaValidationFunction } from "./codec/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3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,+BAA+B;AAC/B,qGAAA,SAAS,OAAA;AACT,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,6GAAA,iBAAiB,OAAA;AACjB,8EAA8E;AAC9E,gHAAA,oBAAoB,OAAA;AACpB,qHAAA,yBAAyB,OAAA;AACzB,wHAAA,4BAA4B,OAAA;AAE7B,mDAAoE;AAA3D,4GAAA,UAAU,OAAA;AAAE,sHAAA,oBAAoB,OAAA;AAGzC,6CAAiD;AAAxC,yGAAA,aAAa,OAAA;AACtB,0DAAiE;AAAxD,4GAAA,gBAAgB,OAAA;AAEzB,oKAAoK;AACpK,6CAgByB;AAZxB,wGAAA,WAAW,OAAA;AAcZ,0DA0BsC;AAdrC,2GAAA,cAAc,OAAA;AACd,+GAAA,kBAAkB,OAAA;AAenB,kEAAoD;AAMnD,sCAAa","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype FieldKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype DetachedRangeUpPath,\n\ttype DetachedPlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\ttype ProtoNodes,\n\ttype DeltaRoot,\n\ttype DeltaProtoNode,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype RevisionTag,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype FieldKindIdentifier,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\ttype FieldAnchor,\n\ttype SchemaEvents,\n\ttype ChangesetLocalId,\n\ttype ForestEvents,\n\ttype PathRootPrefix,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype FieldKindData,\n\tAllowedUpdateType,\n\ttype PathVisitor,\n\ttype Adapters,\n\ttype TreeAdapter,\n\ttype MapTree,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\ttype StoredSchemaCollection,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tLeafNodeStoredSchema,\n\tMultiplicity,\n\ttype SchemaPolicy,\n} from \"./core/index.js\";\n\nexport {\n\ttype Brand,\n\ttype Opaque,\n\textractFromOpaque,\n\tbrand,\n\ttype ValueFromBranded,\n\ttype NameFromBranded,\n\ttype JsonCompatible,\n\ttype JsonCompatibleObject,\n\ttype NestedMap,\n\tfail,\n\ttype IdAllocator,\n\tTransactionResult,\n\ttype BrandedKey,\n\ttype BrandedMapSubset,\n\ttype RangeQueryResult,\n\ttype Named,\n\toneFromSet,\n\tdisposeSymbol,\n\ttype IDisposable,\n} from \"./util/index.js\";\n\nexport {\n\ttype Listeners,\n\ttype IsListener,\n\ttype Listenable,\n\ttype Off,\n\tcreateEmitter,\n\ttype IEmitter,\n\ttype NoListenersCallback,\n\ttype HasListeners,\n} from \"./events/index.js\";\n\nexport { leaf } from \"./domains/index.js\";\n\nexport {\n\tFlexFieldKind,\n\tisNeverField,\n\ttype FullSchemaPolicy,\n\tvalueSymbol,\n\ttype ContextuallyTypedNodeDataObject,\n\ttype ContextuallyTypedNodeData,\n\ttype MarkedArrayLike,\n\tisContextuallyTypedNodeDataObject,\n\tdefaultSchemaPolicy,\n\tjsonableTreeFromCursor,\n\ttype StableNodeKey,\n\ttype LocalNodeKey,\n\tcompareLocalNodeKeys,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tprefixPath,\n\tprefixFieldPath,\n\tcursorForJsonableTreeNode,\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\ttype CursorWithNode,\n\ttype FlexTreeNodeEvents,\n\ttype ArrayLikeMut,\n\tFieldKinds,\n\ttype ContextuallyTypedFieldData,\n\tcursorFromContextualData,\n\ttype FlexAllowedTypes,\n\ttype FlexTreeNodeSchema,\n\ttype FlexTreeSchema,\n\ttype SchemaLibrary,\n\ttype SchemaLibraryData,\n\tFlexFieldSchema,\n\tAny,\n\ttype NewFieldContent,\n\ttype NodeExistsConstraint,\n\tcursorForTypedTreeData,\n\ttype LazyTreeNodeSchema,\n\ttype FieldGenerator,\n\ttype TreeDataContext,\n\ttype SchemaLintConfiguration,\n\tTreeStatus,\n\ttype FlexTreeFieldNode,\n\ttype FlexibleFieldContent,\n\ttype FlexibleNodeContent,\n\ttype FlexTreeLeafNode,\n\ttype FlexTreeMapNode,\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeObjectNode,\n\ttype FlexTreeObjectNodeTyped,\n\ttype AssignableFieldKinds,\n\ttype FlexTreeContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeTypedNode,\n\ttype FlexTreeTypedNodeUnion,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeNodeSchemaBase,\n\tFlexFieldNodeSchema,\n\tLeafNodeSchema,\n\tFlexMapNodeSchema,\n\tFlexObjectNodeSchema,\n\ttype CheckTypesOverlap,\n\tSchemaBuilderBase,\n\ttype FlexImplicitFieldSchema,\n\ttype FlexImplicitAllowedTypes,\n\ttype Unenforced,\n\tschemaIsFieldNode,\n\tschemaIsLeaf,\n\tschemaIsMap,\n\tschemaIsObjectNode,\n\ttype AllowedTypeSet,\n\ttype SchemaBuilderOptions,\n\ttype SchemaCollection,\n\tTreeCompressionStrategy,\n\ttreeSchemaFromStoredSchema,\n\tencodeTreeSchema,\n\tstackTreeFieldCursor,\n\ttype FlexTreeUnknownUnboxed,\n\ttype InsertableFlexNode,\n\ttype InsertableFlexField,\n\ttype AllowedTypesToFlexInsertableTree,\n\ttype ApplyMultiplicity,\n\ttype NormalizeObjectNodeFields,\n\ttype NormalizeFieldSchema,\n\ttype FlexObjectNodeFields,\n\ttype FlexMapFieldSchema,\n\ttype LazyItem,\n\ttype PropertyNameFromFieldKey,\n\ttype ReservedObjectNodeFieldPropertyNames,\n\ttype ReservedObjectNodeFieldPropertyNamePrefixes,\n\treservedObjectNodeFieldPropertyNames,\n\treservedObjectNodeFieldPropertyNamePrefixes,\n\ttype FlexTreeObjectNodeFieldsInner,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ISharedTree,\n\ttype ITreeCheckout,\n\ttype ITransaction,\n\trunSynchronous,\n\ttype SharedTreeOptions,\n\ttype ITreeCheckoutFork,\n\ttype CheckoutEvents,\n\ttype SchematizeConfiguration,\n\ttype TreeContent,\n\ttype InitializeAndSchematizeConfiguration,\n\ttype SchemaConfiguration,\n\tForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype FlexTreeView,\n\ttype ITreeViewFork,\n\tbuildTreeConfiguration,\n\ttype ISharedTreeEditor,\n\ttype ISchemaEditor,\n\ttype RevertibleFactory,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransaction,\n\trollback,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\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 ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype InternalTreeNode,\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 WithType,\n\ttype TreeObjectNodeUnsafe,\n\ttype InsertableTreeNodeFromImplicitAllowedTypesUnsafe,\n\ttype TreeArrayNodeUnsafe,\n\ttype TreeMapNodeUnsafe,\n\ttype InsertableObjectFromSchemaRecordUnsafe,\n\ttype InsertableTreeFieldFromImplicitFieldUnsafe,\n\ttype FieldSchemaUnsafe,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\t// experimental @internal APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttypedObjectValues,\n\t// test recursive schema for checking that d.ts files handles schema correctly\n\ttest_RecursiveObject,\n\ttest_RecursiveObject_base,\n\ttest_RecursiveObjectPojoMode,\n} from \"./simple-tree/index.js\";\nexport { SharedTree, configuredSharedTree } from \"./treeFactory.js\";\n\nexport type { ICodecOptions, JsonValidator, SchemaValidationFunction } from \"./codec/index.js\";\nexport { noopValidator } from \"./codec/index.js\";\nexport { typeboxValidator } from \"./external-utilities/index.js\";\n\n// TODO: When previously tagged '@internal', these types could not be included in `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639\nexport {\n\ttype Invariant,\n\ttype Contravariant,\n\ttype Covariant,\n\tBrandedType,\n\ttype ExtractFromOpaque,\n\ttype Assume,\n\ttype AllowOptional,\n\ttype RequiredFields,\n\ttype OptionalFields,\n\ttype _RecursiveTrick,\n\ttype AllowOptionalNotFlattened,\n\ttype isAny,\n\ttype BrandedKeyContent,\n\ttype RestrictiveReadonlyRecord,\n\ttype MakeNominal,\n} from \"./util/index.js\";\n\nexport {\n\ttype NormalizeField,\n\ttype NormalizeAllowedTypes,\n\ttype FlexTreeTypedFieldInner,\n\ttype FlexTreeUnboxFieldInner,\n\ttype FlexTreeObjectNodeFields,\n\ttype FlexTreeUnboxField,\n\ttype FlexTreeUnboxNode,\n\ttype FlexTreeUnboxNodeUnion,\n\ttype FlexTreeNodeKeyField,\n\ttype IsArrayOfOne,\n\ttype FlexibleNodeSubSequence,\n\tflexTreeMarker,\n\tFlexTreeEntityKind,\n\ttype NodeKeyManager,\n\ttype CollectOptions,\n\ttype TypedFields,\n\ttype UnbrandedName,\n\ttype EmptyObject,\n\t// These field kind types really only need to show up via FieldKinds.name, and not as top level names in the package.\n\t// These names also are collision prone.\n\ttype Required,\n\ttype Optional,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype Sequence,\n} from \"./feature-libraries/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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CA4FyB;AA3FxB,oGAAA,QAAQ,OAAA;AAKR,qGAAA,SAAS,OAAA;AAiCT,wGAAA,YAAY,OAAA;AACZ,qGAAA,SAAS,OAAA;AAET,8GAAA,kBAAkB,OAAA;AAIlB,gHAAA,oBAAoB,OAAA;AAOpB,wHAAA,4BAA4B,OAAA;AAG5B,uGAAA,WAAW,OAAA;AACX,gHAAA,oBAAoB,OAAA;AAYpB,sGAAA,UAAU,OAAA;AAKV,6GAAA,iBAAiB,OAAA;AAMjB,sGAAA,UAAU,OAAA;AACV,4GAAA,gBAAgB,OAAA;AAEhB,wHAAA,4BAA4B,OAAA;AAC5B,yHAAA,6BAA6B,OAAA;AAG7B,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AACnB,gHAAA,oBAAoB,OAAA;AACpB,wGAAA,YAAY,OAAA;AAIb,4CAoByB;AAjBxB,6GAAA,iBAAiB,OAAA;AACjB,iGAAA,KAAK,OAAA;AAML,gGAAA,IAAI,OAAA;AAEJ,6GAAA,iBAAiB,OAAA;AAKjB,sGAAA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yGAAA,aAAa,OAAA;AAEb,oHAAA,wBAAwB,OAAA;AAIxB,iHAAA,qBAAqB,OAAA;AAKrB,yGAAA,aAAa,OAAA;AAQb,qGAAA,SAAS,OAAA;AACT,uGAAA,WAAW,OAAA;AAIX,oGAAA,QAAQ,OAAA;AA0BR,+BAA+B;AAC/B,qGAAA,SAAS,OAAA;AACT,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,6GAAA,iBAAiB,OAAA;AACjB,8EAA8E;AAC9E,gHAAA,oBAAoB,OAAA;AACpB,qHAAA,yBAAyB,OAAA;AACzB,wHAAA,4BAA4B,OAAA;AAE7B,mDAAoE;AAA3D,4GAAA,UAAU,OAAA;AAAE,sHAAA,oBAAoB,OAAA;AAGzC,6CAAiD;AAAxC,yGAAA,aAAa,OAAA;AACtB,0DAAiE;AAAxD,4GAAA,gBAAgB,OAAA;AAEzB,oKAAoK;AACpK,6CAgByB;AAZxB,wGAAA,WAAW,OAAA;AAcZ,0DA0BsC;AAdrC,2GAAA,cAAc,OAAA;AACd,+GAAA,kBAAkB,OAAA;AAenB,kEAAoD;AAMnD,sCAAa","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype FieldKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype DetachedRangeUpPath,\n\ttype DetachedPlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\ttype ProtoNodes,\n\ttype DeltaRoot,\n\ttype DeltaProtoNode,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype RevisionTag,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype FieldKindIdentifier,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\ttype FieldAnchor,\n\ttype SchemaEvents,\n\ttype ChangesetLocalId,\n\ttype ForestEvents,\n\ttype PathRootPrefix,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype FieldKindData,\n\tAllowedUpdateType,\n\ttype PathVisitor,\n\ttype Adapters,\n\ttype TreeAdapter,\n\ttype MapTree,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\ttype StoredSchemaCollection,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tLeafNodeStoredSchema,\n\tMultiplicity,\n\ttype SchemaPolicy,\n} from \"./core/index.js\";\n\nexport {\n\ttype Brand,\n\ttype Opaque,\n\textractFromOpaque,\n\tbrand,\n\ttype ValueFromBranded,\n\ttype NameFromBranded,\n\ttype JsonCompatible,\n\ttype JsonCompatibleObject,\n\ttype NestedMap,\n\tfail,\n\ttype IdAllocator,\n\tTransactionResult,\n\ttype BrandedKey,\n\ttype BrandedMapSubset,\n\ttype RangeQueryResult,\n\ttype Named,\n\toneFromSet,\n\tdisposeSymbol,\n\ttype IDisposable,\n} from \"./util/index.js\";\n\nexport {\n\ttype Listeners,\n\ttype IsListener,\n\ttype Listenable,\n\ttype Off,\n\tcreateEmitter,\n\ttype IEmitter,\n\ttype NoListenersCallback,\n\ttype HasListeners,\n} from \"./events/index.js\";\n\nexport { leaf } from \"./domains/index.js\";\n\nexport {\n\tFlexFieldKind,\n\tisNeverField,\n\ttype FullSchemaPolicy,\n\tvalueSymbol,\n\ttype ContextuallyTypedNodeDataObject,\n\ttype ContextuallyTypedNodeData,\n\ttype MarkedArrayLike,\n\tisContextuallyTypedNodeDataObject,\n\tdefaultSchemaPolicy,\n\tjsonableTreeFromCursor,\n\ttype StableNodeKey,\n\ttype LocalNodeKey,\n\tcompareLocalNodeKeys,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tprefixPath,\n\tprefixFieldPath,\n\tcursorForJsonableTreeNode,\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\ttype CursorWithNode,\n\ttype FlexTreeNodeEvents,\n\ttype ArrayLikeMut,\n\tFieldKinds,\n\ttype ContextuallyTypedFieldData,\n\tcursorFromContextualData,\n\ttype FlexAllowedTypes,\n\ttype FlexTreeNodeSchema,\n\ttype FlexTreeSchema,\n\ttype SchemaLibrary,\n\ttype SchemaLibraryData,\n\tFlexFieldSchema,\n\tAny,\n\ttype NewFieldContent,\n\ttype NodeExistsConstraint,\n\tcursorForTypedTreeData,\n\ttype LazyTreeNodeSchema,\n\ttype FieldGenerator,\n\ttype TreeDataContext,\n\ttype SchemaLintConfiguration,\n\tTreeStatus,\n\ttype FlexTreeFieldNode,\n\ttype FlexibleFieldContent,\n\ttype FlexibleNodeContent,\n\ttype FlexTreeLeafNode,\n\ttype FlexTreeMapNode,\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeObjectNode,\n\ttype FlexTreeObjectNodeTyped,\n\ttype AssignableFieldKinds,\n\ttype FlexTreeContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeTypedNode,\n\ttype FlexTreeTypedNodeUnion,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeNodeSchemaBase,\n\tFlexFieldNodeSchema,\n\tLeafNodeSchema,\n\tFlexMapNodeSchema,\n\tFlexObjectNodeSchema,\n\ttype CheckTypesOverlap,\n\tSchemaBuilderBase,\n\ttype FlexImplicitFieldSchema,\n\ttype FlexImplicitAllowedTypes,\n\ttype Unenforced,\n\tschemaIsFieldNode,\n\tschemaIsLeaf,\n\tschemaIsMap,\n\tschemaIsObjectNode,\n\ttype AllowedTypeSet,\n\ttype SchemaBuilderOptions,\n\ttype SchemaCollection,\n\tTreeCompressionStrategy,\n\ttreeSchemaFromStoredSchema,\n\tencodeTreeSchema,\n\tstackTreeFieldCursor,\n\ttype FlexTreeUnknownUnboxed,\n\ttype InsertableFlexNode,\n\ttype InsertableFlexField,\n\ttype AllowedTypesToFlexInsertableTree,\n\ttype ApplyMultiplicity,\n\ttype NormalizeObjectNodeFields,\n\ttype NormalizeFieldSchema,\n\ttype FlexObjectNodeFields,\n\ttype FlexMapFieldSchema,\n\ttype LazyItem,\n\ttype PropertyNameFromFieldKey,\n\ttype ReservedObjectNodeFieldPropertyNames,\n\ttype ReservedObjectNodeFieldPropertyNamePrefixes,\n\treservedObjectNodeFieldPropertyNames,\n\treservedObjectNodeFieldPropertyNamePrefixes,\n\ttype FlexTreeObjectNodeFieldsInner,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ISharedTree,\n\ttype ITreeCheckout,\n\ttype ITransaction,\n\trunSynchronous,\n\ttype SharedTreeOptions,\n\ttype ITreeCheckoutFork,\n\ttype CheckoutEvents,\n\ttype SchematizeConfiguration,\n\ttype TreeContent,\n\ttype InitializeAndSchematizeConfiguration,\n\ttype SchemaConfiguration,\n\tForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype FlexTreeView,\n\ttype FlexTreeViewGeneric,\n\ttype ITreeViewFork,\n\tbuildTreeConfiguration,\n\ttype ISharedTreeEditor,\n\ttype ISchemaEditor,\n\ttype RevertibleFactory,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransaction,\n\trollback,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\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 ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype InternalTreeNode,\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 WithType,\n\ttype TreeObjectNodeUnsafe,\n\ttype InsertableTreeNodeFromImplicitAllowedTypesUnsafe,\n\ttype TreeArrayNodeUnsafe,\n\ttype TreeMapNodeUnsafe,\n\ttype InsertableObjectFromSchemaRecordUnsafe,\n\ttype InsertableTreeFieldFromImplicitFieldUnsafe,\n\ttype FieldSchemaUnsafe,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\t// experimental @internal APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttypedObjectValues,\n\t// test recursive schema for checking that d.ts files handles schema correctly\n\ttest_RecursiveObject,\n\ttest_RecursiveObject_base,\n\ttest_RecursiveObjectPojoMode,\n} from \"./simple-tree/index.js\";\nexport { SharedTree, configuredSharedTree } from \"./treeFactory.js\";\n\nexport type { ICodecOptions, JsonValidator, SchemaValidationFunction } from \"./codec/index.js\";\nexport { noopValidator } from \"./codec/index.js\";\nexport { typeboxValidator } from \"./external-utilities/index.js\";\n\n// TODO: When previously tagged '@internal', these types could not be included in `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639\nexport {\n\ttype Invariant,\n\ttype Contravariant,\n\ttype Covariant,\n\tBrandedType,\n\ttype ExtractFromOpaque,\n\ttype Assume,\n\ttype AllowOptional,\n\ttype RequiredFields,\n\ttype OptionalFields,\n\ttype _RecursiveTrick,\n\ttype AllowOptionalNotFlattened,\n\ttype isAny,\n\ttype BrandedKeyContent,\n\ttype RestrictiveReadonlyRecord,\n\ttype MakeNominal,\n} from \"./util/index.js\";\n\nexport {\n\ttype NormalizeField,\n\ttype NormalizeAllowedTypes,\n\ttype FlexTreeTypedFieldInner,\n\ttype FlexTreeUnboxFieldInner,\n\ttype FlexTreeObjectNodeFields,\n\ttype FlexTreeUnboxField,\n\ttype FlexTreeUnboxNode,\n\ttype FlexTreeUnboxNodeUnion,\n\ttype FlexTreeNodeKeyField,\n\ttype IsArrayOfOne,\n\ttype FlexibleNodeSubSequence,\n\tflexTreeMarker,\n\tFlexTreeEntityKind,\n\ttype NodeKeyManager,\n\ttype CollectOptions,\n\ttype TypedFields,\n\ttype UnbrandedName,\n\ttype EmptyObject,\n\t// These field kind types really only need to show up via FieldKinds.name, and not as top level names in the package.\n\t// These names also are collision prone.\n\ttype Required,\n\ttype Optional,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype Sequence,\n} from \"./feature-libraries/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"]}
@@ -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.0.2";
8
+ export declare const pkgVersion = "2.1.0-276326";
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,UAAU,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,iBAAiB,CAAC"}
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/tree";
11
- exports.pkgVersion = "2.0.2";
11
+ exports.pkgVersion = "2.1.0-276326";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,UAAU,GAAG,OAAO,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.0.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,UAAU,GAAG,cAAc,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.1.0-276326\";\n"]}
@@ -5,7 +5,7 @@
5
5
  export { type ISharedTree, SharedTreeFactory, type SharedTreeOptions, SharedTree, ForestType, type SharedTreeContentSnapshot, type SharedTreeFormatOptions, SharedTreeFormatVersion, } from "./sharedTree.js";
6
6
  export { createTreeCheckout, TreeCheckout, type ITreeCheckout, runSynchronous, type CheckoutEvents, type ITransaction, type ITreeCheckoutFork, type RevertibleFactory, } from "./treeCheckout.js";
7
7
  export { type SchematizeConfiguration, type TreeContent, type InitializeAndSchematizeConfiguration, type SchemaConfiguration, buildTreeConfiguration, } from "./schematizeTree.js";
8
- export { type FlexTreeView, CheckoutFlexTreeView, type ITreeViewFork } from "./treeView.js";
8
+ export { type FlexTreeView, CheckoutFlexTreeView, type ITreeViewFork, type FlexTreeViewGeneric, } from "./treeView.js";
9
9
  export type { ISharedTreeEditor, ISchemaEditor } from "./sharedTreeEditBuilder.js";
10
10
  export { treeApi as Tree, type TreeApi, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransaction, rollback, } from "./treeApi.js";
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,UAAU,EACV,UAAU,EACV,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,uBAAuB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,KAAK,aAAa,EAClB,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EACxB,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,YAAY,EAAE,oBAAoB,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAE5F,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,EACN,OAAO,IAAI,IAAI,EACf,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,QAAQ,GACR,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,UAAU,EACV,UAAU,EACV,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,uBAAuB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,KAAK,aAAa,EAClB,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EACxB,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,KAAK,YAAY,EACjB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,mBAAmB,GACxB,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,EACN,OAAO,IAAI,IAAI,EACf,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,QAAQ,GACR,MAAM,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDASyB;AAPxB,kHAAA,iBAAiB,OAAA;AAEjB,2GAAA,UAAU,OAAA;AACV,2GAAA,UAAU,OAAA;AAGV,wHAAA,uBAAuB,OAAA;AAGxB,qDAS2B;AAR1B,qHAAA,kBAAkB,OAAA;AAClB,+GAAA,YAAY,OAAA;AAEZ,iHAAA,cAAc,OAAA;AAOf,yDAM6B;AAD5B,2HAAA,sBAAsB,OAAA;AAGvB,6CAA4F;AAAhE,mHAAA,oBAAoB,OAAA;AAIhD,2CAOsB;AANrB,kGAAA,OAAO,OAAQ;AAKf,sGAAA,QAAQ,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ISharedTree,\n\tSharedTreeFactory,\n\ttype SharedTreeOptions,\n\tSharedTree,\n\tForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n} from \"./sharedTree.js\";\n\nexport {\n\tcreateTreeCheckout,\n\tTreeCheckout,\n\ttype ITreeCheckout,\n\trunSynchronous,\n\ttype CheckoutEvents,\n\ttype ITransaction,\n\ttype ITreeCheckoutFork,\n\ttype RevertibleFactory,\n} from \"./treeCheckout.js\";\n\nexport {\n\ttype SchematizeConfiguration,\n\ttype TreeContent,\n\ttype InitializeAndSchematizeConfiguration,\n\ttype SchemaConfiguration,\n\tbuildTreeConfiguration,\n} from \"./schematizeTree.js\";\n\nexport { type FlexTreeView, CheckoutFlexTreeView, type ITreeViewFork } from \"./treeView.js\";\n\nexport type { ISharedTreeEditor, ISchemaEditor } from \"./sharedTreeEditBuilder.js\";\n\nexport {\n\ttreeApi as Tree,\n\ttype TreeApi,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransaction,\n\trollback,\n} from \"./treeApi.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDASyB;AAPxB,kHAAA,iBAAiB,OAAA;AAEjB,2GAAA,UAAU,OAAA;AACV,2GAAA,UAAU,OAAA;AAGV,wHAAA,uBAAuB,OAAA;AAGxB,qDAS2B;AAR1B,qHAAA,kBAAkB,OAAA;AAClB,+GAAA,YAAY,OAAA;AAEZ,iHAAA,cAAc,OAAA;AAOf,yDAM6B;AAD5B,2HAAA,sBAAsB,OAAA;AAGvB,6CAKuB;AAHtB,mHAAA,oBAAoB,OAAA;AAOrB,2CAOsB;AANrB,kGAAA,OAAO,OAAQ;AAKf,sGAAA,QAAQ,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ISharedTree,\n\tSharedTreeFactory,\n\ttype SharedTreeOptions,\n\tSharedTree,\n\tForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n} from \"./sharedTree.js\";\n\nexport {\n\tcreateTreeCheckout,\n\tTreeCheckout,\n\ttype ITreeCheckout,\n\trunSynchronous,\n\ttype CheckoutEvents,\n\ttype ITransaction,\n\ttype ITreeCheckoutFork,\n\ttype RevertibleFactory,\n} from \"./treeCheckout.js\";\n\nexport {\n\ttype SchematizeConfiguration,\n\ttype TreeContent,\n\ttype InitializeAndSchematizeConfiguration,\n\ttype SchemaConfiguration,\n\tbuildTreeConfiguration,\n} from \"./schematizeTree.js\";\n\nexport {\n\ttype FlexTreeView,\n\tCheckoutFlexTreeView,\n\ttype ITreeViewFork,\n\ttype FlexTreeViewGeneric,\n} from \"./treeView.js\";\n\nexport type { ISharedTreeEditor, ISchemaEditor } from \"./sharedTreeEditBuilder.js\";\n\nexport {\n\ttreeApi as Tree,\n\ttype TreeApi,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransaction,\n\trollback,\n} from \"./treeApi.js\";\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type HasListeners, type IEmitter, type Listenable } from "../events/index.js";
6
6
  import { type FlexFieldSchema, type NodeKeyManager, ViewSchema } from "../feature-libraries/index.js";
7
- import { type ImplicitFieldSchema, type SchemaCompatibilityStatus, type InsertableTreeFieldFromImplicitField, type TreeConfiguration, type TreeFieldFromImplicitField, type TreeView, type TreeViewEvents, type TreeViewConfiguration } from "../simple-tree/index.js";
7
+ import { type ImplicitFieldSchema, type SchemaCompatibilityStatus, type InsertableTreeFieldFromImplicitField, type TreeFieldFromImplicitField, type TreeView, type TreeViewEvents, type TreeViewConfiguration } from "../simple-tree/index.js";
8
8
  import type { TreeCheckout } from "./treeCheckout.js";
9
9
  import { CheckoutFlexTreeView } from "./treeView.js";
10
10
  /**
@@ -12,8 +12,7 @@ import { CheckoutFlexTreeView } from "./treeView.js";
12
12
  */
13
13
  export declare class SchematizingSimpleTreeView<in out TRootSchema extends ImplicitFieldSchema> implements TreeView<TRootSchema> {
14
14
  readonly checkout: TreeCheckout;
15
- readonly config: // eslint-disable-next-line import/no-deprecated
16
- TreeConfiguration<TRootSchema> | TreeViewConfiguration<TRootSchema>;
15
+ readonly config: TreeViewConfiguration<TRootSchema>;
17
16
  readonly nodeKeyManager: NodeKeyManager;
18
17
  /**
19
18
  * The view is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.
@@ -25,7 +24,7 @@ export declare class SchematizingSimpleTreeView<in out TRootSchema extends Impli
25
24
  * Undefined iff uninitialized or disposed.
26
25
  */
27
26
  private currentCompatibility;
28
- private readonly flexConfig;
27
+ private readonly flexSchema;
29
28
  readonly events: Listenable<TreeViewEvents> & IEmitter<TreeViewEvents> & HasListeners<TreeViewEvents>;
30
29
  private readonly viewSchema;
31
30
  private readonly unregisterCallbacks;
@@ -38,8 +37,7 @@ export declare class SchematizingSimpleTreeView<in out TRootSchema extends Impli
38
37
  */
39
38
  private midUpgrade;
40
39
  private readonly rootFieldSchema;
41
- constructor(checkout: TreeCheckout, config: // eslint-disable-next-line import/no-deprecated
42
- TreeConfiguration<TRootSchema> | TreeViewConfiguration<TRootSchema>, nodeKeyManager: NodeKeyManager);
40
+ constructor(checkout: TreeCheckout, config: TreeViewConfiguration<TRootSchema>, nodeKeyManager: NodeKeyManager);
43
41
  initialize(content: InsertableTreeFieldFromImplicitField<TRootSchema>): void;
44
42
  upgradeSchema(): void;
45
43
  /**
@@ -1 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C,eAAe,CAAC;IAMvD,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,YAAY;IAIpB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM;IAyEd,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,WAAW;IAQnB,IAAW,aAAa,IAAI,yBAAyB,CAKpD;IAEM,OAAO,IAAI,IAAI;IAMtB,IAAW,IAAI,IAAI,0BAA0B,CAAC,WAAW,CAAC,CAQzD;IAED,IAAW,IAAI,CAAC,OAAO,EAAE,oCAAoC,CAAC,WAAW,CAAC,EAQzE;CACD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,SAAS,eAAe,EAC1D,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,MAAM,IAAI,EACrB,cAAc,EAAE,cAAc,GAC5B,oBAAoB,CAAC,KAAK,CAAC,CA2B7B"}
@@ -37,11 +37,8 @@ class SchematizingSimpleTreeView {
37
37
  validateSchema: config.enableSchemaValidation,
38
38
  };
39
39
  this.rootFieldSchema = (0, index_js_4.normalizeFieldSchema)(config.schema);
40
- this.flexConfig = (0, index_js_4.toFlexConfig)(config, nodeKeyManager, {
41
- schema: checkout.storedSchema,
42
- policy,
43
- });
44
- this.viewSchema = new index_js_3.ViewSchema(policy, {}, this.flexConfig.schema);
40
+ this.flexSchema = (0, index_js_4.toFlexSchema)(config.schema);
41
+ this.viewSchema = new index_js_3.ViewSchema(policy, {}, this.flexSchema);
45
42
  // This must be initialized before `update` can be called.
46
43
  this.currentCompatibility = {
47
44
  canView: false,
@@ -59,11 +56,17 @@ class SchematizingSimpleTreeView {
59
56
  throw new internal_2.UsageError("Tree cannot be initialized more than once.");
60
57
  }
61
58
  this.runSchemaEdit(() => {
59
+ const mapTree = (0, index_js_4.mapTreeFromNodeData)(content, this.rootFieldSchema.allowedTypes, this.nodeKeyManager, {
60
+ schema: this.checkout.storedSchema,
61
+ policy: {
62
+ ...index_js_3.defaultSchemaPolicy,
63
+ validateSchema: this.config.enableSchemaValidation,
64
+ },
65
+ });
66
+ (0, index_js_4.prepareContentForHydration)(mapTree, this.checkout.forest);
62
67
  (0, schematizeTree_js_1.initialize)(this.checkout, {
63
- schema: this.flexConfig.schema,
64
- initialTree: content === undefined
65
- ? undefined
66
- : (0, index_js_4.cursorFromUnhydratedRoot)(this.config.schema, content, this.nodeKeyManager),
68
+ schema: this.flexSchema,
69
+ initialTree: mapTree === undefined ? undefined : (0, index_js_3.cursorForMapTreeNode)(mapTree),
67
70
  });
68
71
  });
69
72
  }
@@ -78,9 +81,10 @@ class SchematizingSimpleTreeView {
78
81
  throw new internal_2.UsageError("Existing stored schema can not be upgraded (see TreeView.compatibility.canUpgrade).");
79
82
  }
80
83
  this.runSchemaEdit(() => {
81
- const result = (0, schematizeTree_js_1.ensureSchema)(this.viewSchema,
82
- // eslint-disable-next-line no-bitwise
83
- index_js_1.AllowedUpdateType.SchemaCompatible | index_js_1.AllowedUpdateType.Initialize, this.checkout, this.flexConfig);
84
+ const result = (0, schematizeTree_js_1.ensureSchema)(this.viewSchema, index_js_1.AllowedUpdateType.SchemaCompatible, this.checkout, {
85
+ schema: this.flexSchema,
86
+ initialTree: undefined,
87
+ });
84
88
  (0, internal_1.assert)(result, 0x8bf /* Schema upgrade should always work if canUpgrade is set. */);
85
89
  });
86
90
  }
@@ -1 +1 @@
1
- {"version":3,"file":"schematizingTreeView.js","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,uEAAsE;AAEtE,+CAAoE;AACpE,iDAK4B;AAC5B,4DAMuC;AACvC,sDAiBiC;AACjC,+CAAiD;AAEjD,2DAK6B;AAE7B,+CAAqD;AAErD;;GAEG;AACH,MAAa,0BAA0B;IAkCtC,YACiB,QAAsB,EACtB,MACmD,EACnD,cAA8B;QAH9B,aAAQ,GAAR,QAAQ,CAAc;QACtB,W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IAAI,CAAC,wBAAa,CAAC,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACb,CAAC;AAhCD,sCAgCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { AllowedUpdateType, Compatibility } from \"../core/index.js\";\nimport {\n\ttype HasListeners,\n\ttype IEmitter,\n\ttype Listenable,\n\tcreateEmitter,\n} from \"../events/index.js\";\nimport {\n\ttype FlexFieldSchema,\n\ttype NodeKeyManager,\n\tViewSchema,\n\tdefaultSchemaPolicy,\n\tContextSlot,\n} from \"../feature-libraries/index.js\";\nimport {\n\ttype FieldSchema,\n\ttype ImplicitFieldSchema,\n\ttype SchemaCompatibilityStatus,\n\ttype InsertableTreeFieldFromImplicitField,\n\t// eslint-disable-next-line import/no-deprecated\n\ttype TreeConfiguration,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tgetProxyForField,\n\ttoFlexConfig,\n\tsetField,\n\tnormalizeFieldSchema,\n\ttype InsertableContent,\n\tcursorFromUnhydratedRoot,\n\ttype TreeViewConfiguration,\n} from \"../simple-tree/index.js\";\nimport { disposeSymbol } from \"../util/index.js\";\n\nimport {\n\ttype TreeContent,\n\tcanInitialize,\n\tensureSchema,\n\tinitialize,\n} from \"./schematizeTree.js\";\nimport type { TreeCheckout } from \"./treeCheckout.js\";\nimport { CheckoutFlexTreeView } from \"./treeView.js\";\n\n/**\n * Implementation of TreeView wrapping a FlexTreeView.\n */\nexport class SchematizingSimpleTreeView<in out TRootSchema extends ImplicitFieldSchema>\n\timplements TreeView<TRootSchema>\n{\n\t/**\n\t * The view is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.\n\t *\n\t * The view schema may be incompatible with the stored schema. Use `compatibility` to check.\n\t */\n\tprivate view: CheckoutFlexTreeView<FlexFieldSchema> | undefined;\n\n\t/**\n\t * Undefined iff uninitialized or disposed.\n\t */\n\tprivate currentCompatibility: SchemaCompatibilityStatus | undefined;\n\tprivate readonly flexConfig: TreeContent;\n\tpublic readonly events: Listenable<TreeViewEvents> &\n\t\tIEmitter<TreeViewEvents> &\n\t\tHasListeners<TreeViewEvents> = createEmitter();\n\n\tprivate readonly viewSchema: ViewSchema;\n\n\tprivate readonly unregisterCallbacks = new Set<() => void>();\n\n\tpublic disposed = false;\n\t/**\n\t * This is set to true while an edit impacting the document schema is in progress.\n\t * This allows suppressing extra rootChanged / schemaChanged events until the edit concludes.\n\t * This is useful especially for some initialization edits, since document initialization can involve transient schemas\n\t * which are implementation details and should not be exposed to the user.\n\t */\n\tprivate midUpgrade = false;\n\n\tprivate readonly rootFieldSchema: FieldSchema;\n\n\tpublic constructor(\n\t\tpublic readonly checkout: TreeCheckout,\n\t\tpublic readonly config: // eslint-disable-next-line import/no-deprecated\n\t\tTreeConfiguration<TRootSchema> | TreeViewConfiguration<TRootSchema>,\n\t\tpublic readonly nodeKeyManager: NodeKeyManager,\n\t) {\n\t\tconst policy = {\n\t\t\t...defaultSchemaPolicy,\n\t\t\tvalidateSchema: config.enableSchemaValidation,\n\t\t};\n\t\tthis.rootFieldSchema = normalizeFieldSchema(config.schema);\n\t\tthis.flexConfig = toFlexConfig(config, nodeKeyManager, {\n\t\t\tschema: checkout.storedSchema,\n\t\t\tpolicy,\n\t\t});\n\t\tthis.viewSchema = new ViewSchema(policy, {}, this.flexConfig.schema);\n\t\t// This must be initialized before `update` can be called.\n\t\tthis.currentCompatibility = {\n\t\t\tcanView: false,\n\t\t\tcanUpgrade: true,\n\t\t\tisEquivalent: false,\n\t\t\tcanInitialize: true,\n\t\t};\n\t\tthis.update();\n\n\t\tthis.unregisterCallbacks.add(\n\t\t\tthis.checkout.events.on(\"commitApplied\", (data, getRevertible) =>\n\t\t\t\tthis.events.emit(\"commitApplied\", data, getRevertible),\n\t\t\t),\n\t\t);\n\t}\n\n\tpublic initialize(content: InsertableTreeFieldFromImplicitField<TRootSchema>): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (!compatibility.canInitialize) {\n\t\t\tthrow new UsageError(\"Tree cannot be initialized more than once.\");\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tinitialize(this.checkout, {\n\t\t\t\tschema: this.flexConfig.schema,\n\t\t\t\tinitialTree:\n\t\t\t\t\tcontent === undefined\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: cursorFromUnhydratedRoot(this.config.schema, content, this.nodeKeyManager),\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic upgradeSchema(): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (compatibility.isEquivalent) {\n\t\t\t// No-op\n\t\t\treturn;\n\t\t}\n\n\t\tif (!compatibility.canUpgrade) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Existing stored schema can not be upgraded (see TreeView.compatibility.canUpgrade).\",\n\t\t\t);\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst result = ensureSchema(\n\t\t\t\tthis.viewSchema,\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tAllowedUpdateType.SchemaCompatible | AllowedUpdateType.Initialize,\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.flexConfig,\n\t\t\t);\n\t\t\tassert(result, 0x8bf /* Schema upgrade should always work if canUpgrade is set. */);\n\t\t});\n\t}\n\n\t/**\n\t * Gets the view. Throws when disposed.\n\t */\n\tpublic getView(): CheckoutFlexTreeView<FlexFieldSchema> {\n\t\tthis.ensureUndisposed();\n\t\tassert(this.view !== undefined, 0x8c0 /* unexpected getViewOrError */);\n\t\treturn this.view;\n\t}\n\n\tprivate ensureUndisposed(): void {\n\t\tif (this.disposed) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t}\n\n\tprivate failDisposed(): never {\n\t\tthrow new UsageError(\"Accessed a disposed TreeView.\");\n\t}\n\n\t/**\n\t * Updates `this.view` and the current compatibility status.\n\t * Invoked during initialization and when `this.view` needs to be replaced due to stored schema changes.\n\t * Handles re-registering for events to call update in the future.\n\t * @remarks\n\t * This does not check if the view needs to be replaced, it replaces it unconditionally:\n\t * callers should do any checking to detect if it's really needed before calling `update`.\n\t * @privateRemarks\n\t * This implementation avoids making any edits, which prevents it from being invoked reentrantly.\n\t * If implicit initialization (or some other edit) is desired, it should be done outside of this method.\n\t */\n\tprivate update(): void {\n\t\tthis.disposeView();\n\n\t\tconst result = this.viewSchema.checkCompatibility(this.checkout.storedSchema);\n\n\t\t// TODO: AB#8121: Weaken this check to support viewing under additional circumstances.\n\t\t// In the near term, this should support viewing documents with additional optional fields in their schema on object types.\n\t\t// Longer-term (as demand arises), we could also add APIs to constructing view schema to allow for more flexibility\n\t\t// (e.g. out-of-schema content handlers could allow support for viewing docs which have extra allowed types in a particular field)\n\t\tconst canView =\n\t\t\tresult.write === Compatibility.Compatible && result.read === Compatibility.Compatible;\n\t\tconst canUpgrade = result.read === Compatibility.Compatible;\n\t\tconst isEquivalent = canView && canUpgrade;\n\t\tconst compatibility: SchemaCompatibilityStatus = {\n\t\t\tcanView,\n\t\t\tcanUpgrade,\n\t\t\tisEquivalent,\n\t\t\tcanInitialize: canInitialize(this.checkout),\n\t\t};\n\t\tlet lastRoot =\n\t\t\tthis.compatibility.canView && this.view !== undefined ? this.root : undefined;\n\t\tthis.currentCompatibility = compatibility;\n\n\t\tif (compatibility.canView) {\n\t\t\t// Trigger \"rootChanged\" if the root changes in the future.\n\t\t\t// Currently there is no good way to do this as FlexTreeField has no events for changes.\n\t\t\t// this.view.flexTree.on(????)\n\t\t\t// As a workaround for the above, trigger \"rootChanged\" in \"afterBatch\"\n\t\t\t// which isn't the correct time since we normally do events during the batch when the forest is modified, but its better than nothing.\n\t\t\t// TODO: provide a better event: this.view.flexTree.on(????)\n\t\t\tconst cleanupCheckOutEvents = this.checkout.events.on(\"afterBatch\", () => {\n\t\t\t\t// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.\n\t\t\t\t// Accessing `this.root` in that case can throw. It's OK to ignore this because:\n\t\t\t\t// - The rootChanged event will already be raised at the end of the current upgrade\n\t\t\t\t// - It doesn't matter that `lastRoot` isn't updated in this case, because `update` will be called again before the upgrade\n\t\t\t\t// completes (at which point this callback and the `lastRoot` captured here will be out of scope anyway)\n\t\t\t\tif (!this.midUpgrade && lastRoot !== this.root) {\n\t\t\t\t\tlastRoot = this.root;\n\t\t\t\t\tthis.events.emit(\"rootChanged\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconst onViewDispose = (): void => {\n\t\t\t\tcleanupCheckOutEvents();\n\t\t\t\tthis.view = undefined;\n\t\t\t\tif (!this.disposed) {\n\t\t\t\t\tthis.update();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.view = requireSchema(\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.viewSchema,\n\t\t\t\tonViewDispose,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t);\n\t\t} else {\n\t\t\tthis.view = undefined;\n\n\t\t\tconst unregister = this.checkout.storedSchema.on(\"afterSchemaChange\", () => {\n\t\t\t\tunregister();\n\t\t\t\tthis.unregisterCallbacks.delete(unregister);\n\t\t\t\tthis.update();\n\t\t\t});\n\t\t\tthis.unregisterCallbacks.add(unregister);\n\t\t}\n\n\t\tif (!this.midUpgrade) {\n\t\t\tthis.events.emit(\"schemaChanged\");\n\t\t\tthis.events.emit(\"rootChanged\");\n\t\t}\n\t}\n\n\tprivate runSchemaEdit(edit: () => void): void {\n\t\tthis.midUpgrade = true;\n\t\ttry {\n\t\t\tedit();\n\t\t} finally {\n\t\t\tthis.midUpgrade = false;\n\t\t}\n\t\tthis.events.emit(\"schemaChanged\");\n\t\tthis.events.emit(\"rootChanged\");\n\t}\n\n\tprivate disposeView(): void {\n\t\tif (this.view !== undefined) {\n\t\t\tthis.view[disposeSymbol]();\n\t\t\tthis.view = undefined;\n\t\t\tthis.unregisterCallbacks.forEach((unregister) => unregister());\n\t\t}\n\t}\n\n\tpublic get compatibility(): SchemaCompatibilityStatus {\n\t\tif (!this.currentCompatibility) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentCompatibility;\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.disposeView();\n\t\tthis.currentCompatibility = undefined;\n\t}\n\n\tpublic get root(): TreeFieldFromImplicitField<TRootSchema> {\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getView();\n\t\treturn getProxyForField(view.flexTree) as TreeFieldFromImplicitField<TRootSchema>;\n\t}\n\n\tpublic set root(newRoot: InsertableTreeFieldFromImplicitField<TRootSchema>) {\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getView();\n\t\tsetField(view.context.root, this.rootFieldSchema, newRoot as InsertableContent);\n\t}\n}\n\n/**\n * Creates a view that self-disposes whenenever the stored schema changes.\n * This may only be called when the schema is already known to be compatible (typically via ensureSchema).\n */\nexport function requireSchema<TRoot extends FlexFieldSchema>(\n\tcheckout: TreeCheckout,\n\tviewSchema: ViewSchema<TRoot>,\n\tonDispose: () => void,\n\tnodeKeyManager: NodeKeyManager,\n): CheckoutFlexTreeView<TRoot> {\n\tconst slots = checkout.forest.anchors.slots;\n\tassert(!slots.has(ContextSlot), 0x8c2 /* Cannot create second view from checkout */);\n\n\t{\n\t\tconst compatibility = viewSchema.checkCompatibility(checkout.storedSchema);\n\t\tassert(\n\t\t\tcompatibility.write === Compatibility.Compatible &&\n\t\t\t\tcompatibility.read === Compatibility.Compatible,\n\t\t\t0x8c3 /* requireSchema invoked with incompatible schema */,\n\t\t);\n\t}\n\n\tconst view = new CheckoutFlexTreeView(\n\t\tcheckout,\n\t\tviewSchema.schema,\n\t\tnodeKeyManager,\n\t\tonDispose,\n\t);\n\tassert(slots.has(ContextSlot), 0x90d /* Context should be tracked in slot */);\n\n\tconst unregister = checkout.storedSchema.on(\"afterSchemaChange\", () => {\n\t\tunregister();\n\t\tview[disposeSymbol]();\n\t});\n\n\treturn view;\n}\n"]}
1
+ {"version":3,"file":"schematizingTreeView.js","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,uEAAsE;AAEtE,+CAAoE;AACpE,iDAK4B;AAC5B,4DAQuC;AACvC,sDAgBiC;AACjC,+CAAiD;AAEjD,2DAA8E;AAE9E,+CAAqD;AAErD;;GAEG;AACH,MAAa,0BAA0B;IAkCtC,YACiB,QAAsB,EACtB,MAA0C,EAC1C,cAA8B;QAF9B,aAAQ,GAAR,QAAQ,CAAc;QACtB,WAAM,GAAN,MAAM,CAAoC;QAC1C,mBAAc,GAAd,cAAc,CAAgB;QAtB/B,WAAM,GAEU,IAAA,wBAAa,GAAE,CAAC;QAI/B,wBAAmB,GAAG,IAAI,GAAG,EAAc,CAAC;QAEtD,aAAQ,GAAG,KAAK,CAAC;QACxB;;;;;WAKG;QACK,eAAU,GAAG,KAAK,CAAC;QAS1B,MAAM,MAAM,GAAG;YACd,GAAG,8BAAmB;YACtB,cAAc,EAAE,MAAM,CAAC,sBAAsB;SAC7C,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAA,+BAAoB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,UAAU,GAAG,IAAA,uBAAY,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE9C,IAAI,CAAC,UAAU,GAAG,IAAI,qBAAU,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,UAA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;IACjF,CAAC;CACD;AApRD,gEAoRC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAC5B,QAAsB,EACtB,UAA6B,EAC7B,SAAqB,EACrB,cAA8B;IAE9B,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5C,IAAA,iBAAM,EAAC,CAAC,KAAK,CAAC,GAAG,CAAC,sBAAW,CAAC,EAAE,KAAK,CAAC,6CAA6C,CAAC,CAAC;IAErF,CAAC;QACA,MAAM,aAAa,GAAG,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAA,iBAAM,EACL,aAAa,CAAC,KAAK,KAAK,wBAAa,CAAC,UAAU;YAC/C,aAAa,CAAC,IAAI,KAAK,wBAAa,CAAC,UAAU,EAChD,KAAK,CAAC,oDAAoD,CAC1D,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,kCAAoB,CACpC,QAAQ,EACR,UAAU,CAAC,MAAM,EACjB,cAAc,EACd,SAAS,CACT,CAAC;IACF,IAAA,iBAAM,EAAC,KAAK,CAAC,GAAG,CAAC,sBAAW,CAAC,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAE9E,MAAM,UAAU,GAAG,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QACrE,UAAU,EAAE,CAAC;QACb,IAAI,CAAC,wBAAa,CAAC,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACb,CAAC;AAhCD,sCAgCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { AllowedUpdateType, Compatibility } from \"../core/index.js\";\nimport {\n\ttype HasListeners,\n\ttype IEmitter,\n\ttype Listenable,\n\tcreateEmitter,\n} from \"../events/index.js\";\nimport {\n\ttype FlexFieldSchema,\n\ttype NodeKeyManager,\n\tViewSchema,\n\tdefaultSchemaPolicy,\n\tContextSlot,\n\tcursorForMapTreeNode,\n\ttype FlexTreeSchema,\n} from \"../feature-libraries/index.js\";\nimport {\n\ttype FieldSchema,\n\ttype ImplicitFieldSchema,\n\ttype SchemaCompatibilityStatus,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tgetProxyForField,\n\ttoFlexSchema,\n\tsetField,\n\tnormalizeFieldSchema,\n\ttype InsertableContent,\n\ttype TreeViewConfiguration,\n\tmapTreeFromNodeData,\n\tprepareContentForHydration,\n} from \"../simple-tree/index.js\";\nimport { disposeSymbol } from \"../util/index.js\";\n\nimport { canInitialize, ensureSchema, initialize } from \"./schematizeTree.js\";\nimport type { TreeCheckout } from \"./treeCheckout.js\";\nimport { CheckoutFlexTreeView } from \"./treeView.js\";\n\n/**\n * Implementation of TreeView wrapping a FlexTreeView.\n */\nexport class SchematizingSimpleTreeView<in out TRootSchema extends ImplicitFieldSchema>\n\timplements TreeView<TRootSchema>\n{\n\t/**\n\t * The view is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.\n\t *\n\t * The view schema may be incompatible with the stored schema. Use `compatibility` to check.\n\t */\n\tprivate view: CheckoutFlexTreeView<FlexFieldSchema> | undefined;\n\n\t/**\n\t * Undefined iff uninitialized or disposed.\n\t */\n\tprivate currentCompatibility: SchemaCompatibilityStatus | undefined;\n\tprivate readonly flexSchema: FlexTreeSchema;\n\tpublic readonly events: Listenable<TreeViewEvents> &\n\t\tIEmitter<TreeViewEvents> &\n\t\tHasListeners<TreeViewEvents> = createEmitter();\n\n\tprivate readonly viewSchema: ViewSchema;\n\n\tprivate readonly unregisterCallbacks = new Set<() => void>();\n\n\tpublic disposed = false;\n\t/**\n\t * This is set to true while an edit impacting the document schema is in progress.\n\t * This allows suppressing extra rootChanged / schemaChanged events until the edit concludes.\n\t * This is useful especially for some initialization edits, since document initialization can involve transient schemas\n\t * which are implementation details and should not be exposed to the user.\n\t */\n\tprivate midUpgrade = false;\n\n\tprivate readonly rootFieldSchema: FieldSchema;\n\n\tpublic constructor(\n\t\tpublic readonly checkout: TreeCheckout,\n\t\tpublic readonly config: TreeViewConfiguration<TRootSchema>,\n\t\tpublic readonly nodeKeyManager: NodeKeyManager,\n\t) {\n\t\tconst policy = {\n\t\t\t...defaultSchemaPolicy,\n\t\t\tvalidateSchema: config.enableSchemaValidation,\n\t\t};\n\t\tthis.rootFieldSchema = normalizeFieldSchema(config.schema);\n\t\tthis.flexSchema = toFlexSchema(config.schema);\n\n\t\tthis.viewSchema = new ViewSchema(policy, {}, this.flexSchema);\n\t\t// This must be initialized before `update` can be called.\n\t\tthis.currentCompatibility = {\n\t\t\tcanView: false,\n\t\t\tcanUpgrade: true,\n\t\t\tisEquivalent: false,\n\t\t\tcanInitialize: true,\n\t\t};\n\t\tthis.update();\n\n\t\tthis.unregisterCallbacks.add(\n\t\t\tthis.checkout.events.on(\"commitApplied\", (data, getRevertible) =>\n\t\t\t\tthis.events.emit(\"commitApplied\", data, getRevertible),\n\t\t\t),\n\t\t);\n\t}\n\n\tpublic initialize(content: InsertableTreeFieldFromImplicitField<TRootSchema>): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (!compatibility.canInitialize) {\n\t\t\tthrow new UsageError(\"Tree cannot be initialized more than once.\");\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst mapTree = mapTreeFromNodeData(\n\t\t\t\tcontent as InsertableContent,\n\t\t\t\tthis.rootFieldSchema.allowedTypes,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t\t{\n\t\t\t\t\tschema: this.checkout.storedSchema,\n\t\t\t\t\tpolicy: {\n\t\t\t\t\t\t...defaultSchemaPolicy,\n\t\t\t\t\t\tvalidateSchema: this.config.enableSchemaValidation,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tprepareContentForHydration(mapTree, this.checkout.forest);\n\t\t\tinitialize(this.checkout, {\n\t\t\t\tschema: this.flexSchema,\n\t\t\t\tinitialTree: mapTree === undefined ? undefined : cursorForMapTreeNode(mapTree),\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic upgradeSchema(): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (compatibility.isEquivalent) {\n\t\t\t// No-op\n\t\t\treturn;\n\t\t}\n\n\t\tif (!compatibility.canUpgrade) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Existing stored schema can not be upgraded (see TreeView.compatibility.canUpgrade).\",\n\t\t\t);\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst result = ensureSchema(\n\t\t\t\tthis.viewSchema,\n\t\t\t\tAllowedUpdateType.SchemaCompatible,\n\t\t\t\tthis.checkout,\n\t\t\t\t{\n\t\t\t\t\tschema: this.flexSchema,\n\t\t\t\t\tinitialTree: undefined,\n\t\t\t\t},\n\t\t\t);\n\t\t\tassert(result, 0x8bf /* Schema upgrade should always work if canUpgrade is set. */);\n\t\t});\n\t}\n\n\t/**\n\t * Gets the view. Throws when disposed.\n\t */\n\tpublic getView(): CheckoutFlexTreeView<FlexFieldSchema> {\n\t\tthis.ensureUndisposed();\n\t\tassert(this.view !== undefined, 0x8c0 /* unexpected getViewOrError */);\n\t\treturn this.view;\n\t}\n\n\tprivate ensureUndisposed(): void {\n\t\tif (this.disposed) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t}\n\n\tprivate failDisposed(): never {\n\t\tthrow new UsageError(\"Accessed a disposed TreeView.\");\n\t}\n\n\t/**\n\t * Updates `this.view` and the current compatibility status.\n\t * Invoked during initialization and when `this.view` needs to be replaced due to stored schema changes.\n\t * Handles re-registering for events to call update in the future.\n\t * @remarks\n\t * This does not check if the view needs to be replaced, it replaces it unconditionally:\n\t * callers should do any checking to detect if it's really needed before calling `update`.\n\t * @privateRemarks\n\t * This implementation avoids making any edits, which prevents it from being invoked reentrantly.\n\t * If implicit initialization (or some other edit) is desired, it should be done outside of this method.\n\t */\n\tprivate update(): void {\n\t\tthis.disposeView();\n\n\t\tconst result = this.viewSchema.checkCompatibility(this.checkout.storedSchema);\n\n\t\t// TODO: AB#8121: Weaken this check to support viewing under additional circumstances.\n\t\t// In the near term, this should support viewing documents with additional optional fields in their schema on object types.\n\t\t// Longer-term (as demand arises), we could also add APIs to constructing view schema to allow for more flexibility\n\t\t// (e.g. out-of-schema content handlers could allow support for viewing docs which have extra allowed types in a particular field)\n\t\tconst canView =\n\t\t\tresult.write === Compatibility.Compatible && result.read === Compatibility.Compatible;\n\t\tconst canUpgrade = result.read === Compatibility.Compatible;\n\t\tconst isEquivalent = canView && canUpgrade;\n\t\tconst compatibility: SchemaCompatibilityStatus = {\n\t\t\tcanView,\n\t\t\tcanUpgrade,\n\t\t\tisEquivalent,\n\t\t\tcanInitialize: canInitialize(this.checkout),\n\t\t};\n\t\tlet lastRoot =\n\t\t\tthis.compatibility.canView && this.view !== undefined ? this.root : undefined;\n\t\tthis.currentCompatibility = compatibility;\n\n\t\tif (compatibility.canView) {\n\t\t\t// Trigger \"rootChanged\" if the root changes in the future.\n\t\t\t// Currently there is no good way to do this as FlexTreeField has no events for changes.\n\t\t\t// this.view.flexTree.on(????)\n\t\t\t// As a workaround for the above, trigger \"rootChanged\" in \"afterBatch\"\n\t\t\t// which isn't the correct time since we normally do events during the batch when the forest is modified, but its better than nothing.\n\t\t\t// TODO: provide a better event: this.view.flexTree.on(????)\n\t\t\tconst cleanupCheckOutEvents = this.checkout.events.on(\"afterBatch\", () => {\n\t\t\t\t// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.\n\t\t\t\t// Accessing `this.root` in that case can throw. It's OK to ignore this because:\n\t\t\t\t// - The rootChanged event will already be raised at the end of the current upgrade\n\t\t\t\t// - It doesn't matter that `lastRoot` isn't updated in this case, because `update` will be called again before the upgrade\n\t\t\t\t// completes (at which point this callback and the `lastRoot` captured here will be out of scope anyway)\n\t\t\t\tif (!this.midUpgrade && lastRoot !== this.root) {\n\t\t\t\t\tlastRoot = this.root;\n\t\t\t\t\tthis.events.emit(\"rootChanged\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconst onViewDispose = (): void => {\n\t\t\t\tcleanupCheckOutEvents();\n\t\t\t\tthis.view = undefined;\n\t\t\t\tif (!this.disposed) {\n\t\t\t\t\tthis.update();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.view = requireSchema(\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.viewSchema,\n\t\t\t\tonViewDispose,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t);\n\t\t} else {\n\t\t\tthis.view = undefined;\n\n\t\t\tconst unregister = this.checkout.storedSchema.on(\"afterSchemaChange\", () => {\n\t\t\t\tunregister();\n\t\t\t\tthis.unregisterCallbacks.delete(unregister);\n\t\t\t\tthis.update();\n\t\t\t});\n\t\t\tthis.unregisterCallbacks.add(unregister);\n\t\t}\n\n\t\tif (!this.midUpgrade) {\n\t\t\tthis.events.emit(\"schemaChanged\");\n\t\t\tthis.events.emit(\"rootChanged\");\n\t\t}\n\t}\n\n\tprivate runSchemaEdit(edit: () => void): void {\n\t\tthis.midUpgrade = true;\n\t\ttry {\n\t\t\tedit();\n\t\t} finally {\n\t\t\tthis.midUpgrade = false;\n\t\t}\n\t\tthis.events.emit(\"schemaChanged\");\n\t\tthis.events.emit(\"rootChanged\");\n\t}\n\n\tprivate disposeView(): void {\n\t\tif (this.view !== undefined) {\n\t\t\tthis.view[disposeSymbol]();\n\t\t\tthis.view = undefined;\n\t\t\tthis.unregisterCallbacks.forEach((unregister) => unregister());\n\t\t}\n\t}\n\n\tpublic get compatibility(): SchemaCompatibilityStatus {\n\t\tif (!this.currentCompatibility) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentCompatibility;\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.disposeView();\n\t\tthis.currentCompatibility = undefined;\n\t}\n\n\tpublic get root(): TreeFieldFromImplicitField<TRootSchema> {\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getView();\n\t\treturn getProxyForField(view.flexTree) as TreeFieldFromImplicitField<TRootSchema>;\n\t}\n\n\tpublic set root(newRoot: InsertableTreeFieldFromImplicitField<TRootSchema>) {\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getView();\n\t\tsetField(view.context.root, this.rootFieldSchema, newRoot as InsertableContent);\n\t}\n}\n\n/**\n * Creates a view that self-disposes whenenever the stored schema changes.\n * This may only be called when the schema is already known to be compatible (typically via ensureSchema).\n */\nexport function requireSchema<TRoot extends FlexFieldSchema>(\n\tcheckout: TreeCheckout,\n\tviewSchema: ViewSchema<TRoot>,\n\tonDispose: () => void,\n\tnodeKeyManager: NodeKeyManager,\n): CheckoutFlexTreeView<TRoot> {\n\tconst slots = checkout.forest.anchors.slots;\n\tassert(!slots.has(ContextSlot), 0x8c2 /* Cannot create second view from checkout */);\n\n\t{\n\t\tconst compatibility = viewSchema.checkCompatibility(checkout.storedSchema);\n\t\tassert(\n\t\t\tcompatibility.write === Compatibility.Compatible &&\n\t\t\t\tcompatibility.read === Compatibility.Compatible,\n\t\t\t0x8c3 /* requireSchema invoked with incompatible schema */,\n\t\t);\n\t}\n\n\tconst view = new CheckoutFlexTreeView(\n\t\tcheckout,\n\t\tviewSchema.schema,\n\t\tnodeKeyManager,\n\t\tonDispose,\n\t);\n\tassert(slots.has(ContextSlot), 0x90d /* Context should be tracked in slot */);\n\n\tconst unregister = checkout.storedSchema.on(\"afterSchemaChange\", () => {\n\t\tunregister();\n\t\tview[disposeSymbol]();\n\t});\n\n\treturn view;\n}\n"]}
@@ -8,7 +8,7 @@ import { type ICodecOptions } from "../codec/index.js";
8
8
  import { type JsonableTree, type TreeStoredSchema, TreeStoredSchemaRepository } from "../core/index.js";
9
9
  import { type FlexFieldSchema, TreeCompressionStrategy } from "../feature-libraries/index.js";
10
10
  import { SharedTreeCore } from "../shared-tree-core/index.js";
11
- import type { ITree, ImplicitFieldSchema, TreeConfiguration, TreeView, TreeViewConfiguration } from "../simple-tree/index.js";
11
+ import type { ITree, ImplicitFieldSchema, TreeView, TreeViewConfiguration } from "../simple-tree/index.js";
12
12
  import { type InitializeAndSchematizeConfiguration } from "./schematizeTree.js";
13
13
  import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
14
14
  import type { SharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
@@ -74,7 +74,6 @@ export declare class SharedTree extends SharedTreeCore<SharedTreeEditBuilder, Sh
74
74
  constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes, optionsParam: SharedTreeOptions, telemetryContextPrefix?: string);
75
75
  contentSnapshot(): SharedTreeContentSnapshot;
76
76
  schematizeFlexTree<TRoot extends FlexFieldSchema>(config: InitializeAndSchematizeConfiguration<TRoot>, onDispose: () => void): CheckoutFlexTreeView<TRoot> | undefined;
77
- schematize<TRoot extends ImplicitFieldSchema>(config: TreeConfiguration<TRoot>): TreeView<TRoot>;
78
77
  viewWith<TRoot extends ImplicitFieldSchema>(config: TreeViewConfiguration<TRoot>): TreeView<TRoot>;
79
78
  protected loadCore(services: IChannelStorageService): Promise<void>;
80
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTree.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAg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C;CACtE;AAED;;;GAGG;AACH,oBAAY,UAAU;IACrB;;OAEG;IACH,SAAS,IAAI;IACb;;OAEG;IACH,SAAS,IAAI;CACb;AAED,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,iBAAiB,CAKhE,CAAC;AAEF;;GAEG;AACH,qBAAa,iBAAkB,YAAW,eAAe,CAAC,WAAW,CAAC;IASlD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAR3C,SAAgB,IAAI,EAAE,MAAM,CAA4C;IAExE,SAAgB,UAAU,EAAE,kBAAkB,CAI5C;gBAEkC,OAAO,GAAE,iBAAsB;IAEtD,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,iBAAiB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAC7C,OAAO,CAAC,UAAU,CAAC;IAMf,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU;CAKtE"}
@@ -128,16 +128,6 @@ class SharedTree extends index_js_5.SharedTreeCore {
128
128
  }
129
129
  return (0, schematizingTreeView_js_1.requireSchema)(this.checkout, viewSchema, onDispose, (0, index_js_4.createNodeKeyManager)(this.runtime.idCompressor));
130
130
  }
131
- schematize(
132
- // eslint-disable-next-line import/no-deprecated
133
- config) {
134
- const view = new schematizingTreeView_js_1.SchematizingSimpleTreeView(this.checkout, config, (0, index_js_4.createNodeKeyManager)(this.runtime.idCompressor));
135
- // As a subjective API design choice, we initialize the tree here if it is not already initialized.
136
- if (view.compatibility.canInitialize === true) {
137
- view.initialize(config.initialTree());
138
- }
139
- return view;
140
- }
141
131
  viewWith(config) {
142
132
  return new schematizingTreeView_js_1.SchematizingSimpleTreeView(this.checkout, config, (0, index_js_4.createNodeKeyManager)(this.runtime.idCompressor));
143
133
  }