@itwin/core-common 5.2.0-dev.8 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  3. package/lib/cjs/AnalysisStyle.js.map +1 -1
  4. package/lib/cjs/Atmosphere.js.map +1 -1
  5. package/lib/cjs/AuthorizationClient.js.map +1 -1
  6. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  7. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  8. package/lib/cjs/Base64EncodedString.js.map +1 -1
  9. package/lib/cjs/BlobReader.js.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.d.ts +2 -0
  11. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  12. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  13. package/lib/cjs/Camera.js.map +1 -1
  14. package/lib/cjs/CatalogIModel.js.map +1 -1
  15. package/lib/cjs/CesiumIonAssets.js.map +1 -1
  16. package/lib/cjs/ChangedElements.js.map +1 -1
  17. package/lib/cjs/ChangedEntities.js.map +1 -1
  18. package/lib/cjs/ChangesetProps.js.map +1 -1
  19. package/lib/cjs/ClipStyle.js.map +1 -1
  20. package/lib/cjs/Code.js.map +1 -1
  21. package/lib/cjs/ColorByName.js.map +1 -1
  22. package/lib/cjs/ColorDef.js.map +1 -1
  23. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  24. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  25. package/lib/cjs/ContextRealityModel.js.map +1 -1
  26. package/lib/cjs/ContourDisplay.js.map +1 -1
  27. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  28. package/lib/cjs/ECSchemaProps.js.map +1 -1
  29. package/lib/cjs/ECSqlReader.js.map +1 -1
  30. package/lib/cjs/ECSqlTypes.js.map +1 -1
  31. package/lib/cjs/ElementMesh.js.map +1 -1
  32. package/lib/cjs/ElementProps.d.ts +32 -6
  33. package/lib/cjs/ElementProps.d.ts.map +1 -1
  34. package/lib/cjs/ElementProps.js.map +1 -1
  35. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  36. package/lib/cjs/EntityProps.js.map +1 -1
  37. package/lib/cjs/EntityReference.js.map +1 -1
  38. package/lib/cjs/Environment.js.map +1 -1
  39. package/lib/cjs/FeatureIndex.js.map +1 -1
  40. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  41. package/lib/cjs/FeatureSymbology.js +0 -2
  42. package/lib/cjs/FeatureSymbology.js.map +1 -1
  43. package/lib/cjs/FeatureTable.js.map +1 -1
  44. package/lib/cjs/Fonts.js.map +1 -1
  45. package/lib/cjs/Frustum.js.map +1 -1
  46. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  47. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  48. package/lib/cjs/GeometryContainment.js.map +1 -1
  49. package/lib/cjs/GeometryParams.js.map +1 -1
  50. package/lib/cjs/GeometrySummary.js.map +1 -1
  51. package/lib/cjs/Gradient.js.map +1 -1
  52. package/lib/cjs/GraphicParams.js.map +1 -1
  53. package/lib/cjs/GroundPlane.js.map +1 -1
  54. package/lib/cjs/HSLColor.js.map +1 -1
  55. package/lib/cjs/HSVColor.js.map +1 -1
  56. package/lib/cjs/HiddenLine.js.map +1 -1
  57. package/lib/cjs/Hilite.js.map +1 -1
  58. package/lib/cjs/IModel.js.map +1 -1
  59. package/lib/cjs/IModelError.js.map +1 -1
  60. package/lib/cjs/IModelVersion.js.map +1 -1
  61. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  62. package/lib/cjs/Image.js.map +1 -1
  63. package/lib/cjs/IpcAppProps.js.map +1 -1
  64. package/lib/cjs/LightSettings.js.map +1 -1
  65. package/lib/cjs/LinePixels.js.map +1 -1
  66. package/lib/cjs/Localization.js.map +1 -1
  67. package/lib/cjs/MapImagerySettings.js.map +1 -1
  68. package/lib/cjs/MapLayerSettings.js.map +1 -1
  69. package/lib/cjs/MassProperties.js.map +1 -1
  70. package/lib/cjs/MaterialProps.js.map +1 -1
  71. package/lib/cjs/ModelClipGroup.js.map +1 -1
  72. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  73. package/lib/cjs/ModelProps.js.map +1 -1
  74. package/lib/cjs/NativeAppProps.js.map +1 -1
  75. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  76. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  77. package/lib/cjs/PlanarClipMask.js.map +1 -1
  78. package/lib/cjs/QPoint.js.map +1 -1
  79. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  80. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  81. package/lib/cjs/RenderMaterial.js.map +1 -1
  82. package/lib/cjs/RenderPolyline.js.map +1 -1
  83. package/lib/cjs/RenderTexture.js.map +1 -1
  84. package/lib/cjs/RgbColor.js.map +1 -1
  85. package/lib/cjs/RpcInterface.js.map +1 -1
  86. package/lib/cjs/RpcManager.js.map +1 -1
  87. package/lib/cjs/SessionProps.js.map +1 -1
  88. package/lib/cjs/SkyBox.js.map +1 -1
  89. package/lib/cjs/SolarCalculate.js.map +1 -1
  90. package/lib/cjs/SolarShadows.js.map +1 -1
  91. package/lib/cjs/SpatialClassification.js.map +1 -1
  92. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  93. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  94. package/lib/cjs/TerrainSettings.js.map +1 -1
  95. package/lib/cjs/TextureMapping.js.map +1 -1
  96. package/lib/cjs/TextureProps.js.map +1 -1
  97. package/lib/cjs/ThematicDisplay.js.map +1 -1
  98. package/lib/cjs/Thumbnail.js.map +1 -1
  99. package/lib/cjs/TileProps.js.map +1 -1
  100. package/lib/cjs/Tween.js.map +1 -1
  101. package/lib/cjs/TxnAction.js.map +1 -1
  102. package/lib/cjs/ViewDetails.js.map +1 -1
  103. package/lib/cjs/ViewFlags.js.map +1 -1
  104. package/lib/cjs/ViewProps.js.map +1 -1
  105. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  106. package/lib/cjs/annotation/TextAnnotation.d.ts +1 -1
  107. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  108. package/lib/cjs/annotation/TextAnnotation.js +1 -1
  109. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  110. package/lib/cjs/annotation/TextBlock.d.ts +111 -126
  111. package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
  112. package/lib/cjs/annotation/TextBlock.js +234 -142
  113. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  114. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  115. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts +3 -5
  116. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  117. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  118. package/lib/cjs/annotation/TextField.d.ts +86 -0
  119. package/lib/cjs/annotation/TextField.d.ts.map +1 -0
  120. package/lib/cjs/annotation/TextField.js +10 -0
  121. package/lib/cjs/annotation/TextField.js.map +1 -0
  122. package/lib/cjs/annotation/TextStyle.d.ts +125 -35
  123. package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
  124. package/lib/cjs/annotation/TextStyle.js +105 -46
  125. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  126. package/lib/cjs/core-common.d.ts +1 -0
  127. package/lib/cjs/core-common.d.ts.map +1 -1
  128. package/lib/cjs/core-common.js +1 -0
  129. package/lib/cjs/core-common.js.map +1 -1
  130. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  131. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  132. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  133. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  134. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  135. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  136. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  137. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  138. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  139. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  140. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  141. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  142. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  143. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  144. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  145. package/lib/cjs/geometry/Placement.js.map +1 -1
  146. package/lib/cjs/geometry/Projection.js.map +1 -1
  147. package/lib/cjs/geometry/TextString.js.map +1 -1
  148. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  149. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  150. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  151. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  152. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  153. package/lib/cjs/internal/Snapping.js.map +1 -1
  154. package/lib/cjs/internal/annotations/FieldFormatter.d.ts +18 -0
  155. package/lib/cjs/internal/annotations/FieldFormatter.d.ts.map +1 -0
  156. package/lib/cjs/internal/annotations/FieldFormatter.js +66 -0
  157. package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -0
  158. package/lib/cjs/internal/cross-package.d.ts +1 -0
  159. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  160. package/lib/cjs/internal/cross-package.js +4 -1
  161. package/lib/cjs/internal/cross-package.js.map +1 -1
  162. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  163. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  164. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  165. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  166. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  167. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  168. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  169. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  170. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  171. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  172. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  173. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  174. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  175. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  176. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  177. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  178. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  179. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  180. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  181. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  182. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  183. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  184. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  185. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  186. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  187. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  188. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  189. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  190. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  191. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  192. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  193. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  194. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  195. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  196. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  197. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  198. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  199. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  200. package/lib/cjs/tile/TileIO.js.map +1 -1
  201. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  202. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  203. package/lib/esm/AmbientOcclusion.js.map +1 -1
  204. package/lib/esm/AnalysisStyle.js.map +1 -1
  205. package/lib/esm/Atmosphere.js.map +1 -1
  206. package/lib/esm/AuthorizationClient.js.map +1 -1
  207. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  208. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  209. package/lib/esm/Base64EncodedString.js.map +1 -1
  210. package/lib/esm/BlobReader.js.map +1 -1
  211. package/lib/esm/BriefcaseTypes.d.ts +2 -0
  212. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  213. package/lib/esm/BriefcaseTypes.js.map +1 -1
  214. package/lib/esm/Camera.js.map +1 -1
  215. package/lib/esm/CatalogIModel.js.map +1 -1
  216. package/lib/esm/CesiumIonAssets.js.map +1 -1
  217. package/lib/esm/ChangedElements.js.map +1 -1
  218. package/lib/esm/ChangedEntities.js.map +1 -1
  219. package/lib/esm/ChangesetProps.js.map +1 -1
  220. package/lib/esm/ClipStyle.js.map +1 -1
  221. package/lib/esm/Code.js.map +1 -1
  222. package/lib/esm/ColorByName.js.map +1 -1
  223. package/lib/esm/ColorDef.js.map +1 -1
  224. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  225. package/lib/esm/ConcurrentQuery.js.map +1 -1
  226. package/lib/esm/ContextRealityModel.js.map +1 -1
  227. package/lib/esm/ContourDisplay.js.map +1 -1
  228. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  229. package/lib/esm/ECSchemaProps.js.map +1 -1
  230. package/lib/esm/ECSqlReader.js.map +1 -1
  231. package/lib/esm/ECSqlTypes.js.map +1 -1
  232. package/lib/esm/ElementMesh.js.map +1 -1
  233. package/lib/esm/ElementProps.d.ts +32 -6
  234. package/lib/esm/ElementProps.d.ts.map +1 -1
  235. package/lib/esm/ElementProps.js.map +1 -1
  236. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  237. package/lib/esm/EntityProps.js.map +1 -1
  238. package/lib/esm/EntityReference.js.map +1 -1
  239. package/lib/esm/Environment.js.map +1 -1
  240. package/lib/esm/FeatureIndex.js.map +1 -1
  241. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  242. package/lib/esm/FeatureSymbology.js +0 -2
  243. package/lib/esm/FeatureSymbology.js.map +1 -1
  244. package/lib/esm/FeatureTable.js.map +1 -1
  245. package/lib/esm/Fonts.js.map +1 -1
  246. package/lib/esm/Frustum.js.map +1 -1
  247. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  248. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  249. package/lib/esm/GeometryContainment.js.map +1 -1
  250. package/lib/esm/GeometryParams.js.map +1 -1
  251. package/lib/esm/GeometrySummary.js.map +1 -1
  252. package/lib/esm/Gradient.js.map +1 -1
  253. package/lib/esm/GraphicParams.js.map +1 -1
  254. package/lib/esm/GroundPlane.js.map +1 -1
  255. package/lib/esm/HSLColor.js.map +1 -1
  256. package/lib/esm/HSVColor.js.map +1 -1
  257. package/lib/esm/HiddenLine.js.map +1 -1
  258. package/lib/esm/Hilite.js.map +1 -1
  259. package/lib/esm/IModel.js.map +1 -1
  260. package/lib/esm/IModelError.js.map +1 -1
  261. package/lib/esm/IModelVersion.js.map +1 -1
  262. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  263. package/lib/esm/Image.js.map +1 -1
  264. package/lib/esm/IpcAppProps.js.map +1 -1
  265. package/lib/esm/LightSettings.js.map +1 -1
  266. package/lib/esm/LinePixels.js.map +1 -1
  267. package/lib/esm/Localization.js.map +1 -1
  268. package/lib/esm/MapImagerySettings.js.map +1 -1
  269. package/lib/esm/MapLayerSettings.js.map +1 -1
  270. package/lib/esm/MassProperties.js.map +1 -1
  271. package/lib/esm/MaterialProps.js.map +1 -1
  272. package/lib/esm/ModelClipGroup.js.map +1 -1
  273. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  274. package/lib/esm/ModelProps.js.map +1 -1
  275. package/lib/esm/NativeAppProps.js.map +1 -1
  276. package/lib/esm/OctEncodedNormal.js.map +1 -1
  277. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  278. package/lib/esm/PlanarClipMask.js.map +1 -1
  279. package/lib/esm/QPoint.js.map +1 -1
  280. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  281. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  282. package/lib/esm/RenderMaterial.js.map +1 -1
  283. package/lib/esm/RenderPolyline.js.map +1 -1
  284. package/lib/esm/RenderTexture.js.map +1 -1
  285. package/lib/esm/RgbColor.js.map +1 -1
  286. package/lib/esm/RpcInterface.js.map +1 -1
  287. package/lib/esm/RpcManager.js.map +1 -1
  288. package/lib/esm/SessionProps.js.map +1 -1
  289. package/lib/esm/SkyBox.js.map +1 -1
  290. package/lib/esm/SolarCalculate.js.map +1 -1
  291. package/lib/esm/SolarShadows.js.map +1 -1
  292. package/lib/esm/SpatialClassification.js.map +1 -1
  293. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  294. package/lib/esm/SubCategoryOverride.js.map +1 -1
  295. package/lib/esm/TerrainSettings.js.map +1 -1
  296. package/lib/esm/TextureMapping.js.map +1 -1
  297. package/lib/esm/TextureProps.js.map +1 -1
  298. package/lib/esm/ThematicDisplay.js.map +1 -1
  299. package/lib/esm/Thumbnail.js.map +1 -1
  300. package/lib/esm/TileProps.js.map +1 -1
  301. package/lib/esm/Tween.js.map +1 -1
  302. package/lib/esm/TxnAction.js.map +1 -1
  303. package/lib/esm/ViewDetails.js.map +1 -1
  304. package/lib/esm/ViewFlags.js.map +1 -1
  305. package/lib/esm/ViewProps.js.map +1 -1
  306. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  307. package/lib/esm/annotation/TextAnnotation.d.ts +1 -1
  308. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  309. package/lib/esm/annotation/TextAnnotation.js +1 -1
  310. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  311. package/lib/esm/annotation/TextBlock.d.ts +111 -126
  312. package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
  313. package/lib/esm/annotation/TextBlock.js +230 -141
  314. package/lib/esm/annotation/TextBlock.js.map +1 -1
  315. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  316. package/lib/esm/annotation/TextBlockLayoutResult.d.ts +3 -5
  317. package/lib/esm/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  318. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  319. package/lib/esm/annotation/TextField.d.ts +86 -0
  320. package/lib/esm/annotation/TextField.d.ts.map +1 -0
  321. package/lib/esm/annotation/TextField.js +9 -0
  322. package/lib/esm/annotation/TextField.js.map +1 -0
  323. package/lib/esm/annotation/TextStyle.d.ts +125 -35
  324. package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
  325. package/lib/esm/annotation/TextStyle.js +104 -45
  326. package/lib/esm/annotation/TextStyle.js.map +1 -1
  327. package/lib/esm/core-common.d.ts +1 -0
  328. package/lib/esm/core-common.d.ts.map +1 -1
  329. package/lib/esm/core-common.js +1 -0
  330. package/lib/esm/core-common.js.map +1 -1
  331. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  332. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  333. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  334. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  335. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  336. package/lib/esm/geometry/Cartographic.js.map +1 -1
  337. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  338. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  339. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  340. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  341. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  342. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  343. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  344. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  345. package/lib/esm/geometry/LineStyle.js.map +1 -1
  346. package/lib/esm/geometry/Placement.js.map +1 -1
  347. package/lib/esm/geometry/Projection.js.map +1 -1
  348. package/lib/esm/geometry/TextString.js.map +1 -1
  349. package/lib/esm/internal/BackendTypes.js.map +1 -1
  350. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  351. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  352. package/lib/esm/internal/RenderMesh.js.map +1 -1
  353. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  354. package/lib/esm/internal/Snapping.js.map +1 -1
  355. package/lib/esm/internal/annotations/FieldFormatter.d.ts +18 -0
  356. package/lib/esm/internal/annotations/FieldFormatter.d.ts.map +1 -0
  357. package/lib/esm/internal/annotations/FieldFormatter.js +62 -0
  358. package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -0
  359. package/lib/esm/internal/cross-package.d.ts +1 -0
  360. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  361. package/lib/esm/internal/cross-package.js +1 -0
  362. package/lib/esm/internal/cross-package.js.map +1 -1
  363. package/lib/esm/ipc/IpcSession.js.map +1 -1
  364. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  365. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  366. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  367. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  368. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  369. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  370. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  371. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  372. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  373. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  374. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  375. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  376. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  377. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  378. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  379. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  380. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  381. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  382. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  383. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  384. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  385. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  386. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  387. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  388. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  389. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  390. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  391. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  392. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  393. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  394. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  395. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  396. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  397. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  398. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  399. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  400. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  401. package/lib/esm/tile/TileIO.js.map +1 -1
  402. package/lib/esm/tile/TileMetadata.js.map +1 -1
  403. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  404. package/package.json +6 -6
