@itwin/core-backend 5.2.0-dev.8 → 5.2.1

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 (506) hide show
  1. package/CHANGELOG.md +59 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +2 -0
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BackendLoggerCategory.d.ts +6 -0
  6. package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -1
  7. package/lib/cjs/BackendLoggerCategory.js +6 -0
  8. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  9. package/lib/cjs/BisCoreSchema.js.map +1 -1
  10. package/lib/cjs/BlobContainerService.js.map +1 -1
  11. package/lib/cjs/BriefcaseManager.d.ts +57 -3
  12. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  13. package/lib/cjs/BriefcaseManager.js +151 -42
  14. package/lib/cjs/BriefcaseManager.js.map +1 -1
  15. package/lib/cjs/CatalogDb.js.map +1 -1
  16. package/lib/cjs/Category.js.map +1 -1
  17. package/lib/cjs/ChangeSummaryManager.js +2 -2
  18. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  19. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  20. package/lib/cjs/ChangesetECAdaptor.js +248 -248
  21. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  22. package/lib/cjs/ChannelControl.js.map +1 -1
  23. package/lib/cjs/CheckpointManager.js.map +1 -1
  24. package/lib/cjs/ClassRegistry.js +5 -5
  25. package/lib/cjs/ClassRegistry.js.map +1 -1
  26. package/lib/cjs/CloudSqlite.d.ts +4 -0
  27. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  28. package/lib/cjs/CloudSqlite.js.map +1 -1
  29. package/lib/cjs/CodeService.js.map +1 -1
  30. package/lib/cjs/CodeSpecs.js.map +1 -1
  31. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  32. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  33. package/lib/cjs/DevTools.js.map +1 -1
  34. package/lib/cjs/DisplayStyle.js.map +1 -1
  35. package/lib/cjs/ECDb.d.ts +8 -0
  36. package/lib/cjs/ECDb.d.ts.map +1 -1
  37. package/lib/cjs/ECDb.js +22 -0
  38. package/lib/cjs/ECDb.js.map +1 -1
  39. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  40. package/lib/cjs/ECSqlStatement.js.map +1 -1
  41. package/lib/cjs/Element.js.map +1 -1
  42. package/lib/cjs/ElementAspect.js.map +1 -1
  43. package/lib/cjs/ElementGraphics.js.map +1 -1
  44. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  45. package/lib/cjs/Entity.js.map +1 -1
  46. package/lib/cjs/EntityReferences.js.map +1 -1
  47. package/lib/cjs/ExportGraphics.js.map +1 -1
  48. package/lib/cjs/ExternalSource.js.map +1 -1
  49. package/lib/cjs/FontFile.js.map +1 -1
  50. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  51. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  52. package/lib/cjs/GeometrySummary.js +47 -47
  53. package/lib/cjs/GeometrySummary.js.map +1 -1
  54. package/lib/cjs/IModelDb.d.ts +54 -3
  55. package/lib/cjs/IModelDb.d.ts.map +1 -1
  56. package/lib/cjs/IModelDb.js +96 -18
  57. package/lib/cjs/IModelDb.js.map +1 -1
  58. package/lib/cjs/IModelDbFonts.js.map +1 -1
  59. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  60. package/lib/cjs/IModelHost.d.ts +11 -1
  61. package/lib/cjs/IModelHost.d.ts.map +1 -1
  62. package/lib/cjs/IModelHost.js +5 -0
  63. package/lib/cjs/IModelHost.js.map +1 -1
  64. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +1 -5
  65. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -1
  66. package/lib/cjs/IModelIncrementalSchemaLocater.js +0 -6
  67. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  68. package/lib/cjs/IModelJsFs.js.map +1 -1
  69. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  70. package/lib/cjs/IpcHost.js.map +1 -1
  71. package/lib/cjs/LineStyle.js.map +1 -1
  72. package/lib/cjs/LocalHub.js +1 -1
  73. package/lib/cjs/LocalHub.js.map +1 -1
  74. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  75. package/lib/cjs/LockControl.js.map +1 -1
  76. package/lib/cjs/Material.js.map +1 -1
  77. package/lib/cjs/Model.js.map +1 -1
  78. package/lib/cjs/NativeAppStorage.js.map +1 -1
  79. package/lib/cjs/NativeHost.js.map +1 -1
  80. package/lib/cjs/NavigationRelationship.js.map +1 -1
  81. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  82. package/lib/cjs/PropertyStore.js.map +1 -1
  83. package/lib/cjs/Relationship.js.map +1 -1
  84. package/lib/cjs/RpcBackend.js.map +1 -1
  85. package/lib/cjs/SQLiteDb.js.map +1 -1
  86. package/lib/cjs/Schema.js.map +1 -1
  87. package/lib/cjs/SchemaSync.js.map +1 -1
  88. package/lib/cjs/SchemaUtils.js.map +1 -1
  89. package/lib/cjs/SheetIndex.js.map +1 -1
  90. package/lib/cjs/SqliteChangesetReader.d.ts +8 -0
  91. package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
  92. package/lib/cjs/SqliteChangesetReader.js +11 -0
  93. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  94. package/lib/cjs/SqliteStatement.js.map +1 -1
  95. package/lib/cjs/StashManager.d.ts +175 -0
  96. package/lib/cjs/StashManager.d.ts.map +1 -0
  97. package/lib/cjs/StashManager.js +306 -0
  98. package/lib/cjs/StashManager.js.map +1 -0
  99. package/lib/cjs/Texture.js.map +1 -1
  100. package/lib/cjs/TileStorage.js.map +1 -1
  101. package/lib/cjs/TxnManager.d.ts +226 -15
  102. package/lib/cjs/TxnManager.d.ts.map +1 -1
  103. package/lib/cjs/TxnManager.js +249 -23
  104. package/lib/cjs/TxnManager.js.map +1 -1
  105. package/lib/cjs/ViewDefinition.js.map +1 -1
  106. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  107. package/lib/cjs/ViewStore.js.map +1 -1
  108. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +17 -2
  109. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  110. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +40 -6
  111. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  112. package/lib/cjs/annotations/FrameGeometry.js +6 -6
  113. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  114. package/lib/cjs/annotations/LeaderGeometry.d.ts +3 -2
  115. package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -1
  116. package/lib/cjs/annotations/LeaderGeometry.js +8 -7
  117. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  118. package/lib/cjs/annotations/TextAnnotationElement.d.ts +164 -36
  119. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
  120. package/lib/cjs/annotations/TextAnnotationElement.js +315 -105
  121. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  122. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +2 -0
  123. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -1
  124. package/lib/cjs/annotations/TextAnnotationGeometry.js +26 -19
  125. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  126. package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -1
  127. package/lib/cjs/annotations/TextBlockGeometry.js +11 -3
  128. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  129. package/lib/cjs/annotations/TextBlockLayout.d.ts +51 -38
  130. package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -1
  131. package/lib/cjs/annotations/TextBlockLayout.js +252 -156
  132. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  133. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  134. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  135. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  136. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  137. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  138. package/lib/cjs/core-backend.js.map +1 -1
  139. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  140. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  141. package/lib/cjs/domains/GenericElements.js.map +1 -1
  142. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  143. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  144. package/lib/cjs/internal/ChannelAdmin.js +1 -1
  145. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  146. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  147. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  148. package/lib/cjs/internal/HubMock.js.map +1 -1
  149. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  150. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  151. package/lib/cjs/internal/NoLocks.js.map +1 -1
  152. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  153. package/lib/cjs/internal/Symbols.d.ts +1 -0
  154. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  155. package/lib/cjs/internal/Symbols.js +2 -1
  156. package/lib/cjs/internal/Symbols.js.map +1 -1
  157. package/lib/cjs/internal/annotations/fields.d.ts +2 -12
  158. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
  159. package/lib/cjs/internal/annotations/fields.js +50 -45
  160. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  161. package/lib/cjs/internal/cross-package.js.map +1 -1
  162. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  163. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  164. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  165. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  166. package/lib/cjs/rpc/multipart.js.map +1 -1
  167. package/lib/cjs/rpc/tracing.js.map +1 -1
  168. package/lib/cjs/rpc/web/logging.js.map +1 -1
  169. package/lib/cjs/rpc/web/request.js.map +1 -1
  170. package/lib/cjs/rpc/web/response.js.map +1 -1
  171. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  172. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  173. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  174. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  175. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  176. package/lib/cjs/workspace/Settings.js.map +1 -1
  177. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  178. package/lib/cjs/workspace/Workspace.d.ts +1 -1
  179. package/lib/cjs/workspace/Workspace.js.map +1 -1
  180. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  181. package/lib/esm/BackendHubAccess.d.ts +2 -0
  182. package/lib/esm/BackendHubAccess.d.ts.map +1 -1
  183. package/lib/esm/BackendHubAccess.js.map +1 -1
  184. package/lib/esm/BackendLoggerCategory.d.ts +6 -0
  185. package/lib/esm/BackendLoggerCategory.d.ts.map +1 -1
  186. package/lib/esm/BackendLoggerCategory.js +6 -0
  187. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  188. package/lib/esm/BisCoreSchema.js.map +1 -1
  189. package/lib/esm/BlobContainerService.js.map +1 -1
  190. package/lib/esm/BriefcaseManager.d.ts +57 -3
  191. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  192. package/lib/esm/BriefcaseManager.js +152 -43
  193. package/lib/esm/BriefcaseManager.js.map +1 -1
  194. package/lib/esm/CatalogDb.js.map +1 -1
  195. package/lib/esm/Category.js.map +1 -1
  196. package/lib/esm/ChangeSummaryManager.js +2 -2
  197. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  198. package/lib/esm/ChangedElementsDb.js.map +1 -1
  199. package/lib/esm/ChangesetECAdaptor.js +248 -248
  200. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  201. package/lib/esm/ChannelControl.js.map +1 -1
  202. package/lib/esm/CheckpointManager.js.map +1 -1
  203. package/lib/esm/ClassRegistry.js +5 -5
  204. package/lib/esm/ClassRegistry.js.map +1 -1
  205. package/lib/esm/CloudSqlite.d.ts +4 -0
  206. package/lib/esm/CloudSqlite.d.ts.map +1 -1
  207. package/lib/esm/CloudSqlite.js.map +1 -1
  208. package/lib/esm/CodeService.js.map +1 -1
  209. package/lib/esm/CodeSpecs.js.map +1 -1
  210. package/lib/esm/ConcurrentQuery.js.map +1 -1
  211. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  212. package/lib/esm/DevTools.js.map +1 -1
  213. package/lib/esm/DisplayStyle.js.map +1 -1
  214. package/lib/esm/ECDb.d.ts +8 -0
  215. package/lib/esm/ECDb.d.ts.map +1 -1
  216. package/lib/esm/ECDb.js +22 -0
  217. package/lib/esm/ECDb.js.map +1 -1
  218. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  219. package/lib/esm/ECSqlStatement.js.map +1 -1
  220. package/lib/esm/Element.js.map +1 -1
  221. package/lib/esm/ElementAspect.js.map +1 -1
  222. package/lib/esm/ElementGraphics.js.map +1 -1
  223. package/lib/esm/ElementTreeWalker.js.map +1 -1
  224. package/lib/esm/Entity.js.map +1 -1
  225. package/lib/esm/EntityReferences.js.map +1 -1
  226. package/lib/esm/ExportGraphics.js.map +1 -1
  227. package/lib/esm/ExternalSource.js.map +1 -1
  228. package/lib/esm/FontFile.js.map +1 -1
  229. package/lib/esm/GeoCoordConfig.js.map +1 -1
  230. package/lib/esm/GeographicCRSServices.js.map +1 -1
  231. package/lib/esm/GeometrySummary.js +47 -47
  232. package/lib/esm/GeometrySummary.js.map +1 -1
  233. package/lib/esm/IModelDb.d.ts +54 -3
  234. package/lib/esm/IModelDb.d.ts.map +1 -1
  235. package/lib/esm/IModelDb.js +97 -19
  236. package/lib/esm/IModelDb.js.map +1 -1
  237. package/lib/esm/IModelDbFonts.js.map +1 -1
  238. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  239. package/lib/esm/IModelHost.d.ts +11 -1
  240. package/lib/esm/IModelHost.d.ts.map +1 -1
  241. package/lib/esm/IModelHost.js +5 -0
  242. package/lib/esm/IModelHost.js.map +1 -1
  243. package/lib/esm/IModelIncrementalSchemaLocater.d.ts +1 -5
  244. package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -1
  245. package/lib/esm/IModelIncrementalSchemaLocater.js +0 -6
  246. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  247. package/lib/esm/IModelJsFs.js.map +1 -1
  248. package/lib/esm/ImageSourceConversion.js.map +1 -1
  249. package/lib/esm/IpcHost.js.map +1 -1
  250. package/lib/esm/LineStyle.js.map +1 -1
  251. package/lib/esm/LocalHub.js +1 -1
  252. package/lib/esm/LocalHub.js.map +1 -1
  253. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  254. package/lib/esm/LockControl.js.map +1 -1
  255. package/lib/esm/Material.js.map +1 -1
  256. package/lib/esm/Model.js.map +1 -1
  257. package/lib/esm/NativeAppStorage.js.map +1 -1
  258. package/lib/esm/NativeHost.js.map +1 -1
  259. package/lib/esm/NavigationRelationship.js.map +1 -1
  260. package/lib/esm/PromiseMemoizer.js.map +1 -1
  261. package/lib/esm/PropertyStore.js.map +1 -1
  262. package/lib/esm/Relationship.js.map +1 -1
  263. package/lib/esm/RpcBackend.js.map +1 -1
  264. package/lib/esm/SQLiteDb.js.map +1 -1
  265. package/lib/esm/Schema.js.map +1 -1
  266. package/lib/esm/SchemaSync.js.map +1 -1
  267. package/lib/esm/SchemaUtils.js.map +1 -1
  268. package/lib/esm/SheetIndex.js.map +1 -1
  269. package/lib/esm/SqliteChangesetReader.d.ts +8 -0
  270. package/lib/esm/SqliteChangesetReader.d.ts.map +1 -1
  271. package/lib/esm/SqliteChangesetReader.js +11 -0
  272. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  273. package/lib/esm/SqliteStatement.js.map +1 -1
  274. package/lib/esm/StashManager.d.ts +175 -0
  275. package/lib/esm/StashManager.d.ts.map +1 -0
  276. package/lib/esm/StashManager.js +301 -0
  277. package/lib/esm/StashManager.js.map +1 -0
  278. package/lib/esm/Texture.js.map +1 -1
  279. package/lib/esm/TileStorage.js.map +1 -1
  280. package/lib/esm/TxnManager.d.ts +226 -15
  281. package/lib/esm/TxnManager.d.ts.map +1 -1
  282. package/lib/esm/TxnManager.js +247 -21
  283. package/lib/esm/TxnManager.js.map +1 -1
  284. package/lib/esm/ViewDefinition.js.map +1 -1
  285. package/lib/esm/ViewStateHydrator.js.map +1 -1
  286. package/lib/esm/ViewStore.js.map +1 -1
  287. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +17 -2
  288. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  289. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +38 -5
  290. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  291. package/lib/esm/annotations/FrameGeometry.js +6 -6
  292. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  293. package/lib/esm/annotations/LeaderGeometry.d.ts +3 -2
  294. package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -1
  295. package/lib/esm/annotations/LeaderGeometry.js +8 -7
  296. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  297. package/lib/esm/annotations/TextAnnotationElement.d.ts +164 -36
  298. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
  299. package/lib/esm/annotations/TextAnnotationElement.js +317 -108
  300. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  301. package/lib/esm/annotations/TextAnnotationGeometry.d.ts +2 -0
  302. package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -1
  303. package/lib/esm/annotations/TextAnnotationGeometry.js +26 -19
  304. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  305. package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -1
  306. package/lib/esm/annotations/TextBlockGeometry.js +11 -3
  307. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  308. package/lib/esm/annotations/TextBlockLayout.d.ts +51 -38
  309. package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -1
  310. package/lib/esm/annotations/TextBlockLayout.js +253 -157
  311. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  312. package/lib/esm/core-backend.js.map +1 -1
  313. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  314. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  315. package/lib/esm/domains/GenericElements.js.map +1 -1
  316. package/lib/esm/domains/GenericSchema.js.map +1 -1
  317. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  318. package/lib/esm/internal/ChannelAdmin.js +1 -1
  319. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  320. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  321. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  322. package/lib/esm/internal/HubMock.js.map +1 -1
  323. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  324. package/lib/esm/internal/NativePlatform.js.map +1 -1
  325. package/lib/esm/internal/NoLocks.js.map +1 -1
  326. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  327. package/lib/esm/internal/Symbols.d.ts +1 -0
  328. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  329. package/lib/esm/internal/Symbols.js +1 -0
  330. package/lib/esm/internal/Symbols.js.map +1 -1
  331. package/lib/esm/internal/annotations/fields.d.ts +2 -12
  332. package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
  333. package/lib/esm/internal/annotations/fields.js +52 -47
  334. package/lib/esm/internal/annotations/fields.js.map +1 -1
  335. package/lib/esm/internal/cross-package.js.map +1 -1
  336. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  337. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  338. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  339. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  340. package/lib/esm/rpc/multipart.js.map +1 -1
  341. package/lib/esm/rpc/tracing.js.map +1 -1
  342. package/lib/esm/rpc/web/logging.js.map +1 -1
  343. package/lib/esm/rpc/web/request.js.map +1 -1
  344. package/lib/esm/rpc/web/response.js.map +1 -1
  345. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  346. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  347. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  348. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  349. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  350. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  351. package/lib/esm/test/AnnotationTestUtils.d.ts +5 -1
  352. package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -1
  353. package/lib/esm/test/AnnotationTestUtils.js +7 -2
  354. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  355. package/lib/esm/test/AttachDb.test.js +11 -11
  356. package/lib/esm/test/AttachDb.test.js.map +1 -1
  357. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  358. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  359. package/lib/esm/test/IModelHost.test.js.map +1 -1
  360. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  361. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  362. package/lib/esm/test/IpcHost.test.js.map +1 -1
  363. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  364. package/lib/esm/test/PrintElementTree.js.map +1 -1
  365. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  366. package/lib/esm/test/RevisionUtility.js.map +1 -1
  367. package/lib/esm/test/SchemaUtils.test.js +25 -25
  368. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  369. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  370. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  371. package/lib/esm/test/TestUtils.js.map +1 -1
  372. package/lib/esm/test/annotations/Fields.test.js +338 -126
  373. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  374. package/lib/esm/test/annotations/FrameGeometry.test.js +4 -4
  375. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  376. package/lib/esm/test/annotations/LeaderGeometry.test.js +19 -17
  377. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  378. package/lib/esm/test/annotations/TextAnnotation.test.js +636 -60
  379. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  380. package/lib/esm/test/annotations/TextBlock.test.js +627 -193
  381. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  382. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  383. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +46 -0
  384. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -1
  385. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +20 -2
  386. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  387. package/lib/esm/test/categories/Category.test.js.map +1 -1
  388. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  389. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  390. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  391. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +15 -15
  392. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  393. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  394. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  395. package/lib/esm/test/ecdb/ECDb.test.js +128 -58
  396. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  397. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  398. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  399. package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
  400. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  401. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  402. package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
  403. package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
  404. package/lib/esm/test/ecdb/ECSqlStatement.test.js +326 -326
  405. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  406. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  407. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  408. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  409. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  410. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  411. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  412. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  413. package/lib/esm/test/element/ElementAspect.test.js +22 -22
  414. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  415. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  416. package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
  417. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  418. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  419. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  420. package/lib/esm/test/element/NullStructArray.test.js +13 -13
  421. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  422. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  423. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  424. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  425. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
  426. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  427. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  428. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  429. package/lib/esm/test/hubaccess/Rebase.test.d.ts +2 -0
  430. package/lib/esm/test/hubaccess/Rebase.test.d.ts.map +1 -0
  431. package/lib/esm/test/hubaccess/Rebase.test.js +680 -0
  432. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -0
  433. package/lib/esm/test/imageData.js.map +1 -1
  434. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  435. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  436. package/lib/esm/test/imodel/IModel.test.js +44 -44
  437. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  438. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  439. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  440. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +20 -20
  441. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  442. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +3 -3
  443. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  444. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -1
  445. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -1
  446. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +16 -1
  447. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -1
  448. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +47 -0
  449. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -1
  450. package/lib/esm/test/index.js.map +1 -1
  451. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  452. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  453. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  454. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  455. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  456. package/lib/esm/test/rpc/response.test.js.map +1 -1
  457. package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
  458. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  459. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  460. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  461. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  462. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  463. package/lib/esm/test/standalone/ChangeMerge.test.js +15 -19
  464. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  465. package/lib/esm/test/standalone/ChangesetReader.test.js +248 -118
  466. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  467. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  468. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  469. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  470. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  471. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  472. package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
  473. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  474. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  475. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  476. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  477. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  478. package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
  479. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  480. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  481. package/lib/esm/test/standalone/MergeConflict.test.js +3 -3
  482. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  483. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  484. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  485. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  486. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  487. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  488. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  489. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  490. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  491. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  492. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  493. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  494. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  495. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  496. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  497. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  498. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  499. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  500. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  501. package/lib/esm/workspace/Settings.js.map +1 -1
  502. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  503. package/lib/esm/workspace/Workspace.d.ts +1 -1
  504. package/lib/esm/workspace/Workspace.js.map +1 -1
  505. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  506. package/package.json +14 -14
