@itwin/core-backend 5.1.0-dev.9 → 5.1.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 (671) hide show
  1. package/CHANGELOG.md +160 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +1 -1
  3. package/lib/cjs/BackendHubAccess.js +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  6. package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
  7. package/lib/cjs/BisCoreSchema.js +4 -2
  8. package/lib/cjs/BisCoreSchema.js.map +1 -1
  9. package/lib/cjs/BlobContainerService.js.map +1 -1
  10. package/lib/cjs/BriefcaseManager.d.ts +10 -2
  11. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  12. package/lib/cjs/BriefcaseManager.js +16 -0
  13. package/lib/cjs/BriefcaseManager.js.map +1 -1
  14. package/lib/cjs/CatalogDb.js.map +1 -1
  15. package/lib/cjs/Category.d.ts +4 -4
  16. package/lib/cjs/Category.js +4 -4
  17. package/lib/cjs/Category.js.map +1 -1
  18. package/lib/cjs/ChangeSummaryManager.js +2 -2
  19. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  20. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  21. package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
  22. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  23. package/lib/cjs/ChangesetECAdaptor.js +490 -275
  24. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  25. package/lib/cjs/ChannelControl.js.map +1 -1
  26. package/lib/cjs/CheckpointManager.js.map +1 -1
  27. package/lib/cjs/ClassRegistry.d.ts +9 -1
  28. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  29. package/lib/cjs/ClassRegistry.js +14 -6
  30. package/lib/cjs/ClassRegistry.js.map +1 -1
  31. package/lib/cjs/CloudSqlite.js +1 -1
  32. package/lib/cjs/CloudSqlite.js.map +1 -1
  33. package/lib/cjs/CodeService.js.map +1 -1
  34. package/lib/cjs/CodeSpecs.d.ts +1 -1
  35. package/lib/cjs/CodeSpecs.js +1 -1
  36. package/lib/cjs/CodeSpecs.js.map +1 -1
  37. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  38. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  39. package/lib/cjs/DevTools.js.map +1 -1
  40. package/lib/cjs/DisplayStyle.d.ts +4 -4
  41. package/lib/cjs/DisplayStyle.js +3 -3
  42. package/lib/cjs/DisplayStyle.js.map +1 -1
  43. package/lib/cjs/ECDb.d.ts +4 -4
  44. package/lib/cjs/ECDb.d.ts.map +1 -1
  45. package/lib/cjs/ECDb.js +4 -4
  46. package/lib/cjs/ECDb.js.map +1 -1
  47. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  48. package/lib/cjs/ECSqlStatement.d.ts +15 -6
  49. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  50. package/lib/cjs/ECSqlStatement.js +19 -4
  51. package/lib/cjs/ECSqlStatement.js.map +1 -1
  52. package/lib/cjs/Element.d.ts +54 -51
  53. package/lib/cjs/Element.d.ts.map +1 -1
  54. package/lib/cjs/Element.js +67 -52
  55. package/lib/cjs/Element.js.map +1 -1
  56. package/lib/cjs/ElementAspect.d.ts +8 -8
  57. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  58. package/lib/cjs/ElementAspect.js +8 -8
  59. package/lib/cjs/ElementAspect.js.map +1 -1
  60. package/lib/cjs/ElementGraphics.js.map +1 -1
  61. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  62. package/lib/cjs/Entity.d.ts +10 -7
  63. package/lib/cjs/Entity.d.ts.map +1 -1
  64. package/lib/cjs/Entity.js +35 -13
  65. package/lib/cjs/Entity.js.map +1 -1
  66. package/lib/cjs/EntityReferences.js.map +1 -1
  67. package/lib/cjs/ExportGraphics.d.ts +54 -8
  68. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  69. package/lib/cjs/ExportGraphics.js +158 -59
  70. package/lib/cjs/ExportGraphics.js.map +1 -1
  71. package/lib/cjs/ExternalSource.js.map +1 -1
  72. package/lib/cjs/FontFile.js.map +1 -1
  73. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  74. package/lib/cjs/GeographicCRSServices.d.ts +6 -2
  75. package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
  76. package/lib/cjs/GeographicCRSServices.js +1 -1
  77. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  78. package/lib/cjs/GeometrySummary.js +47 -47
  79. package/lib/cjs/GeometrySummary.js.map +1 -1
  80. package/lib/cjs/IModelDb.d.ts +37 -26
  81. package/lib/cjs/IModelDb.d.ts.map +1 -1
  82. package/lib/cjs/IModelDb.js +132 -55
  83. package/lib/cjs/IModelDb.js.map +1 -1
  84. package/lib/cjs/IModelDbFonts.js.map +1 -1
  85. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  86. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  87. package/lib/cjs/IModelElementCloneContext.js +1 -1
  88. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  89. package/lib/cjs/IModelHost.d.ts +2 -3
  90. package/lib/cjs/IModelHost.d.ts.map +1 -1
  91. package/lib/cjs/IModelHost.js +2 -3
  92. package/lib/cjs/IModelHost.js.map +1 -1
  93. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +36 -0
  94. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -0
  95. package/lib/cjs/IModelIncrementalSchemaLocater.js +69 -0
  96. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -0
  97. package/lib/cjs/IModelJsFs.js.map +1 -1
  98. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  99. package/lib/cjs/IpcHost.js.map +1 -1
  100. package/lib/cjs/LineStyle.js.map +1 -1
  101. package/lib/cjs/LocalHub.d.ts.map +1 -1
  102. package/lib/cjs/LocalHub.js +6 -4
  103. package/lib/cjs/LocalHub.js.map +1 -1
  104. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  105. package/lib/cjs/LockControl.js.map +1 -1
  106. package/lib/cjs/Material.d.ts +4 -3
  107. package/lib/cjs/Material.d.ts.map +1 -1
  108. package/lib/cjs/Material.js +5 -5
  109. package/lib/cjs/Material.js.map +1 -1
  110. package/lib/cjs/Model.d.ts +22 -22
  111. package/lib/cjs/Model.js +22 -22
  112. package/lib/cjs/Model.js.map +1 -1
  113. package/lib/cjs/NativeAppStorage.js.map +1 -1
  114. package/lib/cjs/NativeHost.js.map +1 -1
  115. package/lib/cjs/NavigationRelationship.js.map +1 -1
  116. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  117. package/lib/cjs/PropertyStore.js.map +1 -1
  118. package/lib/cjs/Relationship.d.ts +3 -0
  119. package/lib/cjs/Relationship.d.ts.map +1 -1
  120. package/lib/cjs/Relationship.js +15 -0
  121. package/lib/cjs/Relationship.js.map +1 -1
  122. package/lib/cjs/RpcBackend.js.map +1 -1
  123. package/lib/cjs/SQLiteDb.d.ts +1 -1
  124. package/lib/cjs/SQLiteDb.js +1 -1
  125. package/lib/cjs/SQLiteDb.js.map +1 -1
  126. package/lib/cjs/Schema.d.ts +25 -0
  127. package/lib/cjs/Schema.d.ts.map +1 -1
  128. package/lib/cjs/Schema.js +25 -0
  129. package/lib/cjs/Schema.js.map +1 -1
  130. package/lib/cjs/SchemaSync.js.map +1 -1
  131. package/lib/cjs/SchemaUtils.js.map +1 -1
  132. package/lib/cjs/SheetIndex.js.map +1 -1
  133. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  134. package/lib/cjs/SqliteStatement.d.ts +1 -1
  135. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  136. package/lib/cjs/SqliteStatement.js +1 -1
  137. package/lib/cjs/SqliteStatement.js.map +1 -1
  138. package/lib/cjs/Texture.d.ts +1 -1
  139. package/lib/cjs/Texture.js +1 -1
  140. package/lib/cjs/Texture.js.map +1 -1
  141. package/lib/cjs/TileStorage.js.map +1 -1
  142. package/lib/cjs/TxnManager.d.ts +4 -4
  143. package/lib/cjs/TxnManager.js +1 -1
  144. package/lib/cjs/TxnManager.js.map +1 -1
  145. package/lib/cjs/ViewDefinition.d.ts +40 -14
  146. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  147. package/lib/cjs/ViewDefinition.js +42 -14
  148. package/lib/cjs/ViewDefinition.js.map +1 -1
  149. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  150. package/lib/cjs/ViewStore.js.map +1 -1
  151. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
  152. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
  153. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +110 -0
  154. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -0
  155. package/lib/cjs/annotations/FrameGeometry.d.ts +51 -0
  156. package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
  157. package/lib/cjs/annotations/FrameGeometry.js +249 -0
  158. package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
  159. package/lib/cjs/annotations/LeaderGeometry.d.ts +53 -0
  160. package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -0
  161. package/lib/cjs/annotations/LeaderGeometry.js +184 -0
  162. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -0
  163. package/lib/cjs/annotations/TextAnnotationElement.d.ts +204 -0
  164. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
  165. package/lib/cjs/annotations/TextAnnotationElement.js +411 -0
  166. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
  167. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +33 -0
  168. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  169. package/lib/cjs/annotations/TextAnnotationGeometry.js +137 -0
  170. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
  171. package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
  172. package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
  173. package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
  174. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
  175. package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
  176. package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
  177. package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +174 -49
  178. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
  179. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  180. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  181. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  182. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  183. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  184. package/lib/cjs/core-backend.d.ts +7 -3
  185. package/lib/cjs/core-backend.d.ts.map +1 -1
  186. package/lib/cjs/core-backend.js +27 -6
  187. package/lib/cjs/core-backend.js.map +1 -1
  188. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  189. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  190. package/lib/cjs/domains/GenericElements.js.map +1 -1
  191. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  192. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  193. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  194. package/lib/cjs/internal/ElementLRUCache.d.ts +23 -0
  195. package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
  196. package/lib/cjs/internal/ElementLRUCache.js +167 -3
  197. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  198. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  199. package/lib/cjs/internal/HubMock.js.map +1 -1
  200. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  201. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  202. package/lib/cjs/internal/NoLocks.js.map +1 -1
  203. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  204. package/lib/cjs/internal/Symbols.d.ts +1 -0
  205. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  206. package/lib/cjs/internal/Symbols.js +2 -1
  207. package/lib/cjs/internal/Symbols.js.map +1 -1
  208. package/lib/cjs/internal/annotations/fields.d.ts +22 -0
  209. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -0
  210. package/lib/cjs/internal/annotations/fields.js +237 -0
  211. package/lib/cjs/internal/annotations/fields.js.map +1 -0
  212. package/lib/cjs/internal/cross-package.js.map +1 -1
  213. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  214. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  215. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  216. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  217. package/lib/cjs/rpc/multipart.js.map +1 -1
  218. package/lib/cjs/rpc/tracing.js.map +1 -1
  219. package/lib/cjs/rpc/web/logging.js.map +1 -1
  220. package/lib/cjs/rpc/web/request.js.map +1 -1
  221. package/lib/cjs/rpc/web/response.js.map +1 -1
  222. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  223. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  224. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
  225. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  226. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  227. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  228. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  229. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  230. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  231. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  232. package/lib/cjs/workspace/Settings.js.map +1 -1
  233. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  234. package/lib/cjs/workspace/Workspace.d.ts +0 -1
  235. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  236. package/lib/cjs/workspace/Workspace.js.map +1 -1
  237. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  238. package/lib/esm/BackendHubAccess.d.ts +1 -1
  239. package/lib/esm/BackendHubAccess.js +1 -1
  240. package/lib/esm/BackendHubAccess.js.map +1 -1
  241. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  242. package/lib/esm/BisCoreSchema.d.ts.map +1 -1
  243. package/lib/esm/BisCoreSchema.js +4 -2
  244. package/lib/esm/BisCoreSchema.js.map +1 -1
  245. package/lib/esm/BlobContainerService.js.map +1 -1
  246. package/lib/esm/BriefcaseManager.d.ts +10 -2
  247. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  248. package/lib/esm/BriefcaseManager.js +17 -1
  249. package/lib/esm/BriefcaseManager.js.map +1 -1
  250. package/lib/esm/CatalogDb.js.map +1 -1
  251. package/lib/esm/Category.d.ts +4 -4
  252. package/lib/esm/Category.js +4 -4
  253. package/lib/esm/Category.js.map +1 -1
  254. package/lib/esm/ChangeSummaryManager.js +2 -2
  255. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  256. package/lib/esm/ChangedElementsDb.js.map +1 -1
  257. package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
  258. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  259. package/lib/esm/ChangesetECAdaptor.js +490 -275
  260. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  261. package/lib/esm/ChannelControl.js.map +1 -1
  262. package/lib/esm/CheckpointManager.js.map +1 -1
  263. package/lib/esm/ClassRegistry.d.ts +9 -1
  264. package/lib/esm/ClassRegistry.d.ts.map +1 -1
  265. package/lib/esm/ClassRegistry.js +14 -6
  266. package/lib/esm/ClassRegistry.js.map +1 -1
  267. package/lib/esm/CloudSqlite.js +1 -1
  268. package/lib/esm/CloudSqlite.js.map +1 -1
  269. package/lib/esm/CodeService.js.map +1 -1
  270. package/lib/esm/CodeSpecs.d.ts +1 -1
  271. package/lib/esm/CodeSpecs.js +1 -1
  272. package/lib/esm/CodeSpecs.js.map +1 -1
  273. package/lib/esm/ConcurrentQuery.js.map +1 -1
  274. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  275. package/lib/esm/DevTools.js.map +1 -1
  276. package/lib/esm/DisplayStyle.d.ts +4 -4
  277. package/lib/esm/DisplayStyle.js +3 -3
  278. package/lib/esm/DisplayStyle.js.map +1 -1
  279. package/lib/esm/ECDb.d.ts +4 -4
  280. package/lib/esm/ECDb.d.ts.map +1 -1
  281. package/lib/esm/ECDb.js +4 -4
  282. package/lib/esm/ECDb.js.map +1 -1
  283. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  284. package/lib/esm/ECSqlStatement.d.ts +15 -6
  285. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  286. package/lib/esm/ECSqlStatement.js +19 -4
  287. package/lib/esm/ECSqlStatement.js.map +1 -1
  288. package/lib/esm/Element.d.ts +54 -51
  289. package/lib/esm/Element.d.ts.map +1 -1
  290. package/lib/esm/Element.js +67 -52
  291. package/lib/esm/Element.js.map +1 -1
  292. package/lib/esm/ElementAspect.d.ts +8 -8
  293. package/lib/esm/ElementAspect.d.ts.map +1 -1
  294. package/lib/esm/ElementAspect.js +8 -8
  295. package/lib/esm/ElementAspect.js.map +1 -1
  296. package/lib/esm/ElementGraphics.js.map +1 -1
  297. package/lib/esm/ElementTreeWalker.js.map +1 -1
  298. package/lib/esm/Entity.d.ts +10 -7
  299. package/lib/esm/Entity.d.ts.map +1 -1
  300. package/lib/esm/Entity.js +36 -14
  301. package/lib/esm/Entity.js.map +1 -1
  302. package/lib/esm/EntityReferences.js.map +1 -1
  303. package/lib/esm/ExportGraphics.d.ts +54 -8
  304. package/lib/esm/ExportGraphics.d.ts.map +1 -1
  305. package/lib/esm/ExportGraphics.js +156 -58
  306. package/lib/esm/ExportGraphics.js.map +1 -1
  307. package/lib/esm/ExternalSource.js.map +1 -1
  308. package/lib/esm/FontFile.js.map +1 -1
  309. package/lib/esm/GeoCoordConfig.js.map +1 -1
  310. package/lib/esm/GeographicCRSServices.d.ts +6 -2
  311. package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
  312. package/lib/esm/GeographicCRSServices.js +1 -1
  313. package/lib/esm/GeographicCRSServices.js.map +1 -1
  314. package/lib/esm/GeometrySummary.js +47 -47
  315. package/lib/esm/GeometrySummary.js.map +1 -1
  316. package/lib/esm/IModelDb.d.ts +37 -26
  317. package/lib/esm/IModelDb.d.ts.map +1 -1
  318. package/lib/esm/IModelDb.js +136 -59
  319. package/lib/esm/IModelDb.js.map +1 -1
  320. package/lib/esm/IModelDbFonts.js.map +1 -1
  321. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  322. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  323. package/lib/esm/IModelElementCloneContext.js +1 -1
  324. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  325. package/lib/esm/IModelHost.d.ts +2 -3
  326. package/lib/esm/IModelHost.d.ts.map +1 -1
  327. package/lib/esm/IModelHost.js +2 -3
  328. package/lib/esm/IModelHost.js.map +1 -1
  329. package/lib/esm/IModelIncrementalSchemaLocater.d.ts +36 -0
  330. package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -0
  331. package/lib/esm/IModelIncrementalSchemaLocater.js +65 -0
  332. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -0
  333. package/lib/esm/IModelJsFs.js.map +1 -1
  334. package/lib/esm/ImageSourceConversion.js.map +1 -1
  335. package/lib/esm/IpcHost.js.map +1 -1
  336. package/lib/esm/LineStyle.js.map +1 -1
  337. package/lib/esm/LocalHub.d.ts.map +1 -1
  338. package/lib/esm/LocalHub.js +6 -4
  339. package/lib/esm/LocalHub.js.map +1 -1
  340. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  341. package/lib/esm/LockControl.js.map +1 -1
  342. package/lib/esm/Material.d.ts +4 -3
  343. package/lib/esm/Material.d.ts.map +1 -1
  344. package/lib/esm/Material.js +5 -5
  345. package/lib/esm/Material.js.map +1 -1
  346. package/lib/esm/Model.d.ts +22 -22
  347. package/lib/esm/Model.js +22 -22
  348. package/lib/esm/Model.js.map +1 -1
  349. package/lib/esm/NativeAppStorage.js.map +1 -1
  350. package/lib/esm/NativeHost.js.map +1 -1
  351. package/lib/esm/NavigationRelationship.js.map +1 -1
  352. package/lib/esm/PromiseMemoizer.js.map +1 -1
  353. package/lib/esm/PropertyStore.js.map +1 -1
  354. package/lib/esm/Relationship.d.ts +3 -0
  355. package/lib/esm/Relationship.d.ts.map +1 -1
  356. package/lib/esm/Relationship.js +15 -0
  357. package/lib/esm/Relationship.js.map +1 -1
  358. package/lib/esm/RpcBackend.js.map +1 -1
  359. package/lib/esm/SQLiteDb.d.ts +1 -1
  360. package/lib/esm/SQLiteDb.js +1 -1
  361. package/lib/esm/SQLiteDb.js.map +1 -1
  362. package/lib/esm/Schema.d.ts +25 -0
  363. package/lib/esm/Schema.d.ts.map +1 -1
  364. package/lib/esm/Schema.js +25 -0
  365. package/lib/esm/Schema.js.map +1 -1
  366. package/lib/esm/SchemaSync.js.map +1 -1
  367. package/lib/esm/SchemaUtils.js.map +1 -1
  368. package/lib/esm/SheetIndex.js.map +1 -1
  369. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  370. package/lib/esm/SqliteStatement.d.ts +1 -1
  371. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  372. package/lib/esm/SqliteStatement.js +1 -1
  373. package/lib/esm/SqliteStatement.js.map +1 -1
  374. package/lib/esm/Texture.d.ts +1 -1
  375. package/lib/esm/Texture.js +1 -1
  376. package/lib/esm/Texture.js.map +1 -1
  377. package/lib/esm/TileStorage.js.map +1 -1
  378. package/lib/esm/TxnManager.d.ts +4 -4
  379. package/lib/esm/TxnManager.js +1 -1
  380. package/lib/esm/TxnManager.js.map +1 -1
  381. package/lib/esm/ViewDefinition.d.ts +40 -14
  382. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  383. package/lib/esm/ViewDefinition.js +42 -14
  384. package/lib/esm/ViewDefinition.js.map +1 -1
  385. package/lib/esm/ViewStateHydrator.js.map +1 -1
  386. package/lib/esm/ViewStore.js.map +1 -1
  387. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
  388. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
  389. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +105 -0
  390. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -0
  391. package/lib/esm/annotations/FrameGeometry.d.ts +51 -0
  392. package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
  393. package/lib/esm/annotations/FrameGeometry.js +244 -0
  394. package/lib/esm/annotations/FrameGeometry.js.map +1 -0
  395. package/lib/esm/annotations/LeaderGeometry.d.ts +53 -0
  396. package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -0
  397. package/lib/esm/annotations/LeaderGeometry.js +179 -0
  398. package/lib/esm/annotations/LeaderGeometry.js.map +1 -0
  399. package/lib/esm/annotations/TextAnnotationElement.d.ts +204 -0
  400. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
  401. package/lib/esm/annotations/TextAnnotationElement.js +405 -0
  402. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
  403. package/lib/esm/annotations/TextAnnotationGeometry.d.ts +33 -0
  404. package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  405. package/lib/esm/annotations/TextAnnotationGeometry.js +134 -0
  406. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
  407. package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
  408. package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
  409. package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
  410. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
  411. package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
  412. package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
  413. package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +172 -48
  414. package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
  415. package/lib/esm/core-backend.d.ts +7 -3
  416. package/lib/esm/core-backend.d.ts.map +1 -1
  417. package/lib/esm/core-backend.js +27 -3
  418. package/lib/esm/core-backend.js.map +1 -1
  419. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  420. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  421. package/lib/esm/domains/GenericElements.js.map +1 -1
  422. package/lib/esm/domains/GenericSchema.js.map +1 -1
  423. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  424. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  425. package/lib/esm/internal/ElementLRUCache.d.ts +23 -0
  426. package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
  427. package/lib/esm/internal/ElementLRUCache.js +165 -2
  428. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  429. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  430. package/lib/esm/internal/HubMock.js.map +1 -1
  431. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  432. package/lib/esm/internal/NativePlatform.js.map +1 -1
  433. package/lib/esm/internal/NoLocks.js.map +1 -1
  434. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  435. package/lib/esm/internal/Symbols.d.ts +1 -0
  436. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  437. package/lib/esm/internal/Symbols.js +1 -0
  438. package/lib/esm/internal/Symbols.js.map +1 -1
  439. package/lib/esm/internal/annotations/fields.d.ts +22 -0
  440. package/lib/esm/internal/annotations/fields.d.ts.map +1 -0
  441. package/lib/esm/internal/annotations/fields.js +231 -0
  442. package/lib/esm/internal/annotations/fields.js.map +1 -0
  443. package/lib/esm/internal/cross-package.js.map +1 -1
  444. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  445. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  446. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  447. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  448. package/lib/esm/rpc/multipart.js.map +1 -1
  449. package/lib/esm/rpc/tracing.js.map +1 -1
  450. package/lib/esm/rpc/web/logging.js.map +1 -1
  451. package/lib/esm/rpc/web/request.js.map +1 -1
  452. package/lib/esm/rpc/web/response.js.map +1 -1
  453. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  454. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  455. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
  456. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  457. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  458. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  459. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  460. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  461. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  462. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  463. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  464. package/lib/esm/test/AnnotationTestUtils.d.ts +15 -0
  465. package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -0
  466. package/lib/esm/test/AnnotationTestUtils.js +41 -0
  467. package/lib/esm/test/AnnotationTestUtils.js.map +1 -0
  468. package/lib/esm/test/AttachDb.test.js +11 -11
  469. package/lib/esm/test/AttachDb.test.js.map +1 -1
  470. package/lib/esm/test/ElementLRUCache.test.js +224 -1
  471. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  472. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  473. package/lib/esm/test/IModelHost.test.js.map +1 -1
  474. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  475. package/lib/esm/test/IModelTestUtils.js +1 -0
  476. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  477. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  478. package/lib/esm/test/IpcHost.test.js.map +1 -1
  479. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  480. package/lib/esm/test/PrintElementTree.js.map +1 -1
  481. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  482. package/lib/esm/test/RevisionUtility.js.map +1 -1
  483. package/lib/esm/test/SchemaUtils.test.js +25 -25
  484. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  485. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  486. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  487. package/lib/esm/test/TestUtils.d.ts +1 -1
  488. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  489. package/lib/esm/test/TestUtils.js +1 -1
  490. package/lib/esm/test/TestUtils.js.map +1 -1
  491. package/lib/esm/test/annotations/Fields.test.d.ts +2 -0
  492. package/lib/esm/test/annotations/Fields.test.d.ts.map +1 -0
  493. package/lib/esm/test/annotations/Fields.test.js +576 -0
  494. package/lib/esm/test/annotations/Fields.test.js.map +1 -0
  495. package/lib/esm/test/annotations/FrameGeometry.test.d.ts +2 -0
  496. package/lib/esm/test/annotations/FrameGeometry.test.d.ts.map +1 -0
  497. package/lib/esm/test/annotations/FrameGeometry.test.js +86 -0
  498. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -0
  499. package/lib/esm/test/annotations/LeaderGeometry.test.d.ts +2 -0
  500. package/lib/esm/test/annotations/LeaderGeometry.test.d.ts.map +1 -0
  501. package/lib/esm/test/annotations/LeaderGeometry.test.js +256 -0
  502. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -0
  503. package/lib/esm/test/annotations/TextAnnotation.test.js +269 -1047
  504. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  505. package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
  506. package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
  507. package/lib/esm/test/annotations/TextBlock.test.js +1199 -0
  508. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
  509. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts +60 -0
  510. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts.map +1 -0
  511. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js +69 -0
  512. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -0
  513. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +1442 -0
  514. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -0
  515. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +817 -0
  516. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -0
  517. package/lib/esm/test/categories/Category.test.js.map +1 -1
  518. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  519. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  520. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  521. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts +2 -0
  522. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts.map +1 -0
  523. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +164 -0
  524. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -0
  525. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +35 -45
  526. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  527. package/lib/esm/test/ecdb/ECDb.test.js +86 -65
  528. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  529. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  530. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  531. package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
  532. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  533. package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -55
  534. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  535. package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
  536. package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
  537. package/lib/esm/test/ecdb/ECSqlStatement.test.js +484 -292
  538. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  539. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  540. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  541. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  542. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  543. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  544. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  545. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  546. package/lib/esm/test/element/ElementAspect.test.js +22 -22
  547. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  548. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  549. package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
  550. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  551. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  552. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  553. package/lib/esm/test/element/NullStructArray.test.js +13 -13
  554. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  555. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  556. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  557. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  558. package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts +2 -0
  559. package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts.map +1 -0
  560. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +86 -0
  561. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -0
  562. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  563. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  564. package/lib/esm/test/imageData.js.map +1 -1
  565. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  566. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  567. package/lib/esm/test/imodel/IModel.test.js +313 -5
  568. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  569. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  570. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  571. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts +2 -0
  572. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts.map +1 -0
  573. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +343 -0
  574. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -0
  575. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts +2 -0
  576. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts.map +1 -0
  577. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +207 -0
  578. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -0
  579. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +11 -0
  580. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +1 -0
  581. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +36 -0
  582. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -0
  583. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +17 -0
  584. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +1 -0
  585. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +116 -0
  586. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -0
  587. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +9 -0
  588. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -0
  589. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +20 -0
  590. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -0
  591. package/lib/esm/test/index.js.map +1 -1
  592. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  593. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  594. package/lib/esm/test/misc/GeoServices.test.js +36 -10
  595. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  596. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  597. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  598. package/lib/esm/test/rpc/response.test.js.map +1 -1
  599. package/lib/esm/test/schema/ClassRegistry.test.js +175 -73
  600. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  601. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  602. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  603. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  604. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  605. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  606. package/lib/esm/test/standalone/ChangesetReader.test.js +575 -164
  607. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  608. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  609. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  610. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  611. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  612. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  613. package/lib/esm/test/standalone/ExportGraphics.test.js +67 -15
  614. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  615. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  616. package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
  617. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  618. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  619. package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
  620. package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
  621. package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
  622. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
  623. package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
  624. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  625. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  626. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  627. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  628. package/lib/esm/test/standalone/RenderMaterialElement.test.js +24 -1
  629. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  630. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  631. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  632. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  633. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  634. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  635. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  636. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  637. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  638. package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
  639. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  640. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  641. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  642. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  643. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  644. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  645. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  646. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  647. package/lib/esm/workspace/Settings.js.map +1 -1
  648. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  649. package/lib/esm/workspace/Workspace.d.ts +0 -1
  650. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  651. package/lib/esm/workspace/Workspace.js.map +1 -1
  652. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  653. package/package.json +22 -16
  654. package/lib/cjs/TextAnnotationElement.d.ts +0 -54
  655. package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
  656. package/lib/cjs/TextAnnotationElement.js +0 -94
  657. package/lib/cjs/TextAnnotationElement.js.map +0 -1
  658. package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
  659. package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
  660. package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
  661. package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
  662. package/lib/cjs/TextAnnotationLayout.js.map +0 -1
  663. package/lib/esm/TextAnnotationElement.d.ts +0 -54
  664. package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
  665. package/lib/esm/TextAnnotationElement.js +0 -89
  666. package/lib/esm/TextAnnotationElement.js.map +0 -1
  667. package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
  668. package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
  669. package/lib/esm/TextAnnotationGeometry.js.map +0 -1
  670. package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
  671. package/lib/esm/TextAnnotationLayout.js.map +0 -1