@@ -3,6 +3,33 @@
3
3
  */
4
4
  import { DeepReadonlyObject, DeepRequiredObject } from "@itwin/core-bentley";
5
5
  import { ColorDefProps } from "../ColorDef";
6
+ import { FontFamilySelector } from "../Fonts";
7
+ /** Predefined markers for list items in text annotations.
8
+ * These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.
9
+ * @beta
10
+ */
11
+ export declare enum ListMarkerEnumerator {
12
+ /** English Alphabet */
13
+ Letter = "A",
14
+ RomanNumeral = "I",
15
+ Number = "1",
16
+ Bullet = "\u2022",
17
+ Circle = "\u25CB",
18
+ Square = "\u25A0",
19
+ /** EM Dash */
20
+ Dash = "\u2013"
21
+ }
22
+ /** A settings to specify how to mark or denote the start of a list item in a [[List]].
23
+ * @beta
24
+ */
25
+ export interface ListMarker {
26
+ /** This can be either one of the predefined markers in [[ListMarkerEnumerator]], or any arbitrary string. */
27
+ enumerator: ListMarkerEnumerator | string;
28
+ /** The punctuation to follow the enumerator. */
29
+ terminator?: "parenthesis" | "period";
30
+ /** Whether to use upper or lower case for alphabetic or roman numeral enumerators. Ignored if [[enumerator]] is not alphabetic or roman numeral. */
31
+ case?: "upper" | "lower";
32
+ }
6
33
  /** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
7
34
  * @beta
8
35
  */
