@itwin/core-common 5.2.0-dev.29 → 5.2.0-dev.30

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 (357) hide show
  1. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  2. package/lib/cjs/AnalysisStyle.js.map +1 -1
  3. package/lib/cjs/Atmosphere.js.map +1 -1
  4. package/lib/cjs/AuthorizationClient.js.map +1 -1
  5. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  6. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  7. package/lib/cjs/Base64EncodedString.js.map +1 -1
  8. package/lib/cjs/BlobReader.js.map +1 -1
  9. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  10. package/lib/cjs/Camera.js.map +1 -1
  11. package/lib/cjs/CatalogIModel.js.map +1 -1
  12. package/lib/cjs/CesiumIonAssets.js.map +1 -1
  13. package/lib/cjs/ChangedElements.js.map +1 -1
  14. package/lib/cjs/ChangedEntities.js.map +1 -1
  15. package/lib/cjs/ChangesetProps.js.map +1 -1
  16. package/lib/cjs/ClipStyle.js.map +1 -1
  17. package/lib/cjs/Code.js.map +1 -1
  18. package/lib/cjs/ColorByName.js.map +1 -1
  19. package/lib/cjs/ColorDef.js.map +1 -1
  20. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  21. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  22. package/lib/cjs/ContextRealityModel.js.map +1 -1
  23. package/lib/cjs/ContourDisplay.js.map +1 -1
  24. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  25. package/lib/cjs/ECSchemaProps.js.map +1 -1
  26. package/lib/cjs/ECSqlReader.js.map +1 -1
  27. package/lib/cjs/ECSqlTypes.js.map +1 -1
  28. package/lib/cjs/ElementMesh.js.map +1 -1
  29. package/lib/cjs/ElementProps.d.ts +8 -0
  30. package/lib/cjs/ElementProps.d.ts.map +1 -1
  31. package/lib/cjs/ElementProps.js.map +1 -1
  32. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  33. package/lib/cjs/EntityProps.js.map +1 -1
  34. package/lib/cjs/EntityReference.js.map +1 -1
  35. package/lib/cjs/Environment.js.map +1 -1
  36. package/lib/cjs/FeatureIndex.js.map +1 -1
  37. package/lib/cjs/FeatureSymbology.js.map +1 -1
  38. package/lib/cjs/FeatureTable.js.map +1 -1
  39. package/lib/cjs/Fonts.js.map +1 -1
  40. package/lib/cjs/Frustum.js.map +1 -1
  41. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  42. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  43. package/lib/cjs/GeometryContainment.js.map +1 -1
  44. package/lib/cjs/GeometryParams.js.map +1 -1
  45. package/lib/cjs/GeometrySummary.js.map +1 -1
  46. package/lib/cjs/Gradient.js.map +1 -1
  47. package/lib/cjs/GraphicParams.js.map +1 -1
  48. package/lib/cjs/GroundPlane.js.map +1 -1
  49. package/lib/cjs/HSLColor.js.map +1 -1
  50. package/lib/cjs/HSVColor.js.map +1 -1
  51. package/lib/cjs/HiddenLine.js.map +1 -1
  52. package/lib/cjs/Hilite.js.map +1 -1
  53. package/lib/cjs/IModel.js.map +1 -1
  54. package/lib/cjs/IModelError.js.map +1 -1
  55. package/lib/cjs/IModelVersion.js.map +1 -1
  56. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  57. package/lib/cjs/Image.js.map +1 -1
  58. package/lib/cjs/IpcAppProps.js.map +1 -1
  59. package/lib/cjs/LightSettings.js.map +1 -1
  60. package/lib/cjs/LinePixels.js.map +1 -1
  61. package/lib/cjs/Localization.js.map +1 -1
  62. package/lib/cjs/MapImagerySettings.js.map +1 -1
  63. package/lib/cjs/MapLayerSettings.js.map +1 -1
  64. package/lib/cjs/MassProperties.js.map +1 -1
  65. package/lib/cjs/MaterialProps.js.map +1 -1
  66. package/lib/cjs/ModelClipGroup.js.map +1 -1
  67. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  68. package/lib/cjs/ModelProps.js.map +1 -1
  69. package/lib/cjs/NativeAppProps.js.map +1 -1
  70. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  71. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  72. package/lib/cjs/PlanarClipMask.js.map +1 -1
  73. package/lib/cjs/QPoint.js.map +1 -1
  74. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  75. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  76. package/lib/cjs/RenderMaterial.js.map +1 -1
  77. package/lib/cjs/RenderPolyline.js.map +1 -1
  78. package/lib/cjs/RenderTexture.js.map +1 -1
  79. package/lib/cjs/RgbColor.js.map +1 -1
  80. package/lib/cjs/RpcInterface.js.map +1 -1
  81. package/lib/cjs/RpcManager.js.map +1 -1
  82. package/lib/cjs/SessionProps.js.map +1 -1
  83. package/lib/cjs/SkyBox.js.map +1 -1
  84. package/lib/cjs/SolarCalculate.js.map +1 -1
  85. package/lib/cjs/SolarShadows.js.map +1 -1
  86. package/lib/cjs/SpatialClassification.js.map +1 -1
  87. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  88. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  89. package/lib/cjs/TerrainSettings.js.map +1 -1
  90. package/lib/cjs/TextureMapping.js.map +1 -1
  91. package/lib/cjs/TextureProps.js.map +1 -1
  92. package/lib/cjs/ThematicDisplay.js.map +1 -1
  93. package/lib/cjs/Thumbnail.js.map +1 -1
  94. package/lib/cjs/TileProps.js.map +1 -1
  95. package/lib/cjs/Tween.js.map +1 -1
  96. package/lib/cjs/TxnAction.js.map +1 -1
  97. package/lib/cjs/ViewDetails.js.map +1 -1
  98. package/lib/cjs/ViewFlags.js.map +1 -1
  99. package/lib/cjs/ViewProps.js.map +1 -1
  100. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  101. package/lib/cjs/annotation/TextAnnotation.d.ts +1 -1
  102. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  103. package/lib/cjs/annotation/TextAnnotation.js +1 -1
  104. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  105. package/lib/cjs/annotation/TextBlock.d.ts +2 -11
  106. package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
  107. package/lib/cjs/annotation/TextBlock.js +2 -16
  108. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  109. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  110. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  111. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  112. package/lib/cjs/core-common.js.map +1 -1
  113. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  114. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  115. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  116. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  117. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  118. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  119. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  120. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  121. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  122. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  123. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  124. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  125. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  126. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  127. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  128. package/lib/cjs/geometry/Placement.js.map +1 -1
  129. package/lib/cjs/geometry/Projection.js.map +1 -1
  130. package/lib/cjs/geometry/TextString.js.map +1 -1
  131. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  132. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  133. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  134. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  135. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  136. package/lib/cjs/internal/Snapping.js.map +1 -1
  137. package/lib/cjs/internal/cross-package.js.map +1 -1
  138. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  139. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  140. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  141. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  142. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  143. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  144. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  145. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  146. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  147. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  148. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  149. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  150. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  151. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  152. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  153. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  154. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  155. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  156. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  157. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  158. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  159. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  160. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  161. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  162. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  163. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  164. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  165. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  166. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  167. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  168. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  169. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  170. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  171. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  172. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  173. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  174. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  175. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  176. package/lib/cjs/tile/TileIO.js.map +1 -1
  177. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  178. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  179. package/lib/esm/AmbientOcclusion.js.map +1 -1
  180. package/lib/esm/AnalysisStyle.js.map +1 -1
  181. package/lib/esm/Atmosphere.js.map +1 -1
  182. package/lib/esm/AuthorizationClient.js.map +1 -1
  183. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  184. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  185. package/lib/esm/Base64EncodedString.js.map +1 -1
  186. package/lib/esm/BlobReader.js.map +1 -1
  187. package/lib/esm/BriefcaseTypes.js.map +1 -1
  188. package/lib/esm/Camera.js.map +1 -1
  189. package/lib/esm/CatalogIModel.js.map +1 -1
  190. package/lib/esm/CesiumIonAssets.js.map +1 -1
  191. package/lib/esm/ChangedElements.js.map +1 -1
  192. package/lib/esm/ChangedEntities.js.map +1 -1
  193. package/lib/esm/ChangesetProps.js.map +1 -1
  194. package/lib/esm/ClipStyle.js.map +1 -1
  195. package/lib/esm/Code.js.map +1 -1
  196. package/lib/esm/ColorByName.js.map +1 -1
  197. package/lib/esm/ColorDef.js.map +1 -1
  198. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  199. package/lib/esm/ConcurrentQuery.js.map +1 -1
  200. package/lib/esm/ContextRealityModel.js.map +1 -1
  201. package/lib/esm/ContourDisplay.js.map +1 -1
  202. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  203. package/lib/esm/ECSchemaProps.js.map +1 -1
  204. package/lib/esm/ECSqlReader.js.map +1 -1
  205. package/lib/esm/ECSqlTypes.js.map +1 -1
  206. package/lib/esm/ElementMesh.js.map +1 -1
  207. package/lib/esm/ElementProps.d.ts +8 -0
  208. package/lib/esm/ElementProps.d.ts.map +1 -1
  209. package/lib/esm/ElementProps.js.map +1 -1
  210. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  211. package/lib/esm/EntityProps.js.map +1 -1
  212. package/lib/esm/EntityReference.js.map +1 -1
  213. package/lib/esm/Environment.js.map +1 -1
  214. package/lib/esm/FeatureIndex.js.map +1 -1
  215. package/lib/esm/FeatureSymbology.js.map +1 -1
  216. package/lib/esm/FeatureTable.js.map +1 -1
  217. package/lib/esm/Fonts.js.map +1 -1
  218. package/lib/esm/Frustum.js.map +1 -1
  219. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  220. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  221. package/lib/esm/GeometryContainment.js.map +1 -1
  222. package/lib/esm/GeometryParams.js.map +1 -1
  223. package/lib/esm/GeometrySummary.js.map +1 -1
  224. package/lib/esm/Gradient.js.map +1 -1
  225. package/lib/esm/GraphicParams.js.map +1 -1
  226. package/lib/esm/GroundPlane.js.map +1 -1
  227. package/lib/esm/HSLColor.js.map +1 -1
  228. package/lib/esm/HSVColor.js.map +1 -1
  229. package/lib/esm/HiddenLine.js.map +1 -1
  230. package/lib/esm/Hilite.js.map +1 -1
  231. package/lib/esm/IModel.js.map +1 -1
  232. package/lib/esm/IModelError.js.map +1 -1
  233. package/lib/esm/IModelVersion.js.map +1 -1
  234. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  235. package/lib/esm/Image.js.map +1 -1
  236. package/lib/esm/IpcAppProps.js.map +1 -1
  237. package/lib/esm/LightSettings.js.map +1 -1
  238. package/lib/esm/LinePixels.js.map +1 -1
  239. package/lib/esm/Localization.js.map +1 -1
  240. package/lib/esm/MapImagerySettings.js.map +1 -1
  241. package/lib/esm/MapLayerSettings.js.map +1 -1
  242. package/lib/esm/MassProperties.js.map +1 -1
  243. package/lib/esm/MaterialProps.js.map +1 -1
  244. package/lib/esm/ModelClipGroup.js.map +1 -1
  245. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  246. package/lib/esm/ModelProps.js.map +1 -1
  247. package/lib/esm/NativeAppProps.js.map +1 -1
  248. package/lib/esm/OctEncodedNormal.js.map +1 -1
  249. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  250. package/lib/esm/PlanarClipMask.js.map +1 -1
  251. package/lib/esm/QPoint.js.map +1 -1
  252. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  253. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  254. package/lib/esm/RenderMaterial.js.map +1 -1
  255. package/lib/esm/RenderPolyline.js.map +1 -1
  256. package/lib/esm/RenderTexture.js.map +1 -1
  257. package/lib/esm/RgbColor.js.map +1 -1
  258. package/lib/esm/RpcInterface.js.map +1 -1
  259. package/lib/esm/RpcManager.js.map +1 -1
  260. package/lib/esm/SessionProps.js.map +1 -1
  261. package/lib/esm/SkyBox.js.map +1 -1
  262. package/lib/esm/SolarCalculate.js.map +1 -1
  263. package/lib/esm/SolarShadows.js.map +1 -1
  264. package/lib/esm/SpatialClassification.js.map +1 -1
  265. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  266. package/lib/esm/SubCategoryOverride.js.map +1 -1
  267. package/lib/esm/TerrainSettings.js.map +1 -1
  268. package/lib/esm/TextureMapping.js.map +1 -1
  269. package/lib/esm/TextureProps.js.map +1 -1
  270. package/lib/esm/ThematicDisplay.js.map +1 -1
  271. package/lib/esm/Thumbnail.js.map +1 -1
  272. package/lib/esm/TileProps.js.map +1 -1
  273. package/lib/esm/Tween.js.map +1 -1
  274. package/lib/esm/TxnAction.js.map +1 -1
  275. package/lib/esm/ViewDetails.js.map +1 -1
  276. package/lib/esm/ViewFlags.js.map +1 -1
  277. package/lib/esm/ViewProps.js.map +1 -1
  278. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  279. package/lib/esm/annotation/TextAnnotation.d.ts +1 -1
  280. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  281. package/lib/esm/annotation/TextAnnotation.js +1 -1
  282. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  283. package/lib/esm/annotation/TextBlock.d.ts +2 -11
  284. package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
  285. package/lib/esm/annotation/TextBlock.js +2 -16
  286. package/lib/esm/annotation/TextBlock.js.map +1 -1
  287. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  288. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  289. package/lib/esm/annotation/TextStyle.js.map +1 -1
  290. package/lib/esm/core-common.js.map +1 -1
  291. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  292. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  293. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  294. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  295. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  296. package/lib/esm/geometry/Cartographic.js.map +1 -1
  297. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  298. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  299. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  300. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  301. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  302. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  303. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  304. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  305. package/lib/esm/geometry/LineStyle.js.map +1 -1
  306. package/lib/esm/geometry/Placement.js.map +1 -1
  307. package/lib/esm/geometry/Projection.js.map +1 -1
  308. package/lib/esm/geometry/TextString.js.map +1 -1
  309. package/lib/esm/internal/BackendTypes.js.map +1 -1
  310. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  311. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  312. package/lib/esm/internal/RenderMesh.js.map +1 -1
  313. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  314. package/lib/esm/internal/Snapping.js.map +1 -1
  315. package/lib/esm/internal/cross-package.js.map +1 -1
  316. package/lib/esm/ipc/IpcSession.js.map +1 -1
  317. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  318. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  319. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  320. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  321. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  322. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  323. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  324. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  325. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  326. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  327. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  328. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  329. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  330. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  331. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  332. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  333. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  334. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  335. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  336. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  337. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  338. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  339. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  340. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  341. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  342. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  343. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  344. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  345. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  346. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  347. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  348. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  349. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  350. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  351. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  352. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  353. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  354. package/lib/esm/tile/TileIO.js.map +1 -1
  355. package/lib/esm/tile/TileMetadata.js.map +1 -1
  356. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  357. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/annotation/TextBlock.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAA0B,MAAM,aAAa,CAAC;AA4CxE;;;GAGG;AACH,MAAM,OAAgB,kBAAkB;IAC9B,eAAe,CAAyB;IAEhD,gBAAgB;IAChB,YAAsB,KAA+B;QACnD,IAAI,CAAC,eAAe,GAAG,iBAAiB,CAAC,UAAU,CAAC,KAAK,EAAE,cAAc,IAAI,EAAE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SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;QACxF,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAEe,MAAM,CAAC,KAAyB;QAC9C,IAAI,CAAC,CAAC,KAAK,YAAY,SAAS,CAAC,EAAE,CAAC;YAClC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3D,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACnI,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAC1E,KAAK,KAAM,KAAK,CAAC,OAAe,CAAC,GAAG,CAAC,CACtC,CAAC;QAEF,IAAI,CAAC,eAAe;YAAE,OAAO,KAAK,CAAC;QAEnC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChG,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { TextStyleSettings, TextStyleSettingsProps } from \"./TextStyle\";\n\n/** Options supplied to [[TextBlockComponent.clearStyleOverrides]] to control how the style overrides are cleared on the component and its child components.\n * @beta\n */\nexport interface ClearTextStyleOptions {\n /** Controls whether the styleOverrides of any child components are retained.\n * By default, all overrides are cleared.\n */\n preserveChildrenOverrides?: boolean;\n}\n\n/** The JSON representation of a [[TextBlockComponent]].\n * @beta\n */\nexport interface TextBlockComponentProps {\n /** Deviations from the base [[TextStyleSettings]] defined by the [AnnotationTextStyle]($backend) applied to this component.\n * This permits you to, e.g., create a [[TextBlock]] using \"Arial\" font and override one of its [[TextRun]]s to use \"Comic Sans\" instead.\n */\n styleOverrides?: TextStyleSettingsProps;\n}\n\n/** Options supplied to [[TextBlockComponent.stringify]] to control how the content is formatted.\n * @beta\n */\nexport interface TextBlockStringifyOptions {\n /** A string to insert in between each [[Paragraph]].\n * Default: \" \" - a single space.\n */\n paragraphBreak?: string;\n /** A string to insert for each [[LineBreakRun]].\n * Default: \" \" - a single space.\n */\n lineBreak?: string;\n /** A string to insert between the numerator and denominator of each [[FractionRun]].\n * Default: \"/\"\n */\n fractionSeparator?: string;\n /** The number of spaces to use for tabs. If not provided, tabs will be represented by a tab character: \"\\t\".\n * Default: \"undefined\" - use \"\\t\".\n */\n tabsAsSpaces?: number;\n}\n\n/** Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s, [[Paragraph]]s, and [[TextBlock]] itself.\n * The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents. Each component can specify an optional [[styleOverrides]] to customize that formatting.\n * @beta\n */\nexport abstract class TextBlockComponent {\n private _styleOverrides: TextStyleSettingsProps;\n\n /** @internal */\n protected constructor(props?: TextBlockComponentProps) {\n this._styleOverrides = TextStyleSettings.cloneProps(props?.styleOverrides ?? {});\n }\n\n /** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend) specified by `styleId` on the [[TextBlock]].\n * For example, if the style uses the \"Arial\" font, you can override that by settings `styleOverrides.fontName` to \"Comic Sans\".\n * @see [[clearStyleOverrides]] to reset this to an empty object.\n */\n public get styleOverrides(): TextStyleSettingsProps {\n return this._styleOverrides;\n }\n\n public set styleOverrides(overrides: TextStyleSettingsProps) {\n this._styleOverrides = TextStyleSettings.cloneProps(overrides);\n }\n\n /** Reset any [[styleOverrides]] applied to this component. */\n public clearStyleOverrides(_options?: ClearTextStyleOptions): void {\n this.styleOverrides = {};\n }\n\n /** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */\n public get overridesStyle(): boolean {\n return Object.keys(this.styleOverrides).length > 0;\n }\n\n /** Create a deep copy of this component. */\n public abstract clone(): TextBlockComponent;\n\n /** Compute a string representation of the contents of this component and all of its sub-components. */\n public abstract stringify(options?: TextBlockStringifyOptions): string;\n\n /**\n * Returns true if the string representation of this component consists only of whitespace characters.\n * Useful for checking if the component is visually empty (producing no graphics) or contains only spaces, tabs, or line breaks.\n */\n public get isWhitespace(): boolean {\n return /^\\s*$/g.test(this.stringify());\n };\n\n /** Convert this component to its JSON representation. */\n public toJSON(): TextBlockComponentProps {\n return {\n styleOverrides: TextStyleSettings.cloneProps(this.styleOverrides),\n };\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: TextBlockComponent): boolean {\n const myKeys = Object.keys(this.styleOverrides);\n const yrKeys = Object.keys(other._styleOverrides);\n if (myKeys.length !== yrKeys.length) {\n return false;\n }\n\n for (const name of myKeys) {\n const key = name as keyof TextStyleSettingsProps;\n if (this.styleOverrides[key] !== other.styleOverrides[key]) {\n return false;\n }\n }\n\n return true;\n }\n}\n\n/** [[TextBlockComponent]]s contained within a [[Paragraph]].\n * @beta\n */\nexport type Run = TextRun | FractionRun | TabRun | LineBreakRun | FieldRun;\n\n/** The JSON representation of a [[Run]].\n * Use the `type` field to discriminate between the different kinds of runs.\n * @beta\n */\nexport type RunProps = TextRunProps | FractionRunProps | TabRunProps | LineBreakRunProps | FieldRunProps;\n\n/** A sequence of characters within a [[Paragraph]] that share a single style. Runs are the leaf nodes of a [[TextBlock]] document. When laid out for display, a single run may span\n * multiple lines, but it will never contain different styling.\n * Use the `type` field to discriminate between the different kinds of runs.\n * @beta\n */\nexport namespace Run { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Create a run from its JSON representation.\n * @see [[TextRun.create]], [[FractionRun.create]], and [[LineBreakRun.create]] to create a run directly.\n */\n export function fromJSON(props: RunProps): Run {\n switch (props.type) {\n case \"text\": return TextRun.create(props);\n case \"fraction\": return FractionRun.create(props);\n case \"tab\": return TabRun.create(props);\n case \"linebreak\": return LineBreakRun.create(props);\n case \"field\": return FieldRun.create(props);\n }\n }\n}\n\n/** Describes whether the characters of a [[TextRun]] should be displayed normally, in subscript, or in superscript.\n * [[TextStyleSettings.superScriptScale]], [[TextStyleSettings.subScriptScale]], [[TextStyleSettings.superScriptOffsetFactor]], and [[TextStyleSettings.subScriptOffsetFactor]]\n * affect how the content is rendered.\n * @beta\n */\nexport type BaselineShift = \"subscript\" | \"superscript\" | \"none\";\n\n/** JSON representation of a [[TextRun]].\n * @beta\n */\nexport interface TextRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"text\";\n /** The characters displayed by the run.\n * Default: an empty string.\n */\n content?: string;\n /** Whether to display [[content]] as a subscript, superscript, or normally.\n * Default: \"none\"\n */\n baselineShift?: BaselineShift;\n}\n\n/** The most common type of [[Run]], containing a sequence of characters to be displayed using a single style.\n * @beta\n */\nexport class TextRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"text\";\n /** The sequence of characters to be displayed by the run. */\n public content: string;\n /** Whether to display [[content]] as a subscript, superscript, or normally. */\n public baselineShift: BaselineShift;\n\n private constructor(props?: Omit<TextRunProps, \"type\">) {\n super(props);\n this.content = props?.content ?? \"\";\n this.baselineShift = props?.baselineShift ?? \"none\";\n }\n\n public override clone(): TextRun {\n return new TextRun(this.toJSON());\n }\n\n public override toJSON(): TextRunProps {\n return {\n ...super.toJSON(),\n type: \"text\",\n content: this.content,\n baselineShift: this.baselineShift,\n };\n }\n\n public static create(props?: Omit<TextRunProps, \"type\">): TextRun {\n return new TextRun(props);\n }\n\n /** Simply returns [[content]]. */\n public override stringify(): string {\n return this.content;\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof TextRun && this.content === other.content && this.baselineShift === other.baselineShift && super.equals(other);\n }\n}\n\n/** JSON representation of a [[FractionRun]].\n * @beta\n */\nexport interface FractionRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"fraction\";\n /** The text displayed before or above the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\n numerator?: string;\n /** The text displayed after or below the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\n denominator?: string;\n}\n\n/** A [[Run]] containing a numeric ratio to be displayed as a numerator and denominator separated by a horizontal or diagonal bar.\n * @note The [[numerator]] and [[denominator]] are stored as strings. They are not technically required to contain a numeric representation.\n * @beta\n */\nexport class FractionRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"fraction\";\n /** The fraction's numerator. */\n public numerator: string;\n /** The fraction's denominator. */\n public denominator: string;\n\n private constructor(props?: Omit<FractionRunProps, \"type\">) {\n super(props);\n this.numerator = props?.numerator ?? \"\";\n this.denominator = props?.denominator ?? \"\";\n }\n\n public override toJSON(): FractionRunProps {\n return {\n ...super.toJSON(),\n type: \"fraction\",\n numerator: this.numerator,\n denominator: this.denominator,\n };\n }\n\n public override clone(): FractionRun {\n return new FractionRun(this.toJSON());\n }\n\n public static create(props?: Omit<FractionRunProps, \"type\">): FractionRun {\n return new FractionRun(props);\n }\n\n /** Formats the fraction as a string with the [[numerator]] and [[denominator]] separated by [[TextBlockStringifyOptions.fractionSeparator]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n const sep = options?.fractionSeparator ?? \"/\";\n return `${this.numerator}${sep}${this.denominator}`;\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof FractionRun && this.numerator === other.numerator && this.denominator === other.denominator && super.equals(other);\n }\n}\n\n/** JSON representation of a [[LineBreakRun]].\n * @beta\n */\nexport interface LineBreakRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"linebreak\";\n}\n\n/** A [[Run]] that represents the end of a line of text within a [[Paragraph]]. It contains no content of its own - it simply causes subsequent content to display on a new line.\n * @beta\n */\nexport class LineBreakRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"linebreak\";\n\n private constructor(props?: TextBlockComponentProps) {\n super(props);\n }\n\n public override toJSON(): LineBreakRunProps {\n return {\n ...super.toJSON(),\n type: \"linebreak\",\n };\n }\n\n public static create(props?: TextBlockComponentProps) {\n return new LineBreakRun(props);\n }\n\n public override clone(): LineBreakRun {\n return new LineBreakRun(this.toJSON());\n }\n\n /** Simply returns [[TextBlockStringifyOptions.lineBreak]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n return options?.lineBreak ?? \" \";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof LineBreakRun && super.equals(other);\n }\n}\n\n/** JSON representation of a [[TabRun]].\n * @beta\n */\nexport interface TabRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"tab\";\n}\n\n/** A [[TabRun]] is used to shift the next tab stop.\n * @note Only left-justified tabs are supported at this tab.\n * @beta\n */\nexport class TabRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"tab\";\n\n public override toJSON(): TabRunProps {\n return {\n ...super.toJSON(),\n type: \"tab\",\n };\n }\n\n public override clone(): TabRun {\n return new TabRun(this.toJSON());\n }\n\n public static create(props?: Omit<TabRunProps, \"type\">): TabRun {\n return new TabRun(props);\n }\n\n /**\n * Converts a [[TabRun]] to its string representation.\n * If the `tabsAsSpaces` option is provided, returns a string of spaces of the specified length.\n * Otherwise, returns a tab character (\"\\t\").\n */\n public override stringify(options?: TextBlockStringifyOptions): string {\n if (options?.tabsAsSpaces) {\n return \" \".repeat(options.tabsAsSpaces);\n }\n\n return \"\\t\";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof TabRun && super.equals(other);\n }\n}\n\n/** A chain of property accesses that resolves to a primitive value that forms the basis of the displayed content\n * of a [[FieldRun]].\n * The simplest property paths consist of a [[propertyName]] and nothing else, where `propertyName` identifies\n * a primitive property.\n * If `propertyName` identifies a struct or array property, then additional [[accessors]] are required to identify the specific value.\n * If `propertyName` (including any [[accessors]]) resolves to a JSON property, then additional [[jsonAccessors]] are required to identify a specific value within the JSON.\n * Some examples:\n * ```\n * | Access String | propertyName | accessors | jsonAccessors |\n * | ------------- | ------------ | --------- | ------------- |\n * | name | \"name\" | undefined | undefined |\n * | spouse.name | \"spouse\" | [name] | undefined |\n * | colors[2] | \"colors\" | [2] | undefined |\n * | spouse.favoriteRestaurants[1].address | \"spouse\" | [\"favoriteRestaurants\", 1, \"address\"] | undefined |\n * | jsonProperties.contactInfo.email | \"jsonProperties\" | undefined | [\"contactInfo\", \"email\"] |\n * | spouse.jsonProperties.contactInfo.phoneNumbers[0].areaCode | \"spouse\" | [\"jsonProperties\"] | [\"contactInfo\", \"phoneNumbers\", 0, \"areaCode\"] |\n * ```\n * @beta\n */\nexport interface FieldPropertyPath {\n /** The name of the BIS property of the [[FieldPropertyHost]] that serves as the root of the path. */\n propertyName: string;\n /** Property names and/or array indices describing the path from [[propertyName]] to the ultimate BIS property. */\n accessors?: Array<string | number>;\n /** If [[propertyName]] and [[accessors]] (if defined) resolve to a BIS property of extended type `Json`, property names and/or\n * array indices for selecting a primitive value within the JSON.\n */\n jsonAccessors?: Array<string | number>;\n}\n\n/** Describes the source of the property value against which a [[FieldPropertyPath]] is evaluated.\n * A field property is always hosted by an [Element]($backend). It may be a property of the element's BIS class itself,\n * or that of one of its [ElementAspect]($backend)s.\n * The [[schemaName]] and [[className]] should always identify the exact class that contains [[FieldPropertyPath.propertyName]] - not a subclass thereof.\n * @beta\n */\nexport interface FieldPropertyHost {\n /** The Id of the [Element]($backend) that hosts the property. */\n elementId: Id64String;\n /** The name of the schema containing the class identified by [[className]]. */\n schemaName: string;\n /** The name of the exact class (not a subclass) containing the property identified by [[FieldPropertyPath.propertyName]]. */\n className: string;\n}\n\n/** Placeholder type for a description of how to format the raw property value resolved by a [[FieldPropertyPath]] into a [[FieldRun]]'s display string.\n * *** COMING SOON ***\n * @beta\n */\nexport interface FieldFormatter { [k: string]: any }\n\n/** JSON representation of a [[FieldRun]].\n * @beta\n */\nexport interface FieldRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"field\";\n /** The element and BIS class containing the property described by [[propertyPath]]. */\n propertyHost: FieldPropertyHost;\n /** Describes how to obtain the property value from [[propertyHost]]. */\n propertyPath: FieldPropertyPath;\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]]. */\n formatter?: FieldFormatter;\n /** The field's most recently evaluated display string. */\n cachedContent?: string;\n}\n\n/** A [[Run]] that displays the formatted value of a property of some [Element]($backend).\n * When a [[TextBlock]] containing a [[FieldRun]] is written into the iModel as an [ITextAnnotation]($backend) element,\n * a dependency is established between the two elements via the [ElementDrivesTextAnnotation]($backend) relationship such that\n * whenever the source element specified by [[propertyHost]] is modified, the field(s) in the `ITextAnnotation` element are automatically\n * recalculated, causing their [[cachedContent]] to update. If the field's display string cannot be evaluated (for example, because the specified element or\n * property does not exist), then its cached content is set to [[FieldRun.invalidContentIndicator]].\n * A [[FieldRun]] displays its [[cachedContent]] in the same way that [[TextRun]]s display their `content`, including word wrapping where appropriate.\n * @beta\n */\nexport class FieldRun extends TextBlockComponent {\n /** Display string used to signal an error in computing the field's value. */\n public static invalidContentIndicator = \"####\";\n\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"field\";\n /** The element and BIS class containing the property described by [[propertyPath]]. */\n public readonly propertyHost: Readonly<FieldPropertyHost>;\n /** Describes how to obtain the property value from [[propertyHost]]. */\n public readonly propertyPath: Readonly<FieldPropertyPath>;\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]]. */\n public readonly formatter?: FieldFormatter;\n private _cachedContent: string;\n\n /** The field's most recently evaluated display string. */\n public get cachedContent(): string {\n return this._cachedContent;\n }\n\n /** @internal Used by core-backend when re-evaluating field content. */\n public setCachedContent(content: string | undefined): void {\n this._cachedContent = content ?? FieldRun.invalidContentIndicator;\n }\n\n private constructor(props: Omit<FieldRunProps, \"type\">) {\n super(props);\n\n this._cachedContent = props.cachedContent ?? FieldRun.invalidContentIndicator;\n this.propertyHost = props.propertyHost\n this.propertyPath = props.propertyPath;\n this.formatter = props.formatter;\n }\n\n /** Create a FieldRun from its JSON representation. */\n public static create(props: Omit<FieldRunProps, \"type\">): FieldRun {\n return new FieldRun({\n ...props,\n propertyHost: { ...props.propertyHost },\n propertyPath: structuredClone(props.propertyPath),\n formatter: structuredClone(props.formatter),\n });\n }\n\n /** Convert the FieldRun to its JSON representation. */\n public override toJSON(): FieldRunProps {\n const json: FieldRunProps = {\n ...super.toJSON(),\n type: \"field\",\n propertyHost: { ...this.propertyHost },\n propertyPath: structuredClone(this.propertyPath),\n };\n\n if (this.cachedContent !== FieldRun.invalidContentIndicator) {\n json.cachedContent = this.cachedContent;\n }\n\n if (this.formatter) {\n json.formatter = structuredClone(this.formatter);\n }\n\n return json;\n }\n\n /** Create a deep copy of this FieldRun. */\n public override clone(): FieldRun {\n return new FieldRun(this.toJSON());\n }\n\n /** Convert this FieldRun to a simple string representation. */\n public override stringify(): string {\n return this.cachedContent;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof FieldRun) || !super.equals(other)) {\n return false;\n }\n\n if (\n this.propertyHost.elementId !== other.propertyHost.elementId ||\n this.propertyHost.className !== other.propertyHost.className ||\n this.propertyHost.schemaName !== other.propertyHost.schemaName\n ) {\n return false;\n }\n\n if (this.propertyPath.propertyName !== other.propertyPath.propertyName) {\n return false;\n }\n\n const thisAccessors = this.propertyPath.accessors ?? [];\n const otherAccessors = other.propertyPath.accessors ?? [];\n const thisJsonAccessors = this.propertyPath.jsonAccessors ?? [];\n const otherJsonAccessors = other.propertyPath.jsonAccessors ?? [];\n\n if (thisAccessors.length !== otherAccessors.length || thisJsonAccessors.length !== otherJsonAccessors.length) {\n return false;\n }\n\n if (!thisAccessors.every((value, index) => value === otherAccessors[index])) {\n return false;\n }\n\n if (!thisJsonAccessors.every((value, index) => value === otherJsonAccessors[index])) {\n return false;\n }\n\n if (this.formatter && other.formatter) {\n // ###TODO better comparison of formatter objects.\n if (JSON.stringify(this.formatter) !== JSON.stringify(other.formatter)) {\n return false;\n }\n } else if (this.formatter || other.formatter) {\n return false;\n }\n\n return true;\n }\n}\n\n/** JSON representation of a [[Paragraph]].\n * @beta\n */\nexport interface ParagraphProps extends TextBlockComponentProps {\n /** The collection of [[Run]]s within the paragraph.\n * Default: an empty array.\n */\n runs?: RunProps[];\n}\n\n/** A collection of [[Run]]s within a [[TextBlock]]. Each paragraph within a text block is laid out on a separate line.\n * @beta\n */\nexport class Paragraph extends TextBlockComponent {\n /** The runs within the paragraph. You can modify the contents of this array to change the content of the paragraph. */\n public readonly runs: Run[];\n\n private constructor(props?: ParagraphProps) {\n super(props);\n this.runs = props?.runs?.map((run) => Run.fromJSON(run)) ?? [];\n }\n\n public override toJSON(): ParagraphProps {\n return {\n ...super.toJSON(),\n runs: this.runs.map((run) => run.toJSON()),\n };\n }\n\n /** Create a paragraph from its JSON representation. */\n public static create(props?: ParagraphProps): Paragraph {\n return new Paragraph(props);\n }\n\n public override clone(): Paragraph {\n return new Paragraph(this.toJSON());\n }\n\n /**\n * Clears any [[styleOverrides]] applied to this Paragraph.\n * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.\n */\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n super.clearStyleOverrides();\n if (options?.preserveChildrenOverrides)\n return;\n\n for (const run of this.runs) {\n run.clearStyleOverrides();\n }\n }\n\n /** Compute a string representation of this paragraph by concatenating the string representations of all of its [[runs]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n return this.runs.map((x) => x.stringify(options)).join(\"\");\n }\n\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof Paragraph)) {\n return false;\n }\n\n if (this.runs.length !== other.runs.length || !super.equals(other)) {\n return false;\n }\n\n return this.runs.every((run, index) => run.equals(other.runs[index]));\n }\n}\n\n/** Describes the relative alignment of the content of a [[TextBlock]].\n * @beta\n */\nexport type TextBlockJustification = \"left\" | \"center\" | \"right\";\n\n/** Describes the margins around the content inside a [[TextBlock]]. It's measured in meters.\n * @beta\n */\nexport interface TextBlockMargins {\n /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n left: number;\n /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n right: number;\n /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n top: number;\n /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n bottom: number;\n};\n\n/** JSON representation of a [[TextBlock]].\n * @beta\n */\nexport interface TextBlockProps extends TextBlockComponentProps {\n /** The ID of an [AnnotationTextStyle]($backend) stored in the iModel from which the base [[TextStyleSettings]] applied to the [[TextBlock]] originates. */\n styleId: Id64String;\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\n * A value less than or equal to zero indicates no wrapping is to be applied.\n * Default: 0\n */\n width?: number;\n /** The alignment of the document content. Default: \"left\". */\n justification?: TextBlockJustification;\n /** The margins to surround the document content. Default: 0 margins on all sides */\n margins?: Partial<TextBlockMargins>;\n /** The paragraphs within the text block. Default: an empty array. */\n paragraphs?: ParagraphProps[];\n}\n\n/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content in the form of [[Run]]s.\n * You can change the content of the document by directly modifying the contents of its [[paragraphs]], or via [[appendParagraph]] and [[appendRun]].\n * No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.\n * @see [[TextAnnotation]] to position a text block as an annotation in 2d or 3d space.\n * @beta\n */\nexport class TextBlock extends TextBlockComponent {\n /** The ID of the [AnnotationTextStyle]($backend) that provides the base formatting for the contents of this TextBlock.\n * @note Assigning to this property retains all style overrides on the TextBlock and its child components.\n * Call [[clearStyleOverrides]] to clear the TextBlock's and optionally all children's style overrides.\n */\n public styleId: Id64String;\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\n * A value less than or equal to zero indicates no wrapping is to be applied.\n * Default: 0\n */\n public width: number;\n /** The alignment of the document's content. */\n public justification: TextBlockJustification;\n /** The margins of the document. */\n public margins: TextBlockMargins;\n /** The ordered list of paragraphs within the document. */\n public readonly paragraphs: Paragraph[];\n\n private constructor(props: TextBlockProps) {\n super(props);\n this.styleId = props.styleId;\n this.width = props.width ?? 0;\n this.justification = props.justification ?? \"left\";\n\n // Assign default margins if not provided\n this.margins = {\n left: props.margins?.left ?? 0,\n right: props.margins?.right ?? 0,\n top: props.margins?.top ?? 0,\n bottom: props.margins?.bottom ?? 0,\n };\n\n this.paragraphs = props.paragraphs?.map((x) => Paragraph.create(x)) ?? [];\n }\n\n public override toJSON(): TextBlockProps {\n return {\n ...super.toJSON(),\n styleId: this.styleId,\n width: this.width,\n justification: this.justification,\n margins: this.margins,\n paragraphs: this.paragraphs.map((x) => x.toJSON()),\n };\n }\n\n /** Create a text block from its JSON representation. */\n public static create(props: TextBlockProps): TextBlock {\n return new TextBlock(props);\n }\n\n /** Create an empty text block containing no [[paragraphs]] and an empty [[styleId]]. */\n public static createEmpty(): TextBlock {\n return TextBlock.create({ styleId: \"\" });\n }\n\n /** Returns true if every paragraph in this text block is empty. */\n public get isEmpty(): boolean {\n return this.paragraphs.every((p) => p.runs.length === 0);\n }\n\n public override clone(): TextBlock {\n return new TextBlock(this.toJSON());\n }\n\n /**\n * Clears any [[styleOverrides]] applied to this TextBlock.\n * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.\n */\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n super.clearStyleOverrides();\n if (options?.preserveChildrenOverrides)\n return;\n\n for (const paragraph of this.paragraphs) {\n paragraph.clearStyleOverrides();\n }\n }\n\n /** Compute a string representation of the document's contents by concatenating the string representations of each of its [[paragraphs]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */\n public stringify(options?: TextBlockStringifyOptions): string {\n return this.paragraphs.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? \" \");\n }\n\n /** Add and return a new paragraph.\n * By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.\n * @param seedFromLast If true and [[paragraphs]] is not empty, the new paragraph will inherit the style overrides of the last [[Paragraph]] in this block.\n */\n public appendParagraph(seedFromLast: boolean = false): Paragraph {\n let styleOverrides: TextStyleSettingsProps = {};\n\n if (seedFromLast && this.paragraphs.length > 0) {\n const seed = this.paragraphs[this.paragraphs.length - 1];\n styleOverrides = { ...seed.styleOverrides };\n }\n\n const paragraph = Paragraph.create({\n styleOverrides\n });\n\n this.paragraphs.push(paragraph);\n return paragraph;\n }\n\n /** Append a run to the last [[Paragraph]] in this block.\n * If the block contains no [[paragraphs]], a new one will first be created using [[appendParagraph]].\n */\n public appendRun(run: Run): void {\n const paragraph = this.paragraphs[this.paragraphs.length - 1] ?? this.appendParagraph();\n paragraph.runs.push(run);\n }\n\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof TextBlock)) {\n return false;\n }\n\n if (this.styleId !== other.styleId || !super.equals(other)) {\n return false;\n }\n\n if (this.width !== other.width || this.justification !== other.justification || this.paragraphs.length !== other.paragraphs.length) {\n return false;\n }\n\n const marginsAreEqual = Object.entries(this.margins).every(([key, value]) =>\n value === (other.margins as any)[key]\n );\n\n if (!marginsAreEqual) return false;\n\n return this.paragraphs.every((paragraph, index) => paragraph.equals(other.paragraphs[index]));\n }\n}\n"]}
