@itwin/core-common 5.0.0-dev.95 → 5.0.0-dev.96

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 (337) 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/ChangedElements.js.map +1 -1
  12. package/lib/cjs/ChangedEntities.js.map +1 -1
  13. package/lib/cjs/ChangesetProps.js.map +1 -1
  14. package/lib/cjs/ClipStyle.js.map +1 -1
  15. package/lib/cjs/Code.js.map +1 -1
  16. package/lib/cjs/ColorByName.js.map +1 -1
  17. package/lib/cjs/ColorDef.js.map +1 -1
  18. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  19. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  20. package/lib/cjs/ContextRealityModel.js.map +1 -1
  21. package/lib/cjs/ContourDisplay.js.map +1 -1
  22. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  23. package/lib/cjs/ECSchemaProps.js.map +1 -1
  24. package/lib/cjs/ECSqlReader.js.map +1 -1
  25. package/lib/cjs/ECSqlTypes.js.map +1 -1
  26. package/lib/cjs/ElementMesh.js.map +1 -1
  27. package/lib/cjs/ElementProps.js.map +1 -1
  28. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  29. package/lib/cjs/EntityProps.js.map +1 -1
  30. package/lib/cjs/EntityReference.js.map +1 -1
  31. package/lib/cjs/Environment.js.map +1 -1
  32. package/lib/cjs/FeatureIndex.js.map +1 -1
  33. package/lib/cjs/FeatureSymbology.js.map +1 -1
  34. package/lib/cjs/FeatureTable.js.map +1 -1
  35. package/lib/cjs/Fonts.js.map +1 -1
  36. package/lib/cjs/Frustum.js.map +1 -1
  37. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  38. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  39. package/lib/cjs/GeometryContainment.js.map +1 -1
  40. package/lib/cjs/GeometryParams.js.map +1 -1
  41. package/lib/cjs/GeometrySummary.js.map +1 -1
  42. package/lib/cjs/Gradient.js.map +1 -1
  43. package/lib/cjs/GraphicParams.js.map +1 -1
  44. package/lib/cjs/GroundPlane.js.map +1 -1
  45. package/lib/cjs/HSLColor.js.map +1 -1
  46. package/lib/cjs/HSVColor.js.map +1 -1
  47. package/lib/cjs/HiddenLine.js.map +1 -1
  48. package/lib/cjs/Hilite.js.map +1 -1
  49. package/lib/cjs/IModel.js.map +1 -1
  50. package/lib/cjs/IModelError.js.map +1 -1
  51. package/lib/cjs/IModelVersion.js.map +1 -1
  52. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  53. package/lib/cjs/Image.js.map +1 -1
  54. package/lib/cjs/IpcAppProps.js.map +1 -1
  55. package/lib/cjs/LightSettings.js.map +1 -1
  56. package/lib/cjs/LinePixels.js.map +1 -1
  57. package/lib/cjs/Localization.js.map +1 -1
  58. package/lib/cjs/MapImagerySettings.js.map +1 -1
  59. package/lib/cjs/MapLayerSettings.js.map +1 -1
  60. package/lib/cjs/MassProperties.js.map +1 -1
  61. package/lib/cjs/MaterialProps.js.map +1 -1
  62. package/lib/cjs/ModelClipGroup.js.map +1 -1
  63. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  64. package/lib/cjs/ModelProps.js.map +1 -1
  65. package/lib/cjs/NativeAppProps.js.map +1 -1
  66. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  67. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  68. package/lib/cjs/PlanarClipMask.js.map +1 -1
  69. package/lib/cjs/QPoint.js.map +1 -1
  70. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  71. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  72. package/lib/cjs/RenderMaterial.js.map +1 -1
  73. package/lib/cjs/RenderPolyline.js.map +1 -1
  74. package/lib/cjs/RenderTexture.js.map +1 -1
  75. package/lib/cjs/RgbColor.js.map +1 -1
  76. package/lib/cjs/RpcInterface.js.map +1 -1
  77. package/lib/cjs/RpcManager.js.map +1 -1
  78. package/lib/cjs/SessionProps.js.map +1 -1
  79. package/lib/cjs/SkyBox.js.map +1 -1
  80. package/lib/cjs/SolarCalculate.js.map +1 -1
  81. package/lib/cjs/SolarShadows.js.map +1 -1
  82. package/lib/cjs/SpatialClassification.js.map +1 -1
  83. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  84. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  85. package/lib/cjs/TerrainSettings.js.map +1 -1
  86. package/lib/cjs/TextureMapping.js.map +1 -1
  87. package/lib/cjs/TextureProps.js.map +1 -1
  88. package/lib/cjs/ThematicDisplay.js.map +1 -1
  89. package/lib/cjs/Thumbnail.js.map +1 -1
  90. package/lib/cjs/TileProps.js.map +1 -1
  91. package/lib/cjs/Tween.js.map +1 -1
  92. package/lib/cjs/TxnAction.js.map +1 -1
  93. package/lib/cjs/ViewDetails.js.map +1 -1
  94. package/lib/cjs/ViewFlags.js.map +1 -1
  95. package/lib/cjs/ViewProps.js.map +1 -1
  96. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  97. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  98. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  99. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  100. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  101. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  102. package/lib/cjs/core-common.js.map +1 -1
  103. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  104. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  105. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  106. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  107. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  108. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  109. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  110. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  111. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  112. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  113. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  114. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  115. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  116. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  117. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  118. package/lib/cjs/geometry/Placement.js.map +1 -1
  119. package/lib/cjs/geometry/Projection.js.map +1 -1
  120. package/lib/cjs/geometry/TextString.js.map +1 -1
  121. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  122. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  123. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  124. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  125. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  126. package/lib/cjs/internal/Snapping.js.map +1 -1
  127. package/lib/cjs/internal/cross-package.js.map +1 -1
  128. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  129. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  130. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  131. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  132. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  133. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  134. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  135. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  136. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  137. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  138. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  139. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  140. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  141. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  142. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  143. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  144. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  145. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  146. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  147. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  148. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  149. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  150. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  151. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  152. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  153. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  154. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  155. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  156. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  157. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  158. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  159. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  160. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  161. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  162. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  163. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  164. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  165. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  166. package/lib/cjs/tile/TileIO.js.map +1 -1
  167. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  168. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  169. package/lib/esm/AmbientOcclusion.js.map +1 -1
  170. package/lib/esm/AnalysisStyle.js.map +1 -1
  171. package/lib/esm/Atmosphere.js.map +1 -1
  172. package/lib/esm/AuthorizationClient.js.map +1 -1
  173. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  174. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  175. package/lib/esm/Base64EncodedString.js.map +1 -1
  176. package/lib/esm/BlobReader.js.map +1 -1
  177. package/lib/esm/BriefcaseTypes.js.map +1 -1
  178. package/lib/esm/Camera.js.map +1 -1
  179. package/lib/esm/ChangedElements.js.map +1 -1
  180. package/lib/esm/ChangedEntities.js.map +1 -1
  181. package/lib/esm/ChangesetProps.js.map +1 -1
  182. package/lib/esm/ClipStyle.js.map +1 -1
  183. package/lib/esm/Code.js.map +1 -1
  184. package/lib/esm/ColorByName.js.map +1 -1
  185. package/lib/esm/ColorDef.js.map +1 -1
  186. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  187. package/lib/esm/ConcurrentQuery.js.map +1 -1
  188. package/lib/esm/ContextRealityModel.js.map +1 -1
  189. package/lib/esm/ContourDisplay.js.map +1 -1
  190. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  191. package/lib/esm/ECSchemaProps.js.map +1 -1
  192. package/lib/esm/ECSqlReader.js.map +1 -1
  193. package/lib/esm/ECSqlTypes.js.map +1 -1
  194. package/lib/esm/ElementMesh.js.map +1 -1
  195. package/lib/esm/ElementProps.js.map +1 -1
  196. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  197. package/lib/esm/EntityProps.js.map +1 -1
  198. package/lib/esm/EntityReference.js.map +1 -1
  199. package/lib/esm/Environment.js.map +1 -1
  200. package/lib/esm/FeatureIndex.js.map +1 -1
  201. package/lib/esm/FeatureSymbology.js.map +1 -1
  202. package/lib/esm/FeatureTable.js.map +1 -1
  203. package/lib/esm/Fonts.js.map +1 -1
  204. package/lib/esm/Frustum.js.map +1 -1
  205. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  206. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  207. package/lib/esm/GeometryContainment.js.map +1 -1
  208. package/lib/esm/GeometryParams.js.map +1 -1
  209. package/lib/esm/GeometrySummary.js.map +1 -1
  210. package/lib/esm/Gradient.js.map +1 -1
  211. package/lib/esm/GraphicParams.js.map +1 -1
  212. package/lib/esm/GroundPlane.js.map +1 -1
  213. package/lib/esm/HSLColor.js.map +1 -1
  214. package/lib/esm/HSVColor.js.map +1 -1
  215. package/lib/esm/HiddenLine.js.map +1 -1
  216. package/lib/esm/Hilite.js.map +1 -1
  217. package/lib/esm/IModel.js.map +1 -1
  218. package/lib/esm/IModelError.js.map +1 -1
  219. package/lib/esm/IModelVersion.js.map +1 -1
  220. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  221. package/lib/esm/Image.js.map +1 -1
  222. package/lib/esm/IpcAppProps.js.map +1 -1
  223. package/lib/esm/LightSettings.js.map +1 -1
  224. package/lib/esm/LinePixels.js.map +1 -1
  225. package/lib/esm/Localization.js.map +1 -1
  226. package/lib/esm/MapImagerySettings.js.map +1 -1
  227. package/lib/esm/MapLayerSettings.js.map +1 -1
  228. package/lib/esm/MassProperties.js.map +1 -1
  229. package/lib/esm/MaterialProps.js.map +1 -1
  230. package/lib/esm/ModelClipGroup.js.map +1 -1
  231. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  232. package/lib/esm/ModelProps.js.map +1 -1
  233. package/lib/esm/NativeAppProps.js.map +1 -1
  234. package/lib/esm/OctEncodedNormal.js.map +1 -1
  235. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  236. package/lib/esm/PlanarClipMask.js.map +1 -1
  237. package/lib/esm/QPoint.js.map +1 -1
  238. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  239. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  240. package/lib/esm/RenderMaterial.js.map +1 -1
  241. package/lib/esm/RenderPolyline.js.map +1 -1
  242. package/lib/esm/RenderTexture.js.map +1 -1
  243. package/lib/esm/RgbColor.js.map +1 -1
  244. package/lib/esm/RpcInterface.js.map +1 -1
  245. package/lib/esm/RpcManager.js.map +1 -1
  246. package/lib/esm/SessionProps.js.map +1 -1
  247. package/lib/esm/SkyBox.js.map +1 -1
  248. package/lib/esm/SolarCalculate.js.map +1 -1
  249. package/lib/esm/SolarShadows.js.map +1 -1
  250. package/lib/esm/SpatialClassification.js.map +1 -1
  251. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  252. package/lib/esm/SubCategoryOverride.js.map +1 -1
  253. package/lib/esm/TerrainSettings.js.map +1 -1
  254. package/lib/esm/TextureMapping.js.map +1 -1
  255. package/lib/esm/TextureProps.js.map +1 -1
  256. package/lib/esm/ThematicDisplay.js.map +1 -1
  257. package/lib/esm/Thumbnail.js.map +1 -1
  258. package/lib/esm/TileProps.js.map +1 -1
  259. package/lib/esm/Tween.js.map +1 -1
  260. package/lib/esm/TxnAction.js.map +1 -1
  261. package/lib/esm/ViewDetails.js.map +1 -1
  262. package/lib/esm/ViewFlags.js.map +1 -1
  263. package/lib/esm/ViewProps.js.map +1 -1
  264. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  265. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  266. package/lib/esm/annotation/TextBlock.js.map +1 -1
  267. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  268. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  269. package/lib/esm/annotation/TextStyle.js.map +1 -1
  270. package/lib/esm/core-common.js.map +1 -1
  271. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  272. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  273. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  274. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  275. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  276. package/lib/esm/geometry/Cartographic.js.map +1 -1
  277. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  278. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  279. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  280. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  281. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  282. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  283. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  284. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  285. package/lib/esm/geometry/LineStyle.js.map +1 -1
  286. package/lib/esm/geometry/Placement.js.map +1 -1
  287. package/lib/esm/geometry/Projection.js.map +1 -1
  288. package/lib/esm/geometry/TextString.js.map +1 -1
  289. package/lib/esm/internal/BackendTypes.js.map +1 -1
  290. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  291. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  292. package/lib/esm/internal/RenderMesh.js.map +1 -1
  293. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  294. package/lib/esm/internal/Snapping.js.map +1 -1
  295. package/lib/esm/internal/cross-package.js.map +1 -1
  296. package/lib/esm/ipc/IpcSession.js.map +1 -1
  297. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  298. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  299. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  300. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  301. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  302. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  303. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  304. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  305. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  306. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  307. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  308. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  309. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  310. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  311. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  312. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  313. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  314. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  315. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  316. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  317. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  318. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  319. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  320. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  321. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  322. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  323. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  324. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  325. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  326. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  327. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  328. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  329. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  330. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  331. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  332. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  333. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  334. package/lib/esm/tile/TileIO.js.map +1 -1
  335. package/lib/esm/tile/TileMetadata.js.map +1 -1
  336. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  337. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AA4OH;;;GAGG;AACH,MAAM,KAAW,YAAY,CA0W5B;AA1WD,WAAiB,YAAY;IAE3B;;;;OAIG;IACU,oBAAO,GAAG,OAAO,CAAC;IAkC/B,qGAAqG;IACxF,0BAAa,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAgUnF,CAAC,EA1WgB,YAAY,KAAZ,YAAY,QA0W5B","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 Views\n */\n\nimport { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\nimport { CameraProps } from \"./Camera\";\nimport { DisplayStyleProps, DisplayStyleSettingsProps } from \"./DisplayStyleSettings\";\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, RenderTimelineProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\nimport { EntityQueryParams } from \"./EntityProps\";\nimport { ModelProps } from \"./ModelProps\";\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\nimport { ThumbnailProps } from \"./Thumbnail\";\nimport { RenderSchedule } from \"./RenderSchedule\";\n\n/** The id of either an element or an entry in a ViewStore.\n * @public\n */\nexport type ViewIdString = Id64String; // should also include ViewStoreRpc.IdString when that's @public\n\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\n * @see [[SectionDrawingProps]]\n * @public\n * @extensions\n */\nexport interface SectionDrawingViewProps {\n /** The Id of the spatial view from which the SectionDrawing was generated. */\n spatialView: Id64String;\n /** If true, the spatial view should be displayed in the context of the drawing view. */\n displaySpatialView: boolean;\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\n drawingToSpatialTransform?: TransformProps;\n}\n\n/** The response props from the getCustomViewState3dData RPC endpoint\n * @internal\n */\nexport interface CustomViewState3dProps {\n modelIds: CompressedId64Set;\n modelExtents: Range3dProps;\n categoryIds: CompressedId64Set;\n}\n\n/**\n * The options passed to the getCustomViewState3dData RPC endpoint.\n * @internal\n */\nexport interface CustomViewState3dCreatorOptions {\n modelIds?: CompressedId64Set;\n}\n\n/**\n * A result row from querying for subcategories\n * @internal\n */\nexport interface SubCategoryResultRow {\n parentId: Id64String;\n id: Id64String;\n appearance: SubCategoryAppearance.Props;\n}\n\n/**\n * Request props for the hydrateViewState RPC endpoint.\n * @internal\n */\nexport interface HydrateViewStateRequestProps {\n acsId?: string;\n notLoadedModelSelectorStateModels?: CompressedId64Set;\n sheetViewAttachmentIds?: CompressedId64Set;\n viewStateLoadProps?: ViewStateLoadProps;\n baseModelId?: Id64String;\n spatialViewId?: Id64String;\n}\n\n/** Response props from the hydrateViewState RPC endpoint.\n * @internal\n */\nexport interface HydrateViewStateResponseProps {\n acsElementProps?: ElementProps;\n modelSelectorStateModels?: ModelProps[];\n // cast this to viewAttachmentInfo[] on the frontend.\n sheetViewAttachmentProps?: ViewAttachmentProps[];\n sheetViewViews?: (ViewStateProps | undefined)[];\n baseModelProps?: ModelProps;\n spatialViewProps?: ViewStateProps;\n}\n\n/** Returned from [IModelDb.Views.getViewStateProps]($backend).\n * @public\n * @extensions\n */\nexport interface ViewStateProps {\n viewDefinitionProps: ViewDefinitionProps;\n categorySelectorProps: CategorySelectorProps;\n modelSelectorProps?: ModelSelectorProps;\n displayStyleProps: DisplayStyleProps;\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\n sheetProps?: SheetProps;\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\n sheetAttachments?: Id64Array;\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\n modelExtents?: Range3dProps;\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\n sectionDrawing?: SectionDrawingViewProps;\n}\n\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateProps]($backend).\n * @public\n * @extensions\n */\nexport interface ViewStateLoadProps {\n /** Options for loading the view's [[DisplayStyleProps]]. */\n displayStyle?: DisplayStyleLoadProps;\n\n /**\n * bindings for query-based selectors\n * @beta\n */\n queryBindings?: {\n modelSelector?: ViewStoreRpc.QueryBindings;\n categorySelector?: ViewStoreRpc.QueryBindings;\n };\n}\n\n/** Properties that define a ModelSelector\n * @public\n * @extensions\n */\nexport interface ModelSelectorProps extends DefinitionElementProps {\n models: Id64Array;\n}\n\n/** Properties that define a CategorySelector\n * @public\n * @extensions\n */\nexport interface CategorySelectorProps extends DefinitionElementProps {\n categories: Id64Array;\n}\n\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\n * @public\n * @extensions\n */\nexport interface ViewQueryParams extends EntityQueryParams {\n wantPrivate?: boolean;\n}\n\n/** Parameters used to construct a ViewDefinition\n * @public\n * @extensions\n */\nexport interface ViewDefinitionProps extends DefinitionElementProps {\n categorySelectorId: ViewIdString;\n displayStyleId: ViewIdString;\n description?: string;\n jsonProperties?: {\n /** Additional properties of the view. */\n viewDetails?: ViewDetailsProps;\n };\n}\n\n/** Parameters to construct a ViewDefinition3d\n * @public\n * @extensions\n */\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\n /** if true, camera is valid. */\n cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n origin: XYZProps;\n /** The extent of the view frustum. */\n extents: XYZProps;\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\n angles?: YawPitchRollProps;\n /** The camera used for this view. */\n camera: CameraProps;\n jsonProperties?: {\n /** Additional properties of the view. */\n viewDetails?: ViewDetails3dProps;\n };\n}\n\n/** Parameters to construct a SpatialViewDefinition\n * @public\n * @extensions\n */\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\n modelSelectorId: ViewIdString;\n}\n\n/** Parameters used to construct a ViewDefinition2d\n * @public\n * @extensions\n */\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\n baseModelId: Id64String;\n origin: XYProps;\n delta: XYProps;\n angle: AngleProps;\n}\n\n/**\n * @public\n * @extensions\n */\nexport interface AuxCoordSystemProps extends ElementProps {\n type?: number;\n description?: string;\n}\n\n/** Properties of AuxCoordSystem2d\n * @public\n * @extensions\n */\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\n /** Origin of the AuxCoordSystem2d */\n origin?: XYProps;\n /** Rotation angle */\n angle?: AngleProps;\n}\n\n/** Properties of AuxCoordSystem3d\n * @public\n * @extensions\n */\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\n /** Origin of the AuxCoordSystem3d */\n origin?: XYZProps;\n /** Yaw angle */\n yaw?: AngleProps;\n /** Pitch angle */\n pitch?: AngleProps;\n /** Roll angle */\n roll?: AngleProps;\n}\n\n/**\n * Access to a ViewStore from the frontend.\n * @beta\n */\nexport namespace ViewStoreRpc {\n\n /**\n * Version of the Rpc interface. If any methods or interfaces of this API change, this number should\n * be incremented according to the rules of semantic versioning. See .\\rpc\\README-RpcInterfaceVersioning.md for more information.\n * @internal\n */\n export const version = \"4.0.0\";\n\n /** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.\n * Will be a base-36 number with a leading \"@\".\n * @public\n */\n export type IdString = string;\n\n /**\n * A string identifying a group. This may either be a \"group name path\" or the RowString of a group (e.g. either \"group1/design/issues\" or \"@4e3\")\n * The syntax is not ambiguous because ViewStoreIdStrings always start with \"@\" and Group names can never contain \"@\".\n */\n export type ViewGroupSpec = IdString | ViewGroupPath;\n\n /** The name for a view. */\n export type ViewName = string;\n\n /** The name for a Tag. */\n export type TagName = string;\n\n /** The name of an \"owner\". Should come from the authentication system, so it will be guaranteed unique.\n * This name should be chosen by the user rather than their email address.\n */\n export type OwnerName = string;\n\n /** The path name of a view group (e.g. \"group1/design/issues\"). Does not include the \"root\" group. */\n export type ViewGroupPath = string;\n\n /** The name for a view group. */\n export type ViewGroupName = string;\n\n /** The name for a view group. */\n export type ClassFullName = string;\n\n /** Determine if a string is an Id of an entry in a ViewStore (base-36 integer with a leading \"@\") */\n export const isViewStoreId = (id?: ViewIdString) => true === id?.startsWith(\"@\");\n\n /** Parameters for querying for views in a ViewStore. */\n export interface QueryParams {\n /** a list of classFullNames to accept. If not present, all classes are returned. */\n readonly classNames?: ClassFullName[];\n /** Optional \"LIMIT\" clause to limit the number of views returned. */\n readonly limit?: number;\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\n readonly offset?: number;\n /** A string to filter view names. May include wildcards if the `nameCompare` uses LIKE or GLOB (see SQLite documentation for LIKE and GLOB). */\n readonly nameSearch?: string;\n /** The comparison operator for `nameSearch`. Default is `=` */\n readonly nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\n /* the Id of the view group to query. If not present, the root group is used. There is no way to query for views from multiple view groups in one request. */\n readonly group?: IdString;\n /** A list of tags to filter views. If present, only views that have one or more of the tags will be returned. */\n readonly tags?: TagName[];\n /* The name of an owner for private views. If present, private views owned by the owner will also be returned. Shared views are always returned. */\n readonly owner?: OwnerName;\n }\n\n /** Parameters for specifying a Query to select Categories or Models. */\n export interface SelectorQuery {\n /**\n * The full ClassName from which to select. If this SelectorQuery is for Categories, this must be or derive from \"BisCore:Category\".\n * If this SelectorQuery is for Models, this must be or derive from \"BisCore:Model\".\n */\n from: ClassFullName;\n /** If true, only return instances of `from`. Otherwise, return instances of `from` and any subclasses of `from`. */\n only?: boolean;\n /**\n * filter for query. If present, only instances of `from` that satisfy the filter will be returned.\n * If not supplied, all instances of `from` are returned.\n * @note\n * This value is used into the ECQuery:`SELECT ECInstanceId FROM ${query.from} WHERE ${query.where}`.\n */\n where?: string;\n /** List of Model or Category ids to add to the query results.\n * @note This is only valid if there is a `where` clause. Otherwise all instances of `from` will be returned so there is no value in adding ids.\n */\n adds?: Id64Array | CompressedId64Set;\n /** List of Model or Category Ids to remove from the query results. */\n removes?: Id64Array | CompressedId64Set;\n }\n\n /** A Model or Category selector may either be a query or a list of Ids. */\n export type SelectorProps = { query: SelectorQuery, ids?: never } | { query?: never, ids: Id64Array | CompressedId64Set };\n\n /** Information about a View in a ViewStore. */\n export interface ViewInfo {\n /** The Id of the view. */\n id: IdString;\n /** The name of the view. */\n name?: ViewName;\n /** The name of the owner of the view. */\n owner?: OwnerName;\n /** The className of the view. */\n className: ClassFullName;\n /** The Id of the view group containing the view. */\n groupId: IdString;\n /** If true, the view is private (unshared) and will only be returned by queries that specify the owner's name. */\n isPrivate: boolean;\n /** The Id of a ModelSelector, if the view has one. */\n modelSelectorId?: IdString;\n /** The Id of the CategorySelector for this view. */\n categorySelectorId: IdString;\n /** The Id of a DisplayStyle for the view. */\n displayStyleId: IdString;\n /** a list of tags for the view. */\n tags?: TagName[];\n }\n\n /** Information about a ViewGroup in a ViewStore. */\n export interface ViewGroupInfo {\n /** The Id of this view group. */\n id: IdString;\n /** The name of this view group. */\n name: ViewGroupName;\n /** The Id of the parent of this view group. If undefined, this is the root group. */\n parent?: IdString;\n /** The Id of the default view for this view group. */\n defaultView?: IdString;\n }\n\n /** Arguments for adding a new view to a ViewStore. */\n export interface AddViewArgs {\n /** the properties of the ViewDefinition for the new view. */\n readonly viewDefinition: ViewDefinitionProps;\n\n /**\n * The properties of a category selector for the new view.\n * @note This value is only used, and should only be present if `viewDefinition.categorySelectorId` **not** a valid\n * `IdString`. In that case, a new category selector will be created with these properties and its Id will be used.\n * Otherwise, the categorySelectorId from the ViewDefinition is used. If it does not represent a valid category\n * selector, an error is thrown.\n */\n readonly categorySelectorProps?: CategorySelectorProps;\n\n /** The properties of a model selector for the new view.\n * @note This value is only used, and should only be present if `viewDefinition.modelSelectorId` **not** a valid\n * `IdString`. In that case, a new model selector will be created with these properties and its Id will be used.\n * Otherwise, the modelSelectorId from the ViewDefinition is used. If it does not represent a valid model selector,\n * an error is thrown.\n */\n readonly modelSelectorProps?: ModelSelectorProps;\n\n /** The properties of a display style for the new view.\n * @note This value is only used, and should only be present if `viewDefinition.displayStyleId` **not** a valid\n * `IdString`. In that case, a new display style will be created with these properties and its Id will be used.\n * Otherwise, the displayStyleId from the ViewDefinition is used. If it does not represent a valid display style, an\n * error is thrown.\n */\n readonly displayStyleProps?: DisplayStyleProps;\n\n /* the owner of the view. Must be present if isPrivate is true. */\n readonly owner?: OwnerName;\n\n /* the Id of the view group for the view. If not present, the view is added to the root group. */\n readonly group?: IdString;\n\n /* if true, the view is private (unshared). */\n readonly isPrivate?: boolean;\n\n /* an optional list of tags for the view. */\n readonly tags?: TagName[];\n\n /** optional thumbnail for the view. */\n readonly thumbnail?: ThumbnailProps;\n }\n\n /** Argument for finding a category selector, model selector, display style, or timeline by name or Id. */\n export type NameOrId = { name: string, id?: never } | { id: IdString, name?: never };\n\n /** Bindings for parameterized values in where clause of SelectorQuery\n * @see[[ECSqlStatement.bindValues]]\n */\n export interface QueryBindings {\n bindings?: any[] | object;\n }\n\n /**\n * Methods for reading from a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreReader`. These\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\n * user only needs read permission to the ViewStore.\n */\n export interface Reader {\n /** Find all views owned by the supplied owner name. */\n findViewsByOwner(args: { owner: OwnerName }): Promise<ViewInfo[]>;\n\n /** Get a category selector by Id. Throws if it does not exist. */\n getCategorySelector(args: NameOrId & QueryBindings): Promise<CategorySelectorProps>;\n\n /** Get a display style by Id. Throws if it does not exist. */\n getDisplayStyle(args: NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps>;\n\n /** Get a model selector by Id. Throws if it does not exist. */\n getModelSelector(args: NameOrId & QueryBindings): Promise<ModelSelectorProps>;\n\n /** Get a thumbnail for a view. */\n getThumbnail(args: { viewId: IdString }): Promise<ThumbnailProps | undefined>;\n\n /** Get a render timeline by Id. Throws if it does not exist. */\n getTimeline(args: NameOrId): Promise<RenderTimelineProps>;\n\n /** Get a view by name. The name can include the *view group path*, if no `groupId` is supplied. */\n getViewByName(arg: { name: ViewName, groupId?: IdString }): Promise<ViewInfo | undefined>;\n\n /** Get a view definition by viewId. Throws if it does not exist. */\n getViewDefinition(args: { viewId: IdString }): Promise<ViewDefinitionProps>;\n\n /** get the properties of a ViewGroup by id. This will include the defaultViewId, if one exists. */\n getViewGroupInfo(args: { groupId?: IdString }): Promise<ViewGroupInfo | undefined>;\n\n /** Get a list of ViewGroups that are children of the supplied parent. If no parent is supplied, the root group is used.\n * Each entry in the list includes the id and name of the ViewGroup.\n */\n getViewGroups(args: { parent?: ViewGroupSpec }): Promise<{ id: IdString, name: string }[]>;\n\n /** Get the ViewInfo for a view by Id. Returns undefined if the view does not exist. */\n getViewInfo(args: { viewId: IdString }): Promise<ViewInfo | undefined>;\n\n /** Query for a list of ViewInfos for views that match the supplied [[QueryParams]].\n * @note The array will be sorted by name, ascending. To limit the size of the array, supply `limit` and `offset` in the QueryParams.\n */\n queryViews(queryParams: QueryParams): Promise<ViewInfo[]>;\n }\n\n /**\n * Methods for writing to a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreWriter`. These\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\n * user must have write permission to the ViewStore.\n */\n export interface Writer {\n /**\n * Add a category selector to a ViewStore.\n * @returns The IdString of the new category selector.\n */\n addCategorySelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\n\n /** Add a display style to a ViewStore.\n * @returns The IdString of the new display style.\n */\n addDisplayStyle(args: { name?: string, className: string, settings: DisplayStyleSettingsProps, owner?: OwnerName }): Promise<IdString>;\n\n /**\n * Add a model selector to a ViewStore.\n * @returns The IdString of the new model selector.\n */\n addModelSelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\n\n /**\n * Add a thumbnail for a view. If the view already has a thumbnail, it is replaced.\n * If a view is deleted, its thumbnail is also deleted.\n * @note The thumbnail must be a valid image in PNG or JPEG format.\n */\n addOrReplaceThumbnail(args: { viewId: IdString, thumbnail: ThumbnailProps }): Promise<void>;\n\n /** Add tags to a view. If the view already has tags, the new tags are appended to the existing tags. */\n addTagsToView(args: { viewId: IdString, tags: TagName[] }): Promise<void>;\n\n /** Add a render timeline to a ViewStore.\n * @returns The IdString of the new timeline.\n */\n addTimeline(args: { name?: string, timeline: RenderSchedule.ScriptProps, owner?: OwnerName }): Promise<IdString>;\n\n /** Add a view to a ViewStore. If no group is supplied, the new view is added to the root view group.\n * @returns The IdString of the new view\n */\n addView(args: AddViewArgs): Promise<IdString>;\n\n /** Add a view group to a ViewStore. If no parent is supplied, the new group is added to the root view group.\n * @returns the IdString of new view group\n */\n addViewGroup(args: { name: string, parentId?: IdString, owner?: OwnerName }): Promise<IdString>;\n\n /** Change the default view for a view group. If no group is supplied, this changes the default view for the root view group. */\n changeDefaultViewId(args: { defaultView: IdString, group?: ViewGroupSpec }): Promise<void>;\n\n /** Delete the thumbnail for a view. */\n deleteThumbnail(args: { viewId: IdString }): Promise<void>;\n\n /**\n * Delete a view from a ViewStore. If this is the default view for a view group, it cannot be deleted until another\n * view is set as the default.\n * @note If this view references a category selector, model selector, or display style that is not referenced by any\n * other view, *and do not have a name*, they will each also be deleted. If the view has a thumbnail, it is also\n * deleted.\n */\n deleteView(args: { viewId: IdString }): Promise<void>;\n\n /** Delete a view group from a ViewStore. This will also delete all views in the group. */\n deleteViewGroup(args: { name: ViewGroupSpec }): Promise<void>;\n\n /** Delete a display style from a ViewStore. If the display style is referenced by any view, it cannot be deleted\n * and an exception will be thrown.\n */\n deleteDisplayStyle(args: { id: IdString }): Promise<void>;\n\n /** Delete a model selector from a ViewStore. If the model selector is referenced by any view, it cannot be deleted\n * and an exception will be thrown. */\n deleteModelSelector(args: { id: IdString }): Promise<void>;\n\n /** Delete a category selector from a ViewStore. If the category selector is referenced by any view, it cannot be\n * deleted and an exception will be thrown.\n */\n deleteCategorySelector(args: { id: IdString }): Promise<void>;\n\n /** Delete a render timeline from a ViewStore. */\n deleteTimeline(args: { id: IdString }): Promise<void>;\n\n /** Delete a tag. This removes it from all views where it was used. */\n deleteTag(args: { name: TagName }): Promise<void>;\n\n /** remove a tag from a view. */\n removeTagFromView(args: { viewId: IdString, tag: TagName }): Promise<void>;\n\n /** Update the properties of a category selector. */\n updateCategorySelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\n\n /** Update the properties of a display style. */\n updateDisplayStyle(args: NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void>;\n\n /** Update the properties of a model selector. */\n updateModelSelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\n\n /** Update the properties of a render timeline. */\n updateTimeline(args: NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void>;\n\n /** Update the properties of a view definition. */\n updateViewDefinition(args: { viewId: IdString, viewDefinition: ViewDefinitionProps }): Promise<void>;\n\n /** Change a view from shared to private, or vice versa. If changing to private, the owner must be supplied. */\n updateViewShared(arg: { viewId: IdString, isShared: boolean, owner?: string }): Promise<void>;\n\n /** Set the name of a category selector. */\n renameCategorySelector(args: { id: IdString, name?: string }): Promise<void>;\n\n /** Set the name of a display style. */\n renameDisplayStyle(args: { id: IdString, name?: string }): Promise<void>;\n\n /** Set the name of a model selector. */\n renameModelSelector(args: { id: IdString, name?: string }): Promise<void>;\n\n /** Set the name of a render timeline. */\n renameTimeline(args: { id: IdString, name?: string }): Promise<void>;\n\n /** Set the name of a view. */\n renameView(args: { viewId: IdString, name: string }): Promise<void>;\n\n /** Set the name of a view group. */\n renameViewGroup(args: { groupId: IdString, name: string }): Promise<void>;\n\n /** rename an existing tag. */\n renameTag(args: { oldName: TagName, newName: TagName }): Promise<void>;\n }\n}\n"]}