@@ -18,6 +45,24 @@ export type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];
18
45
  * @beta
19
46
  */
20
47
  export type TextAnnotationFillColor = TextStyleColor | "background" | "none";
48
+ /** Describes the margins around the content inside a [[TextBlock]], measured in meters.
49
+ * All margins default to zero if `undefined`.
50
+ * @beta
51
+ */
52
+ export interface TextBlockMargins {
53
+ /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
54
+ left?: number;
55
+ /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
56
+ right?: number;
57
+ /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
58
+ top?: number;
59
+ /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
60
+ bottom?: number;
61
+ }
62
+ /** Describes the relative alignment of text.
63
+ * @beta
64
+ */
65
+ export type TextJustification = "left" | "center" | "right";
21
66
  /** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.
22
67
  * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].
23
68
  * @beta
@@ -39,9 +84,9 @@ export interface TextFrameStyleProps {
39
84
  /** Shape of the frame. Default: "none" */
40
85
  shape?: TextAnnotationFrameShape;
41
86
  /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: "none" */
42
- fill?: TextAnnotationFillColor;
87
+ fillColor?: TextAnnotationFillColor;
43
88
  /** The color of the text frame's outline. Default: black */
44
- border?: TextStyleColor;
89
+ borderColor?: TextStyleColor;
45
90
  /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */
