@fluidframework/tree 2.101.1 → 2.103.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (609) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/api-report/tree.alpha.api.md +19 -0
  3. package/dist/codec/codec.d.ts +22 -53
  4. package/dist/codec/codec.d.ts.map +1 -1
  5. package/dist/codec/codec.js +7 -44
  6. package/dist/codec/codec.js.map +1 -1
  7. package/dist/codec/index.d.ts +1 -1
  8. package/dist/codec/index.d.ts.map +1 -1
  9. package/dist/codec/index.js +2 -2
  10. package/dist/codec/index.js.map +1 -1
  11. package/dist/codec/versioned/codec.d.ts +56 -28
  12. package/dist/codec/versioned/codec.d.ts.map +1 -1
  13. package/dist/codec/versioned/codec.js +29 -12
  14. package/dist/codec/versioned/codec.js.map +1 -1
  15. package/dist/codec/versioned/format.d.ts +5 -4
  16. package/dist/codec/versioned/format.d.ts.map +1 -1
  17. package/dist/codec/versioned/format.js +26 -3
  18. package/dist/codec/versioned/format.js.map +1 -1
  19. package/dist/codec/versioned/index.d.ts +1 -1
  20. package/dist/codec/versioned/index.d.ts.map +1 -1
  21. package/dist/codec/versioned/index.js +2 -2
  22. package/dist/codec/versioned/index.js.map +1 -1
  23. package/dist/core/rebase/types.d.ts +4 -3
  24. package/dist/core/rebase/types.d.ts.map +1 -1
  25. package/dist/core/rebase/types.js +27 -4
  26. package/dist/core/rebase/types.js.map +1 -1
  27. package/dist/core/schema-stored/formatV1.d.ts +16 -15
  28. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  29. package/dist/core/schema-stored/formatV1.js +31 -8
  30. package/dist/core/schema-stored/formatV1.js.map +1 -1
  31. package/dist/core/schema-stored/formatV2.d.ts +29 -28
  32. package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
  33. package/dist/core/schema-stored/formatV2.js +33 -10
  34. package/dist/core/schema-stored/formatV2.js.map +1 -1
  35. package/dist/core/tree/deltaUtil.d.ts +2 -2
  36. package/dist/core/tree/deltaUtil.js +2 -2
  37. package/dist/core/tree/deltaUtil.js.map +1 -1
  38. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  39. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
  40. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  41. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  42. package/dist/core/tree/detachedFieldIndexCodecV2.js +4 -2
  43. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  44. package/dist/core/tree/detachedFieldIndexCodecs.d.ts +3 -3
  45. package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  46. package/dist/core/tree/detachedFieldIndexCodecs.js +1 -1
  47. package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  48. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
  49. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  50. package/dist/core/tree/detachedFieldIndexFormatCommon.js +33 -10
  51. package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  52. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
  53. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  54. package/dist/core/tree/detachedFieldIndexFormatV2.js +25 -2
  55. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  56. package/dist/core/tree/persistedTreeTextFormat.d.ts +19 -18
  57. package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  58. package/dist/core/tree/persistedTreeTextFormat.js +33 -10
  59. package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
  60. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +38 -1
  61. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  62. package/dist/feature-libraries/chunked-forest/chunkTree.js +63 -5
  63. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  64. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  65. package/dist/feature-libraries/chunked-forest/chunkedForest.js +18 -4
  66. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  67. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +34 -2
  68. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  69. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +106 -3
  70. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  71. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +5 -5
  72. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  73. package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -2
  74. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  75. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +7 -7
  76. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  77. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
  79. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  80. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js +36 -13
  81. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
  82. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
  83. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
  84. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +41 -18
  85. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
  86. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +35 -14
  87. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
  88. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +35 -6
  89. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
  90. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +106 -0
  91. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -0
  92. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js +67 -0
  93. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -0
  94. package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts +2 -1
  95. package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -1
  96. package/dist/feature-libraries/chunked-forest/codec/format/index.js +5 -1
  97. package/dist/feature-libraries/chunked-forest/codec/format/index.js.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts +38 -4
  99. package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -1
  100. package/dist/feature-libraries/chunked-forest/codec/format/versions.js +7 -1
  101. package/dist/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -1
  102. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
  103. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  104. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +1 -2
  105. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  106. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
  107. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  108. package/dist/feature-libraries/chunked-forest/uniformChunk.js +101 -36
  109. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  110. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  111. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
  112. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  113. package/dist/feature-libraries/forest-summary/codec.d.ts +5 -4
  114. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  115. package/dist/feature-libraries/forest-summary/codec.js +2 -2
  116. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  117. package/dist/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
  118. package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  119. package/dist/feature-libraries/forest-summary/formatCommon.js +26 -3
  120. package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  121. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
  122. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  123. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js +26 -3
  124. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  125. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
  126. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  127. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +48 -25
  128. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  129. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
  130. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  131. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +29 -6
  132. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
  133. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +1 -1
  134. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  135. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  136. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
  137. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  138. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +31 -8
  139. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  140. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
  141. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  142. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +34 -11
  143. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  144. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
  145. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  146. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js +25 -2
  147. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  148. package/dist/feature-libraries/schema-index/codec.d.ts +2 -2
  149. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  150. package/dist/feature-libraries/schema-index/codec.js +1 -1
  151. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  152. package/dist/feature-libraries/schema-index/formatV1.d.ts +15 -14
  153. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  154. package/dist/feature-libraries/schema-index/formatV1.js +27 -4
  155. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  156. package/dist/feature-libraries/schema-index/formatV2.d.ts +20 -19
  157. package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  158. package/dist/feature-libraries/schema-index/formatV2.js +27 -4
  159. package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
  160. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  161. package/dist/feature-libraries/sequence-field/compose.js +1 -3
  162. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  163. package/dist/feature-libraries/sequence-field/formatV1.d.ts +283 -282
  164. package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  165. package/dist/feature-libraries/sequence-field/formatV1.js +63 -40
  166. package/dist/feature-libraries/sequence-field/formatV1.js.map +1 -1
  167. package/dist/feature-libraries/sequence-field/formatV2.d.ts +180 -179
  168. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  169. package/dist/feature-libraries/sequence-field/formatV2.js +55 -32
  170. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  171. package/dist/feature-libraries/sequence-field/formatV3.d.ts +126 -125
  172. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  173. package/dist/feature-libraries/sequence-field/formatV3.js +27 -4
  174. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  175. package/dist/index.d.ts +1 -1
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +3 -1
  178. package/dist/index.js.map +1 -1
  179. package/dist/packageVersion.d.ts +1 -1
  180. package/dist/packageVersion.js +1 -1
  181. package/dist/packageVersion.js.map +1 -1
  182. package/dist/shared-tree/isAuditableFromOutcome.d.ts +20 -0
  183. package/dist/shared-tree/isAuditableFromOutcome.d.ts.map +1 -0
  184. package/dist/shared-tree/isAuditableFromOutcome.js +36 -0
  185. package/dist/shared-tree/isAuditableFromOutcome.js.map +1 -0
  186. package/dist/shared-tree/sharedTree.d.ts +2 -2
  187. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  188. package/dist/shared-tree/sharedTree.js.map +1 -1
  189. package/dist/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
  190. package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  191. package/dist/shared-tree/sharedTreeChangeFormat.js +28 -5
  192. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  193. package/dist/shared-tree/treeCheckout.d.ts +5 -3
  194. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  195. package/dist/shared-tree/treeCheckout.js +37 -8
  196. package/dist/shared-tree/treeCheckout.js.map +1 -1
  197. package/dist/shared-tree-core/editManager.d.ts +2 -2
  198. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  199. package/dist/shared-tree-core/editManager.js.map +1 -1
  200. package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -3
  201. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  202. package/dist/shared-tree-core/editManagerCodecs.js +2 -2
  203. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  204. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
  205. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  206. package/dist/shared-tree-core/editManagerFormatCommons.js +39 -16
  207. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  208. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
  209. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  210. package/dist/shared-tree-core/editManagerFormatV1toV4.js +33 -10
  211. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  212. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
  213. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  214. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +27 -4
  215. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  216. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  217. package/dist/shared-tree-core/messageCodecVSharedBranches.js +25 -2
  218. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  219. package/dist/shared-tree-core/messageCodecs.d.ts +3 -3
  220. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  221. package/dist/shared-tree-core/messageCodecs.js +2 -2
  222. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  223. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
  224. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  225. package/dist/shared-tree-core/messageFormatV1ToV4.js +31 -8
  226. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  227. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
  228. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  229. package/dist/shared-tree-core/messageFormatVSharedBranches.js +29 -6
  230. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  231. package/dist/simple-tree/core/treeNodeKernel.d.ts +5 -0
  232. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  233. package/dist/simple-tree/core/treeNodeKernel.js +62 -24
  234. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  235. package/dist/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
  236. package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  237. package/dist/simple-tree/simpleSchemaFormatV1.js +54 -31
  238. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  239. package/dist/text/codePointUtils.d.ts +48 -0
  240. package/dist/text/codePointUtils.d.ts.map +1 -0
  241. package/dist/text/codePointUtils.js +80 -0
  242. package/dist/text/codePointUtils.js.map +1 -0
  243. package/dist/text/index.d.ts +1 -0
  244. package/dist/text/index.d.ts.map +1 -1
  245. package/dist/text/index.js +4 -1
  246. package/dist/text/index.js.map +1 -1
  247. package/dist/text/textDomain.d.ts +93 -1
  248. package/dist/text/textDomain.d.ts.map +1 -1
  249. package/dist/text/textDomain.js +65 -8
  250. package/dist/text/textDomain.js.map +1 -1
  251. package/dist/text/textDomainFormatted.d.ts +24 -6
  252. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  253. package/dist/text/textDomainFormatted.js +29 -1
  254. package/dist/text/textDomainFormatted.js.map +1 -1
  255. package/dist/treeFactory.d.ts.map +1 -1
  256. package/dist/treeFactory.js +9 -7
  257. package/dist/treeFactory.js.map +1 -1
  258. package/dist/util/breakable.d.ts +7 -1
  259. package/dist/util/breakable.d.ts.map +1 -1
  260. package/dist/util/breakable.js +18 -4
  261. package/dist/util/breakable.js.map +1 -1
  262. package/dist/util/typeboxBrand.d.ts +1 -1
  263. package/dist/util/typeboxBrand.d.ts.map +1 -1
  264. package/dist/util/typeboxBrand.js +26 -3
  265. package/dist/util/typeboxBrand.js.map +1 -1
  266. package/dist/util/utils.d.ts +2 -2
  267. package/dist/util/utils.d.ts.map +1 -1
  268. package/dist/util/utils.js +25 -2
  269. package/dist/util/utils.js.map +1 -1
  270. package/eslint.config.mts +44 -0
  271. package/lib/codec/codec.d.ts +22 -53
  272. package/lib/codec/codec.d.ts.map +1 -1
  273. package/lib/codec/codec.js +7 -44
  274. package/lib/codec/codec.js.map +1 -1
  275. package/lib/codec/index.d.ts +1 -1
  276. package/lib/codec/index.d.ts.map +1 -1
  277. package/lib/codec/index.js +1 -1
  278. package/lib/codec/index.js.map +1 -1
  279. package/lib/codec/versioned/codec.d.ts +56 -28
  280. package/lib/codec/versioned/codec.d.ts.map +1 -1
  281. package/lib/codec/versioned/codec.js +27 -10
  282. package/lib/codec/versioned/codec.js.map +1 -1
  283. package/lib/codec/versioned/format.d.ts +5 -4
  284. package/lib/codec/versioned/format.d.ts.map +1 -1
  285. package/lib/codec/versioned/format.js +1 -1
  286. package/lib/codec/versioned/format.js.map +1 -1
  287. package/lib/codec/versioned/index.d.ts +1 -1
  288. package/lib/codec/versioned/index.d.ts.map +1 -1
  289. package/lib/codec/versioned/index.js +1 -1
  290. package/lib/codec/versioned/index.js.map +1 -1
  291. package/lib/core/rebase/types.d.ts +4 -3
  292. package/lib/core/rebase/types.d.ts.map +1 -1
  293. package/lib/core/rebase/types.js +1 -1
  294. package/lib/core/rebase/types.js.map +1 -1
  295. package/lib/core/schema-stored/formatV1.d.ts +16 -15
  296. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  297. package/lib/core/schema-stored/formatV1.js +1 -1
  298. package/lib/core/schema-stored/formatV1.js.map +1 -1
  299. package/lib/core/schema-stored/formatV2.d.ts +29 -28
  300. package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
  301. package/lib/core/schema-stored/formatV2.js +1 -1
  302. package/lib/core/schema-stored/formatV2.js.map +1 -1
  303. package/lib/core/tree/deltaUtil.d.ts +2 -2
  304. package/lib/core/tree/deltaUtil.js +2 -2
  305. package/lib/core/tree/deltaUtil.js.map +1 -1
  306. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  307. package/lib/core/tree/detachedFieldIndexCodecV1.js +3 -2
  308. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  309. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  310. package/lib/core/tree/detachedFieldIndexCodecV2.js +5 -3
  311. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  312. package/lib/core/tree/detachedFieldIndexCodecs.d.ts +3 -3
  313. package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  314. package/lib/core/tree/detachedFieldIndexCodecs.js +2 -2
  315. package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  316. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
  317. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  318. package/lib/core/tree/detachedFieldIndexFormatCommon.js +1 -1
  319. package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  320. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
  321. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  322. package/lib/core/tree/detachedFieldIndexFormatV2.js +1 -1
  323. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  324. package/lib/core/tree/persistedTreeTextFormat.d.ts +19 -18
  325. package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  326. package/lib/core/tree/persistedTreeTextFormat.js +1 -1
  327. package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
  328. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +38 -1
  329. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  330. package/lib/feature-libraries/chunked-forest/chunkTree.js +62 -5
  331. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  332. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  333. package/lib/feature-libraries/chunked-forest/chunkedForest.js +20 -6
  334. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  335. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +34 -2
  336. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  337. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +102 -2
  338. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  339. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +5 -5
  340. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  341. package/lib/feature-libraries/chunked-forest/codec/codecs.js +3 -3
  342. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  343. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +7 -7
  344. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  345. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  346. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
  347. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  348. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js +1 -1
  349. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
  350. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
  351. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
  352. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js +1 -1
  353. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
  354. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +35 -14
  355. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
  356. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js +9 -3
  357. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
  358. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +106 -0
  359. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -0
  360. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js +41 -0
  361. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -0
  362. package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts +2 -1
  363. package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -1
  364. package/lib/feature-libraries/chunked-forest/codec/format/index.js +2 -1
  365. package/lib/feature-libraries/chunked-forest/codec/format/index.js.map +1 -1
  366. package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts +38 -4
  367. package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -1
  368. package/lib/feature-libraries/chunked-forest/codec/format/versions.js +6 -0
  369. package/lib/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -1
  370. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
  371. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  372. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +2 -3
  373. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  374. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
  375. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  376. package/lib/feature-libraries/chunked-forest/uniformChunk.js +101 -36
  377. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  378. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  379. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
  380. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  381. package/lib/feature-libraries/forest-summary/codec.d.ts +5 -4
  382. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  383. package/lib/feature-libraries/forest-summary/codec.js +3 -3
  384. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  385. package/lib/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
  386. package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  387. package/lib/feature-libraries/forest-summary/formatCommon.js +1 -1
  388. package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  389. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
  390. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  391. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
  392. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  393. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
  394. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  395. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js +1 -1
  396. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  397. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
  398. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  399. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +1 -1
  400. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
  401. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +1 -1
  402. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  403. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  404. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
  405. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  406. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +1 -1
  407. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  408. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
  409. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  410. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +1 -1
  411. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  412. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
  413. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  414. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +1 -1
  415. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  416. package/lib/feature-libraries/schema-index/codec.d.ts +2 -2
  417. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  418. package/lib/feature-libraries/schema-index/codec.js +2 -2
  419. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  420. package/lib/feature-libraries/schema-index/formatV1.d.ts +15 -14
  421. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  422. package/lib/feature-libraries/schema-index/formatV1.js +1 -1
  423. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  424. package/lib/feature-libraries/schema-index/formatV2.d.ts +20 -19
  425. package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  426. package/lib/feature-libraries/schema-index/formatV2.js +1 -1
  427. package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
  428. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  429. package/lib/feature-libraries/sequence-field/compose.js +1 -3
  430. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  431. package/lib/feature-libraries/sequence-field/formatV1.d.ts +283 -282
  432. package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  433. package/lib/feature-libraries/sequence-field/formatV1.js +1 -1
  434. package/lib/feature-libraries/sequence-field/formatV1.js.map +1 -1
  435. package/lib/feature-libraries/sequence-field/formatV2.d.ts +180 -179
  436. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  437. package/lib/feature-libraries/sequence-field/formatV2.js +1 -1
  438. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  439. package/lib/feature-libraries/sequence-field/formatV3.d.ts +126 -125
  440. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  441. package/lib/feature-libraries/sequence-field/formatV3.js +1 -1
  442. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  443. package/lib/index.d.ts +1 -1
  444. package/lib/index.d.ts.map +1 -1
  445. package/lib/index.js +1 -1
  446. package/lib/index.js.map +1 -1
  447. package/lib/packageVersion.d.ts +1 -1
  448. package/lib/packageVersion.js +1 -1
  449. package/lib/packageVersion.js.map +1 -1
  450. package/lib/shared-tree/isAuditableFromOutcome.d.ts +20 -0
  451. package/lib/shared-tree/isAuditableFromOutcome.d.ts.map +1 -0
  452. package/lib/shared-tree/isAuditableFromOutcome.js +32 -0
  453. package/lib/shared-tree/isAuditableFromOutcome.js.map +1 -0
  454. package/lib/shared-tree/sharedTree.d.ts +2 -2
  455. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  456. package/lib/shared-tree/sharedTree.js +1 -1
  457. package/lib/shared-tree/sharedTree.js.map +1 -1
  458. package/lib/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
  459. package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  460. package/lib/shared-tree/sharedTreeChangeFormat.js +1 -1
  461. package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  462. package/lib/shared-tree/treeCheckout.d.ts +5 -3
  463. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  464. package/lib/shared-tree/treeCheckout.js +38 -9
  465. package/lib/shared-tree/treeCheckout.js.map +1 -1
  466. package/lib/shared-tree-core/editManager.d.ts +2 -2
  467. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  468. package/lib/shared-tree-core/editManager.js.map +1 -1
  469. package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -3
  470. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  471. package/lib/shared-tree-core/editManagerCodecs.js +3 -3
  472. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  473. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
  474. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  475. package/lib/shared-tree-core/editManagerFormatCommons.js +1 -1
  476. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  477. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
  478. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  479. package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -1
  480. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  481. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
  482. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  483. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  484. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  485. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  486. package/lib/shared-tree-core/messageCodecVSharedBranches.js +1 -1
  487. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  488. package/lib/shared-tree-core/messageCodecs.d.ts +3 -3
  489. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  490. package/lib/shared-tree-core/messageCodecs.js +3 -3
  491. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  492. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
  493. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  494. package/lib/shared-tree-core/messageFormatV1ToV4.js +1 -1
  495. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  496. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
  497. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  498. package/lib/shared-tree-core/messageFormatVSharedBranches.js +1 -1
  499. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  500. package/lib/simple-tree/core/treeNodeKernel.d.ts +5 -0
  501. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  502. package/lib/simple-tree/core/treeNodeKernel.js +60 -23
  503. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  504. package/lib/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
  505. package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  506. package/lib/simple-tree/simpleSchemaFormatV1.js +1 -1
  507. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  508. package/lib/text/codePointUtils.d.ts +48 -0
  509. package/lib/text/codePointUtils.d.ts.map +1 -0
  510. package/lib/text/codePointUtils.js +75 -0
  511. package/lib/text/codePointUtils.js.map +1 -0
  512. package/lib/text/index.d.ts +1 -0
  513. package/lib/text/index.d.ts.map +1 -1
  514. package/lib/text/index.js +1 -0
  515. package/lib/text/index.js.map +1 -1
  516. package/lib/text/textDomain.d.ts +93 -1
  517. package/lib/text/textDomain.d.ts.map +1 -1
  518. package/lib/text/textDomain.js +56 -0
  519. package/lib/text/textDomain.js.map +1 -1
  520. package/lib/text/textDomainFormatted.d.ts +24 -6
  521. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  522. package/lib/text/textDomainFormatted.js +30 -2
  523. package/lib/text/textDomainFormatted.js.map +1 -1
  524. package/lib/treeFactory.d.ts.map +1 -1
  525. package/lib/treeFactory.js +2 -0
  526. package/lib/treeFactory.js.map +1 -1
  527. package/lib/util/breakable.d.ts +7 -1
  528. package/lib/util/breakable.d.ts.map +1 -1
  529. package/lib/util/breakable.js +18 -4
  530. package/lib/util/breakable.js.map +1 -1
  531. package/lib/util/typeboxBrand.d.ts +1 -1
  532. package/lib/util/typeboxBrand.d.ts.map +1 -1
  533. package/lib/util/typeboxBrand.js +1 -1
  534. package/lib/util/typeboxBrand.js.map +1 -1
  535. package/lib/util/utils.d.ts +2 -2
  536. package/lib/util/utils.d.ts.map +1 -1
  537. package/lib/util/utils.js +1 -1
  538. package/lib/util/utils.js.map +1 -1
  539. package/package.json +24 -24
  540. package/src/codec/codec.ts +82 -73
  541. package/src/codec/index.ts +2 -1
  542. package/src/codec/versioned/codec.ts +173 -73
  543. package/src/codec/versioned/format.ts +2 -1
  544. package/src/codec/versioned/index.ts +2 -1
  545. package/src/core/rebase/types.ts +1 -1
  546. package/src/core/schema-stored/formatV1.ts +2 -1
  547. package/src/core/schema-stored/formatV2.ts +2 -1
  548. package/src/core/tree/deltaUtil.ts +2 -2
  549. package/src/core/tree/detachedFieldIndexCodecV1.ts +3 -2
  550. package/src/core/tree/detachedFieldIndexCodecV2.ts +5 -3
  551. package/src/core/tree/detachedFieldIndexCodecs.ts +2 -2
  552. package/src/core/tree/detachedFieldIndexFormatCommon.ts +2 -1
  553. package/src/core/tree/detachedFieldIndexFormatV2.ts +2 -1
  554. package/src/core/tree/persistedTreeTextFormat.ts +2 -1
  555. package/src/feature-libraries/chunked-forest/chunkTree.ts +88 -3
  556. package/src/feature-libraries/chunked-forest/chunkedForest.ts +27 -7
  557. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +143 -7
  558. package/src/feature-libraries/chunked-forest/codec/codecs.ts +30 -28
  559. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +7 -7
  560. package/src/feature-libraries/chunked-forest/codec/format/formatGeneric.ts +2 -1
  561. package/src/feature-libraries/chunked-forest/codec/format/formatV1.ts +2 -1
  562. package/src/feature-libraries/chunked-forest/codec/format/formatV2.ts +13 -8
  563. package/src/feature-libraries/chunked-forest/codec/format/formatVText.ts +84 -0
  564. package/src/feature-libraries/chunked-forest/codec/format/index.ts +6 -1
  565. package/src/feature-libraries/chunked-forest/codec/format/versions.ts +25 -4
  566. package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +14 -18
  567. package/src/feature-libraries/chunked-forest/uniformChunk.ts +131 -44
  568. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +36 -14
  569. package/src/feature-libraries/forest-summary/codec.ts +9 -4
  570. package/src/feature-libraries/forest-summary/formatCommon.ts +2 -1
  571. package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +2 -1
  572. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +2 -1
  573. package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +2 -1
  574. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +1 -1
  575. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV1.ts +2 -1
  576. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +2 -1
  577. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +2 -1
  578. package/src/feature-libraries/schema-index/codec.ts +2 -5
  579. package/src/feature-libraries/schema-index/formatV1.ts +2 -1
  580. package/src/feature-libraries/schema-index/formatV2.ts +2 -1
  581. package/src/feature-libraries/sequence-field/compose.ts +1 -4
  582. package/src/feature-libraries/sequence-field/formatV1.ts +2 -1
  583. package/src/feature-libraries/sequence-field/formatV2.ts +2 -1
  584. package/src/feature-libraries/sequence-field/formatV3.ts +2 -1
  585. package/src/index.ts +6 -1
  586. package/src/packageVersion.ts +1 -1
  587. package/src/shared-tree/isAuditableFromOutcome.ts +34 -0
  588. package/src/shared-tree/sharedTree.ts +2 -5
  589. package/src/shared-tree/sharedTreeChangeFormat.ts +2 -1
  590. package/src/shared-tree/treeCheckout.ts +55 -15
  591. package/src/shared-tree-core/editManager.ts +2 -2
  592. package/src/shared-tree-core/editManagerCodecs.ts +4 -6
  593. package/src/shared-tree-core/editManagerFormatCommons.ts +2 -1
  594. package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -1
  595. package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +2 -1
  596. package/src/shared-tree-core/messageCodecVSharedBranches.ts +2 -1
  597. package/src/shared-tree-core/messageCodecs.ts +4 -4
  598. package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -1
  599. package/src/shared-tree-core/messageFormatVSharedBranches.ts +2 -1
  600. package/src/simple-tree/core/treeNodeKernel.ts +66 -28
  601. package/src/simple-tree/simpleSchemaFormatV1.ts +2 -1
  602. package/src/text/codePointUtils.ts +81 -0
  603. package/src/text/index.ts +1 -0
  604. package/src/text/textDomain.ts +155 -2
  605. package/src/text/textDomainFormatted.ts +73 -2
  606. package/src/treeFactory.ts +5 -0
  607. package/src/util/breakable.ts +27 -6
  608. package/src/util/typeboxBrand.ts +2 -1
  609. package/src/util/utils.ts +2 -1