@@ -7,30 +7,67 @@
7
7
  * @module Elements
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.AnnotationTextStyle = exports.TextAnnotation3d = exports.TextAnnotation2d = void 0;
10
+ exports.AnnotationTextStyle = exports.TEXT_STYLE_SETTINGS_JSON_VERSION = exports.TextAnnotation3d = exports.TextAnnotation2d = exports.TEXT_ANNOTATION_JSON_VERSION = void 0;
11
+ exports.parseTextAnnotationData = parseTextAnnotationData;
11
12
  const core_common_1 = require("@itwin/core-common");
12
13
  const Element_1 = require("../Element");
13
14
  const core_bentley_1 = require("@itwin/core-bentley");
14
15
  const TextBlockLayout_1 = require("./TextBlockLayout");
15
16
  const TextAnnotationGeometry_1 = require("./TextAnnotationGeometry");
16
17
  const ElementDrivesTextAnnotation_1 = require("./ElementDrivesTextAnnotation");
17
- function parseTextAnnotationData(json) {
18
- if (!json)
19
- return undefined;
18
+ const semver = require("semver");
19
+ /** The version of the JSON stored in `TextAnnotation2d/3dProps.textAnnotationData` used by the code.
20
+ * Uses the same semantics as [ECVersion]($ecschema-metadata).
21
+ * @internal
22
+ */
23
+ exports.TEXT_ANNOTATION_JSON_VERSION = "1.0.0";
24
+ function validateAndMigrateVersionedJSON(json, currentVersion, migrate) {
25
+ let parsed;
20
26
  try {
21
- return JSON.parse(json);
27
+ parsed = JSON.parse(json);
22
28
  }
23
29
  catch {
24
30
  return undefined;
25
31
  }
32
+ const version = parsed.version;
33
+ if (typeof version !== "string" || !semver.valid(version))
34
+ throw new Error("JSON version is missing or invalid.");
35
+ if (typeof parsed.data !== "object" || parsed.data === null)
36
+ throw new Error("JSON data is missing or invalid.");
37
+ // Newer
38
+ if (semver.gt(version, currentVersion))
39
+ throw new Error(`JSON version ${parsed.version} is newer than supported version ${currentVersion}. Application update required to understand data.`);
40
+ // Older
41
+ if (semver.lt(version, currentVersion)) {
42
+ parsed.data = migrate(parsed);
43
+ parsed.version = currentVersion;
44
+ }
45
+ return parsed;
26
46
  }
27
- function getElementGeometryBuilderParams(iModel, modelId, _placementProps, stringifiedAnnotationProps, categoryId, _subCategory) {
28
- const annotationProps = parseTextAnnotationData(stringifiedAnnotationProps);
47
+ function migrateTextAnnotationData(oldData) {
48
+ if (oldData.version === exports.TEXT_ANNOTATION_JSON_VERSION)
49
+ return oldData.data;
50
+ // Place migration logic here.
51
+ throw new Error(`Migration for textAnnotationData from version ${oldData.version} to ${exports.TEXT_ANNOTATION_JSON_VERSION} failed.`);
52
+ }
53
+ /** Parses, validates, and potentially migrates the text annotation data from a JSON string.
54
+ * @internal
55
+ */
56
+ function parseTextAnnotationData(json) {
57
+ if (!json)
58
+ return undefined;
59
+ return validateAndMigrateVersionedJSON(json, exports.TEXT_ANNOTATION_JSON_VERSION, migrateTextAnnotationData);
60
+ }
61
+ function getElementGeometryBuilderParams(iModel, modelId, categoryId, _placementProps, annotationProps, textStyleId, _subCategory) {
29
62
  const textBlock = core_common_1.TextAnnotation.fromJSON(annotationProps).textBlock;
30
- const textStyleResolver = new TextBlockLayout_1.TextStyleResolver({ textBlock, iModel, modelId });
63
+ const textStyleResolver = new TextBlockLayout_1.TextStyleResolver({ textBlock, textStyleId: textStyleId ?? "", iModel });
31
64
  const layout = (0, TextBlockLayout_1.layoutTextBlock)({ iModel, textBlock, textStyleResolver });
32
65
  const builder = new core_common_1.ElementGeometry.Builder();
33
- (0, TextAnnotationGeometry_1.appendTextAnnotationGeometry)({ layout, textStyleResolver, annotationProps: annotationProps ?? {}, builder, categoryId });
66
+ let scaleFactor = 1;
67
+ const element = iModel.elements.getElement(modelId);
68
+ if (element instanceof Element_1.Drawing)
69
+ scaleFactor = element.scaleFactor;
70
+ (0, TextAnnotationGeometry_1.appendTextAnnotationGeometry)({ layout, textStyleResolver, scaleFactor, annotationProps: annotationProps ?? {}, builder, categoryId });
34
71
  return { entryArray: builder.entries };
35
72
  }
36
73
  /** An element that displays textual content within a 2d model.
@@ -41,25 +78,32 @@ function getElementGeometryBuilderParams(iModel, modelId, _placementProps, strin
41
78
  class TextAnnotation2d extends Element_1.AnnotationElement2d /* implements ITextAnnotation */ {
42
79
  /** @internal */
43
80
  static get className() { return "TextAnnotation2d"; }
44
- /** Optional string containing the data associated with the text annotation. */
45
- _textAnnotationData;
81
+ /**
82
+ * The default [[AnnotationTextStyle]] used by the TextAnnotation2d.
83
+ * @beta
84
+ */
85
+ defaultTextStyle;
86
+ /** The data associated with the text annotation. */
87
+ _textAnnotationProps;
46
88
  /** Extract the textual content, if present.
47
89
  * @see [[setAnnotation]] to change it.
48
90
  */
49
91
  getAnnotation() {
50
- const textAnnotationProps = parseTextAnnotationData(this._textAnnotationData);
51
- return textAnnotationProps ? core_common_1.TextAnnotation.fromJSON(textAnnotationProps) : undefined;
92
+ return this._textAnnotationProps ? core_common_1.TextAnnotation.fromJSON(this._textAnnotationProps) : undefined;
52
93
  }
53
94
  /** Change the textual content of the `TextAnnotation2d`.
54
95
  * @see [[getAnnotation]] to extract the current annotation.
55
96
  * @param annotation The new annotation
56
97
  */
57
98
  setAnnotation(annotation) {
58
- this._textAnnotationData = annotation ? JSON.stringify(annotation.toJSON()) : undefined;
99
+ this._textAnnotationProps = annotation.toJSON();
59
100
  }
60
101
  constructor(props, iModel) {
61
102
  super(props, iModel);
62
- this._textAnnotationData = props.textAnnotationData;
103
+ if (props.defaultTextStyle) {
104
+ this.defaultTextStyle = new ElementDrivesTextAnnotation_1.TextAnnotationUsesTextStyleByDefault(props.defaultTextStyle.id);
105
+ }
106
+ this._textAnnotationProps = parseTextAnnotationData(props.textAnnotationData)?.data;
63
107
  }
64
108
  /** Creates a new instance of `TextAnnotation2d` from its JSON representation. */
65
109
  static fromJSON(props, iModel) {
@@ -68,76 +112,96 @@ class TextAnnotation2d extends Element_1.AnnotationElement2d /* implements IText
68
112
  /**
69
113
  * Converts the current `TextAnnotation2d` instance to its JSON representation.
70
114
  * It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.
71
-
72
115
  * @inheritdoc
73
116
  */
74
117
  toJSON() {
75
118
  const props = super.toJSON();
76
- props.textAnnotationData = this._textAnnotationData;
77
- if (this._textAnnotationData) {
78
- props.elementGeometryBuilderParams = getElementGeometryBuilderParams(this.iModel, this.model, this.placement, this._textAnnotationData, this.category);
119
+ props.textAnnotationData = this._textAnnotationProps ? JSON.stringify({ version: exports.TEXT_ANNOTATION_JSON_VERSION, data: this._textAnnotationProps }) : undefined;
120
+ if (this._textAnnotationProps) {
121
+ props.elementGeometryBuilderParams = getElementGeometryBuilderParams(this.iModel, this.model, this.category, this.placement, this._textAnnotationProps, this.defaultTextStyle ? this.defaultTextStyle.id : undefined);
79
122
  }
80
123
  return props;
81
124
  }
82
125
  /** Creates a new `TextAnnotation2d` instance with the specified properties.
83
126
  * @param iModelDb The iModel.
84
- * @param category The category ID for the annotation.
85
- * @param model The model ID where the annotation will be placed.
86
- * @param placement The placement properties for the annotation.
87
- * @param textAnnotationData Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation2d`. Essentially an empty element if not provided.
88
- * @param code Optional code for the element.
127
+ * @param arg The arguments for creating the TextAnnotation2d.
128
+ * @beta
89
129
  */
90
- static create(iModelDb, category, model, placement, textAnnotationData, code) {
91
- const props = {
130
+ static create(iModelDb, arg) {
131
+ const elementProps = {
92
132
  classFullName: this.classFullName,
93
- textAnnotationData: JSON.stringify(textAnnotationData),
94
- placement,
95
- model,
96
- category,
97
- code: code ?? core_common_1.Code.createEmpty(),
133
+ textAnnotationData: arg.textAnnotationProps ? JSON.stringify({ version: exports.TEXT_ANNOTATION_JSON_VERSION, data: arg.textAnnotationProps }) : undefined,
134
+ defaultTextStyle: arg.defaultTextStyleId ? new ElementDrivesTextAnnotation_1.TextAnnotationUsesTextStyleByDefault(arg.defaultTextStyleId).toJSON() : undefined,
135
+ placement: arg.placement,
136
+ model: arg.model,
137
+ category: arg.category,
138
+ code: arg.code ?? core_common_1.Code.createEmpty(),
98
139
  };
99
- return new this(props, iModelDb);
140
+ return new this(elementProps, iModelDb);
100
141
  }
101
142
  /**
102
- * Updates the geometry of the TextAnnotation2d on insert.
143
+ * Updates the geometry of the TextAnnotation2d on insert and validates version.
103
144
  * @inheritdoc
104
145
  * @beta
105
146
  */
106
147
  static onInsert(arg) {
107
148
  super.onInsert(arg);
108
- this.updateGeometry(arg.iModel, arg.props);
149
+ this.validateVersionAndUpdateGeometry(arg);
109
150
  }
110
151
  /**
111
- * Updates the geometry of the TextAnnotation2d on update.
152
+ * Updates the geometry of the TextAnnotation2d on update and validates version.
112
153
  * @inheritdoc
113
154
  * @beta
114
155
  */
115
156
  static onUpdate(arg) {
116
157
  super.onUpdate(arg);
117
- this.updateGeometry(arg.iModel, arg.props);
158
+ this.validateVersionAndUpdateGeometry(arg);
118
159
  }
119
160
  /**
120
161
  * Populates the `elementGeometryBuilderParams` property in the [TextAnnotation2dProps]($common).
121
- * It only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.
162
+ * Only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.
163
+ * Also, validates the version of the text annotation data and migrates it if necessary.
164
+ * @beta
122
165
  */
123
- static updateGeometry(iModelDb, props) {
124
- if (props.elementGeometryBuilderParams || !props.textAnnotationData) {
125
- return;
166
+ static validateVersionAndUpdateGeometry(arg) {
167
+ const props = arg.props;
168
+ const textAnnotationData = parseTextAnnotationData(props.textAnnotationData);
169
+ if (!props.elementGeometryBuilderParams && textAnnotationData) {
170
+ props.elementGeometryBuilderParams = getElementGeometryBuilderParams(arg.iModel, props.model, props.category, props.placement ?? core_common_1.Placement2d.fromJSON(), textAnnotationData.data, props.defaultTextStyle?.id);
126
171
  }
127
- props.elementGeometryBuilderParams = getElementGeometryBuilderParams(iModelDb, props.model, props.placement ?? core_common_1.Placement2d.fromJSON(), props.textAnnotationData, props.category);
128
172
  }
129
173
  /**
130
- * Collects reference IDs used by this `TextAnnotation2d`.
174
+ * TextAnnotation2d custom HandledProps include 'textAnnotationData'.
131
175
  * @inheritdoc
176
+ * @internal
132
177
  */
133
- collectReferenceIds(ids) {
134
- super.collectReferenceIds(ids);
135
- const annotation = this.getAnnotation();
136
- if (!annotation) {
137
- return;
178
+ static _customHandledProps = [
179
+ { propertyName: "textAnnotationData", source: "Class" },
180
+ ];
181
+ /**
182
+ * TextAnnotation2d deserializes 'textAnnotationData'.
183
+ * @inheritdoc
184
+ * @beta
185
+ */
186
+ static deserialize(props) {
187
+ const elProps = super.deserialize(props);
188
+ const textAnnotationData = parseTextAnnotationData(props.row.textAnnotationData);
189
+ if (textAnnotationData) {
190
+ elProps.textAnnotationData = JSON.stringify(textAnnotationData);
191
+ }
192
+ return elProps;
193
+ }
194
+ /**
195
+ * TextAnnotation2d serializes 'textAnnotationData'.
196
+ * @inheritdoc
197
+ * @beta
198
+ */
199
+ static serialize(props, iModel) {
200
+ const inst = super.serialize(props, iModel);
201
+ if (props.textAnnotationData !== undefined) {
202
+ inst.textAnnotationData = props.textAnnotationData;
138
203
  }
139
- if (annotation.textBlock.styleId)
140
- ids.addElement(annotation.textBlock.styleId);
204
+ return inst;
141
205
  }
142
206
  /** @internal */
143
207
  getTextBlocks() {
@@ -157,6 +221,19 @@ class TextAnnotation2d extends Element_1.AnnotationElement2d /* implements IText
157
221
  super.onUpdated(arg);
158
222
  ElementDrivesTextAnnotation_1.ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);
159
223
  }
224
+ collectReferenceIds(referenceIds) {
225
+ super.collectReferenceIds(referenceIds);
226
+ collectReferenceIds(this, referenceIds);
227
+ }
228
+ /** @internal */
229
+ static onCloned(context, srcProps, dstProps) {
230
+ super.onCloned(context, srcProps, dstProps);
231
+ const srcElem = TextAnnotation2d.fromJSON(srcProps, context.sourceDb);
232
+ ElementDrivesTextAnnotation_1.ElementDrivesTextAnnotation.remapFields(srcElem, context);
233
+ const anno = srcElem.getAnnotation();
234
+ dstProps.textAnnotationData = anno ? JSON.stringify({ version: exports.TEXT_ANNOTATION_JSON_VERSION, data: anno.toJSON() }) : undefined;
235
+ remapTextStyle(context, srcElem, dstProps);
236
+ }
160
237
  }
161
238
  exports.TextAnnotation2d = TextAnnotation2d;
162
239
  /** An element that displays textual content within a 3d model.
@@ -167,25 +244,32 @@ exports.TextAnnotation2d = TextAnnotation2d;
167
244
  class TextAnnotation3d extends Element_1.GraphicalElement3d /* implements ITextAnnotation */ {
168
245
  /** @internal */
169
246
  static get className() { return "TextAnnotation3d"; }
170
- /** Optional string containing the data associated with the text annotation. */
171
- _textAnnotationData;
247
+ /**
248
+ * The default [[AnnotationTextStyle]] used by the TextAnnotation3d.
249
+ * @beta
250
+ */
251
+ defaultTextStyle;
252
+ /** The data associated with the text annotation. */
253
+ _textAnnotationProps;
172
254
  /** Extract the textual content, if present.
173
255
  * @see [[setAnnotation]] to change it.
174
256
  */
175
257
  getAnnotation() {
176
- const textAnnotationProps = parseTextAnnotationData(this._textAnnotationData);
177
- return textAnnotationProps ? core_common_1.TextAnnotation.fromJSON(textAnnotationProps) : undefined;
258
+ return this._textAnnotationProps ? core_common_1.TextAnnotation.fromJSON(this._textAnnotationProps) : undefined;
178
259
  }
179
260
  /** Change the textual content of the `TextAnnotation3d`.
180
261
  * @see [[getAnnotation]] to extract the current annotation.
181
262
  * @param annotation The new annotation
182
263
  */
183
264
  setAnnotation(annotation) {
184
- this._textAnnotationData = annotation ? JSON.stringify(annotation.toJSON()) : undefined;
265
+ this._textAnnotationProps = annotation.toJSON();
185
266
  }
186
267
  constructor(props, iModel) {
187
268
  super(props, iModel);
188
- this._textAnnotationData = props.textAnnotationData;
269
+ if (props.defaultTextStyle) {
270
+ this.defaultTextStyle = new ElementDrivesTextAnnotation_1.TextAnnotationUsesTextStyleByDefault(props.defaultTextStyle.id);
271
+ }
272
+ this._textAnnotationProps = parseTextAnnotationData(props.textAnnotationData)?.data;
189
273
  }
190
274
  /** Creates a new instance of `TextAnnotation3d` from its JSON representation. */
191
275
  static fromJSON(props, iModel) {
@@ -198,71 +282,92 @@ class TextAnnotation3d extends Element_1.GraphicalElement3d /* implements ITextA
198
282
  */
199
283
  toJSON() {
200
284
  const props = super.toJSON();
201
- props.textAnnotationData = this._textAnnotationData;
202
- if (this._textAnnotationData) {
203
- props.elementGeometryBuilderParams = getElementGeometryBuilderParams(this.iModel, this.model, this.placement, this._textAnnotationData, this.category);
285
+ props.textAnnotationData = this._textAnnotationProps ? JSON.stringify({ version: exports.TEXT_ANNOTATION_JSON_VERSION, data: this._textAnnotationProps }) : undefined;
286
+ if (this._textAnnotationProps) {
287
+ props.elementGeometryBuilderParams = getElementGeometryBuilderParams(this.iModel, this.model, this.category, this.placement, this._textAnnotationProps, this.defaultTextStyle ? this.defaultTextStyle.id : undefined);
204
288
  }
205
289
  return props;
206
290
  }
207
291
  /** Creates a new `TextAnnotation3d` instance with the specified properties.
208
292
  * @param iModelDb The iModel.
209
- * @param category The category ID for the annotation.
210
- * @param model The model ID where the annotation will be placed.
211
- * @param placement The placement properties for the annotation.
212
- * @param textAnnotationData Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation3d`. Essentially an empty element if not provided.
213
- * @param code Optional code for the element.
293
+ * @param arg The arguments for creating the TextAnnotation3d.
294
+ * @beta
214
295
  */
215
- static create(iModelDb, category, model, placement, textAnnotationData, code) {
216
- const props = {
296
+ static create(iModelDb, arg) {
297
+ const elementProps = {
217
298
  classFullName: this.classFullName,
218
- textAnnotationData: JSON.stringify(textAnnotationData),
219
- placement,
220
- model,
221
- category,
222
- code: code ?? core_common_1.Code.createEmpty(),
299
+ textAnnotationData: arg.textAnnotationProps ? JSON.stringify({ version: exports.TEXT_ANNOTATION_JSON_VERSION, data: arg.textAnnotationProps }) : undefined,
300
+ defaultTextStyle: arg.defaultTextStyleId ? new ElementDrivesTextAnnotation_1.TextAnnotationUsesTextStyleByDefault(arg.defaultTextStyleId).toJSON() : undefined,
301
+ placement: arg.placement,
302
+ model: arg.model,
303
+ category: arg.category,
304
+ code: arg.code ?? core_common_1.Code.createEmpty(),
223
305
  };
224
- return new this(props, iModelDb);
306
+ return new this(elementProps, iModelDb);
225
307
  }
226
308
  /**
227
- * Updates the geometry of the TextAnnotation3d on insert.
309
+ * Updates the geometry of the TextAnnotation3d on insert and validates version..
228
310
  * @inheritdoc
229
311
  * @beta
230
312
  */
231
313
  static onInsert(arg) {
232
314
  super.onInsert(arg);
233
- this.updateGeometry(arg.iModel, arg.props);
315
+ this.validateVersionAndUpdateGeometry(arg);
234
316
  }
235
317
  /**
236
- * Updates the geometry of the TextAnnotation3d on update.
318
+ * Updates the geometry of the TextAnnotation3d on update and validates version..
237
319
  * @inheritdoc
238
320
  * @beta
239
321
  */
240
322
  static onUpdate(arg) {
241
323
  super.onUpdate(arg);
242
- this.updateGeometry(arg.iModel, arg.props);
324
+ this.validateVersionAndUpdateGeometry(arg);
243
325
  }
244
326
  /**
245
327
  * Populates the `elementGeometryBuilderParams` property in the [TextAnnotation3dProps]($common).
246
- * It only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.
328
+ * Only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.
329
+ * Also, validates the version of the text annotation data and migrates it if necessary.
330
+ * @beta
247
331
  */
248
- static updateGeometry(iModelDb, props) {
249
- if (props.elementGeometryBuilderParams || !props.textAnnotationData) {
250
- return;
332
+ static validateVersionAndUpdateGeometry(arg) {
333
+ const props = arg.props;
334
+ const textAnnotationData = parseTextAnnotationData(props.textAnnotationData);
335
+ if (!props.elementGeometryBuilderParams && textAnnotationData) {
336
+ props.elementGeometryBuilderParams = getElementGeometryBuilderParams(arg.iModel, props.model, props.category, props.placement ?? core_common_1.Placement3d.fromJSON(), textAnnotationData.data, props.defaultTextStyle?.id);
251
337
  }
252
- props.elementGeometryBuilderParams = getElementGeometryBuilderParams(iModelDb, props.model, props.placement ?? core_common_1.Placement3d.fromJSON(), props.textAnnotationData, props.category);
253
338
  }
254
339
  /**
255
- * Collects reference IDs used by this `TextAnnotation3d`.
340
+ * TextAnnotation3d custom HandledProps include 'textAnnotationData'.
256
341
  * @inheritdoc
342
+ * @internal
257
343
  */
258
- collectReferenceIds(ids) {
259
- super.collectReferenceIds(ids);
260
- const annotation = this.getAnnotation();
261
- if (!annotation) {
262
- return;
344
+ static _customHandledProps = [
345
+ { propertyName: "textAnnotationData", source: "Class" },
346
+ ];
347
+ /**
348
+ * TextAnnotation3d deserializes 'textAnnotationData'.
349
+ * @inheritdoc
350
+ * @beta
351
+ */
352
+ static deserialize(props) {
353
+ const elProps = super.deserialize(props);
354
+ const textAnnotationData = parseTextAnnotationData(props.row.textAnnotationData);
355
+ if (textAnnotationData) {
356
+ elProps.textAnnotationData = JSON.stringify(textAnnotationData);
357
+ }
358
+ return elProps;
359
+ }
360
+ /**
361
+ * TextAnnotation3d serializes 'textAnnotationData'.
362
+ * @inheritdoc
363
+ * @beta
364
+ */
365
+ static serialize(props, iModel) {
366
+ const inst = super.serialize(props, iModel);
367
+ if (props.textAnnotationData !== undefined) {
368
+ inst.textAnnotationData = props.textAnnotationData;
263
369
  }
264
- if (annotation.textBlock.styleId)
265
- ids.addElement(annotation.textBlock.styleId);
370
+ return inst;
266
371
  }
267
372
  /** @internal */
268
373
  getTextBlocks() {
@@ -282,8 +387,42 @@ class TextAnnotation3d extends Element_1.GraphicalElement3d /* implements ITextA
282
387
  super.onUpdated(arg);
283
388
  ElementDrivesTextAnnotation_1.ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);
284
389
  }
390
+ collectReferenceIds(referenceIds) {
391
+ super.collectReferenceIds(referenceIds);
392
+ collectReferenceIds(this, referenceIds);
393
+ }
394
+ /** @internal */
395
+ static onCloned(context, srcProps, dstProps) {
396
+ super.onCloned(context, srcProps, dstProps);
397
+ const srcElem = TextAnnotation3d.fromJSON(srcProps, context.sourceDb);
398
+ ElementDrivesTextAnnotation_1.ElementDrivesTextAnnotation.remapFields(srcElem, context);
399
+ const anno = srcElem.getAnnotation();
400
+ dstProps.textAnnotationData = anno ? JSON.stringify({ version: exports.TEXT_ANNOTATION_JSON_VERSION, data: anno.toJSON() }) : undefined;
401
+ remapTextStyle(context, srcElem, dstProps);
402
+ }
285
403
  }
286
404
  exports.TextAnnotation3d = TextAnnotation3d;
405
+ function remapTextStyle(context, srcElem, dstProps) {
406
+ const dstStyleId = AnnotationTextStyle.remapTextStyleId(srcElem.defaultTextStyle?.id ?? core_bentley_1.Id64.invalid, context);
407
+ dstProps.defaultTextStyle = core_bentley_1.Id64.isValid(dstStyleId) ? new ElementDrivesTextAnnotation_1.TextAnnotationUsesTextStyleByDefault(dstStyleId).toJSON() : undefined;
408
+ }
409
+ function collectReferenceIds(elem, referenceIds) {
410
+ const style = elem.defaultTextStyle?.id;
411
+ if (style && core_bentley_1.Id64.isValidId64(style)) {
412
+ referenceIds.addElement(style);
413
+ }
414
+ const block = elem.getAnnotation()?.textBlock;
415
+ if (block) {
416
+ for (const { child } of (0, core_common_1.traverseTextBlockComponent)(block)) {
417
+ if (child.type === "field") {
418
+ const hostId = child.propertyHost.elementId;
419
+ if (core_bentley_1.Id64.isValidId64(hostId)) {
420
+ referenceIds.addElement(hostId);
421
+ }
422
+ }
423
+ }
424
+ }
425
+ }
287
426
  function getTextBlocks(elem) {
288
427
  const annotation = elem.getAnnotation();
289
428
  return annotation ? [{ textBlock: annotation.textBlock, id: undefined }] : [];
@@ -299,7 +438,17 @@ function updateTextBlocks(elem, textBlocks) {
299
438
  }
300
439
  annotation.textBlock = textBlocks[0].textBlock;
301
440
  elem.setAnnotation(annotation);
302
- elem.update();
441
+ }
442
+ /** The version of the JSON stored in `AnnotationTextStyleProps.settings` used by the code.
443
+ * Uses the same semantics as [ECVersion]($ecschema-metadata).
444
+ * @internal
445
+ */
446
+ exports.TEXT_STYLE_SETTINGS_JSON_VERSION = "1.0.0";
447
+ function migrateTextStyleSettings(oldData) {
448
+ if (oldData.version === exports.TEXT_STYLE_SETTINGS_JSON_VERSION)
449
+ return oldData.data;
450
+ // Place migration logic here.
451
+ throw new Error(`Migration for settings from version ${oldData.version} to ${exports.TEXT_STYLE_SETTINGS_JSON_VERSION} failed.`);
303
452
  }
304
453
  /**
305
454
  * The definition element that holds text style information.
@@ -322,7 +471,7 @@ class AnnotationTextStyle extends Element_1.DefinitionElement {
322
471
  super(props, iModel);
323
472
  this.description = props.description;
324
473
  const settingsProps = AnnotationTextStyle.parseTextStyleSettings(props.settings);
325
- this.settings = core_common_1.TextStyleSettings.fromJSON(settingsProps);
474
+ this.settings = core_common_1.TextStyleSettings.fromJSON(settingsProps?.data);
326
475
  }
327
476
  /**
328
477
  * Creates a Code for an `AnnotationTextStyle` given a name that is meant to be unique within the scope of the specified DefinitionModel.
@@ -330,6 +479,7 @@ class AnnotationTextStyle extends Element_1.DefinitionElement {
330
479
  * @param iModel - The IModelDb.
331
480
  * @param definitionModelId - The ID of the DefinitionModel that contains the AnnotationTextStyle and provides the scope for its name.
332
481
  * @param name - The AnnotationTextStyle name.
482
+ * @beta
333
483
  */
334
484
  static createCode(iModel, definitionModelId, name) {
335
485
  const codeSpec = iModel.codeSpecs.getByName(core_common_1.BisCodeSpec.annotationTextStyle);
@@ -339,18 +489,16 @@ class AnnotationTextStyle extends Element_1.DefinitionElement {
339
489
  * Creates a new instance of `AnnotationTextStyle` with the specified properties.
340
490
  *
341
491
  * @param iModelDb - The iModelDb.
342
- * @param definitionModelId - The ID of the [[DefinitionModel]].
343
- * @param name - The name to assign to the `AnnotationTextStyle`.
344
- * @param settings - Optional text style settings used to create the `AnnotationTextStyle`. Default settings will be used if not provided.
345
- * @param description - Optional description for the `AnnotationTextStyle`.
492
+ * @param arg - The arguments for creating the AnnotationTextStyle.
493
+ * @beta
346
494
  */
347
- static create(iModelDb, definitionModelId, name, settings, description) {
495
+ static create(iModelDb, arg) {
348
496
  const props = {
349
497
  classFullName: this.classFullName,
350
- model: definitionModelId,
351
- code: this.createCode(iModelDb, definitionModelId, name).toJSON(),
352
- description,
353
- settings: JSON.stringify(settings),
498
+ model: arg.definitionModelId,
499
+ code: this.createCode(iModelDb, arg.definitionModelId, arg.name).toJSON(),
500
+ description: arg.description,
501
+ settings: arg.settings ? JSON.stringify({ version: exports.TEXT_STYLE_SETTINGS_JSON_VERSION, data: arg.settings }) : undefined,
354
502
  };
355
503
  return new this(props, iModelDb);
356
504
  }
@@ -361,7 +509,7 @@ class AnnotationTextStyle extends Element_1.DefinitionElement {
361
509
  toJSON() {
362
510
  const props = super.toJSON();
363
511
  props.description = this.description;
364
- props.settings = JSON.stringify(this.settings.toJSON());
512
+ props.settings = JSON.stringify({ version: exports.TEXT_STYLE_SETTINGS_JSON_VERSION, data: this.settings.toJSON() });
365
513
  return props;
366
514
  }
367
515
  /** Creates a new instance of `AnnotationTextStyle` from its JSON representation. */
@@ -390,21 +538,83 @@ class AnnotationTextStyle extends Element_1.DefinitionElement {
390
538
  const settingProps = AnnotationTextStyle.parseTextStyleSettings(props.settings);
391
539
  if (!settingProps)
392
540
  return;
393
- const settings = core_common_1.TextStyleSettings.fromJSON(settingProps);
541
+ const settings = core_common_1.TextStyleSettings.fromJSON(settingProps.data);
394
542
  const errors = settings.getValidationErrors();
395
543
  if (errors.length > 0) {
396
544
  throw new Error(`Invalid AnnotationTextStyle settings: ${errors.join(", ")}`);
397
545
  }
398
546
  }
547
+ /**
548
+ * AnnotationTextStyle custom HandledProps include 'settings'.
549
+ * @inheritdoc
550
+ * @beta
551
+ */
552
+ static _customHandledProps = [
553
+ { propertyName: "settings", source: "Class" },
554
+ ];
555
+ /**
556
+ * AnnotationTextStyle deserializes 'settings'.
557
+ * @inheritdoc
558
+ * @beta
559
+ */
560
+ static deserialize(props) {
561
+ const elProps = super.deserialize(props);
562
+ const settings = this.parseTextStyleSettings(props.row.settings);
563
+ if (settings) {
564
+ elProps.settings = JSON.stringify(settings);
565
+ }
566
+ return elProps;
567
+ }
568
+ /**
569
+ * AnnotationTextStyle serializes 'settings'.
570
+ * @inheritdoc
571
+ * @beta
572
+ */
573
+ static serialize(props, iModel) {
574
+ const inst = super.serialize(props, iModel);
575
+ if (props.settings !== undefined) {
576
+ inst.settings = props.settings;
577
+ }
578
+ return inst;
579
+ }
580
+ /** Parses, validates, and potentially migrates the text style settings data from a JSON string. */
399
581
  static parseTextStyleSettings(json) {
400
582
  if (!json)
401
583
  return undefined;
402
- try {
403
- return JSON.parse(json);
584
+ return validateAndMigrateVersionedJSON(json, exports.TEXT_STYLE_SETTINGS_JSON_VERSION, migrateTextStyleSettings);
585
+ }
586
+ /** When copying an element from one iModel to another, returns the Id of the AnnotationTextStyle in the `context`'s target iModel
587
+ * corresponding to `sourceTextStyleId`, or [Id64.invalid]($bentley) if no corresponding text style exists.
588
+ * If a text style with the same [Code]($common) exists in the target iModel, the style Id will be remapped to refer to that style.
589
+ * Otherwise, a copy of the style will be imported into the target iModel and its element Id returned.
590
+ * Implementations of [[ITextAnnotation]] should invoke this function when implementing their [[Element._onCloned]] method.
591
+ * @throws Error if an attempt to import the text style failed.
592
+ */
593
+ static remapTextStyleId(sourceTextStyleId, context) {
594
+ // No remapping necessary if there's no text style or we're not copying to a different iModel.
595
+ if (!core_bentley_1.Id64.isValid(sourceTextStyleId) || !context.isBetweenIModels) {
596
+ return sourceTextStyleId;
404
597
  }
405
- catch {
406
- return undefined;
598
+ // If the style's already been remapped, we're finished.
599
+ let dstStyleId = context.findTargetElementId(sourceTextStyleId);
600
+ if (core_bentley_1.Id64.isValid(dstStyleId)) {
601
+ return dstStyleId;
602
+ }
603
+ // Look up the style. It really ought to exist.
604
+ const srcStyle = context.sourceDb.elements.tryGetElement(sourceTextStyleId);
605
+ if (!srcStyle) {
606
+ return core_bentley_1.Id64.invalid;
607
+ }
608
+ // If a style with the same code exists in the target iModel, remap to that one.
609
+ dstStyleId = context.targetDb.elements.queryElementIdByCode(srcStyle.code);
610
+ if (undefined !== dstStyleId) {
611
+ return dstStyleId;
407
612
  }
613
+ // Copy the style into the target iModel and remap its Id.
614
+ const dstStyleProps = context.cloneElement(srcStyle);
615
+ dstStyleId = context.targetDb.elements.insertElement(dstStyleProps);
616
+ context.remapElement(sourceTextStyleId, dstStyleId);
617
+ return dstStyleId;
408
618
  }
409
619
  }
410
620
  exports.AnnotationTextStyle = AnnotationTextStyle;