46
91
  borderWeight?: number;
47
92
  }
@@ -60,17 +105,17 @@ export interface TextLeaderStyleProps {
60
105
  */
61
106
  wantElbow?: boolean;
62
107
  /** Multiplier used to compute length of the elbow in the leader.
63
- * The elbowLength is computed in meters as elbowLength * [[lineHeight]].
108
+ * The elbowLength is computed in meters as elbowLength * [[textHeight]].
64
109
  * Default: 1.0
65
110
  */
66
111
  elbowLength?: number;
67
112
  /** Multiplier to compute height of the leader terminator.
68
- * The terminator height is computed in meters as terminatorHeight * [[lineHeight]].
113
+ * The terminator height is computed in meters as terminatorHeight * [[textHeight]].
69
114
  * Default: 1.0
70
115
  */
71
116
  terminatorHeightFactor?: number;
72
117
  /** Multiplier to compute width of the leader terminator.
73
- * The terminator width is computed in meters as terminatorWidth * [[lineHeight]].
118
+ * The terminator width is computed in meters as terminatorWidth * [[textHeight]].
74
119
  * Default: 1.0
75
120
  */
76
121
  terminatorWidthFactor?: number;
@@ -83,20 +128,25 @@ export interface TextStyleSettingsProps {
83
128
  * Default: "subcategory".
84
129
  */
85
130
  color?: TextStyleColor;
86
- /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].
87
- * Default: "" (an invalid font name).
131
+ /** The font stored in an iModel, used to draw the contents of a [[TextRun]].
132
+ * Default: { name: "" } (an invalid font name).
88
133
  */
89
- fontName?: string;
90
- /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.
91
- * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and
92
- * lineHeight * [[subScriptOffsetFactor]], respectively.
134
+ font?: FontFamilySelector;
135
+ /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.
136
+ * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and
137
+ * textHeight * [[subScriptOffsetFactor]], respectively.
93
138
  * Default: 1.0. */
94
- lineHeight?: number;
139
+ textHeight?: number;
95
140
  /** Multiplier used to compute the vertical distance between two lines of text.
96
- * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].
141
+ * The distance is computed in meters as lineSpacingFactor * [[textHeight]].
97
142
  * Default: 0.5.
98
143
  */
99
144
  lineSpacingFactor?: number;
145
+ /** Multiplier used to compute the vertical distance between two paragraphs of text.
146
+ * The distance is computed in meters as paragraphSpacingFactor * [[textHeight]].
147
+ * Default: 0.5.
148
+ */
149
+ paragraphSpacingFactor?: number;
100
150
  /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.
101
151
  * Default: false.
102
152
  */
@@ -110,7 +160,7 @@ export interface TextStyleSettingsProps {
110
160
  */
111
161
  isUnderlined?: boolean;
112
162
  /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].
113
- * The height is computed in meters as stackedFractionScale * [[lineHeight]].
163
+ * The height is computed in meters as stackedFractionScale * [[textHeight]].
114
164
  * Default: 0.7.
115
165
  */
116
166
  stackedFractionScale?: number;
@@ -119,22 +169,22 @@ export interface TextStyleSettingsProps {
119
169
  */
120
170
  stackedFractionType?: StackedFractionType;
121
171
  /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].
122
- * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].
172
+ * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].
123
173
  * Default: -0.15.