1
+ {"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AA4OH;;;GAGG;AACH,MAAM,KAAW,YAAY,CA0W5B;AA1WD,WAAiB,YAAY;IAE3B;;;;OAIG;IACU,oBAAO,GAAG,OAAO,CAAC;IAkC/B,qGAAqG;IACxF,0BAAa,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAgUnF,CAAC,EA1WgB,YAAY,KAAZ,YAAY,QA0W5B","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 Views\r\n */\r\n\r\nimport { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { CameraProps } from \"./Camera\";\r\nimport { DisplayStyleProps, DisplayStyleSettingsProps } from \"./DisplayStyleSettings\";\r\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, RenderTimelineProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\r\nimport { EntityQueryParams } from \"./EntityProps\";\r\nimport { ModelProps } from \"./ModelProps\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\r\nimport { ThumbnailProps } from \"./Thumbnail\";\r\nimport { RenderSchedule } from \"./RenderSchedule\";\r\n\r\n/** The id of either an element or an entry in a ViewStore.\r\n * @public\r\n */\r\nexport type ViewIdString = Id64String; // should also include ViewStoreRpc.IdString when that's @public\r\n\r\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\r\n * @see [[SectionDrawingProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingViewProps {\r\n /** The Id of the spatial view from which the SectionDrawing was generated. */\r\n spatialView: Id64String;\r\n /** If true, the spatial view should be displayed in the context of the drawing view. */\r\n displaySpatialView: boolean;\r\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\r\n drawingToSpatialTransform?: TransformProps;\r\n}\r\n\r\n/** The response props from the getCustomViewState3dData RPC endpoint\r\n * @internal\r\n */\r\nexport interface CustomViewState3dProps {\r\n modelIds: CompressedId64Set;\r\n modelExtents: Range3dProps;\r\n categoryIds: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * The options passed to the getCustomViewState3dData RPC endpoint.\r\n * @internal\r\n */\r\nexport interface CustomViewState3dCreatorOptions {\r\n modelIds?: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * A result row from querying for subcategories\r\n * @internal\r\n */\r\nexport interface SubCategoryResultRow {\r\n parentId: Id64String;\r\n id: Id64String;\r\n appearance: SubCategoryAppearance.Props;\r\n}\r\n\r\n/**\r\n * Request props for the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateRequestProps {\r\n acsId?: string;\r\n notLoadedModelSelectorStateModels?: CompressedId64Set;\r\n sheetViewAttachmentIds?: CompressedId64Set;\r\n viewStateLoadProps?: ViewStateLoadProps;\r\n baseModelId?: Id64String;\r\n spatialViewId?: Id64String;\r\n}\r\n\r\n/** Response props from the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateResponseProps {\r\n acsElementProps?: ElementProps;\r\n modelSelectorStateModels?: ModelProps[];\r\n // cast this to viewAttachmentInfo[] on the frontend.\r\n sheetViewAttachmentProps?: ViewAttachmentProps[];\r\n sheetViewViews?: (ViewStateProps | undefined)[];\r\n baseModelProps?: ModelProps;\r\n spatialViewProps?: ViewStateProps;\r\n}\r\n\r\n/** Returned from [IModelDb.Views.getViewStateProps]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateProps {\r\n viewDefinitionProps: ViewDefinitionProps;\r\n categorySelectorProps: CategorySelectorProps;\r\n modelSelectorProps?: ModelSelectorProps;\r\n displayStyleProps: DisplayStyleProps;\r\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\r\n sheetProps?: SheetProps;\r\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\r\n sheetAttachments?: Id64Array;\r\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\r\n modelExtents?: Range3dProps;\r\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\r\n sectionDrawing?: SectionDrawingViewProps;\r\n}\r\n\r\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateProps]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateLoadProps {\r\n /** Options for loading the view's [[DisplayStyleProps]]. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n\r\n /**\r\n * bindings for query-based selectors\r\n * @beta\r\n */\r\n queryBindings?: {\r\n modelSelector?: ViewStoreRpc.QueryBindings;\r\n categorySelector?: ViewStoreRpc.QueryBindings;\r\n };\r\n}\r\n\r\n/** Properties that define a ModelSelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelSelectorProps extends DefinitionElementProps {\r\n models: Id64Array;\r\n}\r\n\r\n/** Properties that define a CategorySelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategorySelectorProps extends DefinitionElementProps {\r\n categories: Id64Array;\r\n}\r\n\r\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewQueryParams extends EntityQueryParams {\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinitionProps extends DefinitionElementProps {\r\n categorySelectorId: ViewIdString;\r\n displayStyleId: ViewIdString;\r\n description?: string;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetailsProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a ViewDefinition3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\r\n /** if true, camera is valid. */\r\n cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n origin: XYZProps;\r\n /** The extent of the view frustum. */\r\n extents: XYZProps;\r\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\r\n angles?: YawPitchRollProps;\r\n /** The camera used for this view. */\r\n camera: CameraProps;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetails3dProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a SpatialViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\r\n modelSelectorId: ViewIdString;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\r\n baseModelId: Id64String;\r\n origin: XYProps;\r\n delta: XYProps;\r\n angle: AngleProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystemProps extends ElementProps {\r\n type?: number;\r\n description?: string;\r\n}\r\n\r\n/** Properties of AuxCoordSystem2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem2d */\r\n origin?: XYProps;\r\n /** Rotation angle */\r\n angle?: AngleProps;\r\n}\r\n\r\n/** Properties of AuxCoordSystem3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem3d */\r\n origin?: XYZProps;\r\n /** Yaw angle */\r\n yaw?: AngleProps;\r\n /** Pitch angle */\r\n pitch?: AngleProps;\r\n /** Roll angle */\r\n roll?: AngleProps;\r\n}\r\n\r\n/**\r\n * Access to a ViewStore from the frontend.\r\n * @beta\r\n */\r\nexport namespace ViewStoreRpc {\r\n\r\n /**\r\n * Version of the Rpc interface. If any methods or interfaces of this API change, this number should\r\n * be incremented according to the rules of semantic versioning. See .\\rpc\\README-RpcInterfaceVersioning.md for more information.\r\n * @internal\r\n */\r\n export const version = \"4.0.0\";\r\n\r\n /** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.\r\n * Will be a base-36 number with a leading \"@\".\r\n * @public\r\n */\r\n export type IdString = string;\r\n\r\n /**\r\n * A string identifying a group. This may either be a \"group name path\" or the RowString of a group (e.g. either \"group1/design/issues\" or \"@4e3\")\r\n * The syntax is not ambiguous because ViewStoreIdStrings always start with \"@\" and Group names can never contain \"@\".\r\n */\r\n export type ViewGroupSpec = IdString | ViewGroupPath;\r\n\r\n /** The name for a view. */\r\n export type ViewName = string;\r\n\r\n /** The name for a Tag. */\r\n export type TagName = string;\r\n\r\n /** The name of an \"owner\". Should come from the authentication system, so it will be guaranteed unique.\r\n * This name should be chosen by the user rather than their email address.\r\n */\r\n export type OwnerName = string;\r\n\r\n /** The path name of a view group (e.g. \"group1/design/issues\"). Does not include the \"root\" group. */\r\n export type ViewGroupPath = string;\r\n\r\n /** The name for a view group. */\r\n export type ViewGroupName = string;\r\n\r\n /** The name for a view group. */\r\n export type ClassFullName = string;\r\n\r\n /** Determine if a string is an Id of an entry in a ViewStore (base-36 integer with a leading \"@\") */\r\n export const isViewStoreId = (id?: ViewIdString) => true === id?.startsWith(\"@\");\r\n\r\n /** Parameters for querying for views in a ViewStore. */\r\n export interface QueryParams {\r\n /** a list of classFullNames to accept. If not present, all classes are returned. */\r\n readonly classNames?: ClassFullName[];\r\n /** Optional \"LIMIT\" clause to limit the number of views returned. */\r\n readonly limit?: number;\r\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\r\n readonly offset?: number;\r\n /** A string to filter view names. May include wildcards if the `nameCompare` uses LIKE or GLOB (see SQLite documentation for LIKE and GLOB). */\r\n readonly nameSearch?: string;\r\n /** The comparison operator for `nameSearch`. Default is `=` */\r\n readonly nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\r\n /* the Id of the view group to query. If not present, the root group is used. There is no way to query for views from multiple view groups in one request. */\r\n readonly group?: IdString;\r\n /** A list of tags to filter views. If present, only views that have one or more of the tags will be returned. */\r\n readonly tags?: TagName[];\r\n /* The name of an owner for private views. If present, private views owned by the owner will also be returned. Shared views are always returned. */\r\n readonly owner?: OwnerName;\r\n }\r\n\r\n /** Parameters for specifying a Query to select Categories or Models. */\r\n export interface SelectorQuery {\r\n /**\r\n * The full ClassName from which to select. If this SelectorQuery is for Categories, this must be or derive from \"BisCore:Category\".\r\n * If this SelectorQuery is for Models, this must be or derive from \"BisCore:Model\".\r\n */\r\n from: ClassFullName;\r\n /** If true, only return instances of `from`. Otherwise, return instances of `from` and any subclasses of `from`. */\r\n only?: boolean;\r\n /**\r\n * filter for query. If present, only instances of `from` that satisfy the filter will be returned.\r\n * If not supplied, all instances of `from` are returned.\r\n * @note\r\n * This value is used into the ECQuery:`SELECT ECInstanceId FROM ${query.from} WHERE ${query.where}`.\r\n */\r\n where?: string;\r\n /** List of Model or Category ids to add to the query results.\r\n * @note This is only valid if there is a `where` clause. Otherwise all instances of `from` will be returned so there is no value in adding ids.\r\n */\r\n adds?: Id64Array | CompressedId64Set;\r\n /** List of Model or Category Ids to remove from the query results. */\r\n removes?: Id64Array | CompressedId64Set;\r\n }\r\n\r\n /** A Model or Category selector may either be a query or a list of Ids. */\r\n export type SelectorProps = { query: SelectorQuery, ids?: never } | { query?: never, ids: Id64Array | CompressedId64Set };\r\n\r\n /** Information about a View in a ViewStore. */\r\n export interface ViewInfo {\r\n /** The Id of the view. */\r\n id: IdString;\r\n /** The name of the view. */\r\n name?: ViewName;\r\n /** The name of the owner of the view. */\r\n owner?: OwnerName;\r\n /** The className of the view. */\r\n className: ClassFullName;\r\n /** The Id of the view group containing the view. */\r\n groupId: IdString;\r\n /** If true, the view is private (unshared) and will only be returned by queries that specify the owner's name. */\r\n isPrivate: boolean;\r\n /** The Id of a ModelSelector, if the view has one. */\r\n modelSelectorId?: IdString;\r\n /** The Id of the CategorySelector for this view. */\r\n categorySelectorId: IdString;\r\n /** The Id of a DisplayStyle for the view. */\r\n displayStyleId: IdString;\r\n /** a list of tags for the view. */\r\n tags?: TagName[];\r\n }\r\n\r\n /** Information about a ViewGroup in a ViewStore. */\r\n export interface ViewGroupInfo {\r\n /** The Id of this view group. */\r\n id: IdString;\r\n /** The name of this view group. */\r\n name: ViewGroupName;\r\n /** The Id of the parent of this view group. If undefined, this is the root group. */\r\n parent?: IdString;\r\n /** The Id of the default view for this view group. */\r\n defaultView?: IdString;\r\n }\r\n\r\n /** Arguments for adding a new view to a ViewStore. */\r\n export interface AddViewArgs {\r\n /** the properties of the ViewDefinition for the new view. */\r\n readonly viewDefinition: ViewDefinitionProps;\r\n\r\n /**\r\n * The properties of a category selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.categorySelectorId` **not** a valid\r\n * `IdString`. In that case, a new category selector will be created with these properties and its Id will be used.\r\n * Otherwise, the categorySelectorId from the ViewDefinition is used. If it does not represent a valid category\r\n * selector, an error is thrown.\r\n */\r\n readonly categorySelectorProps?: CategorySelectorProps;\r\n\r\n /** The properties of a model selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.modelSelectorId` **not** a valid\r\n * `IdString`. In that case, a new model selector will be created with these properties and its Id will be used.\r\n * Otherwise, the modelSelectorId from the ViewDefinition is used. If it does not represent a valid model selector,\r\n * an error is thrown.\r\n */\r\n readonly modelSelectorProps?: ModelSelectorProps;\r\n\r\n /** The properties of a display style for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.displayStyleId` **not** a valid\r\n * `IdString`. In that case, a new display style will be created with these properties and its Id will be used.\r\n * Otherwise, the displayStyleId from the ViewDefinition is used. If it does not represent a valid display style, an\r\n * error is thrown.\r\n */\r\n readonly displayStyleProps?: DisplayStyleProps;\r\n\r\n /* the owner of the view. Must be present if isPrivate is true. */\r\n readonly owner?: OwnerName;\r\n\r\n /* the Id of the view group for the view. If not present, the view is added to the root group. */\r\n readonly group?: IdString;\r\n\r\n /* if true, the view is private (unshared). */\r\n readonly isPrivate?: boolean;\r\n\r\n /* an optional list of tags for the view. */\r\n readonly tags?: TagName[];\r\n\r\n /** optional thumbnail for the view. */\r\n readonly thumbnail?: ThumbnailProps;\r\n }\r\n\r\n /** Argument for finding a category selector, model selector, display style, or timeline by name or Id. */\r\n export type NameOrId = { name: string, id?: never } | { id: IdString, name?: never };\r\n\r\n /** Bindings for parameterized values in where clause of SelectorQuery\r\n * @see[[ECSqlStatement.bindValues]]\r\n */\r\n export interface QueryBindings {\r\n bindings?: any[] | object;\r\n }\r\n\r\n /**\r\n * Methods for reading from a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreReader`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user only needs read permission to the ViewStore.\r\n */\r\n export interface Reader {\r\n /** Find all views owned by the supplied owner name. */\r\n findViewsByOwner(args: { owner: OwnerName }): Promise<ViewInfo[]>;\r\n\r\n /** Get a category selector by Id. Throws if it does not exist. */\r\n getCategorySelector(args: NameOrId & QueryBindings): Promise<CategorySelectorProps>;\r\n\r\n /** Get a display style by Id. Throws if it does not exist. */\r\n getDisplayStyle(args: NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps>;\r\n\r\n /** Get a model selector by Id. Throws if it does not exist. */\r\n getModelSelector(args: NameOrId & QueryBindings): Promise<ModelSelectorProps>;\r\n\r\n /** Get a thumbnail for a view. */\r\n getThumbnail(args: { viewId: IdString }): Promise<ThumbnailProps | undefined>;\r\n\r\n /** Get a render timeline by Id. Throws if it does not exist. */\r\n getTimeline(args: NameOrId): Promise<RenderTimelineProps>;\r\n\r\n /** Get a view by name. The name can include the *view group path*, if no `groupId` is supplied. */\r\n getViewByName(arg: { name: ViewName, groupId?: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Get a view definition by viewId. Throws if it does not exist. */\r\n getViewDefinition(args: { viewId: IdString }): Promise<ViewDefinitionProps>;\r\n\r\n /** get the properties of a ViewGroup by id. This will include the defaultViewId, if one exists. */\r\n getViewGroupInfo(args: { groupId?: IdString }): Promise<ViewGroupInfo | undefined>;\r\n\r\n /** Get a list of ViewGroups that are children of the supplied parent. If no parent is supplied, the root group is used.\r\n * Each entry in the list includes the id and name of the ViewGroup.\r\n */\r\n getViewGroups(args: { parent?: ViewGroupSpec }): Promise<{ id: IdString, name: string }[]>;\r\n\r\n /** Get the ViewInfo for a view by Id. Returns undefined if the view does not exist. */\r\n getViewInfo(args: { viewId: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Query for a list of ViewInfos for views that match the supplied [[QueryParams]].\r\n * @note The array will be sorted by name, ascending. To limit the size of the array, supply `limit` and `offset` in the QueryParams.\r\n */\r\n queryViews(queryParams: QueryParams): Promise<ViewInfo[]>;\r\n }\r\n\r\n /**\r\n * Methods for writing to a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreWriter`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user must have write permission to the ViewStore.\r\n */\r\n export interface Writer {\r\n /**\r\n * Add a category selector to a ViewStore.\r\n * @returns The IdString of the new category selector.\r\n */\r\n addCategorySelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a display style to a ViewStore.\r\n * @returns The IdString of the new display style.\r\n */\r\n addDisplayStyle(args: { name?: string, className: string, settings: DisplayStyleSettingsProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a model selector to a ViewStore.\r\n * @returns The IdString of the new model selector.\r\n */\r\n addModelSelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a thumbnail for a view. If the view already has a thumbnail, it is replaced.\r\n * If a view is deleted, its thumbnail is also deleted.\r\n * @note The thumbnail must be a valid image in PNG or JPEG format.\r\n */\r\n addOrReplaceThumbnail(args: { viewId: IdString, thumbnail: ThumbnailProps }): Promise<void>;\r\n\r\n /** Add tags to a view. If the view already has tags, the new tags are appended to the existing tags. */\r\n addTagsToView(args: { viewId: IdString, tags: TagName[] }): Promise<void>;\r\n\r\n /** Add a render timeline to a ViewStore.\r\n * @returns The IdString of the new timeline.\r\n */\r\n addTimeline(args: { name?: string, timeline: RenderSchedule.ScriptProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a view to a ViewStore. If no group is supplied, the new view is added to the root view group.\r\n * @returns The IdString of the new view\r\n */\r\n addView(args: AddViewArgs): Promise<IdString>;\r\n\r\n /** Add a view group to a ViewStore. If no parent is supplied, the new group is added to the root view group.\r\n * @returns the IdString of new view group\r\n */\r\n addViewGroup(args: { name: string, parentId?: IdString, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Change the default view for a view group. If no group is supplied, this changes the default view for the root view group. */\r\n changeDefaultViewId(args: { defaultView: IdString, group?: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete the thumbnail for a view. */\r\n deleteThumbnail(args: { viewId: IdString }): Promise<void>;\r\n\r\n /**\r\n * Delete a view from a ViewStore. If this is the default view for a view group, it cannot be deleted until another\r\n * view is set as the default.\r\n * @note If this view references a category selector, model selector, or display style that is not referenced by any\r\n * other view, *and do not have a name*, they will each also be deleted. If the view has a thumbnail, it is also\r\n * deleted.\r\n */\r\n deleteView(args: { viewId: IdString }): Promise<void>;\r\n\r\n /** Delete a view group from a ViewStore. This will also delete all views in the group. */\r\n deleteViewGroup(args: { name: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete a display style from a ViewStore. If the display style is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown.\r\n */\r\n deleteDisplayStyle(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a model selector from a ViewStore. If the model selector is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown. */\r\n deleteModelSelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a category selector from a ViewStore. If the category selector is referenced by any view, it cannot be\r\n * deleted and an exception will be thrown.\r\n */\r\n deleteCategorySelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a render timeline from a ViewStore. */\r\n deleteTimeline(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a tag. This removes it from all views where it was used. */\r\n deleteTag(args: { name: TagName }): Promise<void>;\r\n\r\n /** remove a tag from a view. */\r\n removeTagFromView(args: { viewId: IdString, tag: TagName }): Promise<void>;\r\n\r\n /** Update the properties of a category selector. */\r\n updateCategorySelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a display style. */\r\n updateDisplayStyle(args: NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void>;\r\n\r\n /** Update the properties of a model selector. */\r\n updateModelSelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a render timeline. */\r\n updateTimeline(args: NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void>;\r\n\r\n /** Update the properties of a view definition. */\r\n updateViewDefinition(args: { viewId: IdString, viewDefinition: ViewDefinitionProps }): Promise<void>;\r\n\r\n /** Change a view from shared to private, or vice versa. If changing to private, the owner must be supplied. */\r\n updateViewShared(arg: { viewId: IdString, isShared: boolean, owner?: string }): Promise<void>;\r\n\r\n /** Set the name of a category selector. */\r\n renameCategorySelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a display style. */\r\n renameDisplayStyle(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a model selector. */\r\n renameModelSelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a render timeline. */\r\n renameTimeline(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a view. */\r\n renameView(args: { viewId: IdString, name: string }): Promise<void>;\r\n\r\n /** Set the name of a view group. */\r\n renameViewGroup(args: { groupId: IdString, name: string }): Promise<void>;\r\n\r\n /** rename an existing tag. */\r\n renameTag(args: { oldName: TagName, newName: TagName }): Promise<void>;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"WhiteOnWhiteReversalSettings.js","sourceRoot":"","sources":["../../src/WhiteOnWhiteReversalSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IACvC;;;OAGG;IACa,qBAAqB,CAAU;IAE/C,YAAoB,gBAAyB;QAC3C,IAAI,CAAC,qBAAqB,GAAG,gBAAgB,CAAC;IAChD,CAAC;IAEO,MAAM,CAAC,SAAS,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,CAAC,OAAO,GAAG,IAAI,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAEjE,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,OAAO,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED,mHAAmH;IAC5G,MAAM;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,uDAAuD;IAChD,MAAM,CAAC,KAAmC;QAC/C,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,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 DisplayStyles\n */\n\n/** JSON representation of a [[WhiteOnWhiteReversalSettings]].\n * @public\n * @extensions\n */\nexport interface WhiteOnWhiteReversalProps {\n /** Default: false.\n * @see [[WhiteOnWhiteReversalSettings.ignoreBackgroundColor]].\n */\n ignoreBackgroundColor?: boolean;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more\n * visible in the view.\n * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.\n * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.\n * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.\n * @public\n */\nexport class WhiteOnWhiteReversalSettings {\n /** If true, white-on-white reversal ignores the display style's background color; otherwise, white-on-white reversal applies only\n * if the background color is pure white.\n * @see [[DisplayStyleSettings.backgroundColor]] to change the background color.\n */\n public readonly ignoreBackgroundColor: boolean;\n\n private constructor(ignoreBackground: boolean) {\n this.ignoreBackgroundColor = ignoreBackground;\n }\n\n private static _noIgnore = new WhiteOnWhiteReversalSettings(true);\n private static _ignore = new WhiteOnWhiteReversalSettings(false);\n\n /** Create from JSON representation. */\n public static fromJSON(props?: WhiteOnWhiteReversalProps): WhiteOnWhiteReversalSettings {\n return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;\n }\n\n /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */\n public toJSON(): WhiteOnWhiteReversalProps | undefined {\n return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: WhiteOnWhiteReversalSettings): boolean {\n return this === other;\n }\n}\n"]}
1
+ {"version":3,"file":"WhiteOnWhiteReversalSettings.js","sourceRoot":"","sources":["../../src/WhiteOnWhiteReversalSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IACvC;;;OAGG;IACa,qBAAqB,CAAU;IAE/C,YAAoB,gBAAyB;QAC3C,IAAI,CAAC,qBAAqB,GAAG,gBAAgB,CAAC;IAChD,CAAC;IAEO,MAAM,CAAC,SAAS,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,CAAC,OAAO,GAAG,IAAI,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAEjE,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,OAAO,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED,mHAAmH;IAC5G,MAAM;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,uDAAuD;IAChD,MAAM,CAAC,KAAmC;QAC/C,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,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 DisplayStyles\r\n */\r\n\r\n/** JSON representation of a [[WhiteOnWhiteReversalSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface WhiteOnWhiteReversalProps {\r\n /** Default: false.\r\n * @see [[WhiteOnWhiteReversalSettings.ignoreBackgroundColor]].\r\n */\r\n ignoreBackgroundColor?: boolean;\r\n}\r\n\r\n/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more\r\n * visible in the view.\r\n * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.\r\n * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.\r\n * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.\r\n * @public\r\n */\r\nexport class WhiteOnWhiteReversalSettings {\r\n /** If true, white-on-white reversal ignores the display style's background color; otherwise, white-on-white reversal applies only\r\n * if the background color is pure white.\r\n * @see [[DisplayStyleSettings.backgroundColor]] to change the background color.\r\n */\r\n public readonly ignoreBackgroundColor: boolean;\r\n\r\n private constructor(ignoreBackground: boolean) {\r\n this.ignoreBackgroundColor = ignoreBackground;\r\n }\r\n\r\n private static _noIgnore = new WhiteOnWhiteReversalSettings(true);\r\n private static _ignore = new WhiteOnWhiteReversalSettings(false);\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props?: WhiteOnWhiteReversalProps): WhiteOnWhiteReversalSettings {\r\n return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;\r\n }\r\n\r\n /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */\r\n public toJSON(): WhiteOnWhiteReversalProps | undefined {\r\n return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;\r\n }\r\n\r\n /** Returns true if `this` is equivalent to `other`. */\r\n public equals(other: WhiteOnWhiteReversalSettings): boolean {\r\n return this === other;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextAnnotation.js","sourceRoot":"","sources":["../../../src/annotation/TextAnnotation.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAW,SAAS,EAAY,kBAAkB,EAAqB,MAAM,sBAAsB,CAAC;AACpH,OAAO,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAC;AAyDxD;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,cAAc;IACzB;;OAEG;IACI,WAAW,CAAqB;IACvC,8BAA8B;IACvB,SAAS,CAAY;IAC5B,iEAAiE;IAC1D,MAAM,CAAuB;IACpC,8IAA8I;IACvI,MAAM,CAAU;IAEvB,YAAoB,MAAe,EAAE,MAA0B,EAAE,SAAoB,EAAE,MAA4B;QACjH,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,oCAAoC;IAC7B,MAAM,CAAC,MAAM,CAAC,IAA+B;QAClD,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC7C,MAAM,MAAM,GAAG,IAAI,EAAE,WAAW,IAAI,IAAI,kBAAkB,EAAE,CAAC;QAC7D,MAAM,SAAS,GAAG,IAAI,EAAE,SAAS,IAAI,SAAS,CAAC,WAAW,EAAE,CAAC;QAC7D,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,E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BACX,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,MAAM;QACV,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,0EAA0E;IACnE,MAAM,CAAC,KAAqB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,KAAK,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK,CAAC,MAAM,CAAC,QAAQ;eACtG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;eAC5F,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9C,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 { Point3d, Range2d, Transform, XYZProps, YawPitchRollAngles, YawPitchRollProps } from \"@itwin/core-geometry\";\nimport { TextBlock, TextBlockProps } from \"./TextBlock\";\n\n/** Describes how to compute the \"anchor point\" for a [[TextAnnotation]].\n * The anchor point is a point on or inside of the 2d bounding box enclosing the contents of the annotation's [[TextBlock]].\n * The annotation can be rotated and translated relative to the anchor point. The anchor point also serves as the snap point\n * when [AccuSnap]($frontend) is set to [SnapMode.Origin]($frontend).\n * [[TextAnnotation.computeTransform]] will align the anchor point with (0, 0).\n * @see [[TextAnnotation]] for a description of how the anchor point is computed.\n * @beta\n */\nexport interface TextAnnotationAnchor {\n /**\n * The vertical alignment of the anchor point.\n * \"top\" aligns the anchor point with the top of the text's bounding box.\n * \"middle\" aligns the anchor point with the middle of the text's bounding box.\n * \"bottom\" aligns the anchor point with the bottom of the text's bounding box.\n */\n vertical: \"top\" | \"middle\" | \"bottom\";\n\n /**\n * The horizontal alignment of the anchor point.\n * \"left\" aligns the anchor point with left side of the text's bounding box.\n * \"center\" aligns the anchor point with center of the text with's bounding box.\n * \"right\" aligns the anchor point with right side of the text's bounding box.\n */\n horizontal: \"left\" | \"center\" | \"right\";\n}\n\n/**\n * JSON representation of a [[TextAnnotation]].\n * @beta\n */\nexport interface TextAnnotationProps {\n /** See [[TextAnnotation.offset]]. Default: [0, 0, 0]. */\n offset?: XYZProps;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollProps;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlockProps;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n}\n\n/** Arguments supplied to [[TextAnnotation.create]].\n * @beta\n */\nexport interface TextAnnotationCreateArgs {\n /** See [[TextAnnotation.offset]]. Default: (0, 0, 0). */\n offset?: Point3d;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollAngles;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlock;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n}\n\n/**\n * Represents a formatted block of text positioned in 2d or 3d space.\n * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.\n * Other types of elements may store multiple TextAnnotations, positioned relative to one another.\n * The annotation's position and orientation relative to the host element's [Placement]($common) is determined as follows:\n * - First, a bounding box is computed enclosing the contents of the [[textBlock].\n * - Then, an \"anchor point\" is computed based on the bounding box and the [[anchor]] property. The anchor point can be at one of the four corners of the box, in the middle of one of its four\n * edges, or in the center of the box.\n * - The [[orientation]] is applied to rotate the box around the anchor point.\n * - Finally, the [[offset]] is added to the anchor point to apply translation.\n * @see [produceTextAnnotationGeometry]($backend) to decompose the annotation into a set of geometric primitives suitable for use with [[GeometryStreamBuilder.appendTextBlock]].\n * @beta\n */\nexport class TextAnnotation {\n /** The rotation of the annotation.\n * @note When defining an annotation for a [TextAnnotation2d]($backend), only the `yaw` component (rotation around the Z axis) is used.\n */\n public orientation: YawPitchRollAngles;\n /** The formatted document. */\n public textBlock: TextBlock;\n /** Describes how to compute the [[textBlock]]'s anchor point. */\n public anchor: TextAnnotationAnchor;\n /** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */\n public offset: Point3d;\n\n private constructor(offset: Point3d, angles: YawPitchRollAngles, textBlock: TextBlock, anchor: TextAnnotationAnchor) {\n this.offset = offset;\n this.orientation = angles;\n this.textBlock = textBlock;\n this.anchor = anchor;\n }\n\n /** Creates a new TextAnnotation. */\n public static create(args?: TextAnnotationCreateArgs): TextAnnotation {\n const offset = args?.offset ?? new Point3d();\n const angles = args?.orientation ?? new YawPitchRollAngles();\n const textBlock = args?.textBlock ?? TextBlock.createEmpty();\n const anchor = args?.anchor ?? { vertical: \"top\", horizontal: \"left\" };\n\n return new TextAnnotation(offset, angles, textBlock, anchor);\n }\n\n /**\n * Creates a new TextAnnotation instance from its JSON representation.\n */\n public static fromJSON(props: TextAnnotationProps | undefined): TextAnnotation {\n return TextAnnotation.create({\n offset: props?.offset ? Point3d.fromJSON(props.offset) : undefined,\n orientation: props?.orientation ? YawPitchRollAngles.fromJSON(props.orientation) : undefined,\n textBlock: props?.textBlock ? TextBlock.create(props.textBlock) : undefined,\n anchor: props?.anchor ? { ...props.anchor } : undefined,\n });\n }\n\n /**\n * Converts this annotation to its JSON representation.\n */\n public toJSON(): TextAnnotationProps {\n const props: TextAnnotationProps = {};\n\n // Even if the text block is empty, we want to record its style name and overrides, e.g.,\n // so the user can pick up where they left off editing it next time.\n props.textBlock = this.textBlock.toJSON();\n\n if (!this.offset.isZero) {\n props.offset = this.offset.toJSON();\n }\n\n if (!this.orientation.isIdentity()) {\n props.orientation = this.orientation.toJSON();\n }\n\n if (this.anchor.vertical !== \"top\" || this.anchor.horizontal !== \"left\") {\n props.anchor = { ...this.anchor };\n }\n\n return props;\n }\n\n /** Compute the transform that positions and orients this annotation relative to its anchor point, based on the [[textBlock]]'s computed bounding box.\n * The anchor point is computed as specified by this annotation's [[anchor]] setting. For example, if the text block is anchored\n * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.\n * The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].\n * The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.\n * @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.\n * @see [[computeAnchorPoint]] to compute the transform's anchor point.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n */\n public computeTransform(boundingBox: Range2d): Transform {\n const anchorPt = this.computeAnchorPoint(boundingBox);\n const matrix = this.orientation.toMatrix3d();\n\n const rotation = Transform.createFixedPointAndMatrix(anchorPt, matrix);\n const translation = Transform.createTranslation(this.offset.minus(anchorPt));\n\n return translation.multiplyTransformTransform(rotation, rotation);\n }\n\n /** Compute the anchor point of this annotation as specified by [[anchor]].\n * @param boundingBox A box fully containing the [[textBlock]].\n * @see [[computeTransform]] to compute the transform relative to the anchor point.\n */\n public computeAnchorPoint(boundingBox: Range2d): Point3d {\n let x = boundingBox.low.x;\n let y = boundingBox.high.y;\n\n switch (this.anchor.horizontal) {\n case \"center\":\n x += boundingBox.xLength() / 2;\n break;\n case \"right\":\n x += boundingBox.xLength();\n break;\n }\n\n switch (this.anchor.vertical) {\n case \"middle\":\n y -= boundingBox.yLength() / 2;\n break;\n case \"bottom\":\n y -= boundingBox.yLength();\n break;\n }\n\n return new Point3d(x, y, 0);\n }\n\n /** Returns true if this annotation is logically equivalent to `other`. */\n public equals(other: TextAnnotation): boolean {\n return this.anchor.horizontal === other.anchor.horizontal && this.anchor.vertical === other.anchor.vertical\n && this.orientation.isAlmostEqual(other.orientation) && this.offset.isAlmostEqual(other.offset)\n && this.textBl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;IACnE,MAAM,CAAC,KAAqB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,KAAK,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK,CAAC,MAAM,CAAC,QAAQ;eACtG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;eAC5F,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9C,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 Annotation\r\n */\r\n\r\nimport { Point3d, Range2d, Transform, XYZProps, YawPitchRollAngles, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { TextBlock, TextBlockProps } from \"./TextBlock\";\r\n\r\n/** Describes how to compute the \"anchor point\" for a [[TextAnnotation]].\r\n * The anchor point is a point on or inside of the 2d bounding box enclosing the contents of the annotation's [[TextBlock]].\r\n * The annotation can be rotated and translated relative to the anchor point. The anchor point also serves as the snap point\r\n * when [AccuSnap]($frontend) is set to [SnapMode.Origin]($frontend).\r\n * [[TextAnnotation.computeTransform]] will align the anchor point with (0, 0).\r\n * @see [[TextAnnotation]] for a description of how the anchor point is computed.\r\n * @beta\r\n */\r\nexport interface TextAnnotationAnchor {\r\n /**\r\n * The vertical alignment of the anchor point.\r\n * \"top\" aligns the anchor point with the top of the text's bounding box.\r\n * \"middle\" aligns the anchor point with the middle of the text's bounding box.\r\n * \"bottom\" aligns the anchor point with the bottom of the text's bounding box.\r\n */\r\n vertical: \"top\" | \"middle\" | \"bottom\";\r\n\r\n /**\r\n * The horizontal alignment of the anchor point.\r\n * \"left\" aligns the anchor point with left side of the text's bounding box.\r\n * \"center\" aligns the anchor point with center of the text with's bounding box.\r\n * \"right\" aligns the anchor point with right side of the text's bounding box.\r\n */\r\n horizontal: \"left\" | \"center\" | \"right\";\r\n}\r\n\r\n/**\r\n * JSON representation of a [[TextAnnotation]].\r\n * @beta\r\n */\r\nexport interface TextAnnotationProps {\r\n /** See [[TextAnnotation.offset]]. Default: [0, 0, 0]. */\r\n offset?: XYZProps;\r\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\r\n orientation?: YawPitchRollProps;\r\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\r\n textBlock?: TextBlockProps;\r\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\r\n anchor?: TextAnnotationAnchor;\r\n}\r\n\r\n/** Arguments supplied to [[TextAnnotation.create]].\r\n * @beta\r\n */\r\nexport interface TextAnnotationCreateArgs {\r\n /** See [[TextAnnotation.offset]]. Default: (0, 0, 0). */\r\n offset?: Point3d;\r\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\r\n orientation?: YawPitchRollAngles;\r\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\r\n textBlock?: TextBlock;\r\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\r\n anchor?: TextAnnotationAnchor;\r\n}\r\n\r\n/**\r\n * Represents a formatted block of text positioned in 2d or 3d space.\r\n * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.\r\n * Other types of elements may store multiple TextAnnotations, positioned relative to one another.\r\n * The annotation's position and orientation relative to the host element's [Placement]($common) is determined as follows:\r\n * - First, a bounding box is computed enclosing the contents of the [[textBlock].\r\n * - Then, an \"anchor point\" is computed based on the bounding box and the [[anchor]] property. The anchor point can be at one of the four corners of the box, in the middle of one of its four\r\n * edges, or in the center of the box.\r\n * - The [[orientation]] is applied to rotate the box around the anchor point.\r\n * - Finally, the [[offset]] is added to the anchor point to apply translation.\r\n * @see [produceTextAnnotationGeometry]($backend) to decompose the annotation into a set of geometric primitives suitable for use with [[GeometryStreamBuilder.appendTextBlock]].\r\n * @beta\r\n */\r\nexport class TextAnnotation {\r\n /** The rotation of the annotation.\r\n * @note When defining an annotation for a [TextAnnotation2d]($backend), only the `yaw` component (rotation around the Z axis) is used.\r\n */\r\n public orientation: YawPitchRollAngles;\r\n /** The formatted document. */\r\n public textBlock: TextBlock;\r\n /** Describes how to compute the [[textBlock]]'s anchor point. */\r\n public anchor: TextAnnotationAnchor;\r\n /** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */\r\n public offset: Point3d;\r\n\r\n private constructor(offset: Point3d, angles: YawPitchRollAngles, textBlock: TextBlock, anchor: TextAnnotationAnchor) {\r\n this.offset = offset;\r\n this.orientation = angles;\r\n this.textBlock = textBlock;\r\n this.anchor = anchor;\r\n }\r\n\r\n /** Creates a new TextAnnotation. */\r\n public static create(args?: TextAnnotationCreateArgs): TextAnnotation {\r\n const offset = args?.offset ?? new Point3d();\r\n const angles = args?.orientation ?? new YawPitchRollAngles();\r\n const textBlock = args?.textBlock ?? TextBlock.createEmpty();\r\n const anchor = args?.anchor ?? { vertical: \"top\", horizontal: \"left\" };\r\n\r\n return new TextAnnotation(offset, angles, textBlock, anchor);\r\n }\r\n\r\n /**\r\n * Creates a new TextAnnotation instance from its JSON representation.\r\n */\r\n public static fromJSON(props: TextAnnotationProps | undefined): TextAnnotation {\r\n return TextAnnotation.create({\r\n offset: props?.offset ? Point3d.fromJSON(props.offset) : undefined,\r\n orientation: props?.orientation ? YawPitchRollAngles.fromJSON(props.orientation) : undefined,\r\n textBlock: props?.textBlock ? TextBlock.create(props.textBlock) : undefined,\r\n anchor: props?.anchor ? { ...props.anchor } : undefined,\r\n });\r\n }\r\n\r\n /**\r\n * Converts this annotation to its JSON representation.\r\n */\r\n public toJSON(): TextAnnotationProps {\r\n const props: TextAnnotationProps = {};\r\n\r\n // Even if the text block is empty, we want to record its style name and overrides, e.g.,\r\n // so the user can pick up where they left off editing it next time.\r\n props.textBlock = this.textBlock.toJSON();\r\n\r\n if (!this.offset.isZero) {\r\n props.offset = this.offset.toJSON();\r\n }\r\n\r\n if (!this.orientation.isIdentity()) {\r\n props.orientation = this.orientation.toJSON();\r\n }\r\n\r\n if (this.anchor.vertical !== \"top\" || this.anchor.horizontal !== \"left\") {\r\n props.anchor = { ...this.anchor };\r\n }\r\n\r\n return props;\r\n }\r\n\r\n /** Compute the transform that positions and orients this annotation relative to its anchor point, based on the [[textBlock]]'s computed bounding box.\r\n * The anchor point is computed as specified by this annotation's [[anchor]] setting. For example, if the text block is anchored\r\n * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.\r\n * The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].\r\n * The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.\r\n * @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.\r\n * @see [[computeAnchorPoint]] to compute the transform's anchor point.\r\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\r\n */\r\n public computeTransform(boundingBox: Range2d): Transform {\r\n const anchorPt = this.computeAnchorPoint(boundingBox);\r\n const matrix = this.orientation.toMatrix3d();\r\n\r\n const rotation = Transform.createFixedPointAndMatrix(anchorPt, matrix);\r\n const translation = Transform.createTranslation(this.offset.minus(anchorPt));\r\n\r\n return translation.multiplyTransformTransform(rotation, rotation);\r\n }\r\n\r\n /** Compute the anchor point of this annotation as specified by [[anchor]].\r\n * @param boundingBox A box fully containing the [[textBlock]].\r\n * @see [[computeTransform]] to compute the transform relative to the anchor point.\r\n */\r\n public computeAnchorPoint(boundingBox: Range2d): Point3d {\r\n let x = boundingBox.low.x;\r\n let y = boundingBox.high.y;\r\n\r\n switch (this.anchor.horizontal) {\r\n case \"center\":\r\n x += boundingBox.xLength() / 2;\r\n break;\r\n case \"right\":\r\n x += boundingBox.xLength();\r\n break;\r\n }\r\n\r\n switch (this.anchor.vertical) {\r\n case \"middle\":\r\n y -= boundingBox.yLength() / 2;\r\n break;\r\n case \"bottom\":\r\n y -= boundingBox.yLength();\r\n break;\r\n }\r\n\r\n return new Point3d(x, y, 0);\r\n }\r\n\r\n /** Returns true if this annotation is logically equivalent to `other`. */\r\n public equals(other: TextAnnotation): boolean {\r\n return this.anchor.horizontal === other.anchor.horizontal && this.anchor.vertical === other.anchor.vertical\r\n && this.orientation.isAlmostEqual(other.orientation) && this.offset.isAlmostEqual(other.offset)\r\n && this.textBlock.equals(other.textBlock);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/annotation/TextBlock.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAgDH;;;GAGG;AACH,MAAM,OAAgB,kBAAkB;IAC9B,UAAU,CAAS;IACnB,eAAe,CAAyB;IAEhD,gBAAgB;IAChB,YAAsB,KAA8B;QAClD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,eAAe,GAAG,EAAE,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;IACrD,CAAC;IAED;;;OAGG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAW,SAAS,CAAC,SAAiB;QACpC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACH,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAW,cAAc,CAAC,SAAiC;QACzD,IAAI,CAAC,eAAe,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC;IAC1C,CAAC;IAED,8EAA8E;IACvE,mBAAmB;QACxB,IAAI,CAAC,cAAc,GAAG,EAAG,CAAC;IAC5B,CAAC;IAED,oKAAoK;IAC7J,UAAU,CAAC,SAAiB,EAAE,OAA+B;QAClE,IAAI,CAAC,UAAU,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D,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,SAAS,CAAC,GAAQ;QACvB,MAAM,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,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 { TextStyleSettingsProps } from \"./TextStyle\";\n\n/** Options supplied to [[TextBlockComponent.applyStyle]] to control how the style is applied to the component and its child components.\n * @beta\n */\nexport interface ApplyTextStyleOptions {\n /** Controls whether any deviations from the style's settings stored in [[TextBlockComponent.styleOverrides]] are retained.\n * By default, all overrides are cleared.\n */\n preserveOverrides?: boolean;\n /** Controls whether the style should be recursively applied to the [[Paragraph]]s belonging to a [[TextBlock]] and the [[Run]]s belonging to a [[Paragraph]].\n * By default, the style change propagates to child components.\n */\n preventPropagation?: boolean;\n}\n\n/** The JSON representation of a [[TextBlockComponent]].\n * @beta\n */\nexport interface TextBlockComponentProps {\n /** The name of a [[TextStyle]] stored in a [Workspace]($backend) from which the base [[TextStyleSettings]] applied to the component originates. */\n styleName: string;\n /** Deviations from the base [[TextStyleSettings]] defined by the [[TextStyle]] applied to this component.\n * This permits you to, e.g., create a [[TextRun]] using \"Arial\" font and override it 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}\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 * Each component can specify a [[TextStyle]] that formats its contents and optional [[styleOverrides]] to customize that formatting.\n * @beta\n */\nexport abstract class TextBlockComponent {\n private _styleName: string;\n private _styleOverrides: TextStyleSettingsProps;\n\n /** @internal */\n protected constructor(props: TextBlockComponentProps) {\n this._styleName = props.styleName;\n this._styleOverrides = { ...props.styleOverrides };\n }\n\n /** The name of the [[TextStyle]] that provides the base formatting for the contents of this component.\n * @note Assigning to this property is equivalent to calling [[applyStyle]] with default [[ApplyTextStyleOptions]], which propagates the style change to all of\n * the components sub-components and clears any [[styleOverrides]].\n */\n public get styleName(): string {\n return this._styleName;\n }\n\n public set styleName(styleName: string) {\n this.applyStyle(styleName);\n }\n\n /** Deviations in individual properties of the [[TextStyle]] specified by [[styleName]].\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 = { ...overrides };\n }\n\n /** Reset any [[styleOverrides]] applied to this component's [[TextStyle]]. */\n public clearStyleOverrides(): void {\n this.styleOverrides = { };\n }\n\n /** Apply the [[TextStyle]] specified by `styleName` to this component, optionally preserving [[styleOverrides]] and/or preventing propagation to sub-components. */\n public applyStyle(styleName: string, options?: ApplyTextStyleOptions): void {\n this._styleName = styleName;\n\n if (!(options?.preserveOverrides)) {\n this.clearStyleOverrides();\n }\n }\n\n /** Returns true if [[styleOverrides]] specifies any deviations from this component's base [[TextStyle]]. */\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 /** Convert this component to its JSON representation. */\n public toJSON(): TextBlockComponentProps {\n return {\n styleName: this.styleName,\n styleOverrides: { ...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 (this.styleName !== other.styleName || 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/**\n * @beta\n */\nexport type Run = TextRun | FractionRun | LineBreakRun;\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 | LineBreakRunProps;\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 \"linebreak\": return LineBreakRun.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 [[TextStyle.stackedFractionType]]. Default: an empty string. */\n numerator?: string;\n /** The text displayed after or below the fraction separator, depending on [[TextStyle.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 [[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 /** Apply the specified style to this [[Paragraph]], and - unless [[ApplyTextStyleOptions.preventPropagation]] is `true` - to all of its [[runs]]. */\n public override applyStyle(styleName: string, options?: ApplyTextStyleOptions): void {\n super.applyStyle(styleName, options);\n if (!(options?.preventPropagation)) {\n for (const run of this.runs) {\n run.applyStyle(styleName, options);\n }\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 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 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.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 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 [[styleName]]. */\n public static createEmpty(): TextBlock {\n return TextBlock.create({ styleName: \"\" });\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 /** Apply the specified style to this block and - unless [[ApplyTextStyleOptions.preventPropagation]] is `true` - to all of its [[paragraphs]]. */\n public override applyStyle(styleName: string, options?: ApplyTextStyleOptions): void {\n super.applyStyle(styleName, options);\n if (!(options?.preventPropagation)) {\n for (const paragraph of this.paragraphs) {\n paragraph.applyStyle(styleName, options);\n }\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 * If [[paragraphs]] is not empty, the style and overrides of the last [[Paragraph]] in the block will be applied to the new paragraph; otherwise,\n * the paragraph will inherit this block's style with no overrides.\n */\n public appendParagraph(): Paragraph {\n const seed = this.paragraphs[0];\n const paragraph = Paragraph.create({\n styleName: seed?.styleName ?? this.styleName,\n styleOverrides: seed?.styleOverrides ?? undefined,\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.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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C9C,IAAI,CAAC,CAAC,KAAK,YAAY,SAAS,CAAC,EAAE,CAAC;YAClC,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":["/*---------------------------------------------------------------------------------------------\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 { TextStyleSettingsProps } from \"./TextStyle\";\r\n\r\n/** Options supplied to [[TextBlockComponent.applyStyle]] to control how the style is applied to the component and its child components.\r\n * @beta\r\n */\r\nexport interface ApplyTextStyleOptions {\r\n /** Controls whether any deviations from the style's settings stored in [[TextBlockComponent.styleOverrides]] are retained.\r\n * By default, all overrides are cleared.\r\n */\r\n preserveOverrides?: boolean;\r\n /** Controls whether the style should be recursively applied to the [[Paragraph]]s belonging to a [[TextBlock]] and the [[Run]]s belonging to a [[Paragraph]].\r\n * By default, the style change propagates to child components.\r\n */\r\n preventPropagation?: boolean;\r\n}\r\n\r\n/** The JSON representation of a [[TextBlockComponent]].\r\n * @beta\r\n */\r\nexport interface TextBlockComponentProps {\r\n /** The name of a [[TextStyle]] stored in a [Workspace]($backend) from which the base [[TextStyleSettings]] applied to the component originates. */\r\n styleName: string;\r\n /** Deviations from the base [[TextStyleSettings]] defined by the [[TextStyle]] applied to this component.\r\n * This permits you to, e.g., create a [[TextRun]] using \"Arial\" font and override it 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}\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 * Each component can specify a [[TextStyle]] that formats its contents and optional [[styleOverrides]] to customize that formatting.\r\n * @beta\r\n */\r\nexport abstract class TextBlockComponent {\r\n private _styleName: string;\r\n private _styleOverrides: TextStyleSettingsProps;\r\n\r\n /** @internal */\r\n protected constructor(props: TextBlockComponentProps) {\r\n this._styleName = props.styleName;\r\n this._styleOverrides = { ...props.styleOverrides };\r\n }\r\n\r\n /** The name of the [[TextStyle]] that provides the base formatting for the contents of this component.\r\n * @note Assigning to this property is equivalent to calling [[applyStyle]] with default [[ApplyTextStyleOptions]], which propagates the style change to all of\r\n * the components sub-components and clears any [[styleOverrides]].\r\n */\r\n public get styleName(): string {\r\n return this._styleName;\r\n }\r\n\r\n public set styleName(styleName: string) {\r\n this.applyStyle(styleName);\r\n }\r\n\r\n /** Deviations in individual properties of the [[TextStyle]] specified by [[styleName]].\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 = { ...overrides };\r\n }\r\n\r\n /** Reset any [[styleOverrides]] applied to this component's [[TextStyle]]. */\r\n public clearStyleOverrides(): void {\r\n this.styleOverrides = { };\r\n }\r\n\r\n /** Apply the [[TextStyle]] specified by `styleName` to this component, optionally preserving [[styleOverrides]] and/or preventing propagation to sub-components. */\r\n public applyStyle(styleName: string, options?: ApplyTextStyleOptions): void {\r\n this._styleName = styleName;\r\n\r\n if (!(options?.preserveOverrides)) {\r\n this.clearStyleOverrides();\r\n }\r\n }\r\n\r\n /** Returns true if [[styleOverrides]] specifies any deviations from this component's base [[TextStyle]]. */\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 /** Convert this component to its JSON representation. */\r\n public toJSON(): TextBlockComponentProps {\r\n return {\r\n styleName: this.styleName,\r\n styleOverrides: { ...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 (this.styleName !== other.styleName || 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/**\r\n * @beta\r\n */\r\nexport type Run = TextRun | FractionRun | LineBreakRun;\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 | LineBreakRunProps;\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 \"linebreak\": return LineBreakRun.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 [[TextStyle.stackedFractionType]]. Default: an empty string. */\r\n numerator?: string;\r\n /** The text displayed after or below the fraction separator, depending on [[TextStyle.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 [[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 /** Apply the specified style to this [[Paragraph]], and - unless [[ApplyTextStyleOptions.preventPropagation]] is `true` - to all of its [[runs]]. */\r\n public override applyStyle(styleName: string, options?: ApplyTextStyleOptions): void {\r\n super.applyStyle(styleName, options);\r\n if (!(options?.preventPropagation)) {\r\n for (const run of this.runs) {\r\n run.applyStyle(styleName, options);\r\n }\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 /** Create an empty text block containing no [[paragraphs]] and an empty [[styleName]]. */\r\n public static createEmpty(): TextBlock {\r\n return TextBlock.create({ styleName: \"\" });\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 /** Apply the specified style to this block and - unless [[ApplyTextStyleOptions.preventPropagation]] is `true` - to all of its [[paragraphs]]. */\r\n public override applyStyle(styleName: string, options?: ApplyTextStyleOptions): void {\r\n super.applyStyle(styleName, options);\r\n if (!(options?.preventPropagation)) {\r\n for (const paragraph of this.paragraphs) {\r\n paragraph.applyStyle(styleName, options);\r\n }\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 * If [[paragraphs]] is not empty, the style and overrides of the last [[Paragraph]] in the block will be applied to the new paragraph; otherwise,\r\n * the paragraph will inherit this block's style with no overrides.\r\n */\r\n public appendParagraph(): Paragraph {\r\n const seed = this.paragraphs[0];\r\n const paragraph = Paragraph.create({\r\n styleName: seed?.styleName ?? this.styleName,\r\n styleOverrides: seed?.styleOverrides ?? undefined,\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 [produceTextAnnotationGeometry]($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 [produceTextAnnotationGeometry]($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 [[TextStyleSettings]] for the run. */\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 [[TextStyleSettings]] for the run. */\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;AAsFH;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IAC5B,6BAA6B;IACb,KAAK,CAAiB;IACtC;OACG;IACa,QAAQ,CAAS;IACjC;;;OAGG;IACa,UAAU,CAAS;IACnC;;OAEG;IACa,iBAAiB,CAAS;IAC1C,kFAAkF;IAClE,MAAM,CAAU;IAChC,sFAAsF;IACtE,QAAQ,CAAU;IAClC,2EAA2E;IAC3D,YAAY,CAAU;IACtC;;OAEG;IACa,oBAAoB,CAAS;IAC7C,oFAAoF;IACpE,mBAAmB,CAAsB;IACzD;;OAEG;IACa,qBAAqB,CAAS;IAC9C;;OAEG;IACa,cAAc,CAAS;IACvC;;OAEG;IACa,uBAAuB,CAAS;IAChD;;OAEG;IACa,gBAAgB,CAAS;IACzC,sFAAsF;IACtE,WAAW,CAAS;IAEpC,qEAAqE;IAC9D,MAAM,CAAC,YAAY,GAA+C;QACvE,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,CAAC;QACb,iBAAiB,EAAE,GAAG;QACtB,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,KAAK;QACnB,oBAAoB,EAAE,GAAG;QACzB,mBAAmB,EAAE,YAAY;QACjC,qBAAqB,EAAE,CAAC,IAAI;QAC5B,cAAc,EAAE,CAAC,GAAG,CAAC;QACrB,uBAAuB,EAAE,GAAG;QAC5B,gBAAgB,EAAE,CAAC,GAAG,CAA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,CAAC,cAAc;eAC1G,IAAI,CAAC,uBAAuB,KAAK,KAAK,CAAC,uBAAuB,IAAI,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,gBAAgB,CAAC;IAC1H,CAAC;;AAGH,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAC9C,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AAY1C;;;;GAIG;AACH,MAAM,OAAO,SAAS;IACJ,IAAI,CAAS;IACb,QAAQ,CAAoB;IAE5C,YAAoB,IAAY,EAAE,QAA2B;QAC3D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,mDAAmD;IAC5C,MAAM,CAAC,QAAQ,CAAC,IAAoB;QACzC,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,0BAA0B;IACnB,MAAM,CAAC,MAAM,CAAC,IAAY,EAAE,QAA2B;QAC5D,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,sIAAsI;IAC/H,KAAK,CAAC,eAAuC;QAClD,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEM,MAAM,CAAC,KAAgB;QAC5B,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1E,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 { ColorDefProps } from \"../ColorDef\";\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/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [[TextStyle]]'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 a [Workspace]($backend), 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 compuated 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\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\n * Named instances of these settings can be stored as [[TextStyle]]s in a [Workspace]($backend).\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 a [Workspace]($backend), 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 compuated 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\n /** A fully-populated JSON representation of the default settings. */\n public static defaultProps: Readonly<Required<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 };\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 }\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 /** 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 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 }\n}\n\nObject.freeze(TextStyleSettings.defaultProps);\nObject.freeze(TextStyleSettings.defaults);\n\n/** The JSON representation of a [[TextStyle]].\n * @beta\n */\nexport interface TextStyleProps {\n /** The name of the style. */\n name: string;\n /** The settings defined for the style. Any omitted properties will use their default values, as described by [[TextStyleSettingsProps]]. */\n settings?: TextStyleSettingsProps;\n}\n\n/** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).\n * @see [[TextBlockComponent.styleName]] to define the text style for a component of a [[TextBlock]].\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @beta\n */\nexport class TextStyle {\n public readonly name: string;\n public readonly settings: TextStyleSettings;\n\n private constructor(name: string, settings: TextStyleSettings) {\n this.name = name;\n this.settings = settings;\n }\n\n /** Create a style from its JSON representation. */\n public static fromJSON(json: TextStyleProps): TextStyle {\n return TextStyle.create(json.name, TextStyleSettings.fromJSON(json.settings));\n }\n\n /** Create a new style. */\n public static create(name: string, settings: TextStyleSettings): TextStyle {\n return new TextStyle(name, settings);\n }\n\n /** Create a copy of this style with the same name, and settings modified according to the properties defined by `alteredSettings`. */\n public clone(alteredSettings: TextStyleSettingsProps): TextStyle {\n return TextStyle.create(this.name, this.settings.clone(alteredSettings));\n }\n\n public equals(other: TextStyle): boolean {\n return this.name === other.name && this.settings.equals(other.settings);\n }\n}\n\n"]}
1
+ {"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAsFH;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IAC5B,6BAA6B;IACb,KAAK,CAAiB;IACtC;OACG;IACa,QAAQ,CAAS;IACjC;;;OAGG;IACa,UAAU,CAAS;IACnC;;OAEG;IACa,iBAAiB,CAAS;IAC1C,kFAAkF;IAClE,MAAM,CAAU;IAChC,sFAAsF;IACtE,QAAQ,CAAU;IAClC,2EAA2E;IAC3D,YAAY,CAAU;IACtC;;OAEG;IACa,oBAAoB,CAAS;IAC7C,oFAAoF;IACpE,mBAAmB,CAAsB;IACzD;;OAEG;IACa,qBAAqB,CAAS;IAC9C;;OAEG;IACa,cAAc,CAAS;IACvC;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5D,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,sIAAsI;IAC/H,KAAK,CAAC,eAAuC;QAClD,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEM,MAAM,CAAC,KAAgB;QAC5B,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1E,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 Annotation\r\n */\r\n\r\nimport { ColorDefProps } from \"../ColorDef\";\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/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [[TextStyle]]'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 a [Workspace]($backend), 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 compuated 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\r\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\r\n * Named instances of these settings can be stored as [[TextStyle]]s in a [Workspace]($backend).\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 a [Workspace]($backend), 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 compuated 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\r\n /** A fully-populated JSON representation of the default settings. */\r\n public static defaultProps: Readonly<Required<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 };\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 }\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 /** 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 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 }\r\n}\r\n\r\nObject.freeze(TextStyleSettings.defaultProps);\r\nObject.freeze(TextStyleSettings.defaults);\r\n\r\n/** The JSON representation of a [[TextStyle]].\r\n * @beta\r\n */\r\nexport interface TextStyleProps {\r\n /** The name of the style. */\r\n name: string;\r\n /** The settings defined for the style. Any omitted properties will use their default values, as described by [[TextStyleSettingsProps]]. */\r\n settings?: TextStyleSettingsProps;\r\n}\r\n\r\n/** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).\r\n * @see [[TextBlockComponent.styleName]] to define the text style for a component of a [[TextBlock]].\r\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\r\n * @beta\r\n */\r\nexport class TextStyle {\r\n public readonly name: string;\r\n public readonly settings: TextStyleSettings;\r\n\r\n private constructor(name: string, settings: TextStyleSettings) {\r\n this.name = name;\r\n this.settings = settings;\r\n }\r\n\r\n /** Create a style from its JSON representation. */\r\n public static fromJSON(json: TextStyleProps): TextStyle {\r\n return TextStyle.create(json.name, TextStyleSettings.fromJSON(json.settings));\r\n }\r\n\r\n /** Create a new style. */\r\n public static create(name: string, settings: TextStyleSettings): TextStyle {\r\n return new TextStyle(name, settings);\r\n }\r\n\r\n /** Create a copy of this style with the same name, and settings modified according to the properties defined by `alteredSettings`. */\r\n public clone(alteredSettings: TextStyleSettingsProps): TextStyle {\r\n return TextStyle.create(this.name, this.settings.clone(alteredSettings));\r\n }\r\n\r\n public equals(other: TextStyle): boolean {\r\n return this.name === other.name && this.settings.equals(other.settings);\r\n }\r\n}\r\n\r\n"]}
@@ -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;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,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAA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;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 \"./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 \"./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,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,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AgC,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 \"./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 \"./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"]}