@@ -3,6 +3,29 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
30
  exports.SimpleTreeSchemaFormat = exports.SimpleSchemaDefinitionsFormat = exports.SimpleNodeSchemaUnionFormat = exports.SimpleObjectNodeSchemaFormat = exports.SimpleObjectFieldSchemasFormat = exports.SimpleLeafNodeSchemaFormat = exports.SimpleRecordNodeSchemaFormat = exports.SimpleMapNodeSchemaFormat = exports.SimpleArrayNodeSchemaFormat = exports.SimpleObjectFieldSchemaFormat = exports.SimpleFieldSchemaFormat = exports.SimpleAllowedTypesFormat = exports.SimpleAllowedTypeAttributesFormat = exports.SimpleSchemaFormatVersion = void 0;
8
31
  /*
@@ -12,7 +35,7 @@ exports.SimpleTreeSchemaFormat = exports.SimpleSchemaDefinitionsFormat = exports
12
35
  * This only includes all parts of the schema that impact compatibility according to SchemaCompatibilityTester.
13
36
  * It may not include some details which impact maintenance of application enforced invariants (like persisted metadata or logic in view schema).
14
37
  */
15
- const typebox_1 = require("@sinclair/typebox");
38
+ const Type = __importStar(require("@sinclair/typebox"));
16
39
  const noAdditionalProps = { additionalProperties: false };