124
174
  */
125
175
  subScriptOffsetFactor?: number;
126
176
  /** Multiplier used to compute the height of a subscript [[TextRun]].
127
- * The height is computed as subScriptScale * [[lineHeight]].
177
+ * The height is computed as subScriptScale * [[textHeight]].
128
178
  * Default: 2/3
129
179
  */
130
180
  subScriptScale?: number;
131
181
  /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].
132
- * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].
182
+ * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].
133
183
  * Default: -0.5.
134
184
  */
135
185
  superScriptOffsetFactor?: number;
136
186
  /** Multiplier used to compute the height of a superscript [[TextRun]].
137
- * The height is computed as superScriptScale * [[lineHeight]].
187
+ * The height is computed as superScriptScale * [[textHeight]].
138
188
  * Default: 2/3
139
189
  */
140
190
  superScriptScale?: number;
@@ -149,6 +199,9 @@ export interface TextStyleSettingsProps {
149
199
  leader?: TextLeaderStyleProps;
150
200
  /** The size (in meters) used to calculate the tab stops in a run.
151
201
  * These are equally spaced from the left edge of the TextBlock.
202
+ * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].
203
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
204
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
152
205
  * Default: 4 meters.
153
206
  */
154
207
  tabInterval?: number;
@@ -158,6 +211,23 @@ export interface TextStyleSettingsProps {
158
211
  * Default: {shape: "none", fill: "none", border: black, borderWeight: 1} for no frame.
159
212
  */
160
213
  frame?: TextFrameStyleProps;
214
+ /** The margins to surround the document content.
215
+ * Default: 0 margins on all sides */
216
+ margins?: TextBlockMargins;
217
+ /** The offset (in meters) from the left edge of the text block to the start of the line of text.
218
+ * In lists, the indentation is added to offset of list items.
219
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
220
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
221
+ * Default: 0 meters.
222
+ */
223
+ indentation?: number;
224
+ /** The marker used to indicate the start of a list item.
225
+ * Default: "1.".
226
+ */
227
+ listMarker?: ListMarker;
228
+ /** The alignment of the text content.
229
+ * Default: "left". */
230
+ justification?: TextJustification;
161
231
  }
162
232
  /** A description of the formatting to be applied to a [[TextBlockComponent]].
163
233
  * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.
@@ -168,18 +238,22 @@ export interface TextStyleSettingsProps {
168
238
  export declare class TextStyleSettings {
169
239
  /** The color of the text. */
170
240
  readonly color: TextStyleColor;
171
- /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].
241
+ /** The font stored in an iModel, used to draw the contents of a [[TextRun]].
172
242
  */
173
- readonly fontName: string;
174
- /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.
175
- * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and
176
- * lineHeight * [[subScriptOffsetFactor]], respectively.
243
+ readonly font: Readonly<Required<FontFamilySelector>>;
244
+ /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.
245
+ * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and
246
+ * textHeight * [[subScriptOffsetFactor]], respectively.
177
247
  */
178
- readonly lineHeight: number;
248
+ readonly textHeight: number;
179
249
  /** Multiplier used to compute the vertical distance between two lines of text.
180
- * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].
250
+ * The distance is computed in meters as lineSpacingFactor * [[textHeight]] of the [[TextBlock]].
181
251
  */
182
252
  readonly lineSpacingFactor: number;
253
+ /** Multiplier used to compute the vertical distance between two paragraphs of text.
254
+ * The distance is computed in meters as paragraphSpacingFactor * the [[TextBlock]]'s [[textHeight]].
255
+ */
256
+ readonly paragraphSpacingFactor: number;
183
257
  /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */
184
258
  readonly isBold: boolean;
185
259
  /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */
@@ -187,48 +261,63 @@ export declare class TextStyleSettings {
187
261
  /** Specifies whether the content of a [[TextRun]] should be underlined. */
188
262
  readonly isUnderlined: boolean;
189
263
  /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].
190
- * The height is computed in meters as stackedFractionScale * [[lineHeight]].
264
+ * The height is computed in meters as stackedFractionScale * [[textHeight]].
191
265
  */
192
266
  readonly stackedFractionScale: number;
193
267
  /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */
194
268
  readonly stackedFractionType: StackedFractionType;