@@ -0,0 +1,61 @@
1
+ /** @packageDocumentation
2
+ * @module Elements
3
+ */
4
+ import { RelationshipProps, TextBlock } from "@itwin/core-common";
5
+ import { ElementDrivesElement } from "../Relationship";
6
+ import { IModelDb } from "../IModelDb";
7
+ import { Element } from "../Element";
8
+ import { Id64String } from "@itwin/core-bentley";
9
+ /** Describes one of potentially many [TextBlock]($common)s hosted by an [[ITextAnnotation]].
10
+ * For example, a [[TextAnnotation2d]] hosts only a single text block, but an element representing a table may
11
+ * host one text block for each cell in the table, in which case it might use the combination of row and column
12
+ * as the [[id]] for each text block.
13
+ * @beta
14
+ */
15
+ export interface TextBlockAndId {
16
+ /** The text block. */
17
+ readonly textBlock: TextBlock;
18
+ /** An opaque identifier that allows the [[ITextAnnotation]] to discern which of its hosted text blocks is being referred to. */
19
+ readonly id: unknown;
20
+ }
21
+ /** Interface implemented by [[GeometricElement]] subclasses whose schemas declare them to implement the mix-in `BisCore:ITextAnnotation`.
22
+ * Such elements may host any number of [TextBlock]($common)s. `ITextAnnotation` provides a uniform way to interact with text regardless of
23
+ * the type of element to which it belongs.
24
+ * @beta
25
+ */
26
+ export interface ITextAnnotation {
27
+ /** Obtain a collection of all of the [TextBlock]($common)s hosted by this element. */
28
+ getTextBlocks(): Iterable<TextBlockAndId>;
29
+ /** Update the element to replace the contents of the specified [TextBlock]($common)s. */
30
+ updateTextBlocks(textBlocks: TextBlockAndId[]): void;
31
+ }
32
+ /** Returns `true` if the specified `element` implements [[ITextAnnotation]].
33
+ * @beta
34
+ */
35
+ export declare function isITextAnnotation(element: Element): element is ITextAnnotation & Element;
36
+ /** A relationship in which the source element hosts one or more properties that are displayed by a target [[ITextAnnotation]] element.
37
+ * This relationship is used to automatically update the [FieldRun]($common)s contained in the target element when the source element is modified.
38
+ * An [[ITextAnnotation]] element should invoke [[updateFieldDependencies]] from its [[Element.onInserted]] and [[Element.onUpdated]] functions to
39
+ * establish or update the relationships required for the [FieldRun]($common)s it contains.
40
+ * @note This relationship was introduced in version 01.00.22 of the BisCore schema. [FieldRun]($common)s created in iModels that have not been upgraded to
41
+ * that version or newer will not automatically update. Use [[isSupportedForIModel]] to check.
42
+ * @beta
43
+ */
44
+ export declare class ElementDrivesTextAnnotation extends ElementDrivesElement {
45
+ static get className(): string;
46
+ /** @internal */
47
+ static onRootChanged(props: RelationshipProps, iModel: IModelDb): void;
48
+ /** @internal */
49
+ static onDeletedDependency(props: RelationshipProps, iModel: IModelDb): void;
50
+ /** Returns true if `iModel` contains a version of the BisCore schema new enough to support this relationship.
51
+ * If not, the schema should be updated before inserting any [FieldRun]($common)s, or those runs will not
52
+ * update when the source element changes.
53
+ */
54
+ static isSupportedForIModel(iModel: IModelDb): boolean;
55
+ /** Examines all of the [FieldRun]($common)s within the specified [[ITextAnnotation]] and ensures that the appropriate
56
+ * `ElementDrivesTextAnnotation` relationships exist between the fields' source elements and this target element.
57
+ * It also deletes any stale relationships left over from fields that were deleted or whose source elements changed.
58
+ */
59
+ static updateFieldDependencies(annotationElementId: Id64String, iModel: IModelDb): void;
60
+ }
61
+ //# sourceMappingURL=ElementDrivesTextAnnotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementDrivesTextAnnotation.d.ts","sourceRoot":"","sources":["../../../src/annotations/ElementDrivesTextAnnotation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAkB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,gIAAgI;IAChI,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;CACtB;AAKD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,aAAa,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC1C,yFAAyF;IACzF,gBAAgB,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;CACtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,eAAe,GAAG,OAAO,CAExF;AAED;;;;;;;GAOG;AACH,qBAAa,2BAA4B,SAAQ,oBAAoB;IACnE,WAA2B,SAAS,IAAI,MAAM,CAA0C;IAExF,gBAAgB;WACO,aAAa,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI;IAItF,gBAAgB;WACO,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI;IAI5F;;;OAGG;WACW,oBAAoB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO;IAK7D;;;OAGG;WACW,uBAAuB,CAAC,mBAAmB,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI;CA4D/F"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Elements
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ElementDrivesTextAnnotation = void 0;
11
+ exports.isITextAnnotation = isITextAnnotation;
12
+ const Relationship_1 = require("../Relationship");
13
+ const fields_1 = require("../internal/annotations/fields");
14
+ const core_bentley_1 = require("@itwin/core-bentley");
15
+ const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
16
+ // ElementDrivesTextAnnotation was introduced in this version of BisCore - iModels with earlier versions cannot support field dependencies.
17
+ const minBisCoreVersion = new ecschema_metadata_1.ECVersion(1, 0, 22);
18
+ /** Returns `true` if the specified `element` implements [[ITextAnnotation]].
19
+ * @beta
20
+ */
21
+ function isITextAnnotation(element) {
22
+ return ["getTextBlocks", "updateTextBlocks"].every((x) => x in element && typeof element[x] === "function");
23
+ }
24
+ /** A relationship in which the source element hosts one or more properties that are displayed by a target [[ITextAnnotation]] element.
25
+ * This relationship is used to automatically update the [FieldRun]($common)s contained in the target element when the source element is modified.
26
+ * An [[ITextAnnotation]] element should invoke [[updateFieldDependencies]] from its [[Element.onInserted]] and [[Element.onUpdated]] functions to
27
+ * establish or update the relationships required for the [FieldRun]($common)s it contains.
28
+ * @note This relationship was introduced in version 01.00.22 of the BisCore schema. [FieldRun]($common)s created in iModels that have not been upgraded to
29
+ * that version or newer will not automatically update. Use [[isSupportedForIModel]] to check.
30
+ * @beta
31
+ */
32
+ class ElementDrivesTextAnnotation extends Relationship_1.ElementDrivesElement {
33
+ static get className() { return "ElementDrivesTextAnnotation"; }
34
+ /** @internal */
35
+ static onRootChanged(props, iModel) {
36
+ (0, fields_1.updateElementFields)(props, iModel, false);
37
+ }
38
+ /** @internal */
39
+ static onDeletedDependency(props, iModel) {
40
+ (0, fields_1.updateElementFields)(props, iModel, true);
41
+ }
42
+ /** Returns true if `iModel` contains a version of the BisCore schema new enough to support this relationship.
43
+ * If not, the schema should be updated before inserting any [FieldRun]($common)s, or those runs will not
44
+ * update when the source element changes.
45
+ */
46
+ static isSupportedForIModel(iModel) {
47
+ const bisCoreVersion = iModel.querySchemaVersionNumbers("BisCore");
48
+ return undefined !== bisCoreVersion && bisCoreVersion.compare(minBisCoreVersion) >= 0;
49
+ }
50
+ /** Examines all of the [FieldRun]($common)s within the specified [[ITextAnnotation]] and ensures that the appropriate
51
+ * `ElementDrivesTextAnnotation` relationships exist between the fields' source elements and this target element.
52
+ * It also deletes any stale relationships left over from fields that were deleted or whose source elements changed.
53
+ */
54
+ static updateFieldDependencies(annotationElementId, iModel) {
55
+ if (!ElementDrivesTextAnnotation.isSupportedForIModel(iModel)) {
56
+ return;
57
+ }
58
+ const annotationElement = iModel.elements.tryGetElement(annotationElementId);
59
+ if (!annotationElement || !isITextAnnotation(annotationElement)) {
60
+ return;
61
+ }
62
+ // The native layer will allow us to insert relationships to invalid or non-existent source elements...errors will arise later. Prevent it.
63
+ function isValidSourceId(id) {
64
+ if (!core_bentley_1.Id64.isValidId64(id)) {
65
+ return false;
66
+ }
67
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
68
+ return iModel.withPreparedStatement("SELECT CodeValue FROM BisCore.Element WHERE ECInstanceId=?", (stmt) => {
69
+ stmt.bindId(1, id);
70
+ return core_bentley_1.DbResult.BE_SQLITE_ROW === stmt.step();
71
+ });
72
+ }
73
+ const sourceToRelationship = new Map();
74
+ const blocks = annotationElement.getTextBlocks();
75
+ for (const block of blocks) {
76
+ for (const paragraph of block.textBlock.paragraphs) {
77
+ for (const run of paragraph.runs) {
78
+ if (run.type === "field" && isValidSourceId(run.propertyHost.elementId)) {
79
+ sourceToRelationship.set(run.propertyHost.elementId, null);
80
+ }
81
+ }
82
+ }
83
+ }
84
+ const staleRelationships = new Set();
85
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
86
+ annotationElement.iModel.withPreparedStatement(`SELECT ECInstanceId, SourceECInstanceId FROM BisCore.ElementDrivesTextAnnotation WHERE TargetECInstanceId=${annotationElement.id}`, (stmt) => {
87
+ while (core_bentley_1.DbResult.BE_SQLITE_ROW === stmt.step()) {
88
+ const relationshipId = stmt.getValue(0).getId();
89
+ const sourceId = stmt.getValue(1).getId();
90
+ if (sourceToRelationship.has(sourceId)) {
91
+ sourceToRelationship.set(sourceId, relationshipId);
92
+ }
93
+ else {
94
+ staleRelationships.add(relationshipId);
95
+ }
96
+ }
97
+ });
98
+ for (const [sourceId, relationshipId] of sourceToRelationship) {
99
+ if (relationshipId === null) {
100
+ ElementDrivesTextAnnotation.create(annotationElement.iModel, sourceId, annotationElement.id).insert();
101
+ }
102
+ }
103
+ for (const relationshipId of staleRelationships) {
104
+ const props = annotationElement.iModel.relationships.getInstanceProps("BisCore.ElementDrivesTextAnnotation", relationshipId);
105
+ annotationElement.iModel.relationships.deleteInstance(props);
106
+ }
107
+ }
108
+ }
109
+ exports.ElementDrivesTextAnnotation = ElementDrivesTextAnnotation;
110
+ //# sourceMappingURL=ElementDrivesTextAnnotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementDrivesTextAnnotation.js","sourceRoot":"","sources":["../../../src/annotations/ElementDrivesTextAnnotation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAyCH,8CAEC;AAxCD,kDAAuD;AAGvD,2DAAqE;AACrE,sDAAiE;AACjE,gEAAqD;AAerD,2IAA2I;AAC3I,MAAM,iBAAiB,GAAG,IAAI,6BAAS,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAclD;;GAEG;AACH,SAAgB,iBAAiB,CAAC,OAAgB;IAChD,OAAO,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,OAAO,IAAI,OAAQ,OAAe,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC;AACvH,CAAC;AAED;;;;;;;GAOG;AACH,MAAa,2BAA4B,SAAQ,mCAAoB;IAC5D,MAAM,KAAc,SAAS,KAAa,OAAO,6BAA6B,CAAC,CAAC,CAAC;IAExF,gBAAgB;IACT,MAAM,CAAU,aAAa,CAAC,KAAwB,EAAE,MAAgB;QAC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c,CAAC,IAAI,oBAAoB,EAAE,CAAC;YAC9D,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;gBAC5B,2BAA2B,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;YACxG,CAAC;QACH,CAAC;QAED,KAAK,MAAM,cAAc,IAAI,kBAAkB,EAAE,CAAC;YAChD,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,qCAAqC,EAAE,cAAc,CAAC,CAAC;YAC7H,iBAAiB,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;CACF;AAtFD,kEAsFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Elements\r\n */\r\n\r\nimport { RelationshipProps, TextBlock } from \"@itwin/core-common\";\r\nimport { ElementDrivesElement } from \"../Relationship\";\r\nimport { IModelDb } from \"../IModelDb\";\r\nimport { Element } from \"../Element\";\r\nimport { updateElementFields } from \"../internal/annotations/fields\";\r\nimport { DbResult, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { ECVersion } from \"@itwin/ecschema-metadata\";\r\n\r\n/** Describes one of potentially many [TextBlock]($common)s hosted by an [[ITextAnnotation]].\r\n * For example, a [[TextAnnotation2d]] hosts only a single text block, but an element representing a table may\r\n * host one text block for each cell in the table, in which case it might use the combination of row and column\r\n * as the [[id]] for each text block.\r\n * @beta\r\n */\r\nexport interface TextBlockAndId {\r\n /** The text block. */\r\n readonly textBlock: TextBlock;\r\n /** An opaque identifier that allows the [[ITextAnnotation]] to discern which of its hosted text blocks is being referred to. */\r\n readonly id: unknown;\r\n}\r\n\r\n// ElementDrivesTextAnnotation was introduced in this version of BisCore - iModels with earlier versions cannot support field dependencies.\r\nconst minBisCoreVersion = new ECVersion(1, 0, 22);\r\n\r\n/** Interface implemented by [[GeometricElement]] subclasses whose schemas declare them to implement the mix-in `BisCore:ITextAnnotation`.\r\n * Such elements may host any number of [TextBlock]($common)s. `ITextAnnotation` provides a uniform way to interact with text regardless of\r\n * the type of element to which it belongs.\r\n * @beta\r\n */\r\nexport interface ITextAnnotation {\r\n /** Obtain a collection of all of the [TextBlock]($common)s hosted by this element. */\r\n getTextBlocks(): Iterable<TextBlockAndId>;\r\n /** Update the element to replace the contents of the specified [TextBlock]($common)s. */\r\n updateTextBlocks(textBlocks: TextBlockAndId[]): void;\r\n}\r\n\r\n/** Returns `true` if the specified `element` implements [[ITextAnnotation]].\r\n * @beta\r\n */\r\nexport function isITextAnnotation(element: Element): element is ITextAnnotation & Element {\r\n return [\"getTextBlocks\", \"updateTextBlocks\"].every((x) => x in element && typeof (element as any)[x] === \"function\");\r\n}\r\n\r\n/** A relationship in which the source element hosts one or more properties that are displayed by a target [[ITextAnnotation]] element.\r\n * This relationship is used to automatically update the [FieldRun]($common)s contained in the target element when the source element is modified.\r\n * An [[ITextAnnotation]] element should invoke [[updateFieldDependencies]] from its [[Element.onInserted]] and [[Element.onUpdated]] functions to\r\n * establish or update the relationships required for the [FieldRun]($common)s it contains.\r\n * @note This relationship was introduced in version 01.00.22 of the BisCore schema. [FieldRun]($common)s created in iModels that have not been upgraded to\r\n * that version or newer will not automatically update. Use [[isSupportedForIModel]] to check.\r\n * @beta\r\n */\r\nexport class ElementDrivesTextAnnotation extends ElementDrivesElement {\r\n public static override get className(): string { return \"ElementDrivesTextAnnotation\"; }\r\n \r\n /** @internal */\r\n public static override onRootChanged(props: RelationshipProps, iModel: IModelDb): void {\r\n updateElementFields(props, iModel, false);\r\n }\r\n\r\n /** @internal */\r\n public static override onDeletedDependency(props: RelationshipProps, iModel: IModelDb): void {\r\n updateElementFields(props, iModel, true);\r\n }\r\n\r\n /** Returns true if `iModel` contains a version of the BisCore schema new enough to support this relationship.\r\n * If not, the schema should be updated before inserting any [FieldRun]($common)s, or those runs will not\r\n * update when the source element changes.\r\n */\r\n public static isSupportedForIModel(iModel: IModelDb): boolean {\r\n const bisCoreVersion = iModel.querySchemaVersionNumbers(\"BisCore\");\r\n return undefined !== bisCoreVersion && bisCoreVersion.compare(minBisCoreVersion) >= 0;\r\n }\r\n\r\n /** Examines all of the [FieldRun]($common)s within the specified [[ITextAnnotation]] and ensures that the appropriate\r\n * `ElementDrivesTextAnnotation` relationships exist between the fields' source elements and this target element.\r\n * It also deletes any stale relationships left over from fields that were deleted or whose source elements changed.\r\n */\r\n public static updateFieldDependencies(annotationElementId: Id64String, iModel: IModelDb): void {\r\n if (!ElementDrivesTextAnnotation.isSupportedForIModel(iModel)) {\r\n return;\r\n }\r\n\r\n const annotationElement = iModel.elements.tryGetElement<Element>(annotationElementId);\r\n if (!annotationElement || !isITextAnnotation(annotationElement)) {\r\n return;\r\n }\r\n\r\n // The native layer will allow us to insert relationships to invalid or non-existent source elements...errors will arise later. Prevent it.\r\n function isValidSourceId(id: Id64String): boolean {\r\n if (!Id64.isValidId64(id)) {\r\n return false;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return iModel.withPreparedStatement(\"SELECT CodeValue FROM BisCore.Element WHERE ECInstanceId=?\", (stmt) => {\r\n stmt.bindId(1, id);\r\n return DbResult.BE_SQLITE_ROW === stmt.step();\r\n });\r\n }\r\n\r\n const sourceToRelationship = new Map<Id64String, Id64String | null>();\r\n const blocks = annotationElement.getTextBlocks();\r\n for (const block of blocks) {\r\n for (const paragraph of block.textBlock.paragraphs) {\r\n for (const run of paragraph.runs) {\r\n if (run.type === \"field\" && isValidSourceId(run.propertyHost.elementId)) {\r\n sourceToRelationship.set(run.propertyHost.elementId, null);\r\n }\r\n }\r\n }\r\n }\r\n\r\n const staleRelationships = new Set<Id64String>();\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n annotationElement.iModel.withPreparedStatement(`SELECT ECInstanceId, SourceECInstanceId FROM BisCore.ElementDrivesTextAnnotation WHERE TargetECInstanceId=${annotationElement.id}`, (stmt) => {\r\n while (DbResult.BE_SQLITE_ROW === stmt.step()) {\r\n const relationshipId = stmt.getValue(0).getId();\r\n const sourceId = stmt.getValue(1).getId();\r\n if (sourceToRelationship.has(sourceId)) {\r\n sourceToRelationship.set(sourceId, relationshipId);\r\n } else {\r\n staleRelationships.add(relationshipId);\r\n }\r\n }\r\n });\r\n\r\n for (const [sourceId, relationshipId] of sourceToRelationship) {\r\n if (relationshipId === null) {\r\n ElementDrivesTextAnnotation.create(annotationElement.iModel, sourceId, annotationElement.id).insert();\r\n }\r\n }\r\n\r\n for (const relationshipId of staleRelationships) {\r\n const props = annotationElement.iModel.relationships.getInstanceProps(\"BisCore.ElementDrivesTextAnnotation\", relationshipId);\r\n annotationElement.iModel.relationships.deleteInstance(props);\r\n }\r\n }\r\n}\r\n"]}
@@ -0,0 +1,51 @@
1
+ /** @packageDocumentation
2
+ * @module ElementGeometry
3
+ */
4
+ import { ElementGeometry, GeometryParams, TextAnnotationFrameShape, TextFrameStyleProps } from "@itwin/core-common";
5
+ import { Loop, Path, Point3d, Range2d, Transform } from "@itwin/core-geometry";
6
+ /**
7
+ * Based on the frame style, this method will construct and append [[GeometryParams]] (for line style) and a [[Loop]] (for the frame shape) to the builder.
8
+ * @param builder that will be appended to in place
9
+ * @param frame
10
+ * @param range to enclose with the frame
11
+ * @param transform that transforms the range to world coordinates
12
+ * @returns `true` if any geometry was appended to the builder
13
+ * @beta
14
+ */
15
+ export declare function appendFrameToBuilder(builder: ElementGeometry.Builder, frame: TextFrameStyleProps, range: Range2d, transform: Transform, geomParams: GeometryParams): boolean;
16
+ /**
17
+ * Arguments for the [[computeFrame]] method.
18
+ * @beta
19
+ */
20
+ export interface ComputeFrameArgs {
21
+ /** Frame shape to be calculated */
22
+ frame: Exclude<TextAnnotationFrameShape, "none">;
23
+ /** Range to be enclosed */
24
+ range: Range2d;
25
+ /** Transform that translates and rotates the range to world coordinates */
26
+ transform: Transform;
27
+ }
28
+ /**
29
+ * Computes the frame geometry based on the provided frame shape and range.
30
+ * @returns a [Loop]($geometry) or [Path]($geometry) (if it's just a line) that represents the frame geometry
31
+ * @beta
32
+ */
33
+ export declare function computeFrame(args: ComputeFrameArgs): Loop | Path;
34
+ /**
35
+ * Arguments for the [[computeIntervalPoints]] method.
36
+ * @beta
37
+ */
38
+ export interface ComputeIntervalPointsArgs extends ComputeFrameArgs {
39
+ /** A factor applied to divide each straight edge. A value of 1 will place a single point on each vertex. */
40
+ lineIntervalFactor?: number;
41
+ /** A factor applied to divide each straight edge. A value of 1 will place a single point on each vertex. */
42
+ arcIntervalFactor?: number;
43
+ }
44
+ /**
45
+ * Computes points along the edges of the frame geometry based on the provided frame shape, range, and interval factors.
46
+ * These can be used for snapping or attaching leaders.
47
+ * @returns an array of [[Point3d]] that represent the points along the edges of the frame geometry. Returns `undefined` if the loop created by `computeFrame` is empty.
48
+ * @beta
49
+ */
50
+ export declare function computeIntervalPoints({ frame, range, transform, lineIntervalFactor, arcIntervalFactor }: ComputeIntervalPointsArgs): Point3d[] | undefined;
51
+ //# sourceMappingURL=FrameGeometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FrameGeometry.d.ts","sourceRoot":"","sources":["../../../src/annotations/FrameGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAA4B,eAAe,EAAe,cAAc,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC3J,OAAO,EAA0C,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAY,MAAM,sBAAsB,CAAC;AAEjI;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,GAAG,OAAO,CAsC5K;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,KAAK,EAAE,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IACjD,2BAA2B;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,2EAA2E;IAC3E,SAAS,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAehE;AAED;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IACjE,4GAA4G;IAC5G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4GAA4G;IAC5G,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,kBAAwB,EAAE,iBAAwB,EAAE,EAAE,yBAAyB,GAAG,OAAO,EAAE,GAAG,SAAS,CAWvK"}
@@ -0,0 +1,249 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module ElementGeometry
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.appendFrameToBuilder = appendFrameToBuilder;
11
+ exports.computeFrame = computeFrame;
12
+ exports.computeIntervalPoints = computeIntervalPoints;
13
+ const core_common_1 = require("@itwin/core-common");
14
+ const core_geometry_1 = require("@itwin/core-geometry");
15
+ /**
16
+ * Based on the frame style, this method will construct and append [[GeometryParams]] (for line style) and a [[Loop]] (for the frame shape) to the builder.
17
+ * @param builder that will be appended to in place
18
+ * @param frame
19
+ * @param range to enclose with the frame
20
+ * @param transform that transforms the range to world coordinates
21
+ * @returns `true` if any geometry was appended to the builder
22
+ * @beta
23
+ */
24
+ function appendFrameToBuilder(builder, frame, range, transform, geomParams) {
25
+ if (frame.shape === "none" || frame.shape === undefined) {
26
+ return false;
27
+ }
28
+ const params = geomParams.clone();
29
+ if (frame.fill === "none" || frame.fill === undefined) {
30
+ params.fillDisplay = core_common_1.FillDisplay.Never;
31
+ }
32
+ else if (frame.fill === "background") {
33
+ params.backgroundFill = core_common_1.BackgroundFill.Solid;
34
+ params.fillDisplay = core_common_1.FillDisplay.Blanking;
35
+ }
36
+ else if (frame.fill !== "subcategory") {
37
+ params.fillColor = core_common_1.ColorDef.fromJSON(frame.fill);
38
+ params.lineColor = params.fillColor;
39
+ params.fillDisplay = core_common_1.FillDisplay.Blanking;
40
+ }
41
+ if (frame.border !== "subcategory") {
42
+ params.lineColor = core_common_1.ColorDef.fromJSON(frame.border);
43
+ params.weight = frame.borderWeight;
44
+ }
45
+ const frameGeometry = computeFrame({ frame: frame.shape, range, transform });
46
+ if (!builder.appendGeometryParamsChange(params) || !builder.appendGeometryQuery(frameGeometry)) {
47
+ return false;
48
+ }
49
+ // The tile generator does not produce an outline for shapes with blanking fill. We must add the outline separately.
50
+ if (params.fillDisplay === core_common_1.FillDisplay.Blanking) {
51
+ const outlineParams = params.clone();
52
+ outlineParams.fillDisplay = core_common_1.FillDisplay.Never;
53
+ if (!builder.appendGeometryParamsChange(outlineParams) || !builder.appendGeometryQuery(frameGeometry)) {
54
+ return false;
55
+ }
56
+ }
57
+ return true;
58
+ }
59
+ /**
60
+ * Computes the frame geometry based on the provided frame shape and range.
61
+ * @returns a [Loop]($geometry) or [Path]($geometry) (if it's just a line) that represents the frame geometry
62
+ * @beta
63
+ */
64
+ function computeFrame(args) {
65
+ switch (args.frame) {
66
+ case "line": return computeLine(args.range, args.transform);
67
+ case "rectangle": return computeRectangle(args.range, args.transform);
68
+ case "circle": return computeCircle(args.range, args.transform);
69
+ case "equilateralTriangle": return computeTriangle(args.range, args.transform);
70
+ case "diamond": return computeDiamond(args.range, args.transform);
71
+ case "square": return computeSquare(args.range, args.transform);
72
+ case "pentagon": return computePolygon(5, args.range, args.transform, 90);
73
+ case "hexagon": return computePolygon(6, args.range, args.transform);
74
+ case "octagon": return computePolygon(8, args.range, args.transform, 180 / 8); // or pi/8 in radians
75
+ case "capsule": return computeCapsule(args.range, args.transform);
76
+ case "roundedRectangle": return computeRoundedRectangle(args.range, args.transform);
77
+ default: return computeRectangle(args.range, args.transform);
78
+ }
79
+ }
80
+ /**
81
+ * Computes points along the edges of the frame geometry based on the provided frame shape, range, and interval factors.
82
+ * These can be used for snapping or attaching leaders.
83
+ * @returns an array of [[Point3d]] that represent the points along the edges of the frame geometry. Returns `undefined` if the loop created by `computeFrame` is empty.
84
+ * @beta
85
+ */
86
+ function computeIntervalPoints({ frame, range, transform, lineIntervalFactor = 0.5, arcIntervalFactor = 0.25 }) {
87
+ const points = [];
88
+ const curves = computeFrame({ frame, range, transform }).collectCurvePrimitives(undefined, false, true);
89
+ curves.forEach((curve) => {
90
+ const end = curve instanceof core_geometry_1.Arc3d ? arcIntervalFactor : lineIntervalFactor;
91
+ for (let interval = 0; interval <= 1; interval += end) {
92
+ points.push(curve.fractionToPoint(interval));
93
+ }
94
+ });
95
+ return points;
96
+ }
97
+ /** Line - currently just adds an underline. Once we have leaders, this method may change. */
98
+ const computeLine = (range, transform) => {
99
+ const points = [core_geometry_1.Point3d.create(range.low.x, range.low.y), core_geometry_1.Point3d.create(range.high.x, range.low.y)];
100
+ const frame = core_geometry_1.LineString3d.createPoints(points);
101
+ return core_geometry_1.Path.create(frame.cloneTransformed(transform));
102
+ };
103
+ /** Rectangle - simplest frame */
104
+ const computeRectangle = (range, transform) => {
105
+ const points = range.corners3d(true);
106
+ const frame = core_geometry_1.LineString3d.createPoints(points);
107
+ return core_geometry_1.Loop.create(frame.cloneTransformed(transform));
108
+ };
109
+ /** Rounded Rectangle: each corner will be turned into an arc with the radius of the arc being the @param radiusFactor * the height (yLength) of the range */
110
+ const computeRoundedRectangle = (range, transform, radiusFactor = 0.25) => {
111
+ const radius = range.yLength() * radiusFactor * Math.sqrt(2);
112
+ // We're going to circumscribe the range with our rounded edges. The corners of the range will fall on 45 degree angles.
113
+ const radiusOffsetFactor = range.yLength() * radiusFactor;
114
+ // These values are the origins of the circles
115
+ const inLeft = range.low.x + radiusOffsetFactor;
116
+ const inRight = range.high.x - radiusOffsetFactor;
117
+ const inBottom = range.low.y + radiusOffsetFactor;
118
+ const inTop = range.high.y - radiusOffsetFactor;
119
+ // These values exist on the circles
120
+ const exLeft = inLeft - radius;
121
+ const exRight = inRight + radius;
122
+ const exBottom = inBottom - radius;
123
+ const exTop = inTop + radius;
124
+ const q1 = core_geometry_1.AngleSweep.createStartEndDegrees(0, 90);
125
+ const q2 = core_geometry_1.AngleSweep.createStartEndDegrees(90, 180);
126
+ const q3 = core_geometry_1.AngleSweep.createStartEndDegrees(180, 270);
127
+ const q4 = core_geometry_1.AngleSweep.createStartEndDegrees(270, 360);
128
+ const curves = [
129
+ core_geometry_1.LineString3d.create([core_geometry_1.Point3d.create(inRight, exTop), core_geometry_1.Point3d.create(inLeft, exTop)]), // top
130
+ core_geometry_1.Arc3d.createXY(core_geometry_1.Point3d.create(inLeft, inTop), radius, q2), // top left
131
+ core_geometry_1.LineString3d.create([core_geometry_1.Point3d.create(exLeft, inTop), core_geometry_1.Point3d.create(exLeft, inBottom)]), // left
132
+ core_geometry_1.Arc3d.createXY(core_geometry_1.Point3d.create(inLeft, inBottom), radius, q3), // bottom left
133
+ core_geometry_1.LineString3d.create([core_geometry_1.Point3d.create(inLeft, exBottom), core_geometry_1.Point3d.create(inRight, exBottom)]), // bottom
134
+ core_geometry_1.Arc3d.createXY(core_geometry_1.Point3d.create(inRight, inBottom), radius, q4), // bottom right
135
+ core_geometry_1.LineString3d.create([core_geometry_1.Point3d.create(exRight, inBottom), core_geometry_1.Point3d.create(exRight, inTop)]), // right
136
+ core_geometry_1.Arc3d.createXY(core_geometry_1.Point3d.create(inRight, inTop), radius, q1), // top right
137
+ ];
138
+ return core_geometry_1.Loop.createArray(curves.map((curve) => curve.cloneTransformed(transform)));
139
+ };
140
+ /** Circle */
141
+ const computeCircle = (range, transform) => {
142
+ const radius = range.low.distance(range.high) / 2;
143
+ const frame = core_geometry_1.Arc3d.createXY(core_geometry_1.Point3d.createFrom(range.center), radius);
144
+ return core_geometry_1.Loop.create(frame.cloneTransformed(transform));
145
+ };
146
+ /** Equilateral Triangle */
147
+ const computeTriangle = (range, transform) => {
148
+ const xLength = range.xLength();
149
+ const yLength = range.yLength();
150
+ const center = range.center;
151
+ const points = [];
152
+ const magnitude = (xLength > yLength) ? (xLength * Math.sqrt(3) + yLength) / 2 : (yLength * Math.sqrt(3) + xLength) / 2;
153
+ const v1 = core_geometry_1.Vector2d.create(0, magnitude);
154
+ const vectors = [
155
+ v1, // top
156
+ v1.rotateXY(core_geometry_1.Angle.createDegrees(120)), // left
157
+ v1.rotateXY(core_geometry_1.Angle.createDegrees(240)), // right
158
+ v1 // top
159
+ ];
160
+ vectors.forEach((v) => {
161
+ points.push(core_geometry_1.Point3d.create(center.x + v.x, center.y + v.y));
162
+ });
163
+ const frame = core_geometry_1.LineString3d.createPoints(points);
164
+ return core_geometry_1.Loop.create(frame.cloneTransformed(transform));
165
+ };
166
+ /** Diamond (square rotated 45 degrees) */
167
+ const computeDiamond = (range, transform) => {
168
+ const offset = (range.xLength() + range.yLength()) / 2;
169
+ const center = range.center;
170
+ const points = [
171
+ core_geometry_1.Point3d.createFrom({ x: center.x, y: center.y + offset }), // top
172
+ core_geometry_1.Point3d.createFrom({ x: center.x + offset, y: center.y }), // right
173
+ core_geometry_1.Point3d.createFrom({ x: center.x, y: center.y - offset }), // bottom
174
+ core_geometry_1.Point3d.createFrom({ x: center.x - offset, y: center.y }), // left
175
+ core_geometry_1.Point3d.createFrom({ x: center.x, y: center.y + offset }), // top
176
+ ];
177
+ const frame = core_geometry_1.LineString3d.createPoints(points);
178
+ return core_geometry_1.Loop.create(frame.cloneTransformed(transform));
179
+ };
180
+ /** Square */
181
+ const computeSquare = (range, transform) => {
182
+ // Extend range
183
+ const xLength = range.xLength() / 2;
184
+ const yLength = range.yLength() / 2;
185
+ const center = range.center;
186
+ if (xLength > yLength) {
187
+ range.extendPoint({ x: center.x, y: center.y + xLength });
188
+ range.extendPoint({ x: center.x, y: center.y - xLength });
189
+ }
190
+ else {
191
+ range.extendPoint({ x: center.x + yLength, y: center.y });
192
+ range.extendPoint({ x: center.x - yLength, y: center.y });
193
+ }
194
+ const points = range.corners3d(true);
195
+ const frame = core_geometry_1.LineString3d.createPoints(points);
196
+ return core_geometry_1.Loop.create(frame.cloneTransformed(transform));
197
+ };
198
+ /** Capsule (or pill shape) */
199
+ const computeCapsule = (range, transform) => {
200
+ const height = range.yLength();
201
+ const radius = height * (Math.sqrt(2) / 2);
202
+ // We're going to circumscribe the range with our rounded edges. The corners of the range will fall on 45 degree angles.
203
+ const radiusOffsetFactor = height / 2;
204
+ // These values are the origins of the circles
205
+ const inLeft = range.low.x + radiusOffsetFactor;
206
+ const inRight = range.high.x - radiusOffsetFactor;
207
+ const inBottom = range.low.y + radiusOffsetFactor;
208
+ const inTop = range.high.y - radiusOffsetFactor;
209
+ // These values exist on the circles
210
+ const exBottom = inBottom - radius;
211
+ const exTop = inTop + radius;
212
+ const leftHalfCircle = core_geometry_1.AngleSweep.createStartEndDegrees(90, 270);
213
+ const rightHalfCircle = core_geometry_1.AngleSweep.createStartEndDegrees(-90, 90);
214
+ const curves = [
215
+ core_geometry_1.LineString3d.create([core_geometry_1.Point3d.create(inRight, exTop), core_geometry_1.Point3d.create(inLeft, exTop)]), // top
216
+ core_geometry_1.Arc3d.createXY(core_geometry_1.Point3d.create(inLeft, range.center.y), radius, leftHalfCircle), // left
217
+ core_geometry_1.LineString3d.create([core_geometry_1.Point3d.create(inLeft, exBottom), core_geometry_1.Point3d.create(inRight, exBottom)]), // bottom
218
+ core_geometry_1.Arc3d.createXY(core_geometry_1.Point3d.create(inRight, range.center.y), radius, rightHalfCircle), // right
219
+ ];
220
+ return core_geometry_1.Loop.createArray(curves.map((curve) => curve.cloneTransformed(transform)));
221
+ };
222
+ /** Regular polygon with n sides: note, this a generic method that can be used to create any polygon, but the frame will not be as tightly encapsulating. */
223
+ const computePolygon = (n, range, transform, angleOffset = 0) => {
224
+ // These are math terms: cspell:ignore inradius circumradius
225
+ if (n < 3)
226
+ throw new Error("A polygon must have at least 3 sides.");
227
+ // We're assuming the polygon is a regular polygon with `n` sides.
228
+ // The center of the polygon is the center of the range.
229
+ const center = range.center;
230
+ // The inradius is the distance from the center to the midpoint of each side of the polygon. On our range, this coincides with the distance from the center to one of its corners.
231
+ const inradius = range.low.distance(range.high) / 2;
232
+ // The circumradius is the distance from the center to each vertex of the polygon.
233
+ const circumradius = inradius / Math.cos(Math.PI / n);
234
+ // The exterior angles add up to 360 degrees.
235
+ const angleIncrement = 360 / n;
236
+ const vertices = [];
237
+ // Add a point for each vertex
238
+ for (let i = 0; i < n; i++) {
239
+ const angle = core_geometry_1.Angle.createDegrees(i * angleIncrement + angleOffset);
240
+ const vector = core_geometry_1.Vector2d.createPolar(circumradius, angle);
241
+ vertices.push(core_geometry_1.Point3d.create(center.x + vector.x, center.y + vector.y));
242
+ }
243
+ // Close the polygon
244
+ vertices.push(vertices[0]);
245
+ // Finally compute the loop!
246
+ const frame = core_geometry_1.LineString3d.createPoints(vertices);
247
+ return core_geometry_1.Loop.create(frame.cloneTransformed(transform));
248
+ };
249
+ //# sourceMappingURL=FrameGeometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FrameGeometry.js","sourceRoot":"","sources":["../../../src/annotations/FrameGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAeH,oDAsCC;AAoBD,oCAeC;AAmBD,sDAWC;AAnHD,oDAA2J;AAC3J,wDA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AAC,CAAC;IAC/B,MAAM,QAAQ,GAAc,EAAE,CAAC;IAE/B,8BAA8B;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,KAAK,GAAG,qBAAK,CAAC,aAAa,CAAC,CAAC,GAAG,cAAc,GAAG,WAAW,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,wBAAQ,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACzD,QAAQ,CAAC,IAAI,CAAC,uBAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,oBAAoB;IACpB,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3B,4BAA4B;IAC5B,MAAM,KAAK,GAAG,4BAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAClD,OAAO,oBAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ElementGeometry\r\n */\r\n\r\n\r\nimport { BackgroundFill, ColorDef, ElementGeometry, FillDisplay, GeometryParams, TextAnnotationFrameShape, TextFrameStyleProps } from \"@itwin/core-common\";\r\nimport { Angle, AngleSweep, Arc3d, LineString3d, Loop, Path, Point3d, Range2d, Transform, Vector2d } from \"@itwin/core-geometry\";\r\n\r\n/**\r\n * Based on the frame style, this method will construct and append [[GeometryParams]] (for line style) and a [[Loop]] (for the frame shape) to the builder.\r\n * @param builder that will be appended to in place\r\n * @param frame\r\n * @param range to enclose with the frame\r\n * @param transform that transforms the range to world coordinates\r\n * @returns `true` if any geometry was appended to the builder\r\n* @beta\r\n */\r\nexport function appendFrameToBuilder(builder: ElementGeometry.Builder, frame: TextFrameStyleProps, range: Range2d, transform: Transform, geomParams: GeometryParams): boolean {\r\n if (frame.shape === \"none\" || frame.shape === undefined) {\r\n return false;\r\n }\r\n\r\n const params = geomParams.clone();\r\n\r\n if (frame.fill === \"none\" || frame.fill === undefined) {\r\n params.fillDisplay = FillDisplay.Never;\r\n } else if (frame.fill === \"background\") {\r\n params.backgroundFill = BackgroundFill.Solid;\r\n params.fillDisplay = FillDisplay.Blanking;\r\n } else if (frame.fill !== \"subcategory\") {\r\n params.fillColor = ColorDef.fromJSON(frame.fill);\r\n params.lineColor = params.fillColor;\r\n params.fillDisplay = FillDisplay.Blanking;\r\n }\r\n\r\n if (frame.border !== \"subcategory\") {\r\n params.lineColor = ColorDef.fromJSON(frame.border);\r\n params.weight = frame.borderWeight;\r\n }\r\n\r\n const frameGeometry = computeFrame({ frame: frame.shape, range, transform });\r\n if (!builder.appendGeometryParamsChange(params) || !builder.appendGeometryQuery(frameGeometry)) {\r\n return false;\r\n }\r\n\r\n // The tile generator does not produce an outline for shapes with blanking fill. We must add the outline separately.\r\n if (params.fillDisplay === FillDisplay.Blanking) {\r\n const outlineParams = params.clone();\r\n outlineParams.fillDisplay = FillDisplay.Never;\r\n if (!builder.appendGeometryParamsChange(outlineParams) || !builder.appendGeometryQuery(frameGeometry)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * Arguments for the [[computeFrame]] method.\r\n * @beta\r\n */\r\nexport interface ComputeFrameArgs {\r\n /** Frame shape to be calculated */\r\n frame: Exclude<TextAnnotationFrameShape, \"none\">;\r\n /** Range to be enclosed */\r\n range: Range2d;\r\n /** Transform that translates and rotates the range to world coordinates */\r\n transform: Transform;\r\n}\r\n\r\n/**\r\n * Computes the frame geometry based on the provided frame shape and range.\r\n * @returns a [Loop]($geometry) or [Path]($geometry) (if it's just a line) that represents the frame geometry\r\n * @beta\r\n */\r\nexport function computeFrame(args: ComputeFrameArgs): Loop | Path {\r\n switch (args.frame) {\r\n case \"line\": return computeLine(args.range, args.transform);\r\n case \"rectangle\": return computeRectangle(args.range, args.transform);\r\n case \"circle\": return computeCircle(args.range, args.transform);\r\n case \"equilateralTriangle\": return computeTriangle(args.range, args.transform);\r\n case \"diamond\": return computeDiamond(args.range, args.transform);\r\n case \"square\": return computeSquare(args.range, args.transform);\r\n case \"pentagon\": return computePolygon(5, args.range, args.transform, 90);\r\n case \"hexagon\": return computePolygon(6, args.range, args.transform);\r\n case \"octagon\": return computePolygon(8, args.range, args.transform, 180 / 8); // or pi/8 in radians\r\n case \"capsule\": return computeCapsule(args.range, args.transform);\r\n case \"roundedRectangle\": return computeRoundedRectangle(args.range, args.transform);\r\n default: return computeRectangle(args.range, args.transform);\r\n }\r\n}\r\n\r\n/**\r\n * Arguments for the [[computeIntervalPoints]] method.\r\n * @beta\r\n */\r\nexport interface ComputeIntervalPointsArgs extends ComputeFrameArgs {\r\n /** A factor applied to divide each straight edge. A value of 1 will place a single point on each vertex. */\r\n lineIntervalFactor?: number;\r\n /** A factor applied to divide each straight edge. A value of 1 will place a single point on each vertex. */\r\n arcIntervalFactor?: number;\r\n}\r\n\r\n/**\r\n * Computes points along the edges of the frame geometry based on the provided frame shape, range, and interval factors.\r\n * These can be used for snapping or attaching leaders.\r\n * @returns an array of [[Point3d]] that represent the points along the edges of the frame geometry. Returns `undefined` if the loop created by `computeFrame` is empty.\r\n * @beta\r\n */\r\nexport function computeIntervalPoints({ frame, range, transform, lineIntervalFactor = 0.5, arcIntervalFactor = 0.25 }: ComputeIntervalPointsArgs): Point3d[] | undefined {\r\n const points: Point3d[] = [];\r\n const curves = computeFrame({ frame, range, transform }).collectCurvePrimitives(undefined, false, true);\r\n\r\n curves.forEach((curve) => {\r\n const end = curve instanceof Arc3d ? arcIntervalFactor : lineIntervalFactor;\r\n for (let interval = 0; interval <= 1; interval += end) {\r\n points.push(curve.fractionToPoint(interval));\r\n }\r\n });\r\n return points;\r\n}\r\n\r\n/** Line - currently just adds an underline. Once we have leaders, this method may change. */\r\nconst computeLine = (range: Range2d, transform: Transform): Path => {\r\n const points = [Point3d.create(range.low.x, range.low.y), Point3d.create(range.high.x, range.low.y)];\r\n const frame = LineString3d.createPoints(points);\r\n\r\n return Path.create(frame.cloneTransformed(transform));\r\n}\r\n\r\n/** Rectangle - simplest frame */\r\nconst computeRectangle = (range: Range2d, transform: Transform): Loop => {\r\n const points = range.corners3d(true);\r\n const frame = LineString3d.createPoints(points);\r\n\r\n return Loop.create(frame.cloneTransformed(transform));\r\n}\r\n\r\n/** Rounded Rectangle: each corner will be turned into an arc with the radius of the arc being the @param radiusFactor * the height (yLength) of the range */\r\nconst computeRoundedRectangle = (range: Range2d, transform: Transform, radiusFactor: number = 0.25): Loop => {\r\n const radius = range.yLength() * radiusFactor * Math.sqrt(2);\r\n // We're going to circumscribe the range with our rounded edges. The corners of the range will fall on 45 degree angles.\r\n const radiusOffsetFactor = range.yLength() * radiusFactor;\r\n\r\n // These values are the origins of the circles\r\n const inLeft = range.low.x + radiusOffsetFactor;\r\n const inRight = range.high.x - radiusOffsetFactor;\r\n const inBottom = range.low.y + radiusOffsetFactor;\r\n const inTop = range.high.y - radiusOffsetFactor\r\n\r\n // These values exist on the circles\r\n const exLeft = inLeft - radius;\r\n const exRight = inRight + radius;\r\n const exBottom = inBottom - radius;\r\n const exTop = inTop + radius;\r\n\r\n const q1 = AngleSweep.createStartEndDegrees(0, 90);\r\n const q2 = AngleSweep.createStartEndDegrees(90, 180);\r\n const q3 = AngleSweep.createStartEndDegrees(180, 270);\r\n const q4 = AngleSweep.createStartEndDegrees(270, 360);\r\n\r\n\r\n const curves = [\r\n LineString3d.create([Point3d.create(inRight, exTop), Point3d.create(inLeft, exTop)]), // top\r\n Arc3d.createXY(Point3d.create(inLeft, inTop), radius, q2), // top left\r\n LineString3d.create([Point3d.create(exLeft, inTop), Point3d.create(exLeft, inBottom)]), // left\r\n Arc3d.createXY(Point3d.create(inLeft, inBottom), radius, q3), // bottom left\r\n LineString3d.create([Point3d.create(inLeft, exBottom), Point3d.create(inRight, exBottom)]), // bottom\r\n Arc3d.createXY(Point3d.create(inRight, inBottom), radius, q4), // bottom right\r\n LineString3d.create([Point3d.create(exRight, inBottom), Point3d.create(exRight, inTop)]), // right\r\n Arc3d.createXY(Point3d.create(inRight, inTop), radius, q1), // top right\r\n ];\r\n\r\n return Loop.createArray(curves.map((curve) => curve.cloneTransformed(transform)))\r\n}\r\n\r\n\r\n/** Circle */\r\nconst computeCircle = (range: Range2d, transform: Transform): Loop => {\r\n const radius = range.low.distance(range.high) / 2;\r\n const frame = Arc3d.createXY(Point3d.createFrom(range.center), radius);\r\n return Loop.create(frame.cloneTransformed(transform));\r\n}\r\n\r\n/** Equilateral Triangle */\r\nconst computeTriangle = (range: Range2d, transform: Transform): Loop => {\r\n\r\n const xLength = range.xLength();\r\n const yLength = range.yLength();\r\n const center = range.center;\r\n const points: Point3d[] = [];\r\n\r\n const magnitude = (xLength > yLength) ? (xLength * Math.sqrt(3) + yLength) / 2 : (yLength * Math.sqrt(3) + xLength) / 2;\r\n\r\n const v1 = Vector2d.create(0, magnitude);\r\n const vectors = [\r\n v1, // top\r\n v1.rotateXY(Angle.createDegrees(120)), // left\r\n v1.rotateXY(Angle.createDegrees(240)), // right\r\n v1 // top\r\n ];\r\n\r\n vectors.forEach((v) => {\r\n points.push(Point3d.create(center.x + v.x, center.y + v.y));\r\n });\r\n\r\n const frame = LineString3d.createPoints(points);\r\n\r\n return Loop.create(frame.cloneTransformed(transform));\r\n}\r\n\r\n/** Diamond (square rotated 45 degrees) */\r\nconst computeDiamond = (range: Range2d, transform: Transform): Loop => {\r\n const offset = (range.xLength() + range.yLength()) / 2;\r\n const center = range.center;\r\n\r\n const points = [\r\n Point3d.createFrom({ x: center.x, y: center.y + offset }), // top\r\n Point3d.createFrom({ x: center.x + offset, y: center.y }), // right\r\n Point3d.createFrom({ x: center.x, y: center.y - offset }), // bottom\r\n Point3d.createFrom({ x: center.x - offset, y: center.y }), // left\r\n Point3d.createFrom({ x: center.x, y: center.y + offset }), // top\r\n ];\r\n\r\n const frame = LineString3d.createPoints(points);\r\n\r\n return Loop.create(frame.cloneTransformed(transform));\r\n}\r\n\r\n/** Square */\r\nconst computeSquare = (range: Range2d, transform: Transform): Loop => {\r\n\r\n // Extend range\r\n const xLength = range.xLength() / 2;\r\n const yLength = range.yLength() / 2;\r\n const center = range.center;\r\n if (xLength > yLength) {\r\n range.extendPoint({ x: center.x, y: center.y + xLength });\r\n range.extendPoint({ x: center.x, y: center.y - xLength });\r\n } else {\r\n range.extendPoint({ x: center.x + yLength, y: center.y });\r\n range.extendPoint({ x: center.x - yLength, y: center.y });\r\n }\r\n\r\n const points = range.corners3d(true);\r\n const frame = LineString3d.createPoints(points);\r\n\r\n return Loop.create(frame.cloneTransformed(transform));\r\n}\r\n\r\n/** Capsule (or pill shape) */\r\nconst computeCapsule = (range: Range2d, transform: Transform): Loop => {\r\n const height = range.yLength();\r\n const radius = height * (Math.sqrt(2) / 2);\r\n\r\n // We're going to circumscribe the range with our rounded edges. The corners of the range will fall on 45 degree angles.\r\n const radiusOffsetFactor = height / 2;\r\n\r\n // These values are the origins of the circles\r\n const inLeft = range.low.x + radiusOffsetFactor;\r\n const inRight = range.high.x - radiusOffsetFactor;\r\n const inBottom = range.low.y + radiusOffsetFactor;\r\n const inTop = range.high.y - radiusOffsetFactor\r\n\r\n // These values exist on the circles\r\n const exBottom = inBottom - radius;\r\n const exTop = inTop + radius;\r\n\r\n const leftHalfCircle = AngleSweep.createStartEndDegrees(90, 270);\r\n const rightHalfCircle = AngleSweep.createStartEndDegrees(-90, 90);\r\n\r\n const curves = [\r\n LineString3d.create([Point3d.create(inRight, exTop), Point3d.create(inLeft, exTop)]), // top\r\n Arc3d.createXY(Point3d.create(inLeft, range.center.y), radius, leftHalfCircle), // left\r\n LineString3d.create([Point3d.create(inLeft, exBottom), Point3d.create(inRight, exBottom)]), // bottom\r\n Arc3d.createXY(Point3d.create(inRight, range.center.y), radius, rightHalfCircle), // right\r\n ];\r\n\r\n return Loop.createArray(curves.map((curve) => curve.cloneTransformed(transform)));\r\n}\r\n\r\n/** Regular polygon with n sides: note, this a generic method that can be used to create any polygon, but the frame will not be as tightly encapsulating. */\r\nconst computePolygon = (n: number, range: Range2d, transform: Transform, angleOffset: number = 0): Loop => {\r\n // These are math terms: cspell:ignore inradius circumradius\r\n if (n < 3) throw new Error(\"A polygon must have at least 3 sides.\");\r\n\r\n // We're assuming the polygon is a regular polygon with `n` sides.\r\n // The center of the polygon is the center of the range.\r\n const center = range.center;\r\n // The inradius is the distance from the center to the midpoint of each side of the polygon. On our range, this coincides with the distance from the center to one of its corners.\r\n const inradius = range.low.distance(range.high) / 2;\r\n // The circumradius is the distance from the center to each vertex of the polygon.\r\n const circumradius = inradius / Math.cos(Math.PI / n);\r\n\r\n // The exterior angles add up to 360 degrees.\r\n const angleIncrement = 360 / n;\r\n const vertices: Point3d[] = [];\r\n\r\n // Add a point for each vertex\r\n for (let i = 0; i < n; i++) {\r\n const angle = Angle.createDegrees(i * angleIncrement + angleOffset);\r\n const vector = Vector2d.createPolar(circumradius, angle);\r\n vertices.push(Point3d.create(center.x + vector.x, center.y + vector.y));\r\n }\r\n\r\n // Close the polygon\r\n vertices.push(vertices[0]);\r\n\r\n // Finally compute the loop!\r\n const frame = LineString3d.createPoints(vertices);\r\n return Loop.create(frame.cloneTransformed(transform));\r\n};"]}
@@ -0,0 +1,53 @@
1
+ /** @packageDocumentation
2
+ * @module ElementGeometry
3
+ */
4
+ import { ElementGeometry, GeometryParams, TextAnnotationLeader } from "@itwin/core-common";
5
+ import { Loop, Path, Point3d, Transform, Vector3d } from "@itwin/core-geometry";
6
+ import { TextBlockLayout, TextStyleResolver } from "./TextBlockLayout";
7
+ /**
8
+ * Constructs and appends leader lines and their terminators to the provided geometry builder for a text annotation.
9
+ *
10
+ * This function processes an array of `TextAnnotationLeader` objects, computes their attachment points
11
+ * relative to a text frame (or a default rectangular frame if none is provided), and appends the leader
12
+ * line and terminator geometry to the builder. It also applies color overrides if specified
13
+ * in the leader's style overrides.
14
+ *
15
+ * @param builder - The geometry builder to which the leader geometries will be appended.
16
+ * @param leaders - An array of leader properties.
17
+ * @param layout - The layout information for the text block, including its range.
18
+ * @param transform - The transform to apply to the frame and leader geometry.
19
+ * @param params - The geometry parameters, such as color, to use for the leader lines.
20
+ * @param frame - (Optional) The style properties for the text frame. If not provided or set to "none", a default rectangle is used.
21
+ * @returns `true` if at least one leader with a terminator was successfully appended; otherwise, `false`.
22
+ * @beta
23
+ */
24
+ export declare function appendLeadersToBuilder(builder: ElementGeometry.Builder, leaders: TextAnnotationLeader[], layout: TextBlockLayout, transform: Transform, params: GeometryParams, textStyleResolver: TextStyleResolver): boolean;
25
+ /**
26
+ * Computes the direction vector for an "elbow" for leader based on the attachment point and a frame curve.
27
+ * The elbow direction is determined by whether the attachment point is closer to the left or right side of the frame.
28
+ * If the computed elbow would be tangent to the frame at the intersection, no elbow direction is returned.
29
+ *
30
+ * @param attachmentPoint - The point where the leader attaches.
31
+ * @param frameCurve - The frame curve (either a Loop or Path) to which the leader is attached.
32
+ * @param elbowLength - The length of the elbow segment to be created.
33
+ * @returns The direction vector for the elbow, or `undefined` if the elbow would be tangent to the frame.
34
+ * @beta
35
+ */
36
+ export declare function computeElbowDirection(attachmentPoint: Point3d, frameCurve: Loop | Path, elbowLength: number): Vector3d | undefined;
37
+ /**
38
+ * Computes the attachment point for a leader line on a text annotation frame.
39
+ *
40
+ * The attachment point is determined based on the leader's attachment mode:
41
+ * - `"Nearest"`: Finds the closest point on the frame curve to the leader's start point.
42
+ * - `"KeyPoint"`: Uses a specific curve segment and fraction along that segment to determine the point.
43
+ * - `"TextPoint"`: Calculates a point on the text layout (top/bottom, left/right) and projects it onto the frame curve.
44
+ *
45
+ * @param leader - The leader props.
46
+ * @param frameCurve - The curve (Loop or Path) representing the annotation frame.
47
+ * @param textLayout - The layout information for the text block.
48
+ * @param transform - The transform applied to the text layout.
49
+ * @returns The computed attachment point as a `Point3d`, or `undefined` if it cannot be determined.
50
+ * @beta
51
+ */
52
+ export declare function computeLeaderAttachmentPoint(leader: TextAnnotationLeader, frameCurve: Loop | Path, textLayout: TextBlockLayout, transform: Transform): Point3d | undefined;
53
+ //# sourceMappingURL=LeaderGeometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LeaderGeometry.d.ts","sourceRoot":"","sources":["../../../src/annotations/LeaderGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAY,eAAe,EAAE,cAAc,EAAE,oBAAoB,EAAuC,MAAM,oBAAoB,CAAC;AAC1I,OAAO,EAA2C,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEzH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEvE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAmE9N;AAGD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,GAAG,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CA4BlI;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oBAAoB,EAC5B,UAAU,EAAE,IAAI,GAAG,IAAI,EACvB,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,SAAS,GACnB,OAAO,GAAG,SAAS,CAyCrB"}