17
40
  /**
18
41
  * The format version for the schema.
@@ -24,98 +47,98 @@ exports.SimpleSchemaFormatVersion = {
24
47
  * The allowed types and their attributes in the simple schema format.
25
48
  * @see {@link SimpleAllowedTypes}.
26
49
  */
27
- exports.SimpleAllowedTypeAttributesFormat = typebox_1.Type.Object({
28
- isStaged: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
50
+ exports.SimpleAllowedTypeAttributesFormat = Type.Object({
51
+ isStaged: Type.Optional(Type.Boolean()),
29
52
  }, noAdditionalProps);
30
53
  /**
31
54
  * A set of allowed types in the simple schema format.
32
55
  * The keys are the type identifiers, and the values are their attributes.
33
56
  */
34
- exports.SimpleAllowedTypesFormat = typebox_1.Type.Record(typebox_1.Type.String(), exports.SimpleAllowedTypeAttributesFormat);
57
+ exports.SimpleAllowedTypesFormat = Type.Record(Type.String(), exports.SimpleAllowedTypeAttributesFormat);
35
58
  /**
36
59
  * Persisted format for a field schema in the simple schema format.
37
60
  * @see {@link SimpleFieldSchema}.
38
61
  */
39
- exports.SimpleFieldSchemaFormat = typebox_1.Type.Object({
40
- kind: typebox_1.Type.Integer(),
62
+ exports.SimpleFieldSchemaFormat = Type.Object({
63
+ kind: Type.Integer(),
41
64
  simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
42
65
  }, noAdditionalProps);
43
66
  /**
44
67
  * Persisted format for an object field schema in the simple schema format.
45
68
  * @see {@link SimpleObjectFieldSchema}.
46
69
  */
47
- exports.SimpleObjectFieldSchemaFormat = typebox_1.Type.Object({
48
- kind: typebox_1.Type.Integer(),
70
+ exports.SimpleObjectFieldSchemaFormat = Type.Object({
71
+ kind: Type.Integer(),
49
72
  simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
50
- storedKey: typebox_1.Type.String(),
73
+ storedKey: Type.String(),
51
74
  }, noAdditionalProps);
52
75
  /**
53
76
  * Persisted format for an array node schema in the simple schema format.
54
77
  * @see {@link SimpleArrayNodeSchema}.
55
78
  */
56
- exports.SimpleArrayNodeSchemaFormat = typebox_1.Type.Object({
57
- kind: typebox_1.Type.Integer(),
79
+ exports.SimpleArrayNodeSchemaFormat = Type.Object({
80
+ kind: Type.Integer(),
58
81
  simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
59
82
  }, noAdditionalProps);
60
83
  /**
61
84
  * Persisted format for a map node schema in the simple schema format.
62
85
  * @see {@link SimpleMapNodeSchema}.
63
86
  */
64
- exports.SimpleMapNodeSchemaFormat = typebox_1.Type.Object({
65
- kind: typebox_1.Type.Integer(),
87
+ exports.SimpleMapNodeSchemaFormat = Type.Object({
88
+ kind: Type.Integer(),
66
89
  simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
67
90
  }, noAdditionalProps);
68
91
  /**
69
92
  * Persisted format for a record node schema in the simple schema format.
70
93
  * @see {@link SimpleRecordNodeSchema}.
71
94
  */
72
- exports.SimpleRecordNodeSchemaFormat = typebox_1.Type.Object({
73
- kind: typebox_1.Type.Integer(),
95
+ exports.SimpleRecordNodeSchemaFormat = Type.Object({
96
+ kind: Type.Integer(),
74
97
  simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
75
98
  }, noAdditionalProps);
76
99
  /**
77
100
  * Persisted format for a leaf node schema in the simple schema format.
78
101
  * @see {@link SimpleLeafNodeSchema}.
79
102
  */
80
- exports.SimpleLeafNodeSchemaFormat = typebox_1.Type.Object({
81
- kind: typebox_1.Type.Integer(),
82
- leafKind: typebox_1.Type.Integer(),
103
+ exports.SimpleLeafNodeSchemaFormat = Type.Object({
104
+ kind: Type.Integer(),
105
+ leafKind: Type.Integer(),
83
106
  }, noAdditionalProps);
84
107
  /**
85
108
  * Persisted format for the field schemas of an object node in the simple schema format.
86
109
  */
87
- exports.SimpleObjectFieldSchemasFormat = typebox_1.Type.Record(typebox_1.Type.String(), exports.SimpleObjectFieldSchemaFormat);
110
+ exports.SimpleObjectFieldSchemasFormat = Type.Record(Type.String(), exports.SimpleObjectFieldSchemaFormat);
88
111
  /**
89
112
  * Persisted format for an object node schema in the simple schema format.
90
113
  * @see {@link SimpleObjectNodeSchema}.
91
114
  */
92
- exports.SimpleObjectNodeSchemaFormat = typebox_1.Type.Object({
93
- kind: typebox_1.Type.Integer(),
115
+ exports.SimpleObjectNodeSchemaFormat = Type.Object({
116
+ kind: Type.Integer(),
94
117
  fields: exports.SimpleObjectFieldSchemasFormat,
95
- allowUnknownOptionalFields: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
118
+ allowUnknownOptionalFields: Type.Optional(Type.Boolean()),
96
119
  }, noAdditionalProps);
97
120
  /**
98
121
  * Discriminated union of all possible node schemas.
99
122
  *
100
123
  * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
101
124
  */
102
- exports.SimpleNodeSchemaUnionFormat = typebox_1.Type.Object({
103
- array: typebox_1.Type.Optional(exports.SimpleArrayNodeSchemaFormat),
104
- map: typebox_1.Type.Optional(exports.SimpleMapNodeSchemaFormat),
105
- record: typebox_1.Type.Optional(exports.SimpleRecordNodeSchemaFormat),
106
- leaf: typebox_1.Type.Optional(exports.SimpleLeafNodeSchemaFormat),
107
- object: typebox_1.Type.Optional(exports.SimpleObjectNodeSchemaFormat),
125
+ exports.SimpleNodeSchemaUnionFormat = Type.Object({
126
+ array: Type.Optional(exports.SimpleArrayNodeSchemaFormat),
127
+ map: Type.Optional(exports.SimpleMapNodeSchemaFormat),
128
+ record: Type.Optional(exports.SimpleRecordNodeSchemaFormat),
129
+ leaf: Type.Optional(exports.SimpleLeafNodeSchemaFormat),
130
+ object: Type.Optional(exports.SimpleObjectNodeSchemaFormat),
108
131
  });
109
132
  /**
110
133
  * Helper type for the schema definitions map in the persisted format.
111
134
  */
112
- exports.SimpleSchemaDefinitionsFormat = typebox_1.Type.Record(typebox_1.Type.String(), exports.SimpleNodeSchemaUnionFormat);
135
+ exports.SimpleSchemaDefinitionsFormat = Type.Record(Type.String(), exports.SimpleNodeSchemaUnionFormat);
113
136
  /**
114
137
  * Persisted format for the compatibility impacting subset of simple schema.
115
138
  * @see {@link SimpleTreeSchema}.
116
139
  */
117
- exports.SimpleTreeSchemaFormat = typebox_1.Type.Object({
118
- version: typebox_1.Type.Literal(exports.SimpleSchemaFormatVersion.v1),
140
+ exports.SimpleTreeSchemaFormat = Type.Object({
141
+ version: Type.Literal(exports.SimpleSchemaFormatVersion.v1),
119
142
  root: exports.SimpleFieldSchemaFormat,
120
143
  definitions: exports.SimpleSchemaDefinitionsFormat,
121
144
  }, noAdditionalProps);
@@ -1 +1 @@
1
- {"version":3,"file":"simpleSchemaFormatV1.js","sourceRoot":"","sources":["../../src/simple-tree/simpleSchemaFormatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;GAMG;AAEH,+CAA0E;AAE1E,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACxC,EAAE,EAAE,CAAC;CACI,CAAC;AAEX;;;GAGG;AACU,QAAA,iCAAiC,GAAG,cAAI,CAAC,MAAM,CAC3D;IACC,QAAQ,EAAE,cAAI,CAAC,QAAQ,CAAC,c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GAEG;AACU,QAAA,8BAA8B,GAAG,cAAI,CAAC,MAAM,CACxD,cAAI,CAAC,MAAM,EAAE,EACb,qCAA6B,CAC7B,CAAC;AAGF;;;GAGG;AACU,QAAA,4BAA4B,GAAG,cAAI,CAAC,MAAM,CACtD;IACC,IAAI,EAAE,cAAI,CAAC,OAAO,EAAE;IACpB,MAAM,EAAE,sCAA8B;IACtC,0BAA0B,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,EAAE,CAAC;CACzD,EACD,iBAAiB,CACjB,CAAC;AAGF;;;;GAIG;AACU,QAAA,2BAA2B,GAAG,cAAI,CAAC,MAAM,CAAC;IACtD,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,mCAA2B,CAAC;IACjD,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,iCAAyB,CAAC;IAC7C,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,oCAA4B,CAAC;IACnD,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,kCAA0B,CAAC;IAC/C,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,oCAA4B,CAAC;CACnD,CAAC,CAAC;AAGH;;GAEG;AACU,QAAA,6BAA6B,GAAG,cAAI,CAAC,MAAM,CACvD,cAAI,CAAC,MAAM,EAAE,EACb,mCAA2B,CAC3B,CAAC;AAGF;;;GAGG;AACU,QAAA,sBAAsB,GAAG,cAAI,CAAC,MAAM,CAChD;IACC,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC,iCAAyB,CAAC,EAAE,CAAC;IACnD,IAAI,EAAE,+BAAuB;IAC7B,WAAW,EAAE,qCAA6B;CAC1C,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * This file contains a format for serializing the compatibility impacting subset of simple schema.\n\n * This format can be used for both view and stored simple schema.\n * This only includes all parts of the schema that impact compatibility according to SchemaCompatibilityTester.\n * It may not include some details which impact maintenance of application enforced invariants (like persisted metadata or logic in view schema).\n */\n\nimport { Type, type ObjectOptions, type Static } from \"@sinclair/typebox\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n/**\n * The format version for the schema.\n */\nexport const SimpleSchemaFormatVersion = {\n\tv1: 1,\n} as const;\n\n/**\n * The allowed types and their attributes in the simple schema format.\n * @see {@link SimpleAllowedTypes}.\n */\nexport const SimpleAllowedTypeAttributesFormat = Type.Object(\n\t{\n\t\tisStaged: Type.Optional(Type.Boolean()),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type SimpleAllowedTypeAttributesFormat = Static<\n\ttypeof SimpleAllowedTypeAttributesFormat\n>;\n\n/**\n * A set of allowed types in the simple schema format.\n * The keys are the type identifiers, and the values are their attributes.\n */\nexport const SimpleAllowedTypesFormat = Type.Record(\n\tType.String(),\n\tSimpleAllowedTypeAttributesFormat,\n);\nexport type SimpleAllowedTypesFormat = Static<typeof SimpleAllowedTypesFormat>;\n\n/**\n * Persisted format for a field schema in the simple schema format.\n * @see {@link SimpleFieldSchema}.\n */\nexport const SimpleFieldSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleFieldSchemaFormat = Static<typeof SimpleFieldSchemaFormat>;\n\n/**\n * Persisted format for an object field schema in the simple schema format.\n * @see {@link SimpleObjectFieldSchema}.\n */\nexport const SimpleObjectFieldSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t\tstoredKey: Type.String(),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleObjectFieldSchemaFormat = Static<typeof SimpleObjectFieldSchemaFormat>;\n\n/**\n * Persisted format for an array node schema in the simple schema format.\n * @see {@link SimpleArrayNodeSchema}.\n */\nexport const SimpleArrayNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleArrayNodeSchemaFormat = Static<typeof SimpleArrayNodeSchemaFormat>;\n\n/**\n * Persisted format for a map node schema in the simple schema format.\n * @see {@link SimpleMapNodeSchema}.\n */\nexport const SimpleMapNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleMapNodeSchemaFormat = Static<typeof SimpleMapNodeSchemaFormat>;\n\n/**\n * Persisted format for a record node schema in the simple schema format.\n * @see {@link SimpleRecordNodeSchema}.\n */\nexport const SimpleRecordNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleRecordNodeSchemaFormat = Static<typeof SimpleRecordNodeSchemaFormat>;\n\n/**\n * Persisted format for a leaf node schema in the simple schema format.\n * @see {@link SimpleLeafNodeSchema}.\n */\nexport const SimpleLeafNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tleafKind: Type.Integer(),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleLeafNodeSchemaFormat = Static<typeof SimpleLeafNodeSchemaFormat>;\n\n/**\n * Persisted format for the field schemas of an object node in the simple schema format.\n */\nexport const SimpleObjectFieldSchemasFormat = Type.Record(\n\tType.String(),\n\tSimpleObjectFieldSchemaFormat,\n);\nexport type SimpleObjectFieldSchemasFormat = Static<typeof SimpleObjectFieldSchemasFormat>;\n\n/**\n * Persisted format for an object node schema in the simple schema format.\n * @see {@link SimpleObjectNodeSchema}.\n */\nexport const SimpleObjectNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tfields: SimpleObjectFieldSchemasFormat,\n\t\tallowUnknownOptionalFields: Type.Optional(Type.Boolean()),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleObjectNodeSchemaFormat = Static<typeof SimpleObjectNodeSchemaFormat>;\n\n/**\n * Discriminated union of all possible node schemas.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const SimpleNodeSchemaUnionFormat = Type.Object({\n\tarray: Type.Optional(SimpleArrayNodeSchemaFormat),\n\tmap: Type.Optional(SimpleMapNodeSchemaFormat),\n\trecord: Type.Optional(SimpleRecordNodeSchemaFormat),\n\tleaf: Type.Optional(SimpleLeafNodeSchemaFormat),\n\tobject: Type.Optional(SimpleObjectNodeSchemaFormat),\n});\nexport type SimpleNodeSchemaUnionFormat = Static<typeof SimpleNodeSchemaUnionFormat>;\n\n/**\n * Helper type for the schema definitions map in the persisted format.\n */\nexport const SimpleSchemaDefinitionsFormat = Type.Record(\n\tType.String(),\n\tSimpleNodeSchemaUnionFormat,\n);\nexport type SimpleSchemaDefinitionsFormat = Static<typeof SimpleSchemaDefinitionsFormat>;\n\n/**\n * Persisted format for the compatibility impacting subset of simple schema.\n * @see {@link SimpleTreeSchema}.\n */\nexport const SimpleTreeSchemaFormat = Type.Object(\n\t{\n\t\tversion: Type.Literal(SimpleSchemaFormatVersion.v1),\n\t\troot: SimpleFieldSchemaFormat,\n\t\tdefinitions: SimpleSchemaDefinitionsFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleTreeSchemaFormat = Static<typeof SimpleTreeSchemaFormat>;\n"]}
1
+ {"version":3,"file":"simpleSchemaFormatV1.js","sourceRoot":"","sources":["../../src/simple-tree/simpleSchemaFormatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;;;;;GAMG;AAEH,wDAA0C;AAG1C,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACxC,EAAE,EAAE,CA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under the MIT License.\n */\n\n/*\n * This file contains a format for serializing the compatibility impacting subset of simple schema.\n\n * This format can be used for both view and stored simple schema.\n * This only includes all parts of the schema that impact compatibility according to SchemaCompatibilityTester.\n * It may not include some details which impact maintenance of application enforced invariants (like persisted metadata or logic in view schema).\n */\n\nimport * as Type from \"@sinclair/typebox\";\nimport type { ObjectOptions, Static } from \"@sinclair/typebox\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n/**\n * The format version for the schema.\n */\nexport const SimpleSchemaFormatVersion = {\n\tv1: 1,\n} as const;\n\n/**\n * The allowed types and their attributes in the simple schema format.\n * @see {@link SimpleAllowedTypes}.\n */\nexport const SimpleAllowedTypeAttributesFormat = Type.Object(\n\t{\n\t\tisStaged: Type.Optional(Type.Boolean()),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type SimpleAllowedTypeAttributesFormat = Static<\n\ttypeof SimpleAllowedTypeAttributesFormat\n>;\n\n/**\n * A set of allowed types in the simple schema format.\n * The keys are the type identifiers, and the values are their attributes.\n */\nexport const SimpleAllowedTypesFormat = Type.Record(\n\tType.String(),\n\tSimpleAllowedTypeAttributesFormat,\n);\nexport type SimpleAllowedTypesFormat = Static<typeof SimpleAllowedTypesFormat>;\n\n/**\n * Persisted format for a field schema in the simple schema format.\n * @see {@link SimpleFieldSchema}.\n */\nexport const SimpleFieldSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleFieldSchemaFormat = Static<typeof SimpleFieldSchemaFormat>;\n\n/**\n * Persisted format for an object field schema in the simple schema format.\n * @see {@link SimpleObjectFieldSchema}.\n */\nexport const SimpleObjectFieldSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t\tstoredKey: Type.String(),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleObjectFieldSchemaFormat = Static<typeof SimpleObjectFieldSchemaFormat>;\n\n/**\n * Persisted format for an array node schema in the simple schema format.\n * @see {@link SimpleArrayNodeSchema}.\n */\nexport const SimpleArrayNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleArrayNodeSchemaFormat = Static<typeof SimpleArrayNodeSchemaFormat>;\n\n/**\n * Persisted format for a map node schema in the simple schema format.\n * @see {@link SimpleMapNodeSchema}.\n */\nexport const SimpleMapNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleMapNodeSchemaFormat = Static<typeof SimpleMapNodeSchemaFormat>;\n\n/**\n * Persisted format for a record node schema in the simple schema format.\n * @see {@link SimpleRecordNodeSchema}.\n */\nexport const SimpleRecordNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleRecordNodeSchemaFormat = Static<typeof SimpleRecordNodeSchemaFormat>;\n\n/**\n * Persisted format for a leaf node schema in the simple schema format.\n * @see {@link SimpleLeafNodeSchema}.\n */\nexport const SimpleLeafNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tleafKind: Type.Integer(),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleLeafNodeSchemaFormat = Static<typeof SimpleLeafNodeSchemaFormat>;\n\n/**\n * Persisted format for the field schemas of an object node in the simple schema format.\n */\nexport const SimpleObjectFieldSchemasFormat = Type.Record(\n\tType.String(),\n\tSimpleObjectFieldSchemaFormat,\n);\nexport type SimpleObjectFieldSchemasFormat = Static<typeof SimpleObjectFieldSchemasFormat>;\n\n/**\n * Persisted format for an object node schema in the simple schema format.\n * @see {@link SimpleObjectNodeSchema}.\n */\nexport const SimpleObjectNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tfields: SimpleObjectFieldSchemasFormat,\n\t\tallowUnknownOptionalFields: Type.Optional(Type.Boolean()),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleObjectNodeSchemaFormat = Static<typeof SimpleObjectNodeSchemaFormat>;\n\n/**\n * Discriminated union of all possible node schemas.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const SimpleNodeSchemaUnionFormat = Type.Object({\n\tarray: Type.Optional(SimpleArrayNodeSchemaFormat),\n\tmap: Type.Optional(SimpleMapNodeSchemaFormat),\n\trecord: Type.Optional(SimpleRecordNodeSchemaFormat),\n\tleaf: Type.Optional(SimpleLeafNodeSchemaFormat),\n\tobject: Type.Optional(SimpleObjectNodeSchemaFormat),\n});\nexport type SimpleNodeSchemaUnionFormat = Static<typeof SimpleNodeSchemaUnionFormat>;\n\n/**\n * Helper type for the schema definitions map in the persisted format.\n */\nexport const SimpleSchemaDefinitionsFormat = Type.Record(\n\tType.String(),\n\tSimpleNodeSchemaUnionFormat,\n);\nexport type SimpleSchemaDefinitionsFormat = Static<typeof SimpleSchemaDefinitionsFormat>;\n\n/**\n * Persisted format for the compatibility impacting subset of simple schema.\n * @see {@link SimpleTreeSchema}.\n */\nexport const SimpleTreeSchemaFormat = Type.Object(\n\t{\n\t\tversion: Type.Literal(SimpleSchemaFormatVersion.v1),\n\t\troot: SimpleFieldSchemaFormat,\n\t\tdefinitions: SimpleSchemaDefinitionsFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleTreeSchemaFormat = Static<typeof SimpleTreeSchemaFormat>;\n"]}
@@ -0,0 +1,48 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Returns the number of Unicode code points in `value`.
7
+ * @remarks
8
+ * Use this to translate a JavaScript string length (which is in UTF-16 code units) into
9
+ * the atom/code-point space used by {@link TextAsTree}.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * codePointCount(""); // 0
14
+ * codePointCount("abc"); // 3
15
+ * codePointCount("a😀b"); // 3 — emoji is one code point, but "a😀b".length === 4 (UTF-16 surrogate pair)
16
+ * ```
17
+ *
18
+ * @internal
19
+ */
20
+ export declare function codePointCount(value: string): number;
21
+ /**
22
+ * Returns the number of UTF-16 code units occupied by the first `count` Unicode code points in `value`,
23
+ * starting at UTF-16 index `start`.
24
+ * @remarks
25
+ * Use this to translate {@link TextAsTree}-space counts (code points) into JavaScript string indices (UTF-16).
26
+ * One code point outside the Basic Multilingual Plane (e.g. most emoji) occupies two UTF-16 code units.
27
+ *
28
+ * Validates that the requested `count` code points are fully consumable from `start`; silent truncation
29
+ * would misalign delta offsets applied to strings rather than surface the drift to the caller.
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * utf16LengthForCodePoints("abc", 0, 3); // 3 — three single-unit characters
34
+ * utf16LengthForCodePoints("a😀b", 0, 3); // 4 — a (1) + 😀 (2) + b (1)
35
+ * utf16LengthForCodePoints("a😀b", 1, 1); // 2 — just the emoji
36
+ * utf16LengthForCodePoints("abc", 0, 0); // 0 — no code points requested
37
+ * ```
38
+ *
39
+ * @param value - The string to measure.
40
+ * @param start - The UTF-16 index in `value` to start measuring from. Must be in `[0, value.length]`.
41
+ * @param count - The number of Unicode code points to measure. Must be non-negative, and there must
42
+ * be at least `count` code points available in `value` starting at `start`.
43
+ * @throws A {@link @fluidframework/telemetry-utils#UsageError} if `start` is out of range,
44
+ * `count` is negative, or fewer than `count` code points are available from `start`.
45
+ * @internal
46
+ */
47
+ export declare function utf16LengthForCodePoints(value: string, start: number, count: number): number;
48
+ //# sourceMappingURL=codePointUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codePointUtils.d.ts","sourceRoot":"","sources":["../../src/text/codePointUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOpD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAuB5F"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.utf16LengthForCodePoints = exports.codePointCount = void 0;
8
+ const internal_1 = require("@fluidframework/telemetry-utils/internal");
9
+ /**
10
+ * Returns the number of Unicode code points in `value`.
11
+ * @remarks
12
+ * Use this to translate a JavaScript string length (which is in UTF-16 code units) into
13
+ * the atom/code-point space used by {@link TextAsTree}.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * codePointCount(""); // 0
18
+ * codePointCount("abc"); // 3
19
+ * codePointCount("a😀b"); // 3 — emoji is one code point, but "a😀b".length === 4 (UTF-16 surrogate pair)
20
+ * ```
21
+ *
22
+ * @internal
23
+ */
24
+ function codePointCount(value) {
25
+ // Iterate instead of spreading to avoid allocating an intermediate array.
26
+ let count = 0;
27
+ for (const _ of value) {
28
+ count++;
29
+ }
30
+ return count;
31
+ }
32
+ exports.codePointCount = codePointCount;
33
+ /**
34
+ * Returns the number of UTF-16 code units occupied by the first `count` Unicode code points in `value`,
35
+ * starting at UTF-16 index `start`.
36
+ * @remarks
37
+ * Use this to translate {@link TextAsTree}-space counts (code points) into JavaScript string indices (UTF-16).
38
+ * One code point outside the Basic Multilingual Plane (e.g. most emoji) occupies two UTF-16 code units.
39
+ *
40
+ * Validates that the requested `count` code points are fully consumable from `start`; silent truncation
41
+ * would misalign delta offsets applied to strings rather than surface the drift to the caller.
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * utf16LengthForCodePoints("abc", 0, 3); // 3 — three single-unit characters
46
+ * utf16LengthForCodePoints("a😀b", 0, 3); // 4 — a (1) + 😀 (2) + b (1)
47
+ * utf16LengthForCodePoints("a😀b", 1, 1); // 2 — just the emoji
48
+ * utf16LengthForCodePoints("abc", 0, 0); // 0 — no code points requested
49
+ * ```
50
+ *
51
+ * @param value - The string to measure.
52
+ * @param start - The UTF-16 index in `value` to start measuring from. Must be in `[0, value.length]`.
53
+ * @param count - The number of Unicode code points to measure. Must be non-negative, and there must
54
+ * be at least `count` code points available in `value` starting at `start`.
55
+ * @throws A {@link @fluidframework/telemetry-utils#UsageError} if `start` is out of range,
56
+ * `count` is negative, or fewer than `count` code points are available from `start`.
57
+ * @internal
58
+ */
59
+ function utf16LengthForCodePoints(value, start, count) {
60
+ if (start < 0 || start > value.length) {
61
+ throw new internal_1.UsageError(`start (${start}) must be within [0, ${value.length}] (value.length).`);
62
+ }
63
+ if (count < 0) {
64
+ throw new internal_1.UsageError(`count (${count}) must be non-negative.`);
65
+ }
66
+ let utf16 = 0;
67
+ let counted = 0;
68
+ while (counted < count && start + utf16 < value.length) {
69
+ // Code points above 0xFFFF are encoded in UTF-16 as a surrogate pair (2 units);
70
+ // everything else takes a single UTF-16 unit.
71
+ utf16 += (value.codePointAt(start + utf16) ?? 0) > 0xffff ? 2 : 1;
72
+ counted++;
73
+ }
74
+ if (counted !== count) {
75
+ throw new internal_1.UsageError(`count (${count}) exceeds the ${counted} code point(s) available from start (${start}) in a value of length ${value.length}.`);
76
+ }
77
+ return utf16;
78
+ }
79
+ exports.utf16LengthForCodePoints = utf16LengthForCodePoints;
80
+ //# sourceMappingURL=codePointUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codePointUtils.js","sourceRoot":"","sources":["../../src/text/codePointUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAAsE;AAEtE;;;;;;;;;;;;;;GAcG;AACH,SAAgB,cA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All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * Returns the number of Unicode code points in `value`.\n * @remarks\n * Use this to translate a JavaScript string length (which is in UTF-16 code units) into\n * the atom/code-point space used by {@link TextAsTree}.\n *\n * @example\n * ```typescript\n * codePointCount(\"\"); // 0\n * codePointCount(\"abc\"); // 3\n * codePointCount(\"a😀b\"); // 3 — emoji is one code point, but \"a😀b\".length === 4 (UTF-16 surrogate pair)\n * ```\n *\n * @internal\n */\nexport function codePointCount(value: string): number {\n\t// Iterate instead of spreading to avoid allocating an intermediate array.\n\tlet count = 0;\n\tfor (const _ of value) {\n\t\tcount++;\n\t}\n\treturn count;\n}\n\n/**\n * Returns the number of UTF-16 code units occupied by the first `count` Unicode code points in `value`,\n * starting at UTF-16 index `start`.\n * @remarks\n * Use this to translate {@link TextAsTree}-space counts (code points) into JavaScript string indices (UTF-16).\n * One code point outside the Basic Multilingual Plane (e.g. most emoji) occupies two UTF-16 code units.\n *\n * Validates that the requested `count` code points are fully consumable from `start`; silent truncation\n * would misalign delta offsets applied to strings rather than surface the drift to the caller.\n *\n * @example\n * ```typescript\n * utf16LengthForCodePoints(\"abc\", 0, 3); // 3 — three single-unit characters\n * utf16LengthForCodePoints(\"a😀b\", 0, 3); // 4 — a (1) + 😀 (2) + b (1)\n * utf16LengthForCodePoints(\"a😀b\", 1, 1); // 2 — just the emoji\n * utf16LengthForCodePoints(\"abc\", 0, 0); // 0 — no code points requested\n * ```\n *\n * @param value - The string to measure.\n * @param start - The UTF-16 index in `value` to start measuring from. Must be in `[0, value.length]`.\n * @param count - The number of Unicode code points to measure. Must be non-negative, and there must\n * be at least `count` code points available in `value` starting at `start`.\n * @throws A {@link @fluidframework/telemetry-utils#UsageError} if `start` is out of range,\n * `count` is negative, or fewer than `count` code points are available from `start`.\n * @internal\n */\nexport function utf16LengthForCodePoints(value: string, start: number, count: number): number {\n\tif (start < 0 || start > value.length) {\n\t\tthrow new UsageError(\n\t\t\t`start (${start}) must be within [0, ${value.length}] (value.length).`,\n\t\t);\n\t}\n\tif (count < 0) {\n\t\tthrow new UsageError(`count (${count}) must be non-negative.`);\n\t}\n\tlet utf16 = 0;\n\tlet counted = 0;\n\twhile (counted < count && start + utf16 < value.length) {\n\t\t// Code points above 0xFFFF are encoded in UTF-16 as a surrogate pair (2 units);\n\t\t// everything else takes a single UTF-16 unit.\n\t\tutf16 += (value.codePointAt(start + utf16) ?? 0) > 0xffff ? 2 : 1;\n\t\tcounted++;\n\t}\n\tif (counted !== count) {\n\t\tthrow new UsageError(\n\t\t\t`count (${count}) exceeds the ${counted} code point(s) available from start (${start}) in a value of length ${value.length}.`,\n\t\t);\n\t}\n\treturn utf16;\n}\n"]}
@@ -4,4 +4,5 @@
4
4
  */
5
5
  export { TextAsTree } from "./textDomain.js";
6
6
  export { FormattedTextAsTree } from "./textDomainFormatted.js";
7
+ export { codePointCount, utf16LengthForCodePoints } from "./codePointUtils.js";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -4,9 +4,12 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.FormattedTextAsTree = exports.TextAsTree = void 0;
7
+ exports.utf16LengthForCodePoints = exports.codePointCount = exports.FormattedTextAsTree = exports.TextAsTree = void 0;
8
8
  var textDomain_js_1 = require("./textDomain.js");
9
9
  Object.defineProperty(exports, "TextAsTree", { enumerable: true, get: function () { return textDomain_js_1.TextAsTree; } });
10
10
  var textDomainFormatted_js_1 = require("./textDomainFormatted.js");
11
11
  Object.defineProperty(exports, "FormattedTextAsTree", { enumerable: true, get: function () { return textDomainFormatted_js_1.FormattedTextAsTree; } });
12
+ var codePointUtils_js_1 = require("./codePointUtils.js");
13
+ Object.defineProperty(exports, "codePointCount", { enumerable: true, get: function () { return codePointUtils_js_1.codePointCount; } });
14
+ Object.defineProperty(exports, "utf16LengthForCodePoints", { enumerable: true, get: function () { return codePointUtils_js_1.utf16LengthForCodePoints; } });
12
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { TextAsTree } from \"./textDomain.js\";\nexport { FormattedTextAsTree } from \"./textDomainFormatted.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAC5B,yDAA+E;AAAtE,mHAAA,cAAc,OAAA;AAAE,6HAAA,wBAAwB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { TextAsTree } from \"./textDomain.js\";\nexport { FormattedTextAsTree } from \"./textDomainFormatted.js\";\nexport { codePointCount, utf16LengthForCodePoints } from \"./codePointUtils.js\";\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { TreeNode, WithType } from "../simple-tree/index.js";
5
+ import type { ArrayNodeDeltaOp, ArrayNodeTreeChangedDeltaOp, TreeNode, WithType } from "../simple-tree/index.js";
6
6
  import type { NodeKind, TreeNodeSchema } from "../simple-tree/index.js";
7
7
  /**
8
8
  * Interpret a string as an iterable of characters.
@@ -12,6 +12,21 @@ import type { NodeKind, TreeNodeSchema } from "../simple-tree/index.js";
12
12
  * Additionally using this function consistently will make any refactors to support alternative character boundaries easier.
13
13
  */
14
14
  export declare function charactersFromString(value: string): Iterable<string>;
15
+ /**
16
+ * Processes an array-node delta into a {@link TextAsTree.TextOp}[] and calls `callback`.
17
+ * @remarks
18
+ * Shared by both the plain `onCharactersChanged` (from `nodeChanged`) and formatted `onContentChanged`
19
+ * (from `treeChanged`) implementations.
20
+ * @param delta - The raw array-node delta, or `undefined` when no delta is available.
21
+ * When retain ops carry `subtreeChanged` (i.e. delta comes from a `treeChanged` event), the emitted
22
+ * retain ops include an explicit `formattingChanged: boolean`. Otherwise `formattingChanged` is omitted.
23
+ * @param getCharacter - Returns the character string at the given array index in the **post-edit** tree.
24
+ * Only invoked for insert ops, where it must read the inserted character at the given index of the tree
25
+ * after the edit has been applied. Passing an accessor that reads pre-edit content will silently produce wrong text.
26
+ * Return `undefined` if the tree is out of sync with the delta; this triggers a full-reread fallback.
27
+ * @param callback - The user-supplied callback to invoke with the translated ops.
28
+ */
29
+ export declare function processCharactersChangedDelta(delta: readonly (ArrayNodeDeltaOp | ArrayNodeTreeChangedDeltaOp)[] | undefined, getCharacter: (index: number) => string | undefined, callback: (ops: readonly TextAsTree.TextOp[] | undefined) => void): void;
15
30
  /**
16
31
  * A collection of text related types, schema and utilities for working with text beyond the basic {@link SchemaStatics.string}.
17
32
  * @privateRemarks
@@ -75,6 +90,67 @@ export declare function charactersFromString(value: string): Iterable<string>;
75
90
  * @alpha
76
91
  */
77
92
  export declare namespace TextAsTree {
93
+ /**
94
+ * A retain op in a character-level delta — a span of unchanged characters that the consumer should skip over.
95
+ * @sealed
96
+ * @alpha
97
+ */
98
+ interface TextRetainOp {
99
+ /**
100
+ * Discriminator identifying this op as a retain.
101
+ */
102
+ readonly type: "retain";
103
+ /**
104
+ * The number of Unicode code points to retain.
105
+ */
106
+ readonly count: number;
107
+ /**
108
+ * Whether at least one character in the retained range had a deep change.
109
+ * @remarks
110
+ * Present only on retain ops delivered by {@link @fluidframework/tree#FormattedTextAsTree.Members.onContentChanged};
111
+ * always absent on retain ops delivered by {@link TextAsTree.Members.onCharactersChanged}.
112
+ * When present, `true` indicates the retained range contained a formatting property update
113
+ * or an atom content edit; `false` indicates no deep change.
114
+ */
115
+ readonly formattingChanged?: boolean;
116
+ }
117
+ /**
118
+ * An insert op in a character-level delta — characters newly added to the text.
119
+ * @remarks
120
+ * Carries the inserted text as a single string, which is more convenient for consumers than individual characters.
121
+ * @sealed
122
+ * @alpha
123
+ */
124
+ interface TextInsertOp {
125
+ /**
126
+ * Discriminator identifying this op as an insert.
127
+ */
128
+ readonly type: "insert";
129
+ /**
130
+ * The newly inserted characters, concatenated into a single string.
131
+ */
132
+ readonly text: string;
133
+ }
134
+ /**
135
+ * A remove op in a character-level delta — a span of characters that has been deleted from the text.
136
+ * @sealed
137
+ * @alpha
138
+ */
139
+ interface TextRemoveOp {
140
+ /**
141
+ * Discriminator identifying this op as a remove.
142
+ */
143
+ readonly type: "remove";
144
+ /**
145
+ * The number of Unicode code points removed.
146
+ */
147
+ readonly count: number;
148
+ }
149
+ /**
150
+ * A single operation in a character-level delta describing an insert, remove, or retain of text.
151
+ * @alpha
152
+ */
153
+ type TextOp = TextRetainOp | TextInsertOp | TextRemoveOp;
78
154
  /**
79
155
  * Statics for text nodes.
80
156
  * @alpha
@@ -101,6 +177,7 @@ export declare namespace TextAsTree {
101
177
  *
102
178
  * @see {@link TextAsTree.Statics.fromString} for construction.
103
179
  * @see {@link TextAsTree.(Tree:type)} for schema.
180
+ * @sealed
104
181
  * @alpha
105
182
  */
106
183
  interface Members {
@@ -145,6 +222,21 @@ export declare namespace TextAsTree {
145
222
  * See {@link (TreeArrayNode:interface).removeRange} for more details on the behavior.
146
223
  */
147
224
  removeRange(startIndex: number | undefined, endIndex: number | undefined): void;
225
+ /**
226
+ * Subscribe to shallow character-level changes on this text node — inserts and removes only.
227
+ * @param callback - Called after each change with a sequence of {@link TextAsTree.TextOp}s describing what changed,
228
+ * or `undefined` when a delta could not be computed (e.g. during a schema upgrade).
229
+ * @returns A cleanup function that unsubscribes the callback when called.
230
+ * @remarks
231
+ * Only fires on shallow changes — inserts and removes.
232
+ * It does not fire on deep changes such as formatting property updates on existing characters.
233
+ * For formatted text, use {@link @fluidframework/tree#FormattedTextAsTree.Members.onContentChanged} to also receive deep changes.
234
+ *
235
+ * All counts in the delivered ops are in Unicode code points, not UTF-16 code units.
236
+ * For characters outside the Basic Multilingual Plane (e.g. emoji), one code point
237
+ * corresponds to two UTF-16 code units — convert before using the counts as string indices.
238
+ */
239
+ onCharactersChanged(callback: (ops: readonly TextOp[] | undefined) => void): () => void;
148
240
  }
149
241
  /**
150
242
  * Schema for a {@link TextAsTree.(Tree:variable)} node.
@@ -1 +1 @@
1
- {"version":3,"file":"textDomain.d.ts","sourceRoot":"","sources":["../../src/text/textDomain.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIlE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AA8HxE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAKpE;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G;QACH,cAAc,IAAI,MAAM,CAAC;QAEzB;;WAEG;QACH,UAAU,IAAI,MAAM,CAAC;QAErB;;;;;;;;;;;;WAYG;QACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5D;;;WAGG;QACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;QAEhF;;;;;;;;;;;;;WAaG;QACH,mBAAmB,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;KACxF;IAED;;;;;OAKG;IACI,MAAM,IAAI,oKAAmD,CAAC;IAErE;;;;;OAKG;IACH,KAAY,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,8BAA8B,CAAC,CAAC;CACjF"}
@@ -4,15 +4,16 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.TextAsTree = exports.charactersFromString = void 0;
7
+ exports.TextAsTree = exports.processCharactersChangedDelta = exports.charactersFromString = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const alpha_1 = require("@fluidframework/type-factory/alpha");
10
10
  const internal_2 = require("@fluidframework/type-factory/internal");
11
11
  const index_js_1 = require("../core/index.js");
12
- const index_js_2 = require("../simple-tree/index.js");
13
- const sf = new index_js_2.SchemaFactoryAlpha("com.fluidframework.text");
12
+ const index_js_2 = require("../shared-tree/index.js");
13
+ const index_js_3 = require("../simple-tree/index.js");
14
+ const sf = new index_js_3.SchemaFactoryAlpha("com.fluidframework.text");
14
15
  class TextNode extends sf.object("Text", {
15
- content: index_js_2.SchemaFactory.required([() => StringArray], { key: index_js_1.EmptyKey }),
16
+ content: index_js_3.SchemaFactory.required([() => StringArray], { key: index_js_1.EmptyKey }),
16
17
  }) {
17
18
  static [alpha_1.exposeMethodsSymbol](methods) {
18
19
  methods.exposeMethod(TextNode, "insertAt", (0, alpha_1.buildFunc)({
@@ -40,7 +41,7 @@ class TextNode extends sf.object("Text", {
40
41
  TextNode[alpha_1.exposeMethodsSymbol](methods);
41
42
  }
42
43
  insertAt(index, additionalCharacters) {
43
- this.content.insertAt(index, index_js_2.TreeArrayNode.spread(charactersFromString(additionalCharacters)));
44
+ this.content.insertAt(index, index_js_3.TreeArrayNode.spread(charactersFromString(additionalCharacters)));
44
45
  }
45
46
  removeRange(index, end) {
46
47
  this.content.removeRange(index, end);
@@ -74,6 +75,9 @@ class TextNode extends sf.object("Text", {
74
75
  charactersCopy_reference() {
75
76
  return [...this.content];
76
77
  }
78
+ onCharactersChanged(callback) {
79
+ return index_js_2.TreeAlpha.on(this.content, "nodeChanged", ({ delta }) => processCharactersChangedDelta(delta, (i) => this.content[i], callback));
80
+ }
77
81
  static fromString(value) {
78
82
  // Constructing an ArrayNode from an iterator is supported, so creating an array from the iterable of characters seems like its not necessary here,
79
83
  // but to reduce the risk of incorrect data interpretation, we actually ban this in the special case where the iterable is a string directly, which is the case here.
@@ -95,9 +99,9 @@ function charactersFromString(value) {
95
99
  return value;
96
100
  }
97
101
  exports.charactersFromString = charactersFromString;
98
- class StringArray extends sf.array("StringArray", index_js_2.SchemaFactory.string) {
102
+ class StringArray extends sf.array("StringArray", index_js_3.SchemaFactory.string) {
99
103
  withBorrowedSequenceCursor(f) {
100
- const cursor = (0, index_js_2.getInnerNode)(this).borrowCursor();
104
+ const cursor = (0, index_js_3.getInnerNode)(this).borrowCursor();
101
105
  cursor.enterField(index_js_1.EmptyKey);
102
106
  const result = f(cursor);
103
107
  cursor.exitField();
@@ -110,6 +114,59 @@ class StringArray extends sf.array("StringArray", index_js_2.SchemaFactory.strin
110
114
  return this.charactersCopy().join("");
111
115
  }
112
116
  }
117
+ /**
118
+ * Processes an array-node delta into a {@link TextAsTree.TextOp}[] and calls `callback`.
119
+ * @remarks
120
+ * Shared by both the plain `onCharactersChanged` (from `nodeChanged`) and formatted `onContentChanged`
121
+ * (from `treeChanged`) implementations.
122
+ * @param delta - The raw array-node delta, or `undefined` when no delta is available.
123
+ * When retain ops carry `subtreeChanged` (i.e. delta comes from a `treeChanged` event), the emitted
124
+ * retain ops include an explicit `formattingChanged: boolean`. Otherwise `formattingChanged` is omitted.
125
+ * @param getCharacter - Returns the character string at the given array index in the **post-edit** tree.
126
+ * Only invoked for insert ops, where it must read the inserted character at the given index of the tree
127
+ * after the edit has been applied. Passing an accessor that reads pre-edit content will silently produce wrong text.
128
+ * Return `undefined` if the tree is out of sync with the delta; this triggers a full-reread fallback.
129
+ * @param callback - The user-supplied callback to invoke with the translated ops.
130
+ */
131
+ function processCharactersChangedDelta(delta, getCharacter, callback) {
132
+ if (delta === undefined) {
133
+ callback(undefined);
134
+ return;
135
+ }
136
+ let readPosition = 0;
137
+ const ops = [];
138
+ for (const op of delta) {
139
+ if (op.type === "retain") {
140
+ // `subtreeChanged` is only present on retain ops from `treeChanged` deltas.
141
+ ops.push("subtreeChanged" in op
142
+ ? { type: "retain", count: op.count, formattingChanged: op.subtreeChanged === true }
143
+ : { type: "retain", count: op.count });
144
+ readPosition += op.count;
145
+ }
146
+ else if (op.type === "insert") {
147
+ // Accumulate into an array and join at the end to keep this O(n) for large inserts
148
+ // (paste of long text) instead of O(n^2) from repeated string concatenation.
149
+ const characters = [];
150
+ for (let i = 0; i < op.count; i++) {
151
+ const character = getCharacter(readPosition);
152
+ if (character === undefined) {
153
+ // Tree is out of sync with the delta — fall back to full re-read.
154
+ callback(undefined);
155
+ return;
156
+ }
157
+ characters.push(character);
158
+ readPosition++;
159
+ }
160
+ ops.push({ type: "insert", text: characters.join("") });
161
+ }
162
+ else {
163
+ // Construct explicit remove op so internal fields on the source op don't leak.
164
+ ops.push({ type: "remove", count: op.count });
165
+ }
166
+ }
167
+ callback(ops);
168
+ }
169
+ exports.processCharactersChangedDelta = processCharactersChangedDelta;
113
170
  /**
114
171
  * A collection of text related types, schema and utilities for working with text beyond the basic {@link SchemaStatics.string}.
115
172
  * @privateRemarks
@@ -180,6 +237,6 @@ var TextAsTree;
180
237
  * See {@link TextAsTree.Statics} for static APIs on this schema, including construction.
181
238
  * @alpha
182
239
  */
183
- TextAsTree.Tree = (0, index_js_2.eraseSchemaDetails)()(TextNode);
240
+ TextAsTree.Tree = (0, index_js_3.eraseSchemaDetails)()(TextNode);
184
241
  })(TextAsTree || (exports.TextAsTree = TextAsTree = {}));
185
242
  //# sourceMappingURL=textDomain.js.map