195
269
  /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].
196
- * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].
270
+ * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].
197
271
  */
198
272
  readonly subScriptOffsetFactor: number;
199
273
  /** Multiplier used to compute the height of a subscript [[TextRun]].
200
- * The height is computed as subScriptScale * [[lineHeight]].
274
+ * The height is computed as subScriptScale * [[textHeight]].
201
275
  */
202
276
  readonly subScriptScale: number;
203
277
  /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].
204
- * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].
278
+ * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].
205
279
  */
206
280
  readonly superScriptOffsetFactor: number;
207
281
  /** Multiplier used to compute the height of a superscript [[TextRun]].
208
- * The height is computed as superScriptScale * [[lineHeight]].
282
+ * The height is computed as superScriptScale * [[textHeight]].
209
283
  */
210
284
  readonly superScriptScale: number;
211
- /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */
285
+ /** Multiplier used to compute the width of each glyph, relative to [[textHeight]]. */
212
286
  readonly widthFactor: number;
213
287
  /** Properties describing appearance of leaders in a [[TextAnnotation]].
214
288
  * Used when producing geometry for [[TextAnnotation]].
215
289
  */
216
290
  readonly leader: Readonly<Required<TextLeaderStyleProps>>;
217
291
  /** The size (in meters) used to calculate the tab stops in a run.
218
- * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.
292
+ * These are equally spaced from the left edge of the TextBlock.
293
+ * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].
294
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
295
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
219
296
  */
220
297
  readonly tabInterval: number;
298
+ /** The offset (in meters) from the left edge of the text block to the start of the line of text.
299
+ * In lists, the indentation is added to offset of list items.
300
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
301
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
302
+ */
303
+ readonly indentation: number;
304
+ /** The marker used to indicate the start of a list item.
305
+ * Default: [[ListMarkerEnumerator.Number]].
306
+ */
307
+ readonly listMarker: ListMarker;
221
308
  /** The frame settings of the [[TextAnnotation]]. */
222
309
  readonly frame: Readonly<Required<TextFrameStyleProps>>;
223
- /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */
310
+ /** The margins to surround the document content. */
311
+ readonly margins: Readonly<Required<TextBlockMargins>>;
312
+ /** The alignment of the text content. */
313
+ readonly justification: TextJustification;
314
+ /** A fully-populated JSON representation of the default settings. A real `font` must be provided before use. */
224
315
  static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>>;
225
316
  /** Settings initialized to all default values. */
226
317
  static defaults: TextStyleSettings;
227
318
  private constructor();
228
319
  /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */
229
320
  clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings;
230
- /** Creates a deep copy of the `TextStyleSettingsProps`. */
231
- static cloneProps(props: TextStyleSettingsProps): TextStyleSettingsProps;
232
321
  /** Create settings from their JSON representation. */
233
322
  static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings;
234
323
  toJSON(): TextStyleSettingsProps;
@@ -238,6 +327,7 @@ export declare class TextStyleSettings {
238
327
  */
239
328
  leaderEquals(other: TextLeaderStyleProps): boolean;
240
329
  frameEquals(other: TextFrameStyleProps): boolean;
330
+ marginsEqual(other: TextBlockMargins): boolean;
241
331
  equals(other: TextStyleSettings): boolean;
242
332
  /**
243
333
  * Returns a list of validation errors for this instance.
@@ -1 +1 @@
1
- {"version":3,"file":"TextStyle.d.ts","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAY,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtD;;EAEE;AACF,eAAO,MAAM,yBAAyB,+JAAgK,CAAC;AAEvM;;EAEE;AACF,MAAM,MAAM,wBAAwB,GAAG,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAEhF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,YAAY,GAAG,MAAM,CAAC;AAE7E;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,aAAa,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,wBAAwB,CAAC;IACjC,0HAA0H;IAC1H,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAC/B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,6GAA6G;IAC7G,Y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c,YAAY,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC,CAuCxF;IAEF,kDAAkD;IAClD,OAAc,QAAQ,EAAE,iBAAiB,CAA6B;IAEtE,OAAO;IAoDP,uGAAuG;IAChG,KAAK,CAAC,YAAY,CAAC,EAAE,sBAAsB,GAAG,iBAAiB;IAItE,sDAAsD;WACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,sBAAsB,GAAG,iBAAiB;IAIlE,MAAM,IAAI,sBAAsB;IAIvC;;;OAGG;IACI,YAAY,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO;IAMlD,WAAW,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO;IAOhD,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO;IAM9C,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO;IAgBhD;;;;;;;;;OASG;IACI,mBAAmB,IAAI,MAAM,EAAE;CAgBvC"}
@@ -6,11 +6,29 @@
6
6
  * @module Annotation
7
7
  */
8
8
  import { ColorDef } from "../ColorDef";
9
+ import { FontType } from "../Fonts";
10
+ /** Predefined markers for list items in text annotations.
11
+ * These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.
12
+ * @beta
13
+ */
14
+ export var ListMarkerEnumerator;
15
+ (function (ListMarkerEnumerator) {
16
+ /** English Alphabet */
17
+ ListMarkerEnumerator["Letter"] = "A";
18
+ ListMarkerEnumerator["RomanNumeral"] = "I";
19
+ ListMarkerEnumerator["Number"] = "1";
20
+ ListMarkerEnumerator["Bullet"] = "\u2022";
21
+ ListMarkerEnumerator["Circle"] = "\u25CB";
22
+ ListMarkerEnumerator["Square"] = "\u25A0";
23
+ /** EM Dash */
24
+ ListMarkerEnumerator["Dash"] = "\u2013";
25
+ })(ListMarkerEnumerator || (ListMarkerEnumerator = {}));
9
26
  /** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
10
27
  * @beta
11
28
  */
12
29
  export const textAnnotationFrameShapes = ["none", "line", "rectangle", "circle", "equilateralTriangle", "diamond", "square", "pentagon", "hexagon", "octagon", "capsule", "roundedRectangle"];
13
30
  ;
31
+ ;
14
32
  function deepFreeze(obj) {
15
33
  if (obj === null || typeof obj !== "object" || Object.isFrozen(obj))
16
34
  return;
@@ -31,18 +49,22 @@ function deepFreeze(obj) {
31
49
  export class TextStyleSettings {
32
50
  /** The color of the text. */
33
51
  color;
34
- /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].
52
+ /** The font stored in an iModel, used to draw the contents of a [[TextRun]].
35
53
  */
36
- fontName;
37
- /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.
38
- * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and
39
- * lineHeight * [[subScriptOffsetFactor]], respectively.
54
+ font;
55
+ /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.
56
+ * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and
57
+ * textHeight * [[subScriptOffsetFactor]], respectively.
40
58
  */
41
- lineHeight;
59
+ textHeight;
42
60
  /** Multiplier used to compute the vertical distance between two lines of text.
43
- * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].
61
+ * The distance is computed in meters as lineSpacingFactor * [[textHeight]] of the [[TextBlock]].
44
62
  */
45
63
  lineSpacingFactor;
64
+ /** Multiplier used to compute the vertical distance between two paragraphs of text.
65
+ * The distance is computed in meters as paragraphSpacingFactor * the [[TextBlock]]'s [[textHeight]].
66
+ */
67
+ paragraphSpacingFactor;
46
68
  /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */
47
69
  isBold;
48
70
  /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */
@@ -50,45 +72,63 @@ export class TextStyleSettings {
50
72
  /** Specifies whether the content of a [[TextRun]] should be underlined. */
51
73
  isUnderlined;
52
74
  /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].
53
- * The height is computed in meters as stackedFractionScale * [[lineHeight]].
75
+ * The height is computed in meters as stackedFractionScale * [[textHeight]].
54
76
  */
55
77
  stackedFractionScale;
56
78
  /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */
57
79
  stackedFractionType;
58
80
  /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].
59
- * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].
81
+ * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].
60
82
  */