1
+ {"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/annotation/TextBlock.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAA0B,MAAM,aAAa,CAAC;AA4CxE;;;GAGG;AACH,MAAM,OAAgB,kBAAkB;IAC9B,eAAe,CAAyB;IAEhD,gBAAgB;IAChB,YAAsB,KAA+B;QACnD,IAAI,CAAC,eAAe,GAAG,iBAAiB,CAAC,UAAU,CAAC,KAAK,EAAE,cAAc,IAAI,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;OAGG;IACH,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAW,cAAc,CAAC,SAAiC;QACzD,IAAI,CAAC,eAAe,GAAG,iBAAiB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC;IAED,8DAA8D;IACvD,mBAAmB,CAAC,QAAgC;QACzD,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;IAED,4HAA4H;IAC5H,IAAW,cAAc;QACvB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACrD,CAAC;IAQD;;;MAGE;IACF,IAAW,YAAY;QACrB,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IAAA,CAAC;IAEF,yDAAyD;IAClD,MAAM;QACX,OAAO;YACL,cAAc,EAAE,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC;SAClE,CAAC;IACJ,CAAC;IAED,uDAAuD;IACh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;CACF","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 Annotation\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { TextStyleSettings, TextStyleSettingsProps } from \"./TextStyle\";\r\n\r\n/** Options supplied to [[TextBlockComponent.clearStyleOverrides]] to control how the style overrides are cleared on the component and its child components.\r\n * @beta\r\n */\r\nexport interface ClearTextStyleOptions {\r\n /** Controls whether the styleOverrides of any child components are retained.\r\n * By default, all overrides are cleared.\r\n */\r\n preserveChildrenOverrides?: boolean;\r\n}\r\n\r\n/** The JSON representation of a [[TextBlockComponent]].\r\n * @beta\r\n */\r\nexport interface TextBlockComponentProps {\r\n /** Deviations from the base [[TextStyleSettings]] defined by the [AnnotationTextStyle]($backend) applied to this component.\r\n * This permits you to, e.g., create a [[TextBlock]] using \"Arial\" font and override one of its [[TextRun]]s to use \"Comic Sans\" instead.\r\n */\r\n styleOverrides?: TextStyleSettingsProps;\r\n}\r\n\r\n/** Options supplied to [[TextBlockComponent.stringify]] to control how the content is formatted.\r\n * @beta\r\n */\r\nexport interface TextBlockStringifyOptions {\r\n /** A string to insert in between each [[Paragraph]].\r\n * Default: \" \" - a single space.\r\n */\r\n paragraphBreak?: string;\r\n /** A string to insert for each [[LineBreakRun]].\r\n * Default: \" \" - a single space.\r\n */\r\n lineBreak?: string;\r\n /** A string to insert between the numerator and denominator of each [[FractionRun]].\r\n * Default: \"/\"\r\n */\r\n fractionSeparator?: string;\r\n /** The number of spaces to use for tabs. If not provided, tabs will be represented by a tab character: \"\\t\".\r\n * Default: \"undefined\" - use \"\\t\".\r\n */\r\n tabsAsSpaces?: number;\r\n}\r\n\r\n/** Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s, [[Paragraph]]s, and [[TextBlock]] itself.\r\n * The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents. Each component can specify an optional [[styleOverrides]] to customize that formatting.\r\n * @beta\r\n */\r\nexport abstract class TextBlockComponent {\r\n private _styleOverrides: TextStyleSettingsProps;\r\n\r\n /** @internal */\r\n protected constructor(props?: TextBlockComponentProps) {\r\n this._styleOverrides = TextStyleSettings.cloneProps(props?.styleOverrides ?? {});\r\n }\r\n\r\n /** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend).\r\n * For example, if the style uses the \"Arial\" font, you can override that by settings `styleOverrides.fontName` to \"Comic Sans\".\r\n * @see [[clearStyleOverrides]] to reset this to an empty object.\r\n */\r\n public get styleOverrides(): TextStyleSettingsProps {\r\n return this._styleOverrides;\r\n }\r\n\r\n public set styleOverrides(overrides: TextStyleSettingsProps) {\r\n this._styleOverrides = TextStyleSettings.cloneProps(overrides);\r\n }\r\n\r\n /** Reset any [[styleOverrides]] applied to this component. */\r\n public clearStyleOverrides(_options?: ClearTextStyleOptions): void {\r\n this.styleOverrides = {};\r\n }\r\n\r\n /** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */\r\n public get overridesStyle(): boolean {\r\n return Object.keys(this.styleOverrides).length > 0;\r\n }\r\n\r\n /** Create a deep copy of this component. */\r\n public abstract clone(): TextBlockComponent;\r\n\r\n /** Compute a string representation of the contents of this component and all of its sub-components. */\r\n public abstract stringify(options?: TextBlockStringifyOptions): string;\r\n\r\n /**\r\n * Returns true if the string representation of this component consists only of whitespace characters.\r\n * Useful for checking if the component is visually empty (producing no graphics) or contains only spaces, tabs, or line breaks.\r\n */\r\n public get isWhitespace(): boolean {\r\n return /^\\s*$/g.test(this.stringify());\r\n };\r\n\r\n /** Convert this component to its JSON representation. */\r\n public toJSON(): TextBlockComponentProps {\r\n return {\r\n styleOverrides: TextStyleSettings.cloneProps(this.styleOverrides),\r\n };\r\n }\r\n\r\n /** Returns true if `this` is equivalent to `other`. */\r\n public equals(other: TextBlockComponent): boolean {\r\n const myKeys = Object.keys(this.styleOverrides);\r\n const yrKeys = Object.keys(other._styleOverrides);\r\n if (myKeys.length !== yrKeys.length) {\r\n return false;\r\n }\r\n\r\n for (const name of myKeys) {\r\n const key = name as keyof TextStyleSettingsProps;\r\n if (this.styleOverrides[key] !== other.styleOverrides[key]) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/** [[TextBlockComponent]]s contained within a [[Paragraph]].\r\n * @beta\r\n */\r\nexport type Run = TextRun | FractionRun | TabRun | LineBreakRun | FieldRun;\r\n\r\n/** The JSON representation of a [[Run]].\r\n * Use the `type` field to discriminate between the different kinds of runs.\r\n * @beta\r\n */\r\nexport type RunProps = TextRunProps | FractionRunProps | TabRunProps | LineBreakRunProps | FieldRunProps;\r\n\r\n/** A sequence of characters within a [[Paragraph]] that share a single style. Runs are the leaf nodes of a [[TextBlock]] document. When laid out for display, a single run may span\r\n * multiple lines, but it will never contain different styling.\r\n * Use the `type` field to discriminate between the different kinds of runs.\r\n * @beta\r\n */\r\nexport namespace Run { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Create a run from its JSON representation.\r\n * @see [[TextRun.create]], [[FractionRun.create]], and [[LineBreakRun.create]] to create a run directly.\r\n */\r\n export function fromJSON(props: RunProps): Run {\r\n switch (props.type) {\r\n case \"text\": return TextRun.create(props);\r\n case \"fraction\": return FractionRun.create(props);\r\n case \"tab\": return TabRun.create(props);\r\n case \"linebreak\": return LineBreakRun.create(props);\r\n case \"field\": return FieldRun.create(props);\r\n }\r\n }\r\n}\r\n\r\n/** Describes whether the characters of a [[TextRun]] should be displayed normally, in subscript, or in superscript.\r\n * [[TextStyleSettings.superScriptScale]], [[TextStyleSettings.subScriptScale]], [[TextStyleSettings.superScriptOffsetFactor]], and [[TextStyleSettings.subScriptOffsetFactor]]\r\n * affect how the content is rendered.\r\n * @beta\r\n */\r\nexport type BaselineShift = \"subscript\" | \"superscript\" | \"none\";\r\n\r\n/** JSON representation of a [[TextRun]].\r\n * @beta\r\n */\r\nexport interface TextRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"text\";\r\n /** The characters displayed by the run.\r\n * Default: an empty string.\r\n */\r\n content?: string;\r\n /** Whether to display [[content]] as a subscript, superscript, or normally.\r\n * Default: \"none\"\r\n */\r\n baselineShift?: BaselineShift;\r\n}\r\n\r\n/** The most common type of [[Run]], containing a sequence of characters to be displayed using a single style.\r\n * @beta\r\n */\r\nexport class TextRun extends TextBlockComponent {\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"text\";\r\n /** The sequence of characters to be displayed by the run. */\r\n public content: string;\r\n /** Whether to display [[content]] as a subscript, superscript, or normally. */\r\n public baselineShift: BaselineShift;\r\n\r\n private constructor(props?: Omit<TextRunProps, \"type\">) {\r\n super(props);\r\n this.content = props?.content ?? \"\";\r\n this.baselineShift = props?.baselineShift ?? \"none\";\r\n }\r\n\r\n public override clone(): TextRun {\r\n return new TextRun(this.toJSON());\r\n }\r\n\r\n public override toJSON(): TextRunProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"text\",\r\n content: this.content,\r\n baselineShift: this.baselineShift,\r\n };\r\n }\r\n\r\n public static create(props?: Omit<TextRunProps, \"type\">): TextRun {\r\n return new TextRun(props);\r\n }\r\n\r\n /** Simply returns [[content]]. */\r\n public override stringify(): string {\r\n return this.content;\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return other instanceof TextRun && this.content === other.content && this.baselineShift === other.baselineShift && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[FractionRun]].\r\n * @beta\r\n */\r\nexport interface FractionRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"fraction\";\r\n /** The text displayed before or above the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\r\n numerator?: string;\r\n /** The text displayed after or below the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\r\n denominator?: string;\r\n}\r\n\r\n/** A [[Run]] containing a numeric ratio to be displayed as a numerator and denominator separated by a horizontal or diagonal bar.\r\n * @note The [[numerator]] and [[denominator]] are stored as strings. They are not technically required to contain a numeric representation.\r\n * @beta\r\n */\r\nexport class FractionRun extends TextBlockComponent {\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"fraction\";\r\n /** The fraction's numerator. */\r\n public numerator: string;\r\n /** The fraction's denominator. */\r\n public denominator: string;\r\n\r\n private constructor(props?: Omit<FractionRunProps, \"type\">) {\r\n super(props);\r\n this.numerator = props?.numerator ?? \"\";\r\n this.denominator = props?.denominator ?? \"\";\r\n }\r\n\r\n public override toJSON(): FractionRunProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"fraction\",\r\n numerator: this.numerator,\r\n denominator: this.denominator,\r\n };\r\n }\r\n\r\n public override clone(): FractionRun {\r\n return new FractionRun(this.toJSON());\r\n }\r\n\r\n public static create(props?: Omit<FractionRunProps, \"type\">): FractionRun {\r\n return new FractionRun(props);\r\n }\r\n\r\n /** Formats the fraction as a string with the [[numerator]] and [[denominator]] separated by [[TextBlockStringifyOptions.fractionSeparator]]. */\r\n public override stringify(options?: TextBlockStringifyOptions): string {\r\n const sep = options?.fractionSeparator ?? \"/\";\r\n return `${this.numerator}${sep}${this.denominator}`;\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return other instanceof FractionRun && this.numerator === other.numerator && this.denominator === other.denominator && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[LineBreakRun]].\r\n * @beta\r\n */\r\nexport interface LineBreakRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"linebreak\";\r\n}\r\n\r\n/** A [[Run]] that represents the end of a line of text within a [[Paragraph]]. It contains no content of its own - it simply causes subsequent content to display on a new line.\r\n * @beta\r\n */\r\nexport class LineBreakRun extends TextBlockComponent {\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"linebreak\";\r\n\r\n private constructor(props?: TextBlockComponentProps) {\r\n super(props);\r\n }\r\n\r\n public override toJSON(): LineBreakRunProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"linebreak\",\r\n };\r\n }\r\n\r\n public static create(props?: TextBlockComponentProps) {\r\n return new LineBreakRun(props);\r\n }\r\n\r\n public override clone(): LineBreakRun {\r\n return new LineBreakRun(this.toJSON());\r\n }\r\n\r\n /** Simply returns [[TextBlockStringifyOptions.lineBreak]]. */\r\n public override stringify(options?: TextBlockStringifyOptions): string {\r\n return options?.lineBreak ?? \" \";\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return other instanceof LineBreakRun && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[TabRun]].\r\n * @beta\r\n */\r\nexport interface TabRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"tab\";\r\n}\r\n\r\n/** A [[TabRun]] is used to shift the next tab stop.\r\n * @note Only left-justified tabs are supported at this tab.\r\n * @beta\r\n */\r\nexport class TabRun extends TextBlockComponent {\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"tab\";\r\n\r\n public override toJSON(): TabRunProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"tab\",\r\n };\r\n }\r\n\r\n public override clone(): TabRun {\r\n return new TabRun(this.toJSON());\r\n }\r\n\r\n public static create(props?: Omit<TabRunProps, \"type\">): TabRun {\r\n return new TabRun(props);\r\n }\r\n\r\n /**\r\n * Converts a [[TabRun]] to its string representation.\r\n * If the `tabsAsSpaces` option is provided, returns a string of spaces of the specified length.\r\n * Otherwise, returns a tab character (\"\\t\").\r\n */\r\n public override stringify(options?: TextBlockStringifyOptions): string {\r\n if (options?.tabsAsSpaces) {\r\n return \" \".repeat(options.tabsAsSpaces);\r\n }\r\n\r\n return \"\\t\";\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return other instanceof TabRun && super.equals(other);\r\n }\r\n}\r\n\r\n/** A chain of property accesses that resolves to a primitive value that forms the basis of the displayed content\r\n * of a [[FieldRun]].\r\n * The simplest property paths consist of a [[propertyName]] and nothing else, where `propertyName` identifies\r\n * a primitive property.\r\n * If `propertyName` identifies a struct or array property, then additional [[accessors]] are required to identify the specific value.\r\n * If `propertyName` (including any [[accessors]]) resolves to a JSON property, then additional [[jsonAccessors]] are required to identify a specific value within the JSON.\r\n * Some examples:\r\n * ```\r\n * | Access String | propertyName | accessors | jsonAccessors |\r\n * | ------------- | ------------ | --------- | ------------- |\r\n * | name | \"name\" | undefined | undefined |\r\n * | spouse.name | \"spouse\" | [name] | undefined |\r\n * | colors[2] | \"colors\" | [2] | undefined |\r\n * | spouse.favoriteRestaurants[1].address | \"spouse\" | [\"favoriteRestaurants\", 1, \"address\"] | undefined |\r\n * | jsonProperties.contactInfo.email | \"jsonProperties\" | undefined | [\"contactInfo\", \"email\"] |\r\n * | spouse.jsonProperties.contactInfo.phoneNumbers[0].areaCode | \"spouse\" | [\"jsonProperties\"] | [\"contactInfo\", \"phoneNumbers\", 0, \"areaCode\"] |\r\n * ```\r\n * @beta\r\n */\r\nexport interface FieldPropertyPath {\r\n /** The name of the BIS property of the [[FieldPropertyHost]] that serves as the root of the path. */\r\n propertyName: string;\r\n /** Property names and/or array indices describing the path from [[propertyName]] to the ultimate BIS property. */\r\n accessors?: Array<string | number>;\r\n /** If [[propertyName]] and [[accessors]] (if defined) resolve to a BIS property of extended type `Json`, property names and/or\r\n * array indices for selecting a primitive value within the JSON.\r\n */\r\n jsonAccessors?: Array<string | number>;\r\n}\r\n\r\n/** Describes the source of the property value against which a [[FieldPropertyPath]] is evaluated.\r\n * A field property is always hosted by an [Element]($backend). It may be a property of the element's BIS class itself,\r\n * or that of one of its [ElementAspect]($backend)s.\r\n * The [[schemaName]] and [[className]] should always identify the exact class that contains [[FieldPropertyPath.propertyName]] - not a subclass thereof.\r\n * @beta\r\n */\r\nexport interface FieldPropertyHost {\r\n /** The Id of the [Element]($backend) that hosts the property. */\r\n elementId: Id64String;\r\n /** The name of the schema containing the class identified by [[className]]. */\r\n schemaName: string;\r\n /** The name of the exact class (not a subclass) containing the property identified by [[FieldPropertyPath.propertyName]]. */\r\n className: string;\r\n}\r\n\r\n/** Placeholder type for a description of how to format the raw property value resolved by a [[FieldPropertyPath]] into a [[FieldRun]]'s display string.\r\n * *** COMING SOON ***\r\n * @beta\r\n */\r\nexport interface FieldFormatter { [k: string]: any }\r\n\r\n/** JSON representation of a [[FieldRun]].\r\n * @beta\r\n */\r\nexport interface FieldRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"field\";\r\n /** The element and BIS class containing the property described by [[propertyPath]]. */\r\n propertyHost: FieldPropertyHost;\r\n /** Describes how to obtain the property value from [[propertyHost]]. */\r\n propertyPath: FieldPropertyPath;\r\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]]. */\r\n formatter?: FieldFormatter;\r\n /** The field's most recently evaluated display string. */\r\n cachedContent?: string;\r\n}\r\n\r\n/** A [[Run]] that displays the formatted value of a property of some [Element]($backend).\r\n * When a [[TextBlock]] containing a [[FieldRun]] is written into the iModel as an [ITextAnnotation]($backend) element,\r\n * a dependency is established between the two elements via the [ElementDrivesTextAnnotation]($backend) relationship such that\r\n * whenever the source element specified by [[propertyHost]] is modified, the field(s) in the `ITextAnnotation` element are automatically\r\n * recalculated, causing their [[cachedContent]] to update. If the field's display string cannot be evaluated (for example, because the specified element or\r\n * property does not exist), then its cached content is set to [[FieldRun.invalidContentIndicator]].\r\n * A [[FieldRun]] displays its [[cachedContent]] in the same way that [[TextRun]]s display their `content`, including word wrapping where appropriate.\r\n * @beta\r\n */\r\nexport class FieldRun extends TextBlockComponent {\r\n /** Display string used to signal an error in computing the field's value. */\r\n public static invalidContentIndicator = \"####\";\r\n\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"field\";\r\n /** The element and BIS class containing the property described by [[propertyPath]]. */\r\n public readonly propertyHost: Readonly<FieldPropertyHost>;\r\n /** Describes how to obtain the property value from [[propertyHost]]. */\r\n public readonly propertyPath: Readonly<FieldPropertyPath>;\r\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]]. */\r\n public readonly formatter?: FieldFormatter;\r\n private _cachedContent: string;\r\n\r\n /** The field's most recently evaluated display string. */\r\n public get cachedContent(): string {\r\n return this._cachedContent;\r\n }\r\n\r\n /** @internal Used by core-backend when re-evaluating field content. */\r\n public setCachedContent(content: string | undefined): void {\r\n this._cachedContent = content ?? FieldRun.invalidContentIndicator;\r\n }\r\n\r\n private constructor(props: Omit<FieldRunProps, \"type\">) {\r\n super(props);\r\n\r\n this._cachedContent = props.cachedContent ?? FieldRun.invalidContentIndicator;\r\n this.propertyHost = props.propertyHost\r\n this.propertyPath = props.propertyPath;\r\n this.formatter = props.formatter;\r\n }\r\n\r\n /** Create a FieldRun from its JSON representation. */\r\n public static create(props: Omit<FieldRunProps, \"type\">): FieldRun {\r\n return new FieldRun({\r\n ...props,\r\n propertyHost: { ...props.propertyHost },\r\n propertyPath: structuredClone(props.propertyPath),\r\n formatter: structuredClone(props.formatter),\r\n });\r\n }\r\n\r\n /** Convert the FieldRun to its JSON representation. */\r\n public override toJSON(): FieldRunProps {\r\n const json: FieldRunProps = {\r\n ...super.toJSON(),\r\n type: \"field\",\r\n propertyHost: { ...this.propertyHost },\r\n propertyPath: structuredClone(this.propertyPath),\r\n };\r\n\r\n if (this.cachedContent !== FieldRun.invalidContentIndicator) {\r\n json.cachedContent = this.cachedContent;\r\n }\r\n\r\n if (this.formatter) {\r\n json.formatter = structuredClone(this.formatter);\r\n }\r\n\r\n return json;\r\n }\r\n\r\n /** Create a deep copy of this FieldRun. */\r\n public override clone(): FieldRun {\r\n return new FieldRun(this.toJSON());\r\n }\r\n\r\n /** Convert this FieldRun to a simple string representation. */\r\n public override stringify(): string {\r\n return this.cachedContent;\r\n }\r\n\r\n /** Returns true if `this` is equivalent to `other`. */\r\n public override equals(other: TextBlockComponent): boolean {\r\n if (!(other instanceof FieldRun) || !super.equals(other)) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.propertyHost.elementId !== other.propertyHost.elementId ||\r\n this.propertyHost.className !== other.propertyHost.className ||\r\n this.propertyHost.schemaName !== other.propertyHost.schemaName\r\n ) {\r\n return false;\r\n }\r\n\r\n if (this.propertyPath.propertyName !== other.propertyPath.propertyName) {\r\n return false;\r\n }\r\n\r\n const thisAccessors = this.propertyPath.accessors ?? [];\r\n const otherAccessors = other.propertyPath.accessors ?? [];\r\n const thisJsonAccessors = this.propertyPath.jsonAccessors ?? [];\r\n const otherJsonAccessors = other.propertyPath.jsonAccessors ?? [];\r\n\r\n if (thisAccessors.length !== otherAccessors.length || thisJsonAccessors.length !== otherJsonAccessors.length) {\r\n return false;\r\n }\r\n\r\n if (!thisAccessors.every((value, index) => value === otherAccessors[index])) {\r\n return false;\r\n }\r\n\r\n if (!thisJsonAccessors.every((value, index) => value === otherJsonAccessors[index])) {\r\n return false;\r\n }\r\n\r\n if (this.formatter && other.formatter) {\r\n // ###TODO better comparison of formatter objects.\r\n if (JSON.stringify(this.formatter) !== JSON.stringify(other.formatter)) {\r\n return false;\r\n }\r\n } else if (this.formatter || other.formatter) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/** JSON representation of a [[Paragraph]].\r\n * @beta\r\n */\r\nexport interface ParagraphProps extends TextBlockComponentProps {\r\n /** The collection of [[Run]]s within the paragraph.\r\n * Default: an empty array.\r\n */\r\n runs?: RunProps[];\r\n}\r\n\r\n/** A collection of [[Run]]s within a [[TextBlock]]. Each paragraph within a text block is laid out on a separate line.\r\n * @beta\r\n */\r\nexport class Paragraph extends TextBlockComponent {\r\n /** The runs within the paragraph. You can modify the contents of this array to change the content of the paragraph. */\r\n public readonly runs: Run[];\r\n\r\n private constructor(props?: ParagraphProps) {\r\n super(props);\r\n this.runs = props?.runs?.map((run) => Run.fromJSON(run)) ?? [];\r\n }\r\n\r\n public override toJSON(): ParagraphProps {\r\n return {\r\n ...super.toJSON(),\r\n runs: this.runs.map((run) => run.toJSON()),\r\n };\r\n }\r\n\r\n /** Create a paragraph from its JSON representation. */\r\n public static create(props?: ParagraphProps): Paragraph {\r\n return new Paragraph(props);\r\n }\r\n\r\n public override clone(): Paragraph {\r\n return new Paragraph(this.toJSON());\r\n }\r\n\r\n /**\r\n * Clears any [[styleOverrides]] applied to this Paragraph.\r\n * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.\r\n */\r\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\r\n super.clearStyleOverrides();\r\n if (options?.preserveChildrenOverrides)\r\n return;\r\n\r\n for (const run of this.runs) {\r\n run.clearStyleOverrides();\r\n }\r\n }\r\n\r\n /** Compute a string representation of this paragraph by concatenating the string representations of all of its [[runs]]. */\r\n public override stringify(options?: TextBlockStringifyOptions): string {\r\n return this.runs.map((x) => x.stringify(options)).join(\"\");\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n if (!(other instanceof Paragraph)) {\r\n return false;\r\n }\r\n\r\n if (this.runs.length !== other.runs.length || !super.equals(other)) {\r\n return false;\r\n }\r\n\r\n return this.runs.every((run, index) => run.equals(other.runs[index]));\r\n }\r\n}\r\n\r\n/** Describes the relative alignment of the content of a [[TextBlock]].\r\n * @beta\r\n */\r\nexport type TextBlockJustification = \"left\" | \"center\" | \"right\";\r\n\r\n/** Describes the margins around the content inside a [[TextBlock]]. It's measured in meters.\r\n * @beta\r\n */\r\nexport interface TextBlockMargins {\r\n /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n left: number;\r\n /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n right: number;\r\n /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n top: number;\r\n /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n bottom: number;\r\n};\r\n\r\n/** JSON representation of a [[TextBlock]].\r\n * @beta\r\n */\r\nexport interface TextBlockProps extends TextBlockComponentProps {\r\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\r\n * A value less than or equal to zero indicates no wrapping is to be applied.\r\n * Default: 0\r\n */\r\n width?: number;\r\n /** The alignment of the document content. Default: \"left\". */\r\n justification?: TextBlockJustification;\r\n /** The margins to surround the document content. Default: 0 margins on all sides */\r\n margins?: Partial<TextBlockMargins>;\r\n /** The paragraphs within the text block. Default: an empty array. */\r\n paragraphs?: ParagraphProps[];\r\n}\r\n\r\n/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content in the form of [[Run]]s.\r\n * You can change the content of the document by directly modifying the contents of its [[paragraphs]], or via [[appendParagraph]] and [[appendRun]].\r\n * No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.\r\n * @see [[TextAnnotation]] to position a text block as an annotation in 2d or 3d space.\r\n * @beta\r\n */\r\nexport class TextBlock extends TextBlockComponent {\r\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\r\n * A value less than or equal to zero indicates no wrapping is to be applied.\r\n * Default: 0\r\n */\r\n public width: number;\r\n /** The alignment of the document's content. */\r\n public justification: TextBlockJustification;\r\n /** The margins of the document. */\r\n public margins: TextBlockMargins;\r\n /** The ordered list of paragraphs within the document. */\r\n public readonly paragraphs: Paragraph[];\r\n\r\n private constructor(props: TextBlockProps) {\r\n super(props);\r\n this.width = props.width ?? 0;\r\n this.justification = props.justification ?? \"left\";\r\n\r\n // Assign default margins if not provided\r\n this.margins = {\r\n left: props.margins?.left ?? 0,\r\n right: props.margins?.right ?? 0,\r\n top: props.margins?.top ?? 0,\r\n bottom: props.margins?.bottom ?? 0,\r\n };\r\n\r\n this.paragraphs = props.paragraphs?.map((x) => Paragraph.create(x)) ?? [];\r\n }\r\n\r\n public override toJSON(): TextBlockProps {\r\n return {\r\n ...super.toJSON(),\r\n width: this.width,\r\n justification: this.justification,\r\n margins: this.margins,\r\n paragraphs: this.paragraphs.map((x) => x.toJSON()),\r\n };\r\n }\r\n\r\n /** Create a text block from its JSON representation. */\r\n public static create(props?: TextBlockProps): TextBlock {\r\n return new TextBlock(props ?? {});\r\n }\r\n\r\n /** Returns true if every paragraph in this text block is empty. */\r\n public get isEmpty(): boolean {\r\n return this.paragraphs.every((p) => p.runs.length === 0);\r\n }\r\n\r\n public override clone(): TextBlock {\r\n return new TextBlock(this.toJSON());\r\n }\r\n\r\n /**\r\n * Clears any [[styleOverrides]] applied to this TextBlock.\r\n * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.\r\n */\r\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\r\n super.clearStyleOverrides();\r\n if (options?.preserveChildrenOverrides)\r\n return;\r\n\r\n for (const paragraph of this.paragraphs) {\r\n paragraph.clearStyleOverrides();\r\n }\r\n }\r\n\r\n /** Compute a string representation of the document's contents by concatenating the string representations of each of its [[paragraphs]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */\r\n public stringify(options?: TextBlockStringifyOptions): string {\r\n return this.paragraphs.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? \" \");\r\n }\r\n\r\n /** Add and return a new paragraph.\r\n * By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.\r\n * @param seedFromLast If true and [[paragraphs]] is not empty, the new paragraph will inherit the style overrides of the last [[Paragraph]] in this block.\r\n */\r\n public appendParagraph(seedFromLast: boolean = false): Paragraph {\r\n let styleOverrides: TextStyleSettingsProps = {};\r\n\r\n if (seedFromLast && this.paragraphs.length > 0) {\r\n const seed = this.paragraphs[this.paragraphs.length - 1];\r\n styleOverrides = { ...seed.styleOverrides };\r\n }\r\n\r\n const paragraph = Paragraph.create({\r\n styleOverrides\r\n });\r\n\r\n this.paragraphs.push(paragraph);\r\n return paragraph;\r\n }\r\n\r\n /** Append a run to the last [[Paragraph]] in this block.\r\n * If the block contains no [[paragraphs]], a new one will first be created using [[appendParagraph]].\r\n */\r\n public appendRun(run: Run): void {\r\n const paragraph = this.paragraphs[this.paragraphs.length - 1] ?? this.appendParagraph();\r\n paragraph.runs.push(run);\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n if (!(other instanceof TextBlock)) {\r\n return false;\r\n }\r\n\r\n if (this.width !== other.width || this.justification !== other.justification || this.paragraphs.length !== other.paragraphs.length) {\r\n return false;\r\n }\r\n\r\n const marginsAreEqual = Object.entries(this.margins).every(([key, value]) =>\r\n value === (other.margins as any)[key]\r\n );\r\n\r\n if (!marginsAreEqual) return false;\r\n\r\n return this.paragraphs.every((paragraph, index) => paragraph.equals(other.paragraphs[index]));\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextBlockGeometryProps.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockGeometryProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { XYZProps } from \"@itwin/core-geometry\";\nimport { TextStringProps } from \"../geometry/TextString\";\nimport { TextStyleColor } from \"./TextStyle\";\n\n/**\n * A single entry in a [[TextBlockGeometryProps]], representing one of the following primitive types:\n * - A [[TextString]],\n * - A fraction separator described by a [LineSegment3d]($geometry), or\n * - A change in color, to be applied to all subsequent primitives.\n * @beta\n */\nexport type TextBlockGeometryPropsEntry = {\n text: TextStringProps;\n separator?: never;\n color?: never;\n} | {\n text?: never;\n separator: {\n startPoint: XYZProps;\n endPoint: XYZProps;\n };\n color?: never;\n} | {\n text?: never;\n separator?: never;\n color: TextStyleColor;\n};\n\n/**\n * JSON representation of the geometric primitives that can be used to display a [[TextBlock]].\n * @see [appendTextAnnotationGeometry]($backend) to convert an annotation to its geometric representation.\n * @see [[GeometryStreamBuilder.appendTextBlock]] to add a block of text to a [GeometryStream]($docs/learning/common/GeometryStream.md).\n * @beta\n */\nexport interface TextBlockGeometryProps {\n /** The set of geometric primitives representing the contents of the [[TextBlock]]. */\n entries: TextBlockGeometryPropsEntry[];\n}\n"]}
1
+ {"version":3,"file":"TextBlockGeometryProps.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockGeometryProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Annotation\r\n */\r\n\r\nimport { XYZProps } from \"@itwin/core-geometry\";\r\nimport { TextStringProps } from \"../geometry/TextString\";\r\nimport { TextStyleColor } from \"./TextStyle\";\r\n\r\n/**\r\n * A single entry in a [[TextBlockGeometryProps]], representing one of the following primitive types:\r\n * - A [[TextString]],\r\n * - A fraction separator described by a [LineSegment3d]($geometry), or\r\n * - A change in color, to be applied to all subsequent primitives.\r\n * @beta\r\n */\r\nexport type TextBlockGeometryPropsEntry = {\r\n text: TextStringProps;\r\n separator?: never;\r\n color?: never;\r\n} | {\r\n text?: never;\r\n separator: {\r\n startPoint: XYZProps;\r\n endPoint: XYZProps;\r\n };\r\n color?: never;\r\n} | {\r\n text?: never;\r\n separator?: never;\r\n color: TextStyleColor;\r\n};\r\n\r\n/**\r\n * JSON representation of the geometric primitives that can be used to display a [[TextBlock]].\r\n * @see [appendTextAnnotationGeometry]($backend) to convert an annotation to its geometric representation.\r\n * @see [[GeometryStreamBuilder.appendTextBlock]] to add a block of text to a [GeometryStream]($docs/learning/common/GeometryStream.md).\r\n * @beta\r\n */\r\nexport interface TextBlockGeometryProps {\r\n /** The set of geometric primitives representing the contents of the [[TextBlock]]. */\r\n entries: TextBlockGeometryPropsEntry[];\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextBlockLayoutResult.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockLayoutResult.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { Range2dProps, XAndY } from \"@itwin/core-geometry\";\nimport { FontId } from \"../Fonts\";\nimport { TextStyleSettingsProps } from \"./TextStyle\";\n\n/**\n * Represents a single run in a [[LineLayoutResult]].\n * @note Get the text content of the RunLayoutResult using a combination of the `sourceRunIndex`, `characterOffset`, and `characterCount`.\n * @beta\n */\nexport interface RunLayoutResult {\n /** The index of the Run this RunLayoutResult was generated from in [[Paragraph.runs]]. */\n sourceRunIndex: number;\n /** The ID of the font for the run. */\n fontId: FontId;\n /**\n * The number of characters from the source [[Run]] that have already appeared in the layout.\n * @note A single source [[TextRun]] can be split into multiple lines to respect the [[TextBlock.width]].\n */\n characterOffset: number;\n /** The number of characters in the RunLayoutResult. */\n characterCount: number;\n /** The offset of the RunLayoutResult from the top and left of the [[LineLayoutResult]] */\n offsetFromLine: XAndY;\n /** Bounding box enclosing this RunLayoutResult's content. */\n range: Range2dProps;\n /** The resolved [[TextStyleSettings]] for the run. Takes into account overrides and styles on the parent classes. */\n textStyle: TextStyleSettingsProps;\n /** Bounding box used when justifying the run. This may be smaller than [[range]]. */\n justificationRange?: Range2dProps;\n /** The range containing the contents of the [[FractionRun]]'s numerator. */\n numeratorRange?: Range2dProps;\n /** The range containing the contents of the [[FractionRun]]'s denominator. */\n denominatorRange?: Range2dProps;\n}\n\n/**\n * Represents a single line in a [[TextBlockLayoutResult]].\n * @beta\n */\nexport interface LineLayoutResult {\n /** The index of the paragraph this LineLayoutResult was generated from in [[TextBlock.paragraphs]]. */\n sourceParagraphIndex: number;\n /** The runs contained in the line. */\n runs: RunLayoutResult[];\n /** The range containing the contents of the line. */\n range: Range2dProps;\n /** Bounding box used when justifying the line. This may be smaller than [[range]]. */\n justificationRange: Range2dProps;\n /** The offset of the line from the top and left of the [[TextBlock]]. */\n offsetFromDocument: XAndY;\n}\n\n/**\n * Represents the result of laying out a [[TextBlock]]'s contents into a series of lines containing runs.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n * @beta\n */\nexport interface TextBlockLayoutResult {\n /** The laid out lines of a [[TextBlock]]. */\n lines: LineLayoutResult[];\n /** The range containing the contents of a [[TextBlock]]. */\n range: Range2dProps;\n}\n"]}
1
+ {"version":3,"file":"TextBlockLayoutResult.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockLayoutResult.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Annotation\r\n */\r\n\r\nimport { Range2dProps, XAndY } from \"@itwin/core-geometry\";\r\nimport { FontId } from \"../Fonts\";\r\nimport { TextStyleSettingsProps } from \"./TextStyle\";\r\n\r\n/**\r\n * Represents a single run in a [[LineLayoutResult]].\r\n * @note Get the text content of the RunLayoutResult using a combination of the `sourceRunIndex`, `characterOffset`, and `characterCount`.\r\n * @beta\r\n */\r\nexport interface RunLayoutResult {\r\n /** The index of the Run this RunLayoutResult was generated from in [[Paragraph.runs]]. */\r\n sourceRunIndex: number;\r\n /** The ID of the font for the run. */\r\n fontId: FontId;\r\n /**\r\n * The number of characters from the source [[Run]] that have already appeared in the layout.\r\n * @note A single source [[TextRun]] can be split into multiple lines to respect the [[TextBlock.width]].\r\n */\r\n characterOffset: number;\r\n /** The number of characters in the RunLayoutResult. */\r\n characterCount: number;\r\n /** The offset of the RunLayoutResult from the top and left of the [[LineLayoutResult]] */\r\n offsetFromLine: XAndY;\r\n /** Bounding box enclosing this RunLayoutResult's content. */\r\n range: Range2dProps;\r\n /** The resolved [[TextStyleSettings]] for the run. Takes into account overrides and styles on the parent classes. */\r\n textStyle: TextStyleSettingsProps;\r\n /** Bounding box used when justifying the run. This may be smaller than [[range]]. */\r\n justificationRange?: Range2dProps;\r\n /** The range containing the contents of the [[FractionRun]]'s numerator. */\r\n numeratorRange?: Range2dProps;\r\n /** The range containing the contents of the [[FractionRun]]'s denominator. */\r\n denominatorRange?: Range2dProps;\r\n}\r\n\r\n/**\r\n * Represents a single line in a [[TextBlockLayoutResult]].\r\n * @beta\r\n */\r\nexport interface LineLayoutResult {\r\n /** The index of the paragraph this LineLayoutResult was generated from in [[TextBlock.paragraphs]]. */\r\n sourceParagraphIndex: number;\r\n /** The runs contained in the line. */\r\n runs: RunLayoutResult[];\r\n /** The range containing the contents of the line. */\r\n range: Range2dProps;\r\n /** Bounding box used when justifying the line. This may be smaller than [[range]]. */\r\n justificationRange: Range2dProps;\r\n /** The offset of the line from the top and left of the [[TextBlock]]. */\r\n offsetFromDocument: XAndY;\r\n}\r\n\r\n/**\r\n * Represents the result of laying out a [[TextBlock]]'s contents into a series of lines containing runs.\r\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\r\n * @beta\r\n */\r\nexport interface TextBlockLayoutResult {\r\n /** The laid out lines of a [[TextBlock]]. */\r\n lines: LineLayoutResult[];\r\n /** The range containing the contents of a [[TextBlock]]. */\r\n range: Range2dProps;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAiB,MAAM,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CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;;AAGH,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAC3C,UAAU,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { DeepReadonlyObject, DeepRequiredObject } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\n\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport const textAnnotationFrameShapes = [\"none\", \"line\", \"rectangle\", \"circle\", \"equilateralTriangle\", \"diamond\", \"square\", \"pentagon\", \"hexagon\", \"octagon\", \"capsule\", \"roundedRectangle\"] as const;\n\n/** Describes a predefined shape that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];\n\n/**\n * Describes what color to use when filling the frame around a [[TextBlock]].\n * If `background` is specified, [[GeometryParams.BackgroundFill]] will be set to `BackgroundFill.Outline`.\n * If `none` is specified, no fill will be applied.\n * @beta\n */\nexport type TextAnnotationFillColor = TextStyleColor | \"background\" | \"none\";\n\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\n * @beta\n */\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\n\n/** Describes the color in which to draw the text in a [[TextRun]].\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\n * text.\n * @beta\n */\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\n\n/**\n * Describes how to draw the frame around a [[TextAnnotation]].\n * The frame can be a simple line, a filled shape, or both.\n * If only a subset of properties are specified, the others will be set to their default value.\n * @beta\n */\nexport interface TextFrameStyleProps {\n /** Shape of the frame. Default: \"none\" */\n shape?: TextAnnotationFrameShape;\n /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: \"none\" */\n fill?: TextAnnotationFillColor;\n /** The color of the text frame's outline. Default: black */\n border?: TextStyleColor;\n /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */\n borderWeight?: number;\n};\n\n/** Properties describing the appearance of [[TextAnnotationLeader]] in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n * @beta\n */\nexport interface TextLeaderStyleProps {\n /** The color of the leader.\n * If `inherit` is specified, the [[TextAnnotationLeader]] will use the color specified in the parent [[TextStyleSettings]]`.\n * Default: \"inherit\".\n */\n color?: TextStyleColor | \"inherit\";\n /** Whether to use an elbow in the leader.\n * Default: false\n */\n wantElbow?: boolean;\n /** Multiplier used to compute length of the elbow in the leader.\n * The elbowLength is computed in meters as elbowLength * [[lineHeight]].\n * Default: 1.0\n */\n elbowLength?: number;\n /** Multiplier to compute height of the leader terminator.\n * The terminator height is computed in meters as terminatorHeight * [[lineHeight]].\n * Default: 1.0\n */\n terminatorHeightFactor?: number;\n /** Multiplier to compute width of the leader terminator.\n * The terminator width is computed in meters as terminatorWidth * [[lineHeight]].\n * Default: 1.0\n */\n terminatorWidthFactor?: number;\n}\n\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [AnnotationTextStyle]($backend)'s properties.\n * @beta\n */\nexport interface TextStyleSettingsProps {\n /** The color of the text.\n * Default: \"subcategory\".\n */\n color?: TextStyleColor;\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\n * Default: \"\" (an invalid font name).\n */\n fontName?: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n * Default: 1.0. */\n lineHeight?: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n * Default: 0.5.\n */\n lineSpacingFactor?: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\n * Default: false.\n */\n isBold?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\n * Default: false.\n */\n isItalic?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined.\n * Default: false.\n */\n isUnderlined?: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n * Default: 0.7.\n */\n stackedFractionScale?: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\n * Default: \"horizontal\".\n */\n stackedFractionType?: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n * Default: -0.15.\n */\n subScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n subScriptScale?: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n * Default: -0.5.\n */\n superScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n superScriptScale?: number;\n /** A scale applied to the width of each glyph.\n * Default: 1.0\n */\n widthFactor?: number;\n\n /** Properties describing appearance of leaders in a [[TextAnnotation]]\n * Used when producing geometry for [[TextAnnotation]]\n * Default: {color:\"subcategory\", wantElbow:\"false\",elbowLength:1, terminatorWidthFactor:1, terminatorHeightFactor:1}.\n */\n leader?: TextLeaderStyleProps;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock.\n * Default: 4 meters.\n */\n tabInterval?: number;\n /**\n * A description of the frame around the text annotation.\n * Used when producing geometry for [[TextAnnotation]]s.\n * Default: {shape: \"none\", fill: \"none\", border: black, borderWeight: 1} for no frame.\n */\n frame?: TextFrameStyleProps;\n}\n\nfunction deepFreeze<T>(obj: T) {\n if (obj === null || typeof obj !== \"object\" || Object.isFrozen(obj))\n return;\n Object.getOwnPropertyNames(obj).forEach((prop) => {\n const value = (obj as any)[prop];\n if (value && typeof value === \"object\") {\n deepFreeze(value);\n }\n });\n Object.freeze(obj);\n}\n\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\n * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\n * @beta\n */\nexport class TextStyleSettings {\n /** The color of the text. */\n public readonly color: TextStyleColor;\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\n */\n public readonly fontName: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n */\n public readonly lineHeight: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n */\n public readonly lineSpacingFactor: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\n public readonly isBold: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\n public readonly isItalic: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\n public readonly isUnderlined: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n */\n public readonly stackedFractionScale: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\n public readonly stackedFractionType: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n */\n public readonly subScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n */\n public readonly subScriptScale: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n */\n public readonly superScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n */\n public readonly superScriptScale: number;\n /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */\n public readonly widthFactor: number;\n /** Properties describing appearance of leaders in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n */\n public readonly leader: Readonly<Required<TextLeaderStyleProps>>;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.\n */\n public readonly tabInterval: number;\n /** The frame settings of the [[TextAnnotation]]. */\n public readonly frame: Readonly<Required<TextFrameStyleProps>>;\n\n /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */\n public static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>> = {\n color: \"subcategory\",\n fontName: \"\",\n lineHeight: 1,\n lineSpacingFactor: 0.5,\n isBold: false,\n isItalic: false,\n isUnderlined: false,\n stackedFractionScale: 0.7,\n stackedFractionType: \"horizontal\",\n subScriptOffsetFactor: -0.15,\n subScriptScale: 2 / 3,\n superScriptOffsetFactor: 0.5,\n superScriptScale: 2 / 3,\n widthFactor: 1,\n leader: {\n color: \"inherit\",\n wantElbow: false,\n elbowLength: 1.0,\n terminatorHeightFactor: 1.0,\n terminatorWidthFactor: 1.0,\n },\n tabInterval: 4,\n frame: {\n shape: \"none\",\n fill: \"none\",\n border: ColorDef.black.toJSON(),\n borderWeight: 1,\n },\n };\n\n /** Settings initialized to all default values. */\n public static defaults: TextStyleSettings = new TextStyleSettings({});\n\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\n if (!defaults) {\n defaults = TextStyleSettings.defaultProps;\n }\n\n this.color = props.color ?? defaults.color;\n this.fontName = props.fontName ?? defaults.fontName;\n this.lineHeight = props.lineHeight ?? defaults.lineHeight;\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\n this.isBold = props.isBold ?? defaults.isBold;\n this.isItalic = props.isItalic ?? defaults.isItalic;\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\n const leader = {\n color: props.leader?.color ?? defaults.leader.color,\n wantElbow: props.leader?.wantElbow ?? defaults.leader.wantElbow,\n elbowLength: props.leader?.elbowLength ?? defaults.leader.elbowLength,\n terminatorHeightFactor: props.leader?.terminatorHeightFactor ?? defaults.leader.terminatorHeightFactor,\n terminatorWidthFactor: props.leader?.terminatorWidthFactor ?? defaults.leader.terminatorWidthFactor,\n }\n this.leader = Object.freeze(leader) as Readonly<Required<TextLeaderStyleProps>>;\n this.tabInterval = props.tabInterval ?? defaults.tabInterval;\n const frame = {\n shape: props.frame?.shape ?? defaults.frame.shape,\n fill: props.frame?.fill ?? defaults.frame.fill,\n border: props.frame?.border ?? defaults.frame.border,\n borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,\n };\n // Cast to indicate to TypeScript that the frame properties are all defined\n this.frame = Object.freeze(frame) as Readonly<Required<TextFrameStyleProps>>;\n }\n\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\n }\n\n /** Creates a deep copy of the `TextStyleSettingsProps`. */\n public static cloneProps(props: TextStyleSettingsProps): TextStyleSettingsProps {\n const copy = { ...props };\n if (props.leader) {\n copy.leader = { ...props.leader };\n }\n if (props.frame) {\n copy.frame = { ...props.frame };\n }\n return copy;\n }\n\n /** Create settings from their JSON representation. */\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\n }\n\n public toJSON(): TextStyleSettingsProps {\n return { ...this };\n }\n\n /** Compare two [[TextLeaderStyleProps]] for equality.\n * @param other The other leader style properties to compare against.\n * @returns true if the two leader styles are equal, false otherwise.\n */\n public leaderEquals(other: TextLeaderStyleProps): boolean {\n return this.leader.color === other.color && this.leader.wantElbow === other.wantElbow\n && this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor\n && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;\n }\n\n public frameEquals(other: TextFrameStyleProps): boolean {\n return this.frame?.shape === other.shape\n && this.frame?.fill === other.fill\n && this.frame?.border === other.border\n && this.frame?.borderWeight === other.borderWeight;\n }\n\n public equals(other: TextStyleSettings): boolean {\n return this.color === other.color && this.fontName === other.fontName\n && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale\n && this.tabInterval === other.tabInterval\n && this.leaderEquals(other.leader)\n && this.frameEquals(other.frame)\n }\n\n /**\n * Returns a list of validation errors for this instance.\n *\n * A TextStyleSettings object may contain values that are invalid in all contexts.\n * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.\n *\n * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.\n *\n * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.\n */\n public getValidationErrors(): string[] {\n const errorMessages: string[] = [];\n if (this.fontName.trim() === \"\") {\n errorMessages.push(\"fontName must be provided\");\n }\n\n if (this.lineHeight <= 0) {\n errorMessages.push(\"lineHeight must be greater than 0\");\n }\n\n if (this.stackedFractionScale <= 0) {\n errorMessages.push(\"stackedFractionScale must be greater than 0\");\n }\n\n return errorMessages;\n }\n}\n\ndeepFreeze(TextStyleSettings.defaultProps);\ndeepFreeze(TextStyleSettings.defaults);"]}
1
+ {"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAiB,MAAM,aAAa,CAAC;AAEtD;;EAEE;AACF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,CAAU,CAAC;AA2CtM,CAAC;AAuHF,SAAS,UAAU,CAAI,GAAM;IAC3B,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;QACjE,OAAO;IACT,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC/C,MAAM,KAAK,GAAI,GAA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AAC,cAAc;eAC1G,IAAI,CAAC,uBAAuB,KAAK,KAAK,CAAC,uBAAuB,IAAI,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,gBAAgB;eAClH,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW;eACtC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;eAC/B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACpC,CAAC;IAED;;;;;;;;;OASG;IACI,mBAAmB;QACxB,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAChC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC;YACzB,aAAa,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,EAAE,CAAC;YACnC,aAAa,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;QACpE,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;;AAGH,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAC3C,UAAU,CAAC,iBAAiB,CAAC,QAAQ,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 Annotation\r\n */\r\n\r\nimport { DeepReadonlyObject, DeepRequiredObject } from \"@itwin/core-bentley\";\r\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\r\n\r\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\r\n * @beta\r\n*/\r\nexport const textAnnotationFrameShapes = [\"none\", \"line\", \"rectangle\", \"circle\", \"equilateralTriangle\", \"diamond\", \"square\", \"pentagon\", \"hexagon\", \"octagon\", \"capsule\", \"roundedRectangle\"] as const;\r\n\r\n/** Describes a predefined shape that can be computed and drawn around the margins of a [[TextBlock]]\r\n * @beta\r\n*/\r\nexport type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];\r\n\r\n/**\r\n * Describes what color to use when filling the frame around a [[TextBlock]].\r\n * If `background` is specified, [[GeometryParams.BackgroundFill]] will be set to `BackgroundFill.Outline`.\r\n * If `none` is specified, no fill will be applied.\r\n * @beta\r\n */\r\nexport type TextAnnotationFillColor = TextStyleColor | \"background\" | \"none\";\r\n\r\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\r\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\r\n * @beta\r\n */\r\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\r\n\r\n/** Describes the color in which to draw the text in a [[TextRun]].\r\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\r\n * text.\r\n * @beta\r\n */\r\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\r\n\r\n/**\r\n * Describes how to draw the frame around a [[TextAnnotation]].\r\n * The frame can be a simple line, a filled shape, or both.\r\n * If only a subset of properties are specified, the others will be set to their default value.\r\n * @beta\r\n */\r\nexport interface TextFrameStyleProps {\r\n /** Shape of the frame. Default: \"none\" */\r\n shape?: TextAnnotationFrameShape;\r\n /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: \"none\" */\r\n fill?: TextAnnotationFillColor;\r\n /** The color of the text frame's outline. Default: black */\r\n border?: TextStyleColor;\r\n /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */\r\n borderWeight?: number;\r\n};\r\n\r\n/** Properties describing the appearance of [[TextAnnotationLeader]] in a [[TextAnnotation]].\r\n * Used when producing geometry for [[TextAnnotation]].\r\n * @beta\r\n */\r\nexport interface TextLeaderStyleProps {\r\n /** The color of the leader.\r\n * If `inherit` is specified, the [[TextAnnotationLeader]] will use the color specified in the parent [[TextStyleSettings]]`.\r\n * Default: \"inherit\".\r\n */\r\n color?: TextStyleColor | \"inherit\";\r\n /** Whether to use an elbow in the leader.\r\n * Default: false\r\n */\r\n wantElbow?: boolean;\r\n /** Multiplier used to compute length of the elbow in the leader.\r\n * The elbowLength is computed in meters as elbowLength * [[lineHeight]].\r\n * Default: 1.0\r\n */\r\n elbowLength?: number;\r\n /** Multiplier to compute height of the leader terminator.\r\n * The terminator height is computed in meters as terminatorHeight * [[lineHeight]].\r\n * Default: 1.0\r\n */\r\n terminatorHeightFactor?: number;\r\n /** Multiplier to compute width of the leader terminator.\r\n * The terminator width is computed in meters as terminatorWidth * [[lineHeight]].\r\n * Default: 1.0\r\n */\r\n terminatorWidthFactor?: number;\r\n}\r\n\r\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [AnnotationTextStyle]($backend)'s properties.\r\n * @beta\r\n */\r\nexport interface TextStyleSettingsProps {\r\n /** The color of the text.\r\n * Default: \"subcategory\".\r\n */\r\n color?: TextStyleColor;\r\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\r\n * Default: \"\" (an invalid font name).\r\n */\r\n fontName?: string;\r\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\r\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\r\n * lineHeight * [[subScriptOffsetFactor]], respectively.\r\n * Default: 1.0. */\r\n lineHeight?: number;\r\n /** Multiplier used to compute the vertical distance between two lines of text.\r\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\r\n * Default: 0.5.\r\n */\r\n lineSpacingFactor?: number;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\r\n * Default: false.\r\n */\r\n isBold?: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\r\n * Default: false.\r\n */\r\n isItalic?: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be underlined.\r\n * Default: false.\r\n */\r\n isUnderlined?: boolean;\r\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\r\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\r\n * Default: 0.7.\r\n */\r\n stackedFractionScale?: number;\r\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\r\n * Default: \"horizontal\".\r\n */\r\n stackedFractionType?: StackedFractionType;\r\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\r\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\r\n * Default: -0.15.\r\n */\r\n subScriptOffsetFactor?: number;\r\n /** Multiplier used to compute the height of a subscript [[TextRun]].\r\n * The height is computed as subScriptScale * [[lineHeight]].\r\n * Default: 2/3\r\n */\r\n subScriptScale?: number;\r\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\r\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\r\n * Default: -0.5.\r\n */\r\n superScriptOffsetFactor?: number;\r\n /** Multiplier used to compute the height of a superscript [[TextRun]].\r\n * The height is computed as superScriptScale * [[lineHeight]].\r\n * Default: 2/3\r\n */\r\n superScriptScale?: number;\r\n /** A scale applied to the width of each glyph.\r\n * Default: 1.0\r\n */\r\n widthFactor?: number;\r\n\r\n /** Properties describing appearance of leaders in a [[TextAnnotation]]\r\n * Used when producing geometry for [[TextAnnotation]]\r\n * Default: {color:\"subcategory\", wantElbow:\"false\",elbowLength:1, terminatorWidthFactor:1, terminatorHeightFactor:1}.\r\n */\r\n leader?: TextLeaderStyleProps;\r\n /** The size (in meters) used to calculate the tab stops in a run.\r\n * These are equally spaced from the left edge of the TextBlock.\r\n * Default: 4 meters.\r\n */\r\n tabInterval?: number;\r\n /**\r\n * A description of the frame around the text annotation.\r\n * Used when producing geometry for [[TextAnnotation]]s.\r\n * Default: {shape: \"none\", fill: \"none\", border: black, borderWeight: 1} for no frame.\r\n */\r\n frame?: TextFrameStyleProps;\r\n}\r\n\r\nfunction deepFreeze<T>(obj: T) {\r\n if (obj === null || typeof obj !== \"object\" || Object.isFrozen(obj))\r\n return;\r\n Object.getOwnPropertyNames(obj).forEach((prop) => {\r\n const value = (obj as any)[prop];\r\n if (value && typeof value === \"object\") {\r\n deepFreeze(value);\r\n }\r\n });\r\n Object.freeze(obj);\r\n}\r\n\r\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\r\n * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.\r\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\r\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\r\n * @beta\r\n */\r\nexport class TextStyleSettings {\r\n /** The color of the text. */\r\n public readonly color: TextStyleColor;\r\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\r\n */\r\n public readonly fontName: string;\r\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\r\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\r\n * lineHeight * [[subScriptOffsetFactor]], respectively.\r\n */\r\n public readonly lineHeight: number;\r\n /** Multiplier used to compute the vertical distance between two lines of text.\r\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\r\n */\r\n public readonly lineSpacingFactor: number;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\r\n public readonly isBold: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\r\n public readonly isItalic: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\r\n public readonly isUnderlined: boolean;\r\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\r\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\r\n */\r\n public readonly stackedFractionScale: number;\r\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\r\n public readonly stackedFractionType: StackedFractionType;\r\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\r\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\r\n */\r\n public readonly subScriptOffsetFactor: number;\r\n /** Multiplier used to compute the height of a subscript [[TextRun]].\r\n * The height is computed as subScriptScale * [[lineHeight]].\r\n */\r\n public readonly subScriptScale: number;\r\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\r\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\r\n */\r\n public readonly superScriptOffsetFactor: number;\r\n /** Multiplier used to compute the height of a superscript [[TextRun]].\r\n * The height is computed as superScriptScale * [[lineHeight]].\r\n */\r\n public readonly superScriptScale: number;\r\n /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */\r\n public readonly widthFactor: number;\r\n /** Properties describing appearance of leaders in a [[TextAnnotation]].\r\n * Used when producing geometry for [[TextAnnotation]].\r\n */\r\n public readonly leader: Readonly<Required<TextLeaderStyleProps>>;\r\n /** The size (in meters) used to calculate the tab stops in a run.\r\n * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.\r\n */\r\n public readonly tabInterval: number;\r\n /** The frame settings of the [[TextAnnotation]]. */\r\n public readonly frame: Readonly<Required<TextFrameStyleProps>>;\r\n\r\n /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */\r\n public static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>> = {\r\n color: \"subcategory\",\r\n fontName: \"\",\r\n lineHeight: 1,\r\n lineSpacingFactor: 0.5,\r\n isBold: false,\r\n isItalic: false,\r\n isUnderlined: false,\r\n stackedFractionScale: 0.7,\r\n stackedFractionType: \"horizontal\",\r\n subScriptOffsetFactor: -0.15,\r\n subScriptScale: 2 / 3,\r\n superScriptOffsetFactor: 0.5,\r\n superScriptScale: 2 / 3,\r\n widthFactor: 1,\r\n leader: {\r\n color: \"inherit\",\r\n wantElbow: false,\r\n elbowLength: 1.0,\r\n terminatorHeightFactor: 1.0,\r\n terminatorWidthFactor: 1.0,\r\n },\r\n tabInterval: 4,\r\n frame: {\r\n shape: \"none\",\r\n fill: \"none\",\r\n border: ColorDef.black.toJSON(),\r\n borderWeight: 1,\r\n },\r\n };\r\n\r\n /** Settings initialized to all default values. */\r\n public static defaults: TextStyleSettings = new TextStyleSettings({});\r\n\r\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\r\n if (!defaults) {\r\n defaults = TextStyleSettings.defaultProps;\r\n }\r\n\r\n this.color = props.color ?? defaults.color;\r\n this.fontName = props.fontName ?? defaults.fontName;\r\n this.lineHeight = props.lineHeight ?? defaults.lineHeight;\r\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\r\n this.isBold = props.isBold ?? defaults.isBold;\r\n this.isItalic = props.isItalic ?? defaults.isItalic;\r\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\r\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\r\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\r\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\r\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\r\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\r\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\r\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\r\n const leader = {\r\n color: props.leader?.color ?? defaults.leader.color,\r\n wantElbow: props.leader?.wantElbow ?? defaults.leader.wantElbow,\r\n elbowLength: props.leader?.elbowLength ?? defaults.leader.elbowLength,\r\n terminatorHeightFactor: props.leader?.terminatorHeightFactor ?? defaults.leader.terminatorHeightFactor,\r\n terminatorWidthFactor: props.leader?.terminatorWidthFactor ?? defaults.leader.terminatorWidthFactor,\r\n }\r\n this.leader = Object.freeze(leader) as Readonly<Required<TextLeaderStyleProps>>;\r\n this.tabInterval = props.tabInterval ?? defaults.tabInterval;\r\n const frame = {\r\n shape: props.frame?.shape ?? defaults.frame.shape,\r\n fill: props.frame?.fill ?? defaults.frame.fill,\r\n border: props.frame?.border ?? defaults.frame.border,\r\n borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,\r\n };\r\n // Cast to indicate to TypeScript that the frame properties are all defined\r\n this.frame = Object.freeze(frame) as Readonly<Required<TextFrameStyleProps>>;\r\n }\r\n\r\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\r\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\r\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\r\n }\r\n\r\n /** Creates a deep copy of the `TextStyleSettingsProps`. */\r\n public static cloneProps(props: TextStyleSettingsProps): TextStyleSettingsProps {\r\n const copy = { ...props };\r\n if (props.leader) {\r\n copy.leader = { ...props.leader };\r\n }\r\n if (props.frame) {\r\n copy.frame = { ...props.frame };\r\n }\r\n return copy;\r\n }\r\n\r\n /** Create settings from their JSON representation. */\r\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\r\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\r\n }\r\n\r\n public toJSON(): TextStyleSettingsProps {\r\n return { ...this };\r\n }\r\n\r\n /** Compare two [[TextLeaderStyleProps]] for equality.\r\n * @param other The other leader style properties to compare against.\r\n * @returns true if the two leader styles are equal, false otherwise.\r\n */\r\n public leaderEquals(other: TextLeaderStyleProps): boolean {\r\n return this.leader.color === other.color && this.leader.wantElbow === other.wantElbow\r\n && this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor\r\n && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;\r\n }\r\n\r\n public frameEquals(other: TextFrameStyleProps): boolean {\r\n return this.frame?.shape === other.shape\r\n && this.frame?.fill === other.fill\r\n && this.frame?.border === other.border\r\n && this.frame?.borderWeight === other.borderWeight;\r\n }\r\n\r\n public equals(other: TextStyleSettings): boolean {\r\n return this.color === other.color && this.fontName === other.fontName\r\n && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor\r\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\r\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\r\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\r\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale\r\n && this.tabInterval === other.tabInterval\r\n && this.leaderEquals(other.leader)\r\n && this.frameEquals(other.frame)\r\n }\r\n\r\n /**\r\n * Returns a list of validation errors for this instance.\r\n *\r\n * A TextStyleSettings object may contain values that are invalid in all contexts.\r\n * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.\r\n *\r\n * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.\r\n *\r\n * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.\r\n */\r\n public getValidationErrors(): string[] {\r\n const errorMessages: string[] = [];\r\n if (this.fontName.trim() === \"\") {\r\n errorMessages.push(\"fontName must be provided\");\r\n }\r\n\r\n if (this.lineHeight <= 0) {\r\n errorMessages.push(\"lineHeight must be greater than 0\");\r\n }\r\n\r\n if (this.stackedFractionScale <= 0) {\r\n errorMessages.push(\"stackedFractionScale must be greater than 0\");\r\n }\r\n\r\n return errorMessages;\r\n }\r\n}\r\n\r\ndeepFreeze(TextStyleSettings.defaultProps);\r\ndeepFreeze(TextStyleSettings.defaults);"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;A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AmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,0BAA0B,CAAC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./CatalogIModel\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinCoreErrors\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./CesiumIonAssets\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
1
+ {"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;A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AAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,0BAA0B,CAAC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./AmbientOcclusion\";\r\nexport * from \"./AnalysisStyle\";\r\nexport * from \"./annotation/TextAnnotation\";\r\nexport * from \"./annotation/TextBlock\";\r\nexport * from \"./annotation/TextBlockGeometryProps\";\r\nexport * from \"./annotation/TextBlockLayoutResult\";\r\nexport * from \"./annotation/TextStyle\";\r\nexport * from \"./Atmosphere\";\r\nexport * from \"./AuthorizationClient\";\r\nexport * from \"./BackgroundMapProvider\";\r\nexport * from \"./BackgroundMapSettings\";\r\nexport * from \"./Base64EncodedString\";\r\nexport * from \"./BriefcaseTypes\";\r\nexport * from \"./Camera\";\r\nexport * from \"./CatalogIModel\";\r\nexport * from \"./ChangedElements\";\r\nexport * from \"./ChangedEntities\";\r\nexport * from \"./ChangesetProps\";\r\nexport * from \"./ClipStyle\";\r\nexport * from \"./Code\";\r\nexport * from \"./ColorByName\";\r\nexport * from \"./ColorDef\";\r\nexport * from \"./CommonLoggerCategory\";\r\nexport * from \"./ContextRealityModel\";\r\nexport * from \"./DisplayStyleSettings\";\r\nexport * from \"./domains/FunctionalElementProps\";\r\nexport * from \"./domains/GenericElementProps\";\r\nexport * from \"./ECSchemaProps\";\r\nexport * from \"./ECSqlTypes\";\r\nexport * from \"./ElementMesh\";\r\nexport * from \"./ElementProps\";\r\nexport * from \"./EmphasizeElementsProps\";\r\nexport * from \"./EntityProps\";\r\nexport * from \"./EntityReference\";\r\nexport * from \"./Environment\";\r\nexport * from \"./FeatureIndex\";\r\nexport * from \"./FeatureSymbology\";\r\nexport * from \"./FeatureTable\";\r\nexport * from \"./Fonts\";\r\nexport * from \"./Frustum\";\r\nexport * from \"./GenericInstanceFilter\";\r\nexport * from \"./GeoCoordinateServices\";\r\nexport * from \"./geometry/AdditionalTransform\";\r\nexport * from \"./geometry/AreaPattern\";\r\nexport * from \"./geometry/BoundingSphere\";\r\nexport * from \"./geometry/Cartographic\";\r\nexport * from \"./geometry/CoordinateReferenceSystem\";\r\nexport * from \"./geometry/ElementGeometry\";\r\nexport * from \"./geometry/FrustumPlanes\";\r\nexport * from \"./geometry/GeodeticDatum\";\r\nexport * from \"./geometry/GeodeticEllipsoid\";\r\nexport * from \"./geometry/GeometryStream\";\r\nexport * from \"./geometry/ImageGraphic\";\r\nexport * from \"./geometry/LineStyle\";\r\nexport * from \"./geometry/Placement\";\r\nexport * from \"./geometry/Projection\";\r\nexport * from \"./geometry/TextString\";\r\nexport * from \"./GeometryContainment\";\r\nexport * from \"./GeometryParams\";\r\nexport * from \"./GeometrySummary\";\r\nexport * from \"./Gradient\";\r\nexport * from \"./GraphicParams\";\r\nexport * from \"./GroundPlane\";\r\nexport * from \"./HiddenLine\";\r\nexport * from \"./Hilite\";\r\nexport * from \"./HSLColor\";\r\nexport * from \"./HSVColor\";\r\nexport * from \"./Image\";\r\nexport * from \"./IModel\";\r\nexport * from \"./IModelError\";\r\nexport * from \"./IModelVersion\";\r\nexport * from \"./ITwinCoreErrors\";\r\nexport * from \"./ipc/IpcSocket\";\r\nexport * from \"./ipc/IpcWebSocket\";\r\nexport * from \"./ipc/IpcWebSocketTransport\";\r\nexport * from \"./ipc/IpcSession\";\r\nexport * from \"./IpcAppProps\";\r\nexport * from \"./LightSettings\";\r\nexport * from \"./LinePixels\";\r\nexport * from \"./Localization\";\r\nexport * from \"./MapImagerySettings\";\r\nexport * from \"./MapLayerSettings\";\r\nexport * from \"./MassProperties\";\r\nexport * from \"./MaterialProps\";\r\nexport * from \"./ModelClipGroup\";\r\nexport * from \"./ModelProps\";\r\nexport * from \"./NativeAppProps\";\r\nexport * from \"./OctEncodedNormal\";\r\nexport * from \"./ConcurrentQuery\";\r\nexport * from \"./ECSqlReader\";\r\nexport * from \"./PlanarClipMask\";\r\nexport * from \"./ModelGeometryChanges\";\r\nexport * from \"./PlanProjectionSettings\";\r\nexport * from \"./QPoint\";\r\nexport * from \"./RealityDataAccessProps\";\r\nexport * from \"./RealityModelDisplaySettings\";\r\nexport * from \"./RenderPolyline\";\r\nexport * from \"./RenderMaterial\";\r\nexport * from \"./RenderSchedule\";\r\nexport * from \"./RenderTexture\";\r\nexport * from \"./RgbColor\";\r\nexport * from \"./RpcManager\";\r\nexport * from \"./SessionProps\";\r\nexport * from \"./SkyBox\";\r\nexport * from \"./SolarCalculate\";\r\nexport * from \"./SolarShadows\";\r\nexport * from \"./SpatialClassification\";\r\nexport * from \"./SubCategoryAppearance\";\r\nexport * from \"./SubCategoryOverride\";\r\nexport * from \"./CesiumIonAssets\";\r\nexport * from \"./TerrainSettings\";\r\nexport * from \"./TextureMapping\";\r\nexport * from \"./TextureProps\";\r\nexport * from \"./ThematicDisplay\";\r\nexport * from \"./ContourDisplay\";\r\nexport * from \"./Thumbnail\";\r\nexport * from \"./TileProps\";\r\nexport * from \"./Tween\";\r\nexport * from \"./TxnAction\";\r\nexport * from \"./ViewDetails\";\r\nexport * from \"./ViewFlags\";\r\nexport * from \"./ViewProps\";\r\nexport * from \"./rpc/core/RpcConstants\";\r\nexport * from \"./rpc/core/RpcControl\";\r\nexport * from \"./rpc/core/RpcInvocation\";\r\nexport * from \"./rpc/core/RpcSessionInvocation\";\r\nexport * from \"./rpc/core/RpcMarshaling\";\r\nexport * from \"./rpc/core/RpcOperation\";\r\nexport * from \"./rpc/core/RpcPendingQueue\";\r\nexport * from \"./rpc/core/RpcProtocol\";\r\nexport * from \"./rpc/core/RpcRegistry\";\r\nexport * from \"./rpc/core/RpcRequest\";\r\nexport * from \"./rpc/core/RpcRequestContext\";\r\nexport * from \"./rpc/core/RpcRoutingToken\";\r\nexport * from \"./rpc/core/RpcPush\";\r\nexport * from \"./rpc/core/RpcConfiguration\";\r\nexport * from \"./rpc/DevToolsRpcInterface\";\r\nexport * from \"./rpc/IModelReadRpcInterface\";\r\nexport * from \"./rpc/IModelTileRpcInterface\";\r\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\r\nexport * from \"./rpc/TestRpcManager\";\r\nexport * from \"./RpcInterface\";\r\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\r\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\r\nexport * from \"./rpc/web/OpenAPI\";\r\nexport * from \"./rpc/web/RpcMultipart\";\r\nexport * from \"./rpc/web/WebAppRpcProtocol\";\r\nexport * from \"./rpc/web/WebAppRpcRequest\";\r\nexport * from \"./rpc/web/WebAppRpcLogging\";\r\nexport * from \"./tile/B3dmTileIO\";\r\nexport * from \"./tile/CompositeTileIO\";\r\nexport * from \"./tile/ElementGraphics\";\r\nexport * from \"./tile/GltfTileIO\";\r\nexport * from \"./tile/I3dmTileIO\";\r\nexport * from \"./tile/IModelTileIO\";\r\nexport * from \"./tile/PntsTileIO\";\r\nexport * from \"./tile/TileIO\";\r\nexport * from \"./tile/TileMetadata\";\r\nexport * from \"./tile/Tileset3dSchema\";\r\nexport * from \"./WhiteOnWhiteReversalSettings\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n/** @docs-package-description\r\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Entities\r\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\r\n */\r\n/**\r\n * @docs-group-description Geometry\r\n * Types for working with geometry.\r\n */\r\n/**\r\n * @docs-group-description Serialization\r\n * Types for serializing geometry\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Types for defining graphical views of the contents of an iModel.\r\n */\r\n/**\r\n * @docs-group-description DisplayStyles\r\n * Types for describing how the contents of Views should be rendered.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Types describing geometry, views, and symbology for consumption by a display system.\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Types that define the appearance of geometry.\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description IpcSocket\r\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description CloudStorage\r\n * Types for working with Cloud Storage.\r\n */\r\n/**\r\n * @docs-group-description Tween\r\n * Tweening library adapted from tween.js.\r\n */\r\n/**\r\n * @docs-group-description Tile\r\n * Types for working with 3d tile formats.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * [Native applications]($docs/learning/NativeApps.md)\r\n */\r\n/**\r\n * @docs-group-description Localization\r\n * Classes for internationalization and localization of your app.\r\n */\r\n/**\r\n * @docs-group-description Authorization\r\n * Classes for managing AccessToken used for all requests in other classes.\r\n */\r\n/**\r\n * @docs-group-description RealityData\r\n * Types for working with the RealityData API.\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Types for working with the MapLayers API.\r\n */\r\n/**\r\n * @docs-group-description Annotation\r\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\r\n */\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FunctionalElementProps.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { ElementProps, RelatedElementProps } from \"../ElementProps\";\n\n/**\n * @public\n * @extensions\n */\nexport interface FunctionalElementProps extends ElementProps {\n typeDefinition?: RelatedElementProps;\n}\n"]}
1
+ {"version":3,"file":"FunctionalElementProps.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Entities\r\n */\r\n\r\nimport { ElementProps, RelatedElementProps } from \"../ElementProps\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FunctionalElementProps extends ElementProps {\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GenericElementProps.js","sourceRoot":"","sources":["../../../src/domains/GenericElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { GeometricElement2dProps, RelatedElementProps } from \"../ElementProps\";\n\n/**\n * @public\n * @extensions\n */\nexport interface ViewAttachmentLabelProps extends GeometricElement2dProps {\n viewAttachment?: RelatedElementProps;\n}\n\n/**\n * @public\n * @extensions\n */\nexport interface CalloutProps extends GeometricElement2dProps {\n drawingModel?: RelatedElementProps;\n}\n"]}
1
+ {"version":3,"file":"GenericElementProps.js","sourceRoot":"","sources":["../../../src/domains/GenericElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Entities\r\n */\r\n\r\nimport { GeometricElement2dProps, RelatedElementProps } from \"../ElementProps\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentLabelProps extends GeometricElement2dProps {\r\n viewAttachment?: RelatedElementProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CalloutProps extends GeometricElement2dProps {\r\n drawingModel?: RelatedElementProps;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AdditionalTransform.js","sourceRoot":"","sources":["../../../src/geometry/AdditionalTransform.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,wBAAwB;AAExB,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAwBjG;;;;;;;;;GASG;AACH,MAAM,OAAO,oBAAoB;IAC/B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,wCAAwC;IACjC,YAAY,CAAU;IAC7B,oEAAoE;IAC7D,MAAM,CAAU;IACvB,iFAAiF;IAC1E,KAAK,CAAU;IAEtB,YAAY,IAAgC;QAC1C,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,CAAC;IACH,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA+B;QACpD,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED;iBACa;IACN,MAAM;QACX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AAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAEvE,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AAWD;;;;;EAKE;AACF,MAAM,OAAO,mBAAmB;IAE9B,gFAAgF;IAChE,oBAAoB,CAAwB;IAE5D,YAAmB,IAA+B;QAChD,IAAI,IAAI;YACN,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjI,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA8B;QACnD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7D,CAAC;IAED;kBACc;IACP,MAAM,CAAC,KAA0B;QACtC,IAAI,CAAC,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,KAAK,SAAS,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAqB,CAAC;YAC7F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n// cspell:ignore Helmert\n\nimport { Angle, AxisIndex, Geometry, Matrix3d, Transform, Vector3d } from \"@itwin/core-geometry\";\n\n/** An affine transformation with an additional Z Offset.\n * The equations are:\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\n * X = a * x - b * y + translationX\n * Y = b * x + a * y + translationY\n * Z = z + translationZ\n * @public\n * @extensions\n */\nexport interface Helmert2DWithZOffsetProps {\n /** The X post translation */\n translationX: number;\n /** The Y post-translation */\n translationY: number;\n /** The Z post-translation or Z offset*/\n translationZ: number;\n /** The rotation in the trigonometric (CCW) direction in degrees. */\n rotDeg: number;\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\n scale: number;\n}\n\n/** An affine transformation with an additional Z Offset.\n * The equations are:\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\n * X = a * x - b * y + translationX\n * Y = b * x + a * y + translationY\n * Z = z + translationZ\n *\n * Note that the class only implements the definition and not the operation.\n * @public\n */\nexport class Helmert2DWithZOffset implements Helmert2DWithZOffsetProps {\n /** The X post translation */\n public translationX!: number;\n /** The Y post-translation */\n public translationY!: number;\n /** The Z post-translation or Z offset*/\n public translationZ!: number;\n /** The rotation in the trigonometric (CCW) direction in degrees. */\n public rotDeg!: number;\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\n public scale!: number;\n\n constructor(data?: Helmert2DWithZOffsetProps) {\n if (data) {\n this.translationX = data.translationX;\n this.translationY = data.translationY;\n this.translationZ = data.translationZ;\n this.rotDeg = data.rotDeg;\n this.scale = data.scale;\n }\n }\n\n /** Creates an Helmert Transform from JSON representation.\n * @public */\n public static fromJSON(data: Helmert2DWithZOffsetProps): Helmert2DWithZOffset {\n return new Helmert2DWithZOffset(data);\n }\n\n /** Creates a JSON from the Helmert Transform definition\n * @public */\n public toJSON(): Helmert2DWithZOffsetProps {\n return { translationX: this.translationX, translationY: this.translationY, translationZ: this.translationZ, rotDeg: this.rotDeg, scale: this.scale };\n }\n\n /** Compares two Helmert2DWithZOffset objects applying a minuscule tolerance.\n * @public */\n public equals(other: Helmert2DWithZOffset): boolean {\n return (Math.abs(this.translationX - other.translationX) < Geometry.smallMetricDistance &&\n Math.abs(this.translationY - other.translationY) < Geometry.smallMetricDistance &&\n Math.abs(this.translationZ - other.translationZ) < Geometry.smallMetricDistance &&\n Math.abs(this.rotDeg - other.rotDeg) < Geometry.smallAngleDegrees &&\n Math.abs(this.scale - other.scale) < Geometry.smallFraction);\n }\n\n /** Convert Helmert2DWithZOffset object into Transfrom object\n * @public */\n public convertHelmertToTransform(): Transform {\n const rotationXY = Matrix3d.createRotationAroundAxisIndex(\n AxisIndex.Z,\n Angle.createDegrees(this?.rotDeg)\n );\n rotationXY.scaleColumnsInPlace(this.scale, this.scale, 1.0);\n const translation = Vector3d.create(\n this.translationX,\n this.translationY,\n this.translationZ\n );\n const helmertTransform = Transform.createRefs(translation, rotationXY);\n\n return helmertTransform;\n }\n}\n\n/** Additional Transform definition\n * @public\n * @extensions\n */\nexport interface AdditionalTransformProps {\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\n helmert2DWithZOffset?: Helmert2DWithZOffsetProps;\n}\n\n/** Additional Transform implementation.\n * An additional transform is a transformation that can apply to either the horizontal or vertical coordinates of a\n * geographic CRS. The transformation is applied after the latitude/longitude have been projected thus the process\n * is applied to the result Cartesian coordinates of the projection process.\n * @public\n*/\nexport class AdditionalTransform implements AdditionalTransformProps {\n\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\n public readonly helmert2DWithZOffset?: Helmert2DWithZOffset;\n\n public constructor(data?: AdditionalTransformProps) {\n if (data)\n this.helmert2DWithZOffset = data.helmert2DWithZOffset ? Helmert2DWithZOffset.fromJSON(data.helmert2DWithZOffset) : undefined;\n }\n\n /** Creates an Additional Transform from JSON representation.\n * @public */\n public static fromJSON(data: AdditionalTransformProps): AdditionalTransform {\n return new AdditionalTransform(data);\n }\n\n /** Creates a JSON from the Additional Transform definition\n * @public */\n public toJSON(): AdditionalTransformProps {\n return { helmert2DWithZOffset: this.helmert2DWithZOffset };\n }\n\n /** Compares two additional transforms applying a minuscule tolerance to comparing numbers.\n * @public */\n public equals(other: AdditionalTransform): boolean {\n if ((this.helmert2DWithZOffset === undefined) !== (other.helmert2DWithZOffset === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.helmert2DWithZOffset && !this.helmert2DWithZOffset.equals(other.helmert2DWithZOffset!))\n return false;\n\n return true;\n }\n}\n\n"]}
1
+ {"version":3,"file":"AdditionalTransform.js","sourceRoot":"","sources":["../../../src/geometry/AdditionalTransform.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,wBAAwB;AAExB,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAwBjG;;;;;;;;;GASG;AACH,MAAM,OAAO,oBAAoB;IAC/B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,wCAAwC;IACjC,YAAY,CAAU;IAC7B,oEAAoE;IAC7D,MAAM,CAAU;IACvB,iFAAiF;IAC1E,KAAK,CAAU;IAEtB,YAAY,IAAgC;QAC1C,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,CAAC;IACH,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA+B;QACpD,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,M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AO,mBAAmB;IAE9B,gFAAgF;IAChE,oBAAoB,CAAwB;IAE5D,YAAmB,IAA+B;QAChD,IAAI,IAAI;YACN,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjI,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA8B;QACnD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7D,CAAC;IAED;kBACc;IACP,MAAM,CAAC,KAA0B;QACtC,IAAI,CAAC,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,KAAK,SAAS,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAqB,CAAC;YAC7F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF","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 Geometry\r\n */\r\n// cspell:ignore Helmert\r\n\r\nimport { Angle, AxisIndex, Geometry, Matrix3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\n\r\n/** An affine transformation with an additional Z Offset.\r\n * The equations are:\r\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\r\n * X = a * x - b * y + translationX\r\n * Y = b * x + a * y + translationY\r\n * Z = z + translationZ\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Helmert2DWithZOffsetProps {\r\n /** The X post translation */\r\n translationX: number;\r\n /** The Y post-translation */\r\n translationY: number;\r\n /** The Z post-translation or Z offset*/\r\n translationZ: number;\r\n /** The rotation in the trigonometric (CCW) direction in degrees. */\r\n rotDeg: number;\r\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\r\n scale: number;\r\n}\r\n\r\n/** An affine transformation with an additional Z Offset.\r\n * The equations are:\r\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\r\n * X = a * x - b * y + translationX\r\n * Y = b * x + a * y + translationY\r\n * Z = z + translationZ\r\n *\r\n * Note that the class only implements the definition and not the operation.\r\n * @public\r\n */\r\nexport class Helmert2DWithZOffset implements Helmert2DWithZOffsetProps {\r\n /** The X post translation */\r\n public translationX!: number;\r\n /** The Y post-translation */\r\n public translationY!: number;\r\n /** The Z post-translation or Z offset*/\r\n public translationZ!: number;\r\n /** The rotation in the trigonometric (CCW) direction in degrees. */\r\n public rotDeg!: number;\r\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\r\n public scale!: number;\r\n\r\n constructor(data?: Helmert2DWithZOffsetProps) {\r\n if (data) {\r\n this.translationX = data.translationX;\r\n this.translationY = data.translationY;\r\n this.translationZ = data.translationZ;\r\n this.rotDeg = data.rotDeg;\r\n this.scale = data.scale;\r\n }\r\n }\r\n\r\n /** Creates an Helmert Transform from JSON representation.\r\n * @public */\r\n public static fromJSON(data: Helmert2DWithZOffsetProps): Helmert2DWithZOffset {\r\n return new Helmert2DWithZOffset(data);\r\n }\r\n\r\n /** Creates a JSON from the Helmert Transform definition\r\n * @public */\r\n public toJSON(): Helmert2DWithZOffsetProps {\r\n return { translationX: this.translationX, translationY: this.translationY, translationZ: this.translationZ, rotDeg: this.rotDeg, scale: this.scale };\r\n }\r\n\r\n /** Compares two Helmert2DWithZOffset objects applying a minuscule tolerance.\r\n * @public */\r\n public equals(other: Helmert2DWithZOffset): boolean {\r\n return (Math.abs(this.translationX - other.translationX) < Geometry.smallMetricDistance &&\r\n Math.abs(this.translationY - other.translationY) < Geometry.smallMetricDistance &&\r\n Math.abs(this.translationZ - other.translationZ) < Geometry.smallMetricDistance &&\r\n Math.abs(this.rotDeg - other.rotDeg) < Geometry.smallAngleDegrees &&\r\n Math.abs(this.scale - other.scale) < Geometry.smallFraction);\r\n }\r\n\r\n /** Convert Helmert2DWithZOffset object into Transfrom object\r\n * @public */\r\n public convertHelmertToTransform(): Transform {\r\n const rotationXY = Matrix3d.createRotationAroundAxisIndex(\r\n AxisIndex.Z,\r\n Angle.createDegrees(this?.rotDeg)\r\n );\r\n rotationXY.scaleColumnsInPlace(this.scale, this.scale, 1.0);\r\n const translation = Vector3d.create(\r\n this.translationX,\r\n this.translationY,\r\n this.translationZ\r\n );\r\n const helmertTransform = Transform.createRefs(translation, rotationXY);\r\n\r\n return helmertTransform;\r\n }\r\n}\r\n\r\n/** Additional Transform definition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AdditionalTransformProps {\r\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\r\n helmert2DWithZOffset?: Helmert2DWithZOffsetProps;\r\n}\r\n\r\n/** Additional Transform implementation.\r\n * An additional transform is a transformation that can apply to either the horizontal or vertical coordinates of a\r\n * geographic CRS. The transformation is applied after the latitude/longitude have been projected thus the process\r\n * is applied to the result Cartesian coordinates of the projection process.\r\n * @public\r\n*/\r\nexport class AdditionalTransform implements AdditionalTransformProps {\r\n\r\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\r\n public readonly helmert2DWithZOffset?: Helmert2DWithZOffset;\r\n\r\n public constructor(data?: AdditionalTransformProps) {\r\n if (data)\r\n this.helmert2DWithZOffset = data.helmert2DWithZOffset ? Helmert2DWithZOffset.fromJSON(data.helmert2DWithZOffset) : undefined;\r\n }\r\n\r\n /** Creates an Additional Transform from JSON representation.\r\n * @public */\r\n public static fromJSON(data: AdditionalTransformProps): AdditionalTransform {\r\n return new AdditionalTransform(data);\r\n }\r\n\r\n /** Creates a JSON from the Additional Transform definition\r\n * @public */\r\n public toJSON(): AdditionalTransformProps {\r\n return { helmert2DWithZOffset: this.helmert2DWithZOffset };\r\n }\r\n\r\n /** Compares two additional transforms applying a minuscule tolerance to comparing numbers.\r\n * @public */\r\n public equals(other: AdditionalTransform): boolean {\r\n if ((this.helmert2DWithZOffset === undefined) !== (other.helmert2DWithZOffset === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.helmert2DWithZOffset && !this.helmert2DWithZOffset.equals(other.helmert2DWithZOffset!))\r\n return false;\r\n\r\n return true;\r\n }\r\n}\r\n\r\n"]}