61
83
  subScriptOffsetFactor;
62
84
  /** Multiplier used to compute the height of a subscript [[TextRun]].
63
- * The height is computed as subScriptScale * [[lineHeight]].
85
+ * The height is computed as subScriptScale * [[textHeight]].
64
86
  */
65
87
  subScriptScale;
66
88
  /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].
67
- * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].
89
+ * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].
68
90
  */
69
91
  superScriptOffsetFactor;
70
92
  /** Multiplier used to compute the height of a superscript [[TextRun]].
71
- * The height is computed as superScriptScale * [[lineHeight]].
93
+ * The height is computed as superScriptScale * [[textHeight]].
72
94
  */
73
95
  superScriptScale;
74
- /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */
96
+ /** Multiplier used to compute the width of each glyph, relative to [[textHeight]]. */
75
97
  widthFactor;
76
98
  /** Properties describing appearance of leaders in a [[TextAnnotation]].
77
99
  * Used when producing geometry for [[TextAnnotation]].
78
100
  */
79
101
  leader;
80
102
  /** The size (in meters) used to calculate the tab stops in a run.
81
- * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.
103
+ * These are equally spaced from the left edge of the TextBlock.
104
+ * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].
105
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
106
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
82
107
  */
83
108
  tabInterval;
109
+ /** The offset (in meters) from the left edge of the text block to the start of the line of text.
110
+ * In lists, the indentation is added to offset of list items.
111
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
112
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
113
+ */
114
+ indentation;
115
+ /** The marker used to indicate the start of a list item.
116
+ * Default: [[ListMarkerEnumerator.Number]].
117
+ */
118
+ listMarker;
84
119
  /** The frame settings of the [[TextAnnotation]]. */
85
120
  frame;
86
- /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */
121
+ /** The margins to surround the document content. */
122
+ margins;
123
+ /** The alignment of the text content. */
124
+ justification;
125
+ /** A fully-populated JSON representation of the default settings. A real `font` must be provided before use. */
87
126
  static defaultProps = {
88
127
  color: "subcategory",
89
- fontName: "",
90
- lineHeight: 1,
128
+ font: { name: "", type: FontType.TrueType },
129
+ textHeight: 1,
91
130
  lineSpacingFactor: 0.5,
131
+ paragraphSpacingFactor: 0.5,
92
132
  isBold: false,
93
133
  isItalic: false,
94
134
  isUnderlined: false,
@@ -107,12 +147,21 @@ export class TextStyleSettings {
107
147
  terminatorWidthFactor: 1.0,
108
148
  },
109
149
  tabInterval: 4,
150
+ indentation: 0,
151
+ listMarker: { enumerator: "1", terminator: "period", case: "lower" },
110
152
  frame: {
111
153
  shape: "none",
112
- fill: "none",
113
- border: ColorDef.black.toJSON(),
154
+ fillColor: "none",
155
+ borderColor: ColorDef.black.toJSON(),
114
156
  borderWeight: 1,
115
157
  },
158
+ margins: {
159
+ left: 0,
160
+ right: 0,
161
+ top: 0,
162
+ bottom: 0
163
+ },
164
+ justification: "left",
116
165
  };
117
166
  /** Settings initialized to all default values. */
118
167
  static defaults = new TextStyleSettings({});
@@ -121,9 +170,14 @@ export class TextStyleSettings {
121
170
  defaults = TextStyleSettings.defaultProps;
122
171
  }
123
172
  this.color = props.color ?? defaults.color;
124
- this.fontName = props.fontName ?? defaults.fontName;
125
- this.lineHeight = props.lineHeight ?? defaults.lineHeight;
173
+ const font = {
174
+ name: props.font?.name ?? defaults.font.name,
175
+ type: props.font?.type ?? defaults.font.type,
176
+ };
177
+ this.font = Object.freeze(font);
178
+ this.textHeight = props.textHeight ?? defaults.textHeight;
126
179
  this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;
180
+ this.paragraphSpacingFactor = props.paragraphSpacingFactor ?? defaults.paragraphSpacingFactor;
127
181
  this.isBold = props.isBold ?? defaults.isBold;
128
182
  this.isItalic = props.isItalic ?? defaults.isItalic;
129
183
  this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;
@@ -143,36 +197,34 @@ export class TextStyleSettings {
143
197
  };
144
198
  this.leader = Object.freeze(leader);
145
199
  this.tabInterval = props.tabInterval ?? defaults.tabInterval;
200
+ this.indentation = props.indentation ?? defaults.indentation;
201
+ this.listMarker = props.listMarker ?? defaults.listMarker;
146
202
  const frame = {
147
203
  shape: props.frame?.shape ?? defaults.frame.shape,
148
- fill: props.frame?.fill ?? defaults.frame.fill,
149
- border: props.frame?.border ?? defaults.frame.border,
204
+ fillColor: props.frame?.fillColor ?? defaults.frame.fillColor,
205
+ borderColor: props.frame?.borderColor ?? defaults.frame.borderColor,
150
206
  borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,
151
207
  };
152
208
  // Cast to indicate to TypeScript that the frame properties are all defined
153
209
  this.frame = Object.freeze(frame);
210
+ this.margins = Object.freeze({
211
+ left: props.margins?.left ?? defaults.margins.left,
212
+ right: props.margins?.right ?? defaults.margins.right,
213
+ top: props.margins?.top ?? defaults.margins.top,
214
+ bottom: props.margins?.bottom ?? defaults.margins.bottom,
215
+ });
216
+ this.justification = props.justification ?? defaults.justification;
154
217
  }
155
218
  /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */
156
219
  clone(alteredProps) {
157
220
  return alteredProps ? new TextStyleSettings(alteredProps, this) : this;
158
221
  }
159
- /** Creates a deep copy of the `TextStyleSettingsProps`. */
160
- static cloneProps(props) {
161
- const copy = { ...props };
162
- if (props.leader) {
163
- copy.leader = { ...props.leader };
164
- }
165
- if (props.frame) {
166
- copy.frame = { ...props.frame };
167
- }
168
- return copy;
169
- }
170
222
  /** Create settings from their JSON representation. */
171
223
  static fromJSON(props) {
172
224
  return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;
173
225
  }
174
226
  toJSON() {
175
- return { ...this };
227
+ return structuredClone(this);
176
228
  }
177
229
  /** Compare two [[TextLeaderStyleProps]] for equality.
178
230
  * @param other The other leader style properties to compare against.
@@ -185,20 +237,27 @@ export class TextStyleSettings {
185
237
  }
186
238
  frameEquals(other) {
187
239
  return this.frame?.shape === other.shape
188
- && this.frame?.fill === other.fill
189
- && this.frame?.border === other.border
240
+ && this.frame?.fillColor === other.fillColor
241
+ && this.frame?.borderColor === other.borderColor
190
242
  && this.frame?.borderWeight === other.borderWeight;
191
243
  }
244
+ marginsEqual(other) {
245
+ return Object.entries(this.margins).every(([key, value]) => value === other[key]);
246
+ }
192
247
  equals(other) {
193
- return this.color === other.color && this.fontName === other.fontName
194
- && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor
248
+ return this.color === other.color && this.font.name === other.font.name && this.font.type === other.font.type
249
+ && this.textHeight === other.textHeight && this.widthFactor === other.widthFactor
250
+ && this.lineSpacingFactor === other.lineSpacingFactor && this.paragraphSpacingFactor === other.paragraphSpacingFactor
195
251
  && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined
196
252
  && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale
197
253
  && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale
198
254
  && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale
199
- && this.tabInterval === other.tabInterval
255
+ && this.tabInterval === other.tabInterval && this.indentation === other.indentation
256
+ && this.listMarker.case === other.listMarker.case && this.listMarker.enumerator === other.listMarker.enumerator && this.listMarker.terminator === other.listMarker.terminator
257
+ && this.justification === other.justification
200
258
  && this.leaderEquals(other.leader)
201
- && this.frameEquals(other.frame);
259
+ && this.frameEquals(other.frame)
260
+ && this.marginsEqual(other.margins);
202
261
  }
203
262
  /**
204
263
  * Returns a list of validation errors for this instance.
@@ -212,11 +271,11 @@ export class TextStyleSettings {
212
271
  */
213
272
  getValidationErrors() {
214
273
  const errorMessages = [];
215
- if (this.fontName.trim() === "") {
216
- errorMessages.push("fontName must be provided");
274
+ if (this.font.name.trim() === "") {
275
+ errorMessages.push("font name must be provided");
217
276
  }
218
- if (this.lineHeight <= 0) {
219
- errorMessages.push("lineHeight must be greater than 0");
277
+ if (this.textHeight <= 0) {
278
+ errorMessages.push("textHeight must be greater than 0");
220
279
  }
221
280
  if (this.stackedFractionScale <= 0) {
222
281
  errorMessages.push("stackedFractionScale must be greater than 0");