@itwin/core-common 5.5.0-dev.2 → 5.5.0-dev.5

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 (346) hide show
  1. package/CHANGELOG.md +12 -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.js.map +1 -1
  11. package/lib/cjs/Camera.js.map +1 -1
  12. package/lib/cjs/CatalogIModel.js.map +1 -1
  13. package/lib/cjs/CesiumIonAssets.js.map +1 -1
  14. package/lib/cjs/ChangedElements.js.map +1 -1
  15. package/lib/cjs/ChangedEntities.js.map +1 -1
  16. package/lib/cjs/ChangesetProps.js.map +1 -1
  17. package/lib/cjs/ClipStyle.js.map +1 -1
  18. package/lib/cjs/Code.js.map +1 -1
  19. package/lib/cjs/ColorByName.js.map +1 -1
  20. package/lib/cjs/ColorDef.js.map +1 -1
  21. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  22. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  23. package/lib/cjs/ContextRealityModel.js.map +1 -1
  24. package/lib/cjs/ContourDisplay.js.map +1 -1
  25. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  26. package/lib/cjs/ECSchemaProps.js.map +1 -1
  27. package/lib/cjs/ECSqlReader.js.map +1 -1
  28. package/lib/cjs/ECSqlTypes.js.map +1 -1
  29. package/lib/cjs/ElementMesh.js.map +1 -1
  30. package/lib/cjs/ElementProps.js.map +1 -1
  31. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  32. package/lib/cjs/EntityProps.js.map +1 -1
  33. package/lib/cjs/EntityReference.js.map +1 -1
  34. package/lib/cjs/Environment.js.map +1 -1
  35. package/lib/cjs/FeatureIndex.js.map +1 -1
  36. package/lib/cjs/FeatureSymbology.js.map +1 -1
  37. package/lib/cjs/FeatureTable.js.map +1 -1
  38. package/lib/cjs/Fonts.js.map +1 -1
  39. package/lib/cjs/Frustum.js.map +1 -1
  40. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  41. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  42. package/lib/cjs/GeometryContainment.js.map +1 -1
  43. package/lib/cjs/GeometryParams.js.map +1 -1
  44. package/lib/cjs/GeometrySummary.js.map +1 -1
  45. package/lib/cjs/Gradient.js.map +1 -1
  46. package/lib/cjs/GraphicParams.js.map +1 -1
  47. package/lib/cjs/GroundPlane.js.map +1 -1
  48. package/lib/cjs/HSLColor.js.map +1 -1
  49. package/lib/cjs/HSVColor.js.map +1 -1
  50. package/lib/cjs/HiddenLine.js.map +1 -1
  51. package/lib/cjs/Hilite.js.map +1 -1
  52. package/lib/cjs/IModel.js.map +1 -1
  53. package/lib/cjs/IModelError.js.map +1 -1
  54. package/lib/cjs/IModelVersion.js.map +1 -1
  55. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  56. package/lib/cjs/Image.js.map +1 -1
  57. package/lib/cjs/IpcAppProps.js.map +1 -1
  58. package/lib/cjs/LightSettings.js.map +1 -1
  59. package/lib/cjs/LinePixels.js.map +1 -1
  60. package/lib/cjs/Localization.js.map +1 -1
  61. package/lib/cjs/MapImagerySettings.js.map +1 -1
  62. package/lib/cjs/MapLayerSettings.js.map +1 -1
  63. package/lib/cjs/MassProperties.js.map +1 -1
  64. package/lib/cjs/MaterialProps.js.map +1 -1
  65. package/lib/cjs/ModelClipGroup.js.map +1 -1
  66. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  67. package/lib/cjs/ModelProps.js.map +1 -1
  68. package/lib/cjs/NativeAppProps.js.map +1 -1
  69. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  70. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  71. package/lib/cjs/PlanarClipMask.js.map +1 -1
  72. package/lib/cjs/QPoint.js.map +1 -1
  73. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  74. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  75. package/lib/cjs/RenderMaterial.js.map +1 -1
  76. package/lib/cjs/RenderPolyline.js.map +1 -1
  77. package/lib/cjs/RenderTexture.js.map +1 -1
  78. package/lib/cjs/RgbColor.js.map +1 -1
  79. package/lib/cjs/RpcInterface.js.map +1 -1
  80. package/lib/cjs/RpcManager.js.map +1 -1
  81. package/lib/cjs/SessionProps.js.map +1 -1
  82. package/lib/cjs/SkyBox.js.map +1 -1
  83. package/lib/cjs/SolarCalculate.js.map +1 -1
  84. package/lib/cjs/SolarShadows.js.map +1 -1
  85. package/lib/cjs/SpatialClassification.js.map +1 -1
  86. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  87. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  88. package/lib/cjs/TerrainSettings.js.map +1 -1
  89. package/lib/cjs/TextureMapping.js.map +1 -1
  90. package/lib/cjs/TextureProps.js.map +1 -1
  91. package/lib/cjs/ThematicDisplay.js.map +1 -1
  92. package/lib/cjs/Thumbnail.js.map +1 -1
  93. package/lib/cjs/TileProps.js.map +1 -1
  94. package/lib/cjs/Tween.js.map +1 -1
  95. package/lib/cjs/TxnAction.js.map +1 -1
  96. package/lib/cjs/ViewDetails.js.map +1 -1
  97. package/lib/cjs/ViewFlags.js.map +1 -1
  98. package/lib/cjs/ViewProps.js.map +1 -1
  99. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  100. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  101. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  102. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  103. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  104. package/lib/cjs/annotation/TextField.js.map +1 -1
  105. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  106. package/lib/cjs/core-common.js.map +1 -1
  107. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  108. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  109. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  110. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  111. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  112. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  113. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  114. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  115. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  116. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  117. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  118. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  119. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  120. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  121. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  122. package/lib/cjs/geometry/Placement.js.map +1 -1
  123. package/lib/cjs/geometry/Projection.js.map +1 -1
  124. package/lib/cjs/geometry/TextString.js.map +1 -1
  125. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  126. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  127. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  128. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  129. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  130. package/lib/cjs/internal/Snapping.js.map +1 -1
  131. package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
  132. package/lib/cjs/internal/cross-package.js.map +1 -1
  133. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  134. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  135. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  136. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  137. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  138. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  139. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  140. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  141. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  142. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  143. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  144. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  145. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  146. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  147. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  148. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  149. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  150. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  151. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  152. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  153. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  154. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  155. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  156. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  157. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  158. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  159. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  160. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  161. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  162. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  163. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  164. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  165. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  166. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  167. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  168. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  169. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  170. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  171. package/lib/cjs/tile/TileIO.js.map +1 -1
  172. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  173. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  174. package/lib/esm/AmbientOcclusion.js.map +1 -1
  175. package/lib/esm/AnalysisStyle.js.map +1 -1
  176. package/lib/esm/Atmosphere.js.map +1 -1
  177. package/lib/esm/AuthorizationClient.js.map +1 -1
  178. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  179. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  180. package/lib/esm/Base64EncodedString.js.map +1 -1
  181. package/lib/esm/BlobReader.js.map +1 -1
  182. package/lib/esm/BriefcaseTypes.js.map +1 -1
  183. package/lib/esm/Camera.js.map +1 -1
  184. package/lib/esm/CatalogIModel.js.map +1 -1
  185. package/lib/esm/CesiumIonAssets.js.map +1 -1
  186. package/lib/esm/ChangedElements.js.map +1 -1
  187. package/lib/esm/ChangedEntities.js.map +1 -1
  188. package/lib/esm/ChangesetProps.js.map +1 -1
  189. package/lib/esm/ClipStyle.js.map +1 -1
  190. package/lib/esm/Code.js.map +1 -1
  191. package/lib/esm/ColorByName.js.map +1 -1
  192. package/lib/esm/ColorDef.js.map +1 -1
  193. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  194. package/lib/esm/ConcurrentQuery.js.map +1 -1
  195. package/lib/esm/ContextRealityModel.js.map +1 -1
  196. package/lib/esm/ContourDisplay.js.map +1 -1
  197. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  198. package/lib/esm/ECSchemaProps.js.map +1 -1
  199. package/lib/esm/ECSqlReader.js.map +1 -1
  200. package/lib/esm/ECSqlTypes.js.map +1 -1
  201. package/lib/esm/ElementMesh.js.map +1 -1
  202. package/lib/esm/ElementProps.js.map +1 -1
  203. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  204. package/lib/esm/EntityProps.js.map +1 -1
  205. package/lib/esm/EntityReference.js.map +1 -1
  206. package/lib/esm/Environment.js.map +1 -1
  207. package/lib/esm/FeatureIndex.js.map +1 -1
  208. package/lib/esm/FeatureSymbology.js.map +1 -1
  209. package/lib/esm/FeatureTable.js.map +1 -1
  210. package/lib/esm/Fonts.js.map +1 -1
  211. package/lib/esm/Frustum.js.map +1 -1
  212. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  213. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  214. package/lib/esm/GeometryContainment.js.map +1 -1
  215. package/lib/esm/GeometryParams.js.map +1 -1
  216. package/lib/esm/GeometrySummary.js.map +1 -1
  217. package/lib/esm/Gradient.js.map +1 -1
  218. package/lib/esm/GraphicParams.js.map +1 -1
  219. package/lib/esm/GroundPlane.js.map +1 -1
  220. package/lib/esm/HSLColor.js.map +1 -1
  221. package/lib/esm/HSVColor.js.map +1 -1
  222. package/lib/esm/HiddenLine.js.map +1 -1
  223. package/lib/esm/Hilite.js.map +1 -1
  224. package/lib/esm/IModel.js.map +1 -1
  225. package/lib/esm/IModelError.js.map +1 -1
  226. package/lib/esm/IModelVersion.js.map +1 -1
  227. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  228. package/lib/esm/Image.js.map +1 -1
  229. package/lib/esm/IpcAppProps.js.map +1 -1
  230. package/lib/esm/LightSettings.js.map +1 -1
  231. package/lib/esm/LinePixels.js.map +1 -1
  232. package/lib/esm/Localization.js.map +1 -1
  233. package/lib/esm/MapImagerySettings.js.map +1 -1
  234. package/lib/esm/MapLayerSettings.js.map +1 -1
  235. package/lib/esm/MassProperties.js.map +1 -1
  236. package/lib/esm/MaterialProps.js.map +1 -1
  237. package/lib/esm/ModelClipGroup.js.map +1 -1
  238. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  239. package/lib/esm/ModelProps.js.map +1 -1
  240. package/lib/esm/NativeAppProps.js.map +1 -1
  241. package/lib/esm/OctEncodedNormal.js.map +1 -1
  242. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  243. package/lib/esm/PlanarClipMask.js.map +1 -1
  244. package/lib/esm/QPoint.js.map +1 -1
  245. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  246. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  247. package/lib/esm/RenderMaterial.js.map +1 -1
  248. package/lib/esm/RenderPolyline.js.map +1 -1
  249. package/lib/esm/RenderTexture.js.map +1 -1
  250. package/lib/esm/RgbColor.js.map +1 -1
  251. package/lib/esm/RpcInterface.js.map +1 -1
  252. package/lib/esm/RpcManager.js.map +1 -1
  253. package/lib/esm/SessionProps.js.map +1 -1
  254. package/lib/esm/SkyBox.js.map +1 -1
  255. package/lib/esm/SolarCalculate.js.map +1 -1
  256. package/lib/esm/SolarShadows.js.map +1 -1
  257. package/lib/esm/SpatialClassification.js.map +1 -1
  258. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  259. package/lib/esm/SubCategoryOverride.js.map +1 -1
  260. package/lib/esm/TerrainSettings.js.map +1 -1
  261. package/lib/esm/TextureMapping.js.map +1 -1
  262. package/lib/esm/TextureProps.js.map +1 -1
  263. package/lib/esm/ThematicDisplay.js.map +1 -1
  264. package/lib/esm/Thumbnail.js.map +1 -1
  265. package/lib/esm/TileProps.js.map +1 -1
  266. package/lib/esm/Tween.js.map +1 -1
  267. package/lib/esm/TxnAction.js.map +1 -1
  268. package/lib/esm/ViewDetails.js.map +1 -1
  269. package/lib/esm/ViewFlags.js.map +1 -1
  270. package/lib/esm/ViewProps.js.map +1 -1
  271. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  272. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  273. package/lib/esm/annotation/TextBlock.js.map +1 -1
  274. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  275. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  276. package/lib/esm/annotation/TextField.js.map +1 -1
  277. package/lib/esm/annotation/TextStyle.js.map +1 -1
  278. package/lib/esm/core-common.js.map +1 -1
  279. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  280. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  281. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  282. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  283. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  284. package/lib/esm/geometry/Cartographic.js.map +1 -1
  285. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  286. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  287. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  288. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  289. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  290. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  291. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  292. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  293. package/lib/esm/geometry/LineStyle.js.map +1 -1
  294. package/lib/esm/geometry/Placement.js.map +1 -1
  295. package/lib/esm/geometry/Projection.js.map +1 -1
  296. package/lib/esm/geometry/TextString.js.map +1 -1
  297. package/lib/esm/internal/BackendTypes.js.map +1 -1
  298. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  299. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  300. package/lib/esm/internal/RenderMesh.js.map +1 -1
  301. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  302. package/lib/esm/internal/Snapping.js.map +1 -1
  303. package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
  304. package/lib/esm/internal/cross-package.js.map +1 -1
  305. package/lib/esm/ipc/IpcSession.js.map +1 -1
  306. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  307. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  308. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  309. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  310. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  311. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  312. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  313. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  314. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  315. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  316. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  317. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  318. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  319. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  320. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  321. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  322. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  323. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  324. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  325. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  326. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  327. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  328. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  329. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  330. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  331. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  332. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  333. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  334. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  335. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  336. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  337. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  338. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  339. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  340. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  341. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  342. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  343. package/lib/esm/tile/TileIO.js.map +1 -1
  344. package/lib/esm/tile/TileMetadata.js.map +1 -1
  345. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  346. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ChangedElements.js","sourceRoot":"","sources":["../../src/ChangedElements.ts"],"names":[],"mappings":";;;AAWA,uBAAuB;AAEvB;;;GAGG;AACH,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,kCAAkC;IAClC,uDAAY,CAAA;IACZ,wCAAwC;IACxC,uDAAc,CAAA;IACd,oEAAoE;IACpE,uDAAe,CAAA;IACf,kEAAkE;IAClE,yDAAiB,CAAA;IACjB,qEAAqE;IACrE,uDAAiB,CAAA;IACjB,+CAA+C;IAC/C,oDAAgB,CAAA;IAChB,qDAAqD;IACrD,oDAAiB,CAAA;AACnB,CAAC,EAfW,YAAY,4BAAZ,YAAY,QAevB","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/**\n * @packageDocumentation\n * @module Entities\n */\nimport { DbOpcode, Id64String } from \"@itwin/core-bentley\";\nimport { AxisAlignedBox3dProps } from \"./geometry/Placement\";\n\n// cspell:ignore bboxes\n\n/** Bitflags describing which aspects of an [Element]($backend) changed as part of a [[ChangedElements]].\n * @public\n * @extensions\n */\nexport enum TypeOfChange {\n /** Element contains no changes */\n NoChange = 0,\n /** A property in the element changed */\n Property = 0b1,\n /** The geometry stream of a [GeometricElement]($backend) changed */\n Geometry = 0b10,\n /** The [[Placement]] of a [GeometricElement]($backend) changed */\n Placement = 0b100,\n /** Indirect change occurred to this element by a related instance */\n Indirect = 0b1000,\n /** Hidden properties of the element changed */\n Hidden = 0b10000,\n /** The top-most parent of the element has changed */\n Parent = 0b100000,\n}\n\n/** Changed elements found in a changeset or between a range of changesets.\n * All arrays in this object will have the same number of items.\n * Each index for those arrays refer to the same element, e.g. to get the class Id of\n * the element given by element Id changedElements.elements[index], you can use changedElements.classIds[index].\n * @public\n * @extensions\n */\nexport interface ChangedElements {\n /** Ids of elements that changed */\n elements: Id64String[];\n /** ECClass Ids of elements that changed */\n classIds: Id64String[];\n /** Operation that occurred on the element. Whether the element was inserted, updated or deleted.\n * See [DbOpcode]($core-bentley)\n */\n opcodes: DbOpcode[];\n /** Type of change bitflags, see [[TypeOfChange]] */\n type: TypeOfChange[];\n /** Model Ids of the changed elements\n * This may be undefined if the agent that did the processing job did not export model Ids\n */\n modelIds?: Id64String[];\n /** Property accessor strings of properties that changed, if any, for each changed element\n * This may be undefined if the agent that did the processing job did not export properties\n */\n properties?: string[][];\n /** Before state checksums of the property value\n * Useful to determine if property values have changed\n * between the versions being inspected\n * This may be undefined if the agent that did the processing job did not export checksums\n */\n oldChecksums?: number[][];\n /** After state checksums of the property value\n * Useful to determine if property values have changed\n * between the versions being inspected\n * This may be undefined if the agent that did the processing job did not export checksums\n */\n newChecksums?: number[][];\n /**\n * Parent ids of the changed elements\n * Will be \"0\" if the element has no parent\n * This may be undefined if the agent that did the processing job did not export parent information\n */\n parentIds?: Id64String[];\n /**\n * Parent ECClass Ids of the changed elements\n * Will be \"0\" if the element has no parent\n * This may be undefined if the agent that did the processing job did not export parent information\n */\n parentClassIds?: Id64String[];\n}\n\n/** @internal */\nexport interface ChangedModels {\n modelIds: Id64String[];\n bboxes: AxisAlignedBox3dProps[];\n}\n\n/** @internal */\nexport interface ChangeData {\n changedElements: ChangedElements;\n changedModels: ChangedModels;\n}\n"]}
1
+ {"version":3,"file":"ChangedElements.js","sourceRoot":"","sources":["../../src/ChangedElements.ts"],"names":[],"mappings":";;;AAWA,uBAAuB;AAEvB;;;GAGG;AACH,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,kCAAkC;IAClC,uDAAY,CAAA;IACZ,wCAAwC;IACxC,uDAAc,CAAA;IACd,oEAAoE;IACpE,uDAAe,CAAA;IACf,kEAAkE;IAClE,yDAAiB,CAAA;IACjB,qEAAqE;IACrE,uDAAiB,CAAA;IACjB,+CAA+C;IAC/C,oDAAgB,CAAA;IAChB,qDAAqD;IACrD,oDAAiB,CAAA;AACnB,CAAC,EAfW,YAAY,4BAAZ,YAAY,QAevB","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/**\r\n * @packageDocumentation\r\n * @module Entities\r\n */\r\nimport { DbOpcode, Id64String } from \"@itwin/core-bentley\";\r\nimport { AxisAlignedBox3dProps } from \"./geometry/Placement\";\r\n\r\n// cspell:ignore bboxes\r\n\r\n/** Bitflags describing which aspects of an [Element]($backend) changed as part of a [[ChangedElements]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum TypeOfChange {\r\n /** Element contains no changes */\r\n NoChange = 0,\r\n /** A property in the element changed */\r\n Property = 0b1,\r\n /** The geometry stream of a [GeometricElement]($backend) changed */\r\n Geometry = 0b10,\r\n /** The [[Placement]] of a [GeometricElement]($backend) changed */\r\n Placement = 0b100,\r\n /** Indirect change occurred to this element by a related instance */\r\n Indirect = 0b1000,\r\n /** Hidden properties of the element changed */\r\n Hidden = 0b10000,\r\n /** The top-most parent of the element has changed */\r\n Parent = 0b100000,\r\n}\r\n\r\n/** Changed elements found in a changeset or between a range of changesets.\r\n * All arrays in this object will have the same number of items.\r\n * Each index for those arrays refer to the same element, e.g. to get the class Id of\r\n * the element given by element Id changedElements.elements[index], you can use changedElements.classIds[index].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChangedElements {\r\n /** Ids of elements that changed */\r\n elements: Id64String[];\r\n /** ECClass Ids of elements that changed */\r\n classIds: Id64String[];\r\n /** Operation that occurred on the element. Whether the element was inserted, updated or deleted.\r\n * See [DbOpcode]($core-bentley)\r\n */\r\n opcodes: DbOpcode[];\r\n /** Type of change bitflags, see [[TypeOfChange]] */\r\n type: TypeOfChange[];\r\n /** Model Ids of the changed elements\r\n * This may be undefined if the agent that did the processing job did not export model Ids\r\n */\r\n modelIds?: Id64String[];\r\n /** Property accessor strings of properties that changed, if any, for each changed element\r\n * This may be undefined if the agent that did the processing job did not export properties\r\n */\r\n properties?: string[][];\r\n /** Before state checksums of the property value\r\n * Useful to determine if property values have changed\r\n * between the versions being inspected\r\n * This may be undefined if the agent that did the processing job did not export checksums\r\n */\r\n oldChecksums?: number[][];\r\n /** After state checksums of the property value\r\n * Useful to determine if property values have changed\r\n * between the versions being inspected\r\n * This may be undefined if the agent that did the processing job did not export checksums\r\n */\r\n newChecksums?: number[][];\r\n /**\r\n * Parent ids of the changed elements\r\n * Will be \"0\" if the element has no parent\r\n * This may be undefined if the agent that did the processing job did not export parent information\r\n */\r\n parentIds?: Id64String[];\r\n /**\r\n * Parent ECClass Ids of the changed elements\r\n * Will be \"0\" if the element has no parent\r\n * This may be undefined if the agent that did the processing job did not export parent information\r\n */\r\n parentClassIds?: Id64String[];\r\n}\r\n\r\n/** @internal */\r\nexport interface ChangedModels {\r\n modelIds: Id64String[];\r\n bboxes: AxisAlignedBox3dProps[];\r\n}\r\n\r\n/** @internal */\r\nexport interface ChangeData {\r\n changedElements: ChangedElements;\r\n changedModels: ChangedModels;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ChangedEntities.js","sourceRoot":"","sources":["../../src/ChangedEntities.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 NativeApp\n */\n\nimport { CompressedId64Set, Id64String } from \"@itwin/core-bentley\";\n\n/** Describes an [Entity]($backend) and its [ECClass]($docs/bis/guide/references/glossary/#ecclass) by Id.\n * @public\n * @extensions\n */\nexport interface EntityIdAndClassId {\n /** The entity's Id. */\n id: Id64String;\n /** The Id of the entity's ECClass. */\n classId: Id64String;\n}\n\n/** JSON representation of the set of [Element]($backend)s or [Model]($backend)s that were changed by a [Txn]($docs/learning/InteractiveEditing.md).\n * @see [TxnManager.onElementsChanged]($backend) and [TxnManager.onModelsChanged]($backend).\n * @see [BriefcaseTxns.onElementsChanged]($frontend) and [BriefcaseTxns.onModelsChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ChangedEntities {\n /** The ids of entities that were inserted during the Txn. */\n inserted?: CompressedId64Set;\n /** The ids of entities that were deleted during the Txn. */\n deleted?: CompressedId64Set;\n /** The ids of entities that were modified during the Txn, including any [Element]($backend)s for which one of their [ElementAspect]($backend)s was changed. */\n updated?: CompressedId64Set;\n}\n\n/** A collection of [[EntityIdAndClassId]]s, as used by [TxnChangedEntities]($backend).\n * For efficiency, the iterator supplied by this iterable returns **the same `EntityIdAndClassId` object** on each iteration. Therefore the objects must be copied if you\n * intend to store references to them. For example, to populate an array from the iterable:\n * ```ts\n * function arrayFromIterable(entities: EntityIdAndClassIdIterable): EntityIdAndClassId[] {\n * // NO! return Array.from(entities);\n * const array = [];\n * for (const entity of entities)\n * array.push({...entity});\n *\n * return array;\n * }\n * ```\n * @public\n * @extensions\n */\nexport type EntityIdAndClassIdIterable = Iterable<Readonly<EntityIdAndClassId>>;\n"]}
1
+ {"version":3,"file":"ChangedEntities.js","sourceRoot":"","sources":["../../src/ChangedEntities.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 NativeApp\r\n */\r\n\r\nimport { CompressedId64Set, Id64String } from \"@itwin/core-bentley\";\r\n\r\n/** Describes an [Entity]($backend) and its [ECClass]($docs/bis/guide/references/glossary/#ecclass) by Id.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EntityIdAndClassId {\r\n /** The entity's Id. */\r\n id: Id64String;\r\n /** The Id of the entity's ECClass. */\r\n classId: Id64String;\r\n}\r\n\r\n/** JSON representation of the set of [Element]($backend)s or [Model]($backend)s that were changed by a [Txn]($docs/learning/InteractiveEditing.md).\r\n * @see [TxnManager.onElementsChanged]($backend) and [TxnManager.onModelsChanged]($backend).\r\n * @see [BriefcaseTxns.onElementsChanged]($frontend) and [BriefcaseTxns.onModelsChanged]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChangedEntities {\r\n /** The ids of entities that were inserted during the Txn. */\r\n inserted?: CompressedId64Set;\r\n /** The ids of entities that were deleted during the Txn. */\r\n deleted?: CompressedId64Set;\r\n /** The ids of entities that were modified during the Txn, including any [Element]($backend)s for which one of their [ElementAspect]($backend)s was changed. */\r\n updated?: CompressedId64Set;\r\n}\r\n\r\n/** A collection of [[EntityIdAndClassId]]s, as used by [TxnChangedEntities]($backend).\r\n * For efficiency, the iterator supplied by this iterable returns **the same `EntityIdAndClassId` object** on each iteration. Therefore the objects must be copied if you\r\n * intend to store references to them. For example, to populate an array from the iterable:\r\n * ```ts\r\n * function arrayFromIterable(entities: EntityIdAndClassIdIterable): EntityIdAndClassId[] {\r\n * // NO! return Array.from(entities);\r\n * const array = [];\r\n * for (const entity of entities)\r\n * array.push({...entity});\r\n *\r\n * return array;\r\n * }\r\n * ```\r\n * @public\r\n * @extensions\r\n */\r\nexport type EntityIdAndClassIdIterable = Iterable<Readonly<EntityIdAndClassId>>;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ChangesetProps.js","sourceRoot":"","sources":["../../src/ChangesetProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;;GAGG;;;AAuCH;;;GAGG;AACH,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,mDAAmD;IACnD,uDAAW,CAAA;IACX,+CAA+C;IAC/C,qDAAU,CAAA;IACV,gEAAgE;IAChE,8DAAwB,CAAA;AAC1B,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB","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/**\n * @packageDocumentation\n * @module iModels\n */\n\n/** @public */\nexport type LocalFileName = string;\n/** @public */\nexport type LocalDirName = string;\n\n/** A string that identifies a changeset.\n * @note this string is *not* a Guid. It is generated internally based on the content of the changeset.\n * @public\n * @extensions\n */\nexport type ChangesetId = string;\n\n/** The index of a changeset, assigned by iModelHub.\n * @note 0 means \"before the first changeset.\" Values less than 0 are invalid.\n * @public\n * @extensions\n */\nexport type ChangesetIndex = number;\n\n/** Both the index and Id of a changeset\n * @public\n * @extensions\n */\nexport interface ChangesetIndexAndId { readonly index: ChangesetIndex, readonly id: ChangesetId }\n\n/** The Id and optionally the index of a changeset\n * @public\n * @extensions\n */\nexport interface ChangesetIdWithIndex { readonly index?: ChangesetIndex, readonly id: ChangesetId }\n\n/** either changeset index, id, or both\n* @public\n * @extensions\n*/\nexport type ChangesetIndexOrId = ChangesetIndexAndId | { readonly index: ChangesetIndex, readonly id?: never } | { readonly id: ChangesetId, readonly index?: never };\n\n/** Value to indicate whether a changeset contains schema changes or not\n * @public\n * @extensions\n */\nexport enum ChangesetType {\n /** changeset does *not* contain schema changes. */\n Regular = 0,\n /** changeset *does* contain schema changes. */\n Schema = 1,\n /** Schema changeset pushed by iModel with SchemaSync enabled */\n SchemaSync = Schema | 64,\n}\n\n/** Properties of a changeset\n * @public\n */\nexport interface ChangesetProps {\n /** The index (sequence number) from IModelHub for this changeset. Larger index values were pushed later. */\n index: ChangesetIndex;\n /** the ChangesetId */\n id: ChangesetId;\n /** the ChangeSetId of the parent changeset of this changeset */\n parentId: ChangesetId;\n /** The type of changeset */\n changesType: ChangesetType;\n /** The user-supplied description of the work this changeset holds */\n description: string;\n /** The BriefcaseId of the briefcase that created this changeset */\n briefcaseId: number;\n /** The date this changeset was uploaded to the hub */\n pushDate: string;\n /** The identity of the user that created this changeset */\n userCreated: string;\n /** The size, in bytes, of this changeset */\n size: number;\n /** The uncompressed size, in bytes, of this changeset */\n uncompressedSize?: number;\n}\n\n/** Properties of a changeset file\n * @public\n */\nexport interface ChangesetFileProps extends ChangesetProps {\n /** The full pathname of the local file holding this changeset. */\n pathname: LocalFileName;\n}\n\n/**\n * A range of changesets\n * @public\n * @extensions\n */\nexport interface ChangesetRange {\n /** index of the first changeset */\n first: ChangesetIndex;\n /** index of last changeset. If undefined, all changesets after first are returned. */\n end?: ChangesetIndex;\n}\n\n/**\n * Statistics for a single SQL statement executed during changeset application.\n * @beta\n */\nexport interface PerStatementHealthStats {\n sqlStatement: string;\n dbOperation: string;\n rowCount: number;\n elapsedMs: number;\n fullTableScans: number;\n}\n\n/**\n * Aggregated health statistics for a changeset application.\n * @beta\n */\nexport interface ChangesetHealthStats {\n changesetId: string;\n changesetIndex: number;\n uncompressedSizeBytes: number;\n sha1ValidationTimeMs: number;\n insertedRows: number;\n updatedRows: number;\n deletedRows: number;\n totalElapsedMs: number;\n totalFullTableScans: number;\n perStatementStats: [PerStatementHealthStats];\n}\n"]}
1
+ {"version":3,"file":"ChangesetProps.js","sourceRoot":"","sources":["../../src/ChangesetProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;;GAGG;;;AAuCH;;;GAGG;AACH,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,mDAAmD;IACnD,uDAAW,CAAA;IACX,+CAA+C;IAC/C,qDAAU,CAAA;IACV,gEAAgE;IAChE,8DAAwB,CAAA;AAC1B,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB","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/**\r\n * @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\n/** @public */\r\nexport type LocalFileName = string;\r\n/** @public */\r\nexport type LocalDirName = string;\r\n\r\n/** A string that identifies a changeset.\r\n * @note this string is *not* a Guid. It is generated internally based on the content of the changeset.\r\n * @public\r\n * @extensions\r\n */\r\nexport type ChangesetId = string;\r\n\r\n/** The index of a changeset, assigned by iModelHub.\r\n * @note 0 means \"before the first changeset.\" Values less than 0 are invalid.\r\n * @public\r\n * @extensions\r\n */\r\nexport type ChangesetIndex = number;\r\n\r\n/** Both the index and Id of a changeset\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChangesetIndexAndId { readonly index: ChangesetIndex, readonly id: ChangesetId }\r\n\r\n/** The Id and optionally the index of a changeset\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChangesetIdWithIndex { readonly index?: ChangesetIndex, readonly id: ChangesetId }\r\n\r\n/** either changeset index, id, or both\r\n* @public\r\n * @extensions\r\n*/\r\nexport type ChangesetIndexOrId = ChangesetIndexAndId | { readonly index: ChangesetIndex, readonly id?: never } | { readonly id: ChangesetId, readonly index?: never };\r\n\r\n/** Value to indicate whether a changeset contains schema changes or not\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ChangesetType {\r\n /** changeset does *not* contain schema changes. */\r\n Regular = 0,\r\n /** changeset *does* contain schema changes. */\r\n Schema = 1,\r\n /** Schema changeset pushed by iModel with SchemaSync enabled */\r\n SchemaSync = Schema | 64,\r\n}\r\n\r\n/** Properties of a changeset\r\n * @public\r\n */\r\nexport interface ChangesetProps {\r\n /** The index (sequence number) from IModelHub for this changeset. Larger index values were pushed later. */\r\n index: ChangesetIndex;\r\n /** the ChangesetId */\r\n id: ChangesetId;\r\n /** the ChangeSetId of the parent changeset of this changeset */\r\n parentId: ChangesetId;\r\n /** The type of changeset */\r\n changesType: ChangesetType;\r\n /** The user-supplied description of the work this changeset holds */\r\n description: string;\r\n /** The BriefcaseId of the briefcase that created this changeset */\r\n briefcaseId: number;\r\n /** The date this changeset was uploaded to the hub */\r\n pushDate: string;\r\n /** The identity of the user that created this changeset */\r\n userCreated: string;\r\n /** The size, in bytes, of this changeset */\r\n size: number;\r\n /** The uncompressed size, in bytes, of this changeset */\r\n uncompressedSize?: number;\r\n}\r\n\r\n/** Properties of a changeset file\r\n * @public\r\n */\r\nexport interface ChangesetFileProps extends ChangesetProps {\r\n /** The full pathname of the local file holding this changeset. */\r\n pathname: LocalFileName;\r\n}\r\n\r\n/**\r\n * A range of changesets\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChangesetRange {\r\n /** index of the first changeset */\r\n first: ChangesetIndex;\r\n /** index of last changeset. If undefined, all changesets after first are returned. */\r\n end?: ChangesetIndex;\r\n}\r\n\r\n/**\r\n * Statistics for a single SQL statement executed during changeset application.\r\n * @beta\r\n */\r\nexport interface PerStatementHealthStats {\r\n sqlStatement: string;\r\n dbOperation: string;\r\n rowCount: number;\r\n elapsedMs: number;\r\n fullTableScans: number;\r\n}\r\n\r\n/**\r\n * Aggregated health statistics for a changeset application.\r\n * @beta\r\n */\r\nexport interface ChangesetHealthStats {\r\n changesetId: string;\r\n changesetIndex: number;\r\n uncompressedSizeBytes: number;\r\n sha1ValidationTimeMs: number;\r\n insertedRows: number;\r\n updatedRows: number;\r\n deletedRows: number;\r\n totalElapsedMs: number;\r\n totalFullTableScans: number;\r\n perStatementStats: [PerStatementHealthStats];\r\n}\r\n"]}
@@ -1 +1 @@
1
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M;QACX,IAAI,IAAI,CAAC,eAAe;YACtB,OAAO,SAAS,CAAC;QAEnB,MAAM,KAAK,GAAmB,EAAE,CAAC;QACjC,IAAI,IAAI,CAAC,kBAAkB;YACzB,KAAK,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAElC,IAAI,IAAI,CAAC,oBAAoB;YAC3B,KAAK,CAAC,oBAAoB,GAAG,IAAI,CAAC;QAEpC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACxC,IAAI,QAAQ,EAAE,CAAC;YACb,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YACvC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC5B,CAAC;QAED,IAAI,IAAI,CAAC,WAAW;YAClB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAEhD,IAAI,IAAI,CAAC,YAAY;YACnB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAElD,IAAI,IAAI,CAAC,iBAAiB;YACxB,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;QAE5D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uHAAuH;IACvH,IAAW,eAAe;QACxB,IAAI,IAAI,KAAK,SAAS,CAAC,QAAQ;YAC7B,OAAO,IAAI,CAAC;QAEd,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACvK,CAAC;;AA/GH,8BAgHC","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 { assert, JsonUtils } from \"@itwin/core-bentley\";\nimport { ViewFlagOverrides } from \"./ViewFlags\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\nimport { HiddenLine } from \"./HiddenLine\";\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\nimport { ColorDef } from \"./ColorDef\";\n\n/** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry).\n * @see [[ClipStyleProps.cutStyle]].\n * @public\n * @extensions\n */\nexport interface CutStyleProps {\n /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */\n viewflags?: ViewFlagOverrides;\n /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */\n hiddenLine?: HiddenLine.SettingsProps;\n /** If defined, overrides aspects of the cut geometry's symbology. */\n appearance?: FeatureAppearanceProps;\n}\n\n/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.\n * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.\n * @public\n */\nexport class CutStyle {\n /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */\n public readonly viewflags: Readonly<ViewFlagOverrides>;\n /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */\n public readonly hiddenLine?: HiddenLine.Settings;\n /** If defined, overrides aspects of the symbology of the section-cut graphics. */\n public readonly appearance?: FeatureAppearance;\n\n /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */\n public static readonly defaults = new CutStyle();\n\n private constructor(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance) {\n this.viewflags = viewflags ?? {};\n if (hiddenLine && !hiddenLine.matchesDefaults)\n this.hiddenLine = hiddenLine;\n\n if (appearance && !appearance.matchesDefaults)\n this.appearance = appearance;\n }\n\n /** Create a CutStyle from its components. */\n public static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle {\n if ((viewflags && JsonUtils.isNonEmptyObject(viewflags)) || (hiddenLine && !hiddenLine.matchesDefaults) || (appearance && !appearance.matchesDefaults))\n return new CutStyle(viewflags, hiddenLine, appearance);\n\n return this.defaults;\n }\n\n public static fromJSON(props?: CutStyleProps): CutStyle {\n if (JsonUtils.isNonEmptyObject(props)) {\n const viewflags = { ...props?.viewflags };\n const hiddenLine = props?.hiddenLine ? HiddenLine.Settings.fromJSON(props.hiddenLine) : undefined;\n const appearance = props?.appearance ? FeatureAppearance.fromJSON(props.appearance) : undefined;\n\n return this.create(viewflags, hiddenLine, appearance);\n } else {\n return this.defaults;\n }\n }\n\n /** Return JSON representation. The representation is `undefined` if this style matches the default style. */\n public toJSON(): CutStyleProps | undefined {\n if (this.matchesDefaults)\n return undefined;\n\n const props: CutStyleProps = {};\n if (JsonUtils.isNonEmptyObject(this.viewflags))\n props.viewflags = this.viewflags;\n\n if (this.hiddenLine && !this.hiddenLine.matchesDefaults)\n props.hiddenLine = this.hiddenLine?.toJSON();\n\n if (this.appearance && !this.appearance.matchesDefaults)\n props.appearance = this.appearance.toJSON();\n\n return props;\n }\n\n /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */\n public get matchesDefaults(): boolean {\n if (this === CutStyle.defaults)\n return true;\n\n return !JsonUtils.isNonEmptyObject(this.viewflags) && (!this.hiddenLine || this.hiddenLine.matchesDefaults) && (!this.appearance || this.appearance.matchesDefaults);\n }\n}\n\n/** Wire format describing a [[ClipIntersectionStyle]].\n * @see [[ClipStyleProps.ClipIntersectionStyle]].\n * @public\n * @extensions\n */\nexport interface ClipIntersectionStyleProps {\n /** Color to apply to intersection of geometry and clip planes, default white */\n color?: RgbColorProps;\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\n width?: number;\n}\n\n/** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.\n * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.\n * @public\n * @extensions\n */\nexport class ClipIntersectionStyle {\n /** Color to apply to intersection of geometry and clip planes, default white */\n public readonly color: RgbColor;\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\n public readonly width: number;\n\n private constructor(color: RgbColor = RgbColor.fromColorDef(ColorDef.white), width: number = 1) {\n this.color = color;\n this.width = width;\n }\n /** Create a highlight from its components. */\n public static create(color?: RgbColor, width?: number): ClipIntersectionStyle {\n if (!color && !width)\n return this.defaults;\n\n return new ClipIntersectionStyle(color, width);\n }\n\n public static readonly defaults = new ClipIntersectionStyle();\n\n public static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle {\n if (props === undefined) {\n return ClipIntersectionStyle.defaults;\n }\n\n const color = props.color ? RgbColor.fromJSON(props.color) : RgbColor.fromColorDef(ColorDef.white);\n const width = props.width ? props.width : 1;\n return new ClipIntersectionStyle(color, width);\n }\n\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\n public toJSON(): ClipIntersectionStyleProps | undefined {\n const props: ClipIntersectionStyleProps = {};\n\n if (this.matchesDefaults) {\n return undefined;\n }\n\n if (this.color)\n props.color = this.color.toJSON();\n\n if (this.width)\n props.width = this.width;\n\n return props;\n }\n\n public get matchesDefaults(): boolean {\n if (this === ClipIntersectionStyle.defaults)\n return true;\n\n return !this.color && !this.width;\n }\n}\n\n/** Arguments supplied to [[ClipStyle.create]].\n * @public\n * @extensions\n */\nexport interface ClipStyleCreateArgs {\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n produceCutGeometry?: boolean;\n /** If `true`, intersection of geometry and clip planes will be colorized */\n colorizeIntersection?: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n cutStyle?: CutStyle;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n insideColor?: RgbColor;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n outsideColor?: RgbColor;\n /** Controls the style of the intersection of geometry and clip planes */\n intersectionStyle?: ClipIntersectionStyle;\n}\n\n/** Wire format describing a [[ClipStyle]].\n * @see [[DisplayStyleSettingsProps.clipStyle]].\n * @public\n * @extensions\n */\nexport interface ClipStyleProps {\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n produceCutGeometry?: boolean;\n /** If 'true', intersection of geometry and clip planes will be colorized */\n colorizeIntersection?: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n cutStyle?: CutStyleProps;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n insideColor?: RgbColorProps;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n outsideColor?: RgbColorProps;\n /** Controls the style of the intersection of geometry and clip planes */\n intersectionStyle?: ClipIntersectionStyleProps;\n}\n\n/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].\n * @see [[DisplayStyleSettings.clipStyle]].\n * @public\n */\nexport class ClipStyle {\n /** If `true`, geometry will be produced at the clip planes.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n public readonly produceCutGeometry: boolean;\n /** If 'true', intersection of geometry and clip planes will be colorized */\n public readonly colorizeIntersection: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n public readonly cutStyle: CutStyle;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n public readonly insideColor?: RgbColor;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n public readonly outsideColor?: RgbColor;\n /** Controls the style of the intersection of geometry and clip planes */\n public readonly intersectionStyle?: ClipIntersectionStyle;\n\n /** The default style, which overrides none of the view's settings. */\n public static readonly defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);\n\n private constructor(produceCutGeometry: boolean, colorizeIntersection: boolean, cutStyle: CutStyle, inside: RgbColor | undefined, outside: RgbColor | undefined, intersectionStyle: ClipIntersectionStyle | undefined) {\n this.produceCutGeometry = produceCutGeometry;\n this.colorizeIntersection = colorizeIntersection;\n this.cutStyle = cutStyle;\n this.insideColor = inside;\n this.outsideColor = outside;\n this.intersectionStyle = intersectionStyle;\n }\n\n /** @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use [[create(style: ClipStyleCreateArgs]] */\n public static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;\n\n /** Create a style from its components. */\n public static create(style: ClipStyleCreateArgs): ClipStyle;\n\n /** @internal */\n public static create(styleOrProduceCutGeometry: ClipStyleCreateArgs | boolean, cutStyle?: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle {\n\n if (typeof styleOrProduceCutGeometry === \"boolean\") {\n cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;\n\n if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {\n return this.defaults;\n }\n\n return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);\n }\n\n const style = styleOrProduceCutGeometry;\n if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)\n return this.defaults;\n\n const produceCutGeometry = style.produceCutGeometry ? true : false;\n const colorizeIntersection = style.colorizeIntersection ? true : false;\n cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;\n\n return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);\n }\n\n public static fromJSON(props?: ClipStyleProps): ClipStyle {\n if (JsonUtils.isNonEmptyObject(props)) {\n const produceCutGeometry = props.produceCutGeometry ?? false;\n const colorizeIntersection = props.colorizeIntersection ? true : false;\n const cutStyle = CutStyle.fromJSON(props.cutStyle);\n const insideColor = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;\n const outsideColor = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;\n const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;\n\n return this.create({ produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle });\n }\n\n return this.defaults;\n }\n\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\n public toJSON(): ClipStyleProps | undefined {\n if (this.matchesDefaults)\n return undefined;\n\n const props: ClipStyleProps = {};\n if (this.produceCutGeometry)\n props.produceCutGeometry = true;\n\n if (this.colorizeIntersection)\n props.colorizeIntersection = true;\n\n const cutStyle = this.cutStyle.toJSON();\n if (cutStyle) {\n assert(!this.cutStyle.matchesDefaults);\n props.cutStyle = cutStyle;\n }\n\n if (this.insideColor)\n props.insideColor = this.insideColor.toJSON();\n\n if (this.outsideColor)\n props.outsideColor = this.outsideColor.toJSON();\n\n if (this.intersectionStyle)\n props.intersectionStyle = this.intersectionStyle.toJSON();\n\n return props;\n }\n\n /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */\n public get matchesDefaults(): boolean {\n if (this === ClipStyle.defaults)\n return true;\n\n return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;\n }\n}\n"]}
1
+ {"version":3,"file":"ClipStyle.js","sourceRoot":"","sources":["../../src/ClipStyle.ts"],"names":[],"mappings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KAAK,GAAmB,EAAE,CAAC;QACjC,IAAI,IAAI,CAAC,kBAAkB;YACzB,KAAK,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAElC,IAAI,IAAI,CAAC,oBAAoB;YAC3B,KAAK,CAAC,oBAAoB,GAAG,IAAI,CAAC;QAEpC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACxC,IAAI,QAAQ,EAAE,CAAC;YACb,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YACvC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC5B,CAAC;QAED,IAAI,IAAI,CAAC,WAAW;YAClB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAEhD,IAAI,IAAI,CAAC,YAAY;YACnB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAElD,IAAI,IAAI,CAAC,iBAAiB;YACxB,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;QAE5D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uHAAuH;IACvH,IAAW,eAAe;QACxB,IAAI,IAAI,KAAK,SAAS,CAAC,QAAQ;YAC7B,OAAO,IAAI,CAAC;QAEd,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACvK,CAAC;;AA/GH,8BAgHC","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 { assert, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { ViewFlagOverrides } from \"./ViewFlags\";\r\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\r\nimport { HiddenLine } from \"./HiddenLine\";\r\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry).\r\n * @see [[ClipStyleProps.cutStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CutStyleProps {\r\n /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */\r\n viewflags?: ViewFlagOverrides;\r\n /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */\r\n hiddenLine?: HiddenLine.SettingsProps;\r\n /** If defined, overrides aspects of the cut geometry's symbology. */\r\n appearance?: FeatureAppearanceProps;\r\n}\r\n\r\n/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.\r\n * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.\r\n * @public\r\n */\r\nexport class CutStyle {\r\n /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */\r\n public readonly viewflags: Readonly<ViewFlagOverrides>;\r\n /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */\r\n public readonly hiddenLine?: HiddenLine.Settings;\r\n /** If defined, overrides aspects of the symbology of the section-cut graphics. */\r\n public readonly appearance?: FeatureAppearance;\r\n\r\n /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */\r\n public static readonly defaults = new CutStyle();\r\n\r\n private constructor(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance) {\r\n this.viewflags = viewflags ?? {};\r\n if (hiddenLine && !hiddenLine.matchesDefaults)\r\n this.hiddenLine = hiddenLine;\r\n\r\n if (appearance && !appearance.matchesDefaults)\r\n this.appearance = appearance;\r\n }\r\n\r\n /** Create a CutStyle from its components. */\r\n public static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle {\r\n if ((viewflags && JsonUtils.isNonEmptyObject(viewflags)) || (hiddenLine && !hiddenLine.matchesDefaults) || (appearance && !appearance.matchesDefaults))\r\n return new CutStyle(viewflags, hiddenLine, appearance);\r\n\r\n return this.defaults;\r\n }\r\n\r\n public static fromJSON(props?: CutStyleProps): CutStyle {\r\n if (JsonUtils.isNonEmptyObject(props)) {\r\n const viewflags = { ...props?.viewflags };\r\n const hiddenLine = props?.hiddenLine ? HiddenLine.Settings.fromJSON(props.hiddenLine) : undefined;\r\n const appearance = props?.appearance ? FeatureAppearance.fromJSON(props.appearance) : undefined;\r\n\r\n return this.create(viewflags, hiddenLine, appearance);\r\n } else {\r\n return this.defaults;\r\n }\r\n }\r\n\r\n /** Return JSON representation. The representation is `undefined` if this style matches the default style. */\r\n public toJSON(): CutStyleProps | undefined {\r\n if (this.matchesDefaults)\r\n return undefined;\r\n\r\n const props: CutStyleProps = {};\r\n if (JsonUtils.isNonEmptyObject(this.viewflags))\r\n props.viewflags = this.viewflags;\r\n\r\n if (this.hiddenLine && !this.hiddenLine.matchesDefaults)\r\n props.hiddenLine = this.hiddenLine?.toJSON();\r\n\r\n if (this.appearance && !this.appearance.matchesDefaults)\r\n props.appearance = this.appearance.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */\r\n public get matchesDefaults(): boolean {\r\n if (this === CutStyle.defaults)\r\n return true;\r\n\r\n return !JsonUtils.isNonEmptyObject(this.viewflags) && (!this.hiddenLine || this.hiddenLine.matchesDefaults) && (!this.appearance || this.appearance.matchesDefaults);\r\n }\r\n}\r\n\r\n/** Wire format describing a [[ClipIntersectionStyle]].\r\n * @see [[ClipStyleProps.ClipIntersectionStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipIntersectionStyleProps {\r\n /** Color to apply to intersection of geometry and clip planes, default white */\r\n color?: RgbColorProps;\r\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\r\n width?: number;\r\n}\r\n\r\n/** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.\r\n * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.\r\n * @public\r\n * @extensions\r\n */\r\nexport class ClipIntersectionStyle {\r\n /** Color to apply to intersection of geometry and clip planes, default white */\r\n public readonly color: RgbColor;\r\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\r\n public readonly width: number;\r\n\r\n private constructor(color: RgbColor = RgbColor.fromColorDef(ColorDef.white), width: number = 1) {\r\n this.color = color;\r\n this.width = width;\r\n }\r\n /** Create a highlight from its components. */\r\n public static create(color?: RgbColor, width?: number): ClipIntersectionStyle {\r\n if (!color && !width)\r\n return this.defaults;\r\n\r\n return new ClipIntersectionStyle(color, width);\r\n }\r\n\r\n public static readonly defaults = new ClipIntersectionStyle();\r\n\r\n public static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle {\r\n if (props === undefined) {\r\n return ClipIntersectionStyle.defaults;\r\n }\r\n\r\n const color = props.color ? RgbColor.fromJSON(props.color) : RgbColor.fromColorDef(ColorDef.white);\r\n const width = props.width ? props.width : 1;\r\n return new ClipIntersectionStyle(color, width);\r\n }\r\n\r\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\r\n public toJSON(): ClipIntersectionStyleProps | undefined {\r\n const props: ClipIntersectionStyleProps = {};\r\n\r\n if (this.matchesDefaults) {\r\n return undefined;\r\n }\r\n\r\n if (this.color)\r\n props.color = this.color.toJSON();\r\n\r\n if (this.width)\r\n props.width = this.width;\r\n\r\n return props;\r\n }\r\n\r\n public get matchesDefaults(): boolean {\r\n if (this === ClipIntersectionStyle.defaults)\r\n return true;\r\n\r\n return !this.color && !this.width;\r\n }\r\n}\r\n\r\n/** Arguments supplied to [[ClipStyle.create]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipStyleCreateArgs {\r\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n produceCutGeometry?: boolean;\r\n /** If `true`, intersection of geometry and clip planes will be colorized */\r\n colorizeIntersection?: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n cutStyle?: CutStyle;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n insideColor?: RgbColor;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n outsideColor?: RgbColor;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n intersectionStyle?: ClipIntersectionStyle;\r\n}\r\n\r\n/** Wire format describing a [[ClipStyle]].\r\n * @see [[DisplayStyleSettingsProps.clipStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipStyleProps {\r\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n produceCutGeometry?: boolean;\r\n /** If 'true', intersection of geometry and clip planes will be colorized */\r\n colorizeIntersection?: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n cutStyle?: CutStyleProps;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n insideColor?: RgbColorProps;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n outsideColor?: RgbColorProps;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n intersectionStyle?: ClipIntersectionStyleProps;\r\n}\r\n\r\n/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].\r\n * @see [[DisplayStyleSettings.clipStyle]].\r\n * @public\r\n */\r\nexport class ClipStyle {\r\n /** If `true`, geometry will be produced at the clip planes.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n public readonly produceCutGeometry: boolean;\r\n /** If 'true', intersection of geometry and clip planes will be colorized */\r\n public readonly colorizeIntersection: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n public readonly cutStyle: CutStyle;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n public readonly insideColor?: RgbColor;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n public readonly outsideColor?: RgbColor;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n public readonly intersectionStyle?: ClipIntersectionStyle;\r\n\r\n /** The default style, which overrides none of the view's settings. */\r\n public static readonly defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);\r\n\r\n private constructor(produceCutGeometry: boolean, colorizeIntersection: boolean, cutStyle: CutStyle, inside: RgbColor | undefined, outside: RgbColor | undefined, intersectionStyle: ClipIntersectionStyle | undefined) {\r\n this.produceCutGeometry = produceCutGeometry;\r\n this.colorizeIntersection = colorizeIntersection;\r\n this.cutStyle = cutStyle;\r\n this.insideColor = inside;\r\n this.outsideColor = outside;\r\n this.intersectionStyle = intersectionStyle;\r\n }\r\n\r\n /** @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use [[create(style: ClipStyleCreateArgs]] */\r\n public static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;\r\n\r\n /** Create a style from its components. */\r\n public static create(style: ClipStyleCreateArgs): ClipStyle;\r\n\r\n /** @internal */\r\n public static create(styleOrProduceCutGeometry: ClipStyleCreateArgs | boolean, cutStyle?: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle {\r\n\r\n if (typeof styleOrProduceCutGeometry === \"boolean\") {\r\n cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;\r\n\r\n if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {\r\n return this.defaults;\r\n }\r\n\r\n return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);\r\n }\r\n\r\n const style = styleOrProduceCutGeometry;\r\n if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)\r\n return this.defaults;\r\n\r\n const produceCutGeometry = style.produceCutGeometry ? true : false;\r\n const colorizeIntersection = style.colorizeIntersection ? true : false;\r\n cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;\r\n\r\n return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);\r\n }\r\n\r\n public static fromJSON(props?: ClipStyleProps): ClipStyle {\r\n if (JsonUtils.isNonEmptyObject(props)) {\r\n const produceCutGeometry = props.produceCutGeometry ?? false;\r\n const colorizeIntersection = props.colorizeIntersection ? true : false;\r\n const cutStyle = CutStyle.fromJSON(props.cutStyle);\r\n const insideColor = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;\r\n const outsideColor = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;\r\n const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;\r\n\r\n return this.create({ produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle });\r\n }\r\n\r\n return this.defaults;\r\n }\r\n\r\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\r\n public toJSON(): ClipStyleProps | undefined {\r\n if (this.matchesDefaults)\r\n return undefined;\r\n\r\n const props: ClipStyleProps = {};\r\n if (this.produceCutGeometry)\r\n props.produceCutGeometry = true;\r\n\r\n if (this.colorizeIntersection)\r\n props.colorizeIntersection = true;\r\n\r\n const cutStyle = this.cutStyle.toJSON();\r\n if (cutStyle) {\r\n assert(!this.cutStyle.matchesDefaults);\r\n props.cutStyle = cutStyle;\r\n }\r\n\r\n if (this.insideColor)\r\n props.insideColor = this.insideColor.toJSON();\r\n\r\n if (this.outsideColor)\r\n props.outsideColor = this.outsideColor.toJSON();\r\n\r\n if (this.intersectionStyle)\r\n props.intersectionStyle = this.intersectionStyle.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */\r\n public get matchesDefaults(): boolean {\r\n if (this === ClipStyle.defaults)\r\n return true;\r\n\r\n return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../src/Code.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8E;AAwB9E;;;GAGG;AACH,MAAa,IAAI;IACf,8FAA8F;IACvF,IAAI,CAAa;IACxB,+FAA+F;IACxF,KAAK,CAAa;IACzB;;OAEG;IACH,IAAW,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;IAChD,IAAW,KAAK,CAAC,GAAW,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACpD,MAAM,CAAU;IAExB,YAAY,SAAoB;QAC9B,IAAI,CAAC,IAAI,GAAG,mBAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,KAA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gB,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC;IAC5I,CAAC;IACD,IAAW,QAAQ,CAAC,GAAmC;QACrD,IAAI,aAAa,CAAC,gBAAgB,CAAC,cAAc,KAAK,GAAG;YACvD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC;;YAE/C,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC;IACxD,CAAC;CACF;AA7DD,4BA6DC","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 Codes\n */\n\nimport { GuidString, Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { IModel } from \"./IModel\";\n\n/**\n * The ElementId of the element that defines the scope for a Code value.\n * @note For insert or update, you may supply the FederationGuid of the scope element and it will be converted to the ElementId of that element.\n * @public\n * @extensions\n */\nexport type CodeScopeProps = Id64String | GuidString;\n\n/** The parameters that define a Code\n * @public\n * @extensions\n */\nexport interface CodeProps {\n /** Either the stringified 64-bit Id of the CodeSpec for this code, or the name of the CodeSpec. */\n spec: Id64String | string;\n /** Either the ElementId or the FederationGuid of the element that provides the scope for this code. */\n scope: CodeScopeProps;\n /** the value of this code. May be undefined. */\n value?: string;\n}\n\n/**\n * A three-part structure containing information about the [Code]($docs/bis/guide/fundamentals/codes) of an Element\n * @public\n */\nexport class Code implements CodeProps {\n /** The id of the [CodeSpec]($docs/bis/guide/fundamentals/codes.md#codespec) of the Element */\n public spec: Id64String;\n /** The [CodeScope]($docs/bis/guide/fundamentals/codes.md#codescope-property) of the Element */\n public scope: Id64String;\n /** The [CodeValue]($docs/bis/guide/fundamentals/codes.md#codevalue-property) of the Element\n * @note Leading and trailing whitespace is invalid so is automatically trimmed.\n */\n public get value() { return this._value ?? \"\"; }\n public set value(val: string) { this._value = val?.trim(); }\n private _value?: string;\n\n constructor(codeProps: CodeProps) {\n this.spec = Id64.fromJSON(codeProps.spec);\n this.scope = JsonUtils.asString(codeProps.scope);\n this.value = JsonUtils.asString(codeProps.value);\n }\n\n /** Create an empty, non-unique code with no special meaning. */\n public static createEmpty(): Code {\n const id = Id64.fromLocalAndBriefcaseIds(1, 0);\n return new Code({ spec: id, scope: id });\n }\n\n public static fromJSON(json?: any): Code { return json ? new Code(json) : Code.createEmpty(); }\n public toJSON(): CodeProps { return { spec: this.spec, scope: this.scope, value: this.value }; }\n public equals(other: Code): boolean { return Code.equalCodes(this, other); }\n /** @internal */\n public static equalCodes(c1: CodeProps, c2: CodeProps): boolean {\n return c1.spec === c2.spec && c1.scope === c2.scope && c1.value === c2.value;\n }\n /** Determine whether this Code is valid. */\n public static isValid(c: CodeProps): boolean { return Id64.isValidId64(c.spec); }\n /** Determine if this code is valid but not otherwise meaningful (and therefore not necessarily unique) */\n public static isEmpty(c: CodeProps): boolean { return this.isValid(c) && (c.value === undefined || c.value === \"\"); }\n\n public toString(): string { return `[Code: ${this.spec}, ${this.scope}, ${this.value}]`; }\n}\n\n/** Names of the internal BIS CodeSpecs. These names match those specified by the native library.\n * For other domains, the best practice is to include the domain name or alias as part of the CodeSpec name to ensure global uniqueness.\n * @public\n* @extensions\n* @see [CodeSpec]($docs/bis/guide/fundamentals/codes.md#codespec)\n */\nexport enum BisCodeSpec {\n /** The name of the standard [[CodeSpec]] used when creating *empty* codes.\n * @see [[Code.createEmpty]]\n */\n nullCodeSpec = \"bis:NullCodeSpec\",\n /** @internal */\n annotationFrameStyle = \"bis:AnnotationFrameStyle\",\n /** @internal */\n annotationLeaderStyle = \"bis:AnnotationLeaderStyle\",\n /** @internal */\n annotationTextStyle = \"bis:AnnotationTextStyle\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystem2d]($backend) elements.\n * @see [AuxCoordSystem2d.createCode]($backend)\n */\n auxCoordSystem2d = \"bis:AuxCoordSystem2d\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystem3d]($backend) elements.\n * @see [AuxCoordSystem3d.createCode]($backend)\n */\n auxCoordSystem3d = \"bis:AuxCoordSystem3d\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystemSpatial]($backend) elements.\n * @see [AuxCoordSystemSpatial.createCode]($backend)\n */\n auxCoordSystemSpatial = \"bis:AuxCoordSystemSpatial\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [CategorySelector]($backend) elements.\n * @see [CategorySelector.createCode]($backend)\n */\n categorySelector = \"bis:CategorySelector\",\n /** @internal */\n colorBook = \"bis:ColorBook\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [DisplayStyle]($backend) elements.\n * @see [DisplayStyle.createCode]($backend)\n */\n displayStyle = \"bis:DisplayStyle\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [Drawing]($backend) elements.\n * @see [Drawing.createCode]($backend)\n */\n drawing = \"bis:Drawing\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [DrawingCategory]($backend) elements.\n * @see [DrawingCategory.createCode]($backend)\n */\n drawingCategory = \"bis:DrawingCategory\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [ExternalSource]($backend) elements.\n * @note This CodeSpec is not automatically created, so use [ExternalSource.ensureCodeSpec]($backend) to make sure that it exists.\n * @see [ExternalSource.createCode]($backend)\n */\n externalSource = \"bis:ExternalSource\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [ExternalSourceAttachment]($backend) elements.\n * @note This CodeSpec is not automatically created, so use [ExternalSourceAttachment.ensureCodeSpec]($backend) to make sure that it exists.\n * @see [ExternalSource.createCode]($backend)\n */\n externalSourceAttachment = \"bis:ExternalSourceAttachment\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [GeometryPart]($backend) elements.\n * @see [GeometryPart.createCode]($backend)\n */\n geometryPart = \"bis:GeometryPart\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [GraphicalType2d]($backend) elements.\n * @see [GraphicalType2d.createCode]($backend)\n */\n graphicalType2d = \"bis:GraphicalType2d\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [LineStyle]($backend) elements.\n * @see [LineStyle.createCode]($backend)\n */\n lineStyle = \"bis:LineStyle\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [LinkElement]($backend) elements.\n * @see [LinkElement.createCode]($backend)\n */\n linkElement = \"bis:LinkElement\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [ModelSelector]($backend) elements.\n * @see [ModelSelector.createCode]($backend)\n */\n modelSelector = \"bis:ModelSelector\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [PhysicalMaterial]($backend) elements.\n * @see [PhysicalMaterial.createCode]($backend)\n */\n physicalMaterial = \"bis:PhysicalMaterial\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [PhysicalType]($backend) elements.\n * @see [PhysicalType.createCode]($backend)\n */\n physicalType = \"bis:PhysicalType\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [InformationPartitionElement]($backend) elements.\n * @see [InformationPartitionElement.createCode]($backend)\n */\n informationPartitionElement = \"bis:InformationPartitionElement\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [RenderMaterialElement]($backend) elements.\n * @see [RenderMaterialElement.createCode]($backend)\n */\n renderMaterial = \"bis:RenderMaterial\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [Sheet]($backend) elements.\n * @see [Sheet.createCode]($backend)\n */\n sheet = \"bis:Sheet\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndex]($backend) elements.\n * @see [SheetIndex.createCode]($backend)\n */\n sheetIndex = \"bis:SheetIndex\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndexEntry]($backend) elements.\n * @see [SheetIndexEntry.createCode]($backend)\n */\n sheetIndexEntry = \"bis:SheetIndexEntry\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SpatialCategory]($backend) elements.\n * @see [SpatialCategory.createCode]($backend)\n */\n spatialCategory = \"bis:SpatialCategory\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SpatialLocationType]($backend) elements.\n * @see [SpatialLocationType.createCode]($backend)\n */\n spatialLocationType = \"bis:SpatialLocationType\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SubCategory]($backend) elements.\n * @see [SubCategory.createCode]($backend)\n */\n subCategory = \"bis:SubCategory\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [Subject]($backend) elements.\n * @see [Subject.createCode]($backend)\n */\n subject = \"bis:Subject\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [TemplateRecipe2d]($backend) elements.\n * @see [TemplateRecipe2d.createCode]($backend)\n */\n templateRecipe2d = \"bis:TemplateRecipe2d\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [TemplateRecipe3d]($backend) elements.\n * @see [TemplateRecipe3d.createCode]($backend)\n */\n templateRecipe3d = \"bis:TemplateRecipe3d\",\n /** @internal */\n textAnnotationSeed = \"bis:TextAnnotationSeed\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [Texture]($backend) elements.\n * @see [Texture.createCode]($backend)\n */\n texture = \"bis:Texture\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [ViewDefinition]($backend) elements.\n * @see [ViewDefinition.createCode]($backend)\n */\n viewDefinition = \"bis:ViewDefinition\",\n}\n\n/** The scope of the Code.\n * @public\n */\nexport namespace CodeScopeSpec {\n /** The standard ways the CodeScope can be specified.\n * @public\n */\n export enum Type {\n /** The Code value must be unique within (at least) the iModel repository */\n Repository = 1,\n /** The Code value must be unique within the scope of the Model */\n Model = 2,\n /** The Code value must be unique among other children of the same parent element */\n ParentElement = 3,\n /** The Code value must be unique among other elements also scoped by the same element */\n RelatedElement = 4,\n }\n\n /**\n * Requirements for how the CodeScope Element is identified.\n * @public\n */\n export enum ScopeRequirement {\n /** The ElementId of CodeScope element identifies its scope. Used for Codes that are unique only within a single iModel. */\n ElementId = 1,\n /** The FederationGuid of the CodeScope element identifies its scope. Used for Codes that are globally unique. */\n FederationGuid = 2,\n }\n}\n\n/**\n * The JSON properties of a CodeSpec\n * @public\n */\nexport interface CodeSpecProperties {\n scopeSpec: {\n /** the type of CodeSpec */\n type: CodeScopeSpec.Type;\n /** If true, the federationGuid of the scope element identifies the scope, for Codes that are globally unique.\n * Otherwise, the ElementId of the scopeElement is used, for Codes that are scoped only within a single iModel.\n */\n fGuidRequired?: boolean;\n /** The relationship className (in the form \"schema:class\"), when `type` is `CodeScopeSpec.Type.RelatedElement` */\n relationship?: string;\n };\n spec?: {\n isManagedWithDgnDb?: boolean;\n };\n version?: string;\n}\n\n/** A [Code Specification]($docs/bis/guide/references/glossary#codespec) captures the rules for encoding and decoding significant business information into\n * and from a Code (string). This specification is used to generate and validate Codes.\n *\n * A CodeSpec defines the format of a Code for a certain type of Element in an IModel.\n * A CodeSpec can identify an external system that maintains and/or assigns Codes.\n * @public\n */\nexport class CodeSpec {\n /** The iModel holding this CodeSpec. */\n public iModel: IModel;\n /** The id of this CodeSpec. */\n public id: Id64String;\n /** The name of this CodeSpec. */\n public name: string;\n /** The JSON properties for this CodeSpec.\n * @note Use the getters and setters instead of accessing this directly.\n * @internal\n */\n public properties: CodeSpecProperties;\n\n private constructor(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties) {\n this.iModel = iModel;\n this.id = id;\n this.name = name;\n this.properties = properties ?? { scopeSpec: { type: CodeScopeSpec.Type.Repository } };\n }\n\n /** Create a new CodeSpec from the specified parameters\n * > Note: CodeSpec.id will not be valid until inserted\n * @see [CodeSpecs.insert]($backend)\n */\n public static create(iModel: IModel, name: string, scopeType: CodeScopeSpec.Type, scopeReq?: CodeScopeSpec.ScopeRequirement): CodeSpec {\n const props: CodeSpecProperties = { scopeSpec: { type: scopeType } };\n if (scopeReq)\n props.scopeSpec.fGuidRequired = scopeReq === CodeScopeSpec.ScopeRequirement.FederationGuid;\n\n return new CodeSpec(iModel, Id64.invalid, name, props);\n }\n\n /** Create a new CodeSpec directly from JSON. Used internally by the CodeSpecs.load function.\n * @internal\n */\n public static createFromJson(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties): CodeSpec {\n return new CodeSpec(iModel, id, name, properties);\n }\n\n /** Will be true if the id of this CodeSpec is valid. */\n public get isValid(): boolean { return Id64.isValid(this.id); }\n public get isExternal(): boolean {\n return true === this.properties.scopeSpec.fGuidRequired;\n }\n\n /** The scope type of this CodeSpec. */\n public get scopeType(): CodeScopeSpec.Type { return this.properties.scopeSpec.type; }\n public set scopeType(scopeType: CodeScopeSpec.Type) { this.properties.scopeSpec.type = scopeType; }\n\n /** Will be `CodeScopeSpec.ScopeRequirement.FederationGuid` if the scoping element is required to have a FederationGuid or\n * CodeScopeSpec.ScopeRequirement.ElementId` otherwise (the default).\n */\n public get scopeReq(): CodeScopeSpec.ScopeRequirement {\n return this.properties.scopeSpec.fGuidRequired ? CodeScopeSpec.ScopeRequirement.FederationGuid : CodeScopeSpec.ScopeRequirement.ElementId;\n }\n public set scopeReq(req: CodeScopeSpec.ScopeRequirement) {\n if (CodeScopeSpec.ScopeRequirement.FederationGuid === req)\n this.properties.scopeSpec.fGuidRequired = true;\n else\n this.properties.scopeSpec.fGuidRequired = undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../src/Code.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8E;AAwB9E;;;GAGG;AACH,MAAa,IAAI;IACf,8FAA8F;IACvF,IAAI,CAAa;IACxB,+FAA+F;IACxF,KAAK,CAAa;IACzB;;OAEG;IACH,IAAW,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;IAChD,IAAW,KAAK,CAAC,GAAW,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACpD,MAAM,CAAU;IAExB,YAAY,SAAoB;QAC9B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H,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC;IAC5I,CAAC;IACD,IAAW,QAAQ,CAAC,GAAmC;QACrD,IAAI,aAAa,CAAC,gBAAgB,CAAC,cAAc,KAAK,GAAG;YACvD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC;;YAE/C,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC;IACxD,CAAC;CACF;AA7DD,4BA6DC","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 Codes\r\n */\r\n\r\nimport { GuidString, Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { IModel } from \"./IModel\";\r\n\r\n/**\r\n * The ElementId of the element that defines the scope for a Code value.\r\n * @note For insert or update, you may supply the FederationGuid of the scope element and it will be converted to the ElementId of that element.\r\n * @public\r\n * @extensions\r\n */\r\nexport type CodeScopeProps = Id64String | GuidString;\r\n\r\n/** The parameters that define a Code\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CodeProps {\r\n /** Either the stringified 64-bit Id of the CodeSpec for this code, or the name of the CodeSpec. */\r\n spec: Id64String | string;\r\n /** Either the ElementId or the FederationGuid of the element that provides the scope for this code. */\r\n scope: CodeScopeProps;\r\n /** the value of this code. May be undefined. */\r\n value?: string;\r\n}\r\n\r\n/**\r\n * A three-part structure containing information about the [Code]($docs/bis/guide/fundamentals/codes) of an Element\r\n * @public\r\n */\r\nexport class Code implements CodeProps {\r\n /** The id of the [CodeSpec]($docs/bis/guide/fundamentals/codes.md#codespec) of the Element */\r\n public spec: Id64String;\r\n /** The [CodeScope]($docs/bis/guide/fundamentals/codes.md#codescope-property) of the Element */\r\n public scope: Id64String;\r\n /** The [CodeValue]($docs/bis/guide/fundamentals/codes.md#codevalue-property) of the Element\r\n * @note Leading and trailing whitespace is invalid so is automatically trimmed.\r\n */\r\n public get value() { return this._value ?? \"\"; }\r\n public set value(val: string) { this._value = val?.trim(); }\r\n private _value?: string;\r\n\r\n constructor(codeProps: CodeProps) {\r\n this.spec = Id64.fromJSON(codeProps.spec);\r\n this.scope = JsonUtils.asString(codeProps.scope);\r\n this.value = JsonUtils.asString(codeProps.value);\r\n }\r\n\r\n /** Create an empty, non-unique code with no special meaning. */\r\n public static createEmpty(): Code {\r\n const id = Id64.fromLocalAndBriefcaseIds(1, 0);\r\n return new Code({ spec: id, scope: id });\r\n }\r\n\r\n public static fromJSON(json?: any): Code { return json ? new Code(json) : Code.createEmpty(); }\r\n public toJSON(): CodeProps { return { spec: this.spec, scope: this.scope, value: this.value }; }\r\n public equals(other: Code): boolean { return Code.equalCodes(this, other); }\r\n /** @internal */\r\n public static equalCodes(c1: CodeProps, c2: CodeProps): boolean {\r\n return c1.spec === c2.spec && c1.scope === c2.scope && c1.value === c2.value;\r\n }\r\n /** Determine whether this Code is valid. */\r\n public static isValid(c: CodeProps): boolean { return Id64.isValidId64(c.spec); }\r\n /** Determine if this code is valid but not otherwise meaningful (and therefore not necessarily unique) */\r\n public static isEmpty(c: CodeProps): boolean { return this.isValid(c) && (c.value === undefined || c.value === \"\"); }\r\n\r\n public toString(): string { return `[Code: ${this.spec}, ${this.scope}, ${this.value}]`; }\r\n}\r\n\r\n/** Names of the internal BIS CodeSpecs. These names match those specified by the native library.\r\n * For other domains, the best practice is to include the domain name or alias as part of the CodeSpec name to ensure global uniqueness.\r\n * @public\r\n* @extensions\r\n* @see [CodeSpec]($docs/bis/guide/fundamentals/codes.md#codespec)\r\n */\r\nexport enum BisCodeSpec {\r\n /** The name of the standard [[CodeSpec]] used when creating *empty* codes.\r\n * @see [[Code.createEmpty]]\r\n */\r\n nullCodeSpec = \"bis:NullCodeSpec\",\r\n /** @internal */\r\n annotationFrameStyle = \"bis:AnnotationFrameStyle\",\r\n /** @internal */\r\n annotationLeaderStyle = \"bis:AnnotationLeaderStyle\",\r\n /** @internal */\r\n annotationTextStyle = \"bis:AnnotationTextStyle\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystem2d]($backend) elements.\r\n * @see [AuxCoordSystem2d.createCode]($backend)\r\n */\r\n auxCoordSystem2d = \"bis:AuxCoordSystem2d\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystem3d]($backend) elements.\r\n * @see [AuxCoordSystem3d.createCode]($backend)\r\n */\r\n auxCoordSystem3d = \"bis:AuxCoordSystem3d\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystemSpatial]($backend) elements.\r\n * @see [AuxCoordSystemSpatial.createCode]($backend)\r\n */\r\n auxCoordSystemSpatial = \"bis:AuxCoordSystemSpatial\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [CategorySelector]($backend) elements.\r\n * @see [CategorySelector.createCode]($backend)\r\n */\r\n categorySelector = \"bis:CategorySelector\",\r\n /** @internal */\r\n colorBook = \"bis:ColorBook\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [DisplayStyle]($backend) elements.\r\n * @see [DisplayStyle.createCode]($backend)\r\n */\r\n displayStyle = \"bis:DisplayStyle\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [Drawing]($backend) elements.\r\n * @see [Drawing.createCode]($backend)\r\n */\r\n drawing = \"bis:Drawing\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [DrawingCategory]($backend) elements.\r\n * @see [DrawingCategory.createCode]($backend)\r\n */\r\n drawingCategory = \"bis:DrawingCategory\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [ExternalSource]($backend) elements.\r\n * @note This CodeSpec is not automatically created, so use [ExternalSource.ensureCodeSpec]($backend) to make sure that it exists.\r\n * @see [ExternalSource.createCode]($backend)\r\n */\r\n externalSource = \"bis:ExternalSource\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [ExternalSourceAttachment]($backend) elements.\r\n * @note This CodeSpec is not automatically created, so use [ExternalSourceAttachment.ensureCodeSpec]($backend) to make sure that it exists.\r\n * @see [ExternalSource.createCode]($backend)\r\n */\r\n externalSourceAttachment = \"bis:ExternalSourceAttachment\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [GeometryPart]($backend) elements.\r\n * @see [GeometryPart.createCode]($backend)\r\n */\r\n geometryPart = \"bis:GeometryPart\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [GraphicalType2d]($backend) elements.\r\n * @see [GraphicalType2d.createCode]($backend)\r\n */\r\n graphicalType2d = \"bis:GraphicalType2d\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [LineStyle]($backend) elements.\r\n * @see [LineStyle.createCode]($backend)\r\n */\r\n lineStyle = \"bis:LineStyle\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [LinkElement]($backend) elements.\r\n * @see [LinkElement.createCode]($backend)\r\n */\r\n linkElement = \"bis:LinkElement\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [ModelSelector]($backend) elements.\r\n * @see [ModelSelector.createCode]($backend)\r\n */\r\n modelSelector = \"bis:ModelSelector\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [PhysicalMaterial]($backend) elements.\r\n * @see [PhysicalMaterial.createCode]($backend)\r\n */\r\n physicalMaterial = \"bis:PhysicalMaterial\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [PhysicalType]($backend) elements.\r\n * @see [PhysicalType.createCode]($backend)\r\n */\r\n physicalType = \"bis:PhysicalType\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [InformationPartitionElement]($backend) elements.\r\n * @see [InformationPartitionElement.createCode]($backend)\r\n */\r\n informationPartitionElement = \"bis:InformationPartitionElement\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [RenderMaterialElement]($backend) elements.\r\n * @see [RenderMaterialElement.createCode]($backend)\r\n */\r\n renderMaterial = \"bis:RenderMaterial\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [Sheet]($backend) elements.\r\n * @see [Sheet.createCode]($backend)\r\n */\r\n sheet = \"bis:Sheet\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndex]($backend) elements.\r\n * @see [SheetIndex.createCode]($backend)\r\n */\r\n sheetIndex = \"bis:SheetIndex\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndexEntry]($backend) elements.\r\n * @see [SheetIndexEntry.createCode]($backend)\r\n */\r\n sheetIndexEntry = \"bis:SheetIndexEntry\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SpatialCategory]($backend) elements.\r\n * @see [SpatialCategory.createCode]($backend)\r\n */\r\n spatialCategory = \"bis:SpatialCategory\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SpatialLocationType]($backend) elements.\r\n * @see [SpatialLocationType.createCode]($backend)\r\n */\r\n spatialLocationType = \"bis:SpatialLocationType\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SubCategory]($backend) elements.\r\n * @see [SubCategory.createCode]($backend)\r\n */\r\n subCategory = \"bis:SubCategory\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [Subject]($backend) elements.\r\n * @see [Subject.createCode]($backend)\r\n */\r\n subject = \"bis:Subject\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [TemplateRecipe2d]($backend) elements.\r\n * @see [TemplateRecipe2d.createCode]($backend)\r\n */\r\n templateRecipe2d = \"bis:TemplateRecipe2d\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [TemplateRecipe3d]($backend) elements.\r\n * @see [TemplateRecipe3d.createCode]($backend)\r\n */\r\n templateRecipe3d = \"bis:TemplateRecipe3d\",\r\n /** @internal */\r\n textAnnotationSeed = \"bis:TextAnnotationSeed\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [Texture]($backend) elements.\r\n * @see [Texture.createCode]($backend)\r\n */\r\n texture = \"bis:Texture\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [ViewDefinition]($backend) elements.\r\n * @see [ViewDefinition.createCode]($backend)\r\n */\r\n viewDefinition = \"bis:ViewDefinition\",\r\n}\r\n\r\n/** The scope of the Code.\r\n * @public\r\n */\r\nexport namespace CodeScopeSpec {\r\n /** The standard ways the CodeScope can be specified.\r\n * @public\r\n */\r\n export enum Type {\r\n /** The Code value must be unique within (at least) the iModel repository */\r\n Repository = 1,\r\n /** The Code value must be unique within the scope of the Model */\r\n Model = 2,\r\n /** The Code value must be unique among other children of the same parent element */\r\n ParentElement = 3,\r\n /** The Code value must be unique among other elements also scoped by the same element */\r\n RelatedElement = 4,\r\n }\r\n\r\n /**\r\n * Requirements for how the CodeScope Element is identified.\r\n * @public\r\n */\r\n export enum ScopeRequirement {\r\n /** The ElementId of CodeScope element identifies its scope. Used for Codes that are unique only within a single iModel. */\r\n ElementId = 1,\r\n /** The FederationGuid of the CodeScope element identifies its scope. Used for Codes that are globally unique. */\r\n FederationGuid = 2,\r\n }\r\n}\r\n\r\n/**\r\n * The JSON properties of a CodeSpec\r\n * @public\r\n */\r\nexport interface CodeSpecProperties {\r\n scopeSpec: {\r\n /** the type of CodeSpec */\r\n type: CodeScopeSpec.Type;\r\n /** If true, the federationGuid of the scope element identifies the scope, for Codes that are globally unique.\r\n * Otherwise, the ElementId of the scopeElement is used, for Codes that are scoped only within a single iModel.\r\n */\r\n fGuidRequired?: boolean;\r\n /** The relationship className (in the form \"schema:class\"), when `type` is `CodeScopeSpec.Type.RelatedElement` */\r\n relationship?: string;\r\n };\r\n spec?: {\r\n isManagedWithDgnDb?: boolean;\r\n };\r\n version?: string;\r\n}\r\n\r\n/** A [Code Specification]($docs/bis/guide/references/glossary#codespec) captures the rules for encoding and decoding significant business information into\r\n * and from a Code (string). This specification is used to generate and validate Codes.\r\n *\r\n * A CodeSpec defines the format of a Code for a certain type of Element in an IModel.\r\n * A CodeSpec can identify an external system that maintains and/or assigns Codes.\r\n * @public\r\n */\r\nexport class CodeSpec {\r\n /** The iModel holding this CodeSpec. */\r\n public iModel: IModel;\r\n /** The id of this CodeSpec. */\r\n public id: Id64String;\r\n /** The name of this CodeSpec. */\r\n public name: string;\r\n /** The JSON properties for this CodeSpec.\r\n * @note Use the getters and setters instead of accessing this directly.\r\n * @internal\r\n */\r\n public properties: CodeSpecProperties;\r\n\r\n private constructor(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties) {\r\n this.iModel = iModel;\r\n this.id = id;\r\n this.name = name;\r\n this.properties = properties ?? { scopeSpec: { type: CodeScopeSpec.Type.Repository } };\r\n }\r\n\r\n /** Create a new CodeSpec from the specified parameters\r\n * > Note: CodeSpec.id will not be valid until inserted\r\n * @see [CodeSpecs.insert]($backend)\r\n */\r\n public static create(iModel: IModel, name: string, scopeType: CodeScopeSpec.Type, scopeReq?: CodeScopeSpec.ScopeRequirement): CodeSpec {\r\n const props: CodeSpecProperties = { scopeSpec: { type: scopeType } };\r\n if (scopeReq)\r\n props.scopeSpec.fGuidRequired = scopeReq === CodeScopeSpec.ScopeRequirement.FederationGuid;\r\n\r\n return new CodeSpec(iModel, Id64.invalid, name, props);\r\n }\r\n\r\n /** Create a new CodeSpec directly from JSON. Used internally by the CodeSpecs.load function.\r\n * @internal\r\n */\r\n public static createFromJson(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties): CodeSpec {\r\n return new CodeSpec(iModel, id, name, properties);\r\n }\r\n\r\n /** Will be true if the id of this CodeSpec is valid. */\r\n public get isValid(): boolean { return Id64.isValid(this.id); }\r\n public get isExternal(): boolean {\r\n return true === this.properties.scopeSpec.fGuidRequired;\r\n }\r\n\r\n /** The scope type of this CodeSpec. */\r\n public get scopeType(): CodeScopeSpec.Type { return this.properties.scopeSpec.type; }\r\n public set scopeType(scopeType: CodeScopeSpec.Type) { this.properties.scopeSpec.type = scopeType; }\r\n\r\n /** Will be `CodeScopeSpec.ScopeRequirement.FederationGuid` if the scoping element is required to have a FederationGuid or\r\n * CodeScopeSpec.ScopeRequirement.ElementId` otherwise (the default).\r\n */\r\n public get scopeReq(): CodeScopeSpec.ScopeRequirement {\r\n return this.properties.scopeSpec.fGuidRequired ? CodeScopeSpec.ScopeRequirement.FederationGuid : CodeScopeSpec.ScopeRequirement.ElementId;\r\n }\r\n public set scopeReq(req: CodeScopeSpec.ScopeRequirement) {\r\n if (CodeScopeSpec.ScopeRequirement.FederationGuid === req)\r\n this.properties.scopeSpec.fGuidRequired = true;\r\n else\r\n this.properties.scopeSpec.fGuidRequired = undefined;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ColorByName.js","sourceRoot":"","sources":["../../src/ColorByName.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAyB;AACzB;;;;;GAKG;AACU,QAAA,WAAW,GAAG;IACzB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;IACxB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,Q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B,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,QAAQ;IACb,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,QAAQ;IACrB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,QAAQ;IACnB,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,QAAQ;CACtB,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 Symbology\n */\n\n// spell-checker: disable\n/** A set of known colors by [HTML color name](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value), as a 32-bit integer in the form 0xBBGGRR (red is the low byte).\n * This is different than color values in #RRGGBB format for HTML pages (red and blue are swapped).\n * @note If your colors don't look right, likely you're using 0xRRGGBB where ColorDef expects 0xBBGGRR.\n * @public\n * @extensions\n */\nexport const ColorByName = { // eslint-disable-line @typescript-eslint/naming-convention\n aliceBlue: 0xFFF8F0,\n amber: 0x00BFFF,\n antiqueWhite: 0xD7EBFA,\n aqua: 0xFFFF00,\n aquamarine: 0xD4FF7F,\n azure: 0xFFFFF0,\n beige: 0xDCF5F5,\n bisque: 0xC4E4FF,\n black: 0x000000,\n blanchedAlmond: 0xCDEBFF,\n blue: 0xFF0000,\n blueViolet: 0xE22B8A,\n brown: 0x2A2AA5,\n burlyWood: 0x87B8DE,\n cadetBlue: 0xA09E5F,\n chartreuse: 0x00FF7F,\n chocolate: 0x1E69D2,\n coral: 0x507FFF,\n cornflowerBlue: 0xED9564,\n cornSilk: 0xDCF8FF,\n crimson: 0x3C14DC,\n cyan: 0xFFFF00,\n darkBlue: 0x8B0000,\n darkBrown: 0x214365,\n darkCyan: 0x8B8B00,\n darkGoldenrod: 0x0B86B8,\n darkGray: 0xA9A9A9,\n darkGreen: 0x006400,\n darkGrey: 0xA9A9A9,\n darkKhaki: 0x6BB7BD,\n darkMagenta: 0x8B008B,\n darkOliveGreen: 0x2F6B55,\n darkOrange: 0x008CFF,\n darkOrchid: 0xCC3299,\n darkRed: 0x00008B,\n darkSalmon: 0x7A96E9,\n darkSeagreen: 0x8FBC8F,\n darkSlateBlue: 0x8B3D48,\n darkSlateGray: 0x4F4F2F,\n darkSlateGrey: 0x4F4F2F,\n darkTurquoise: 0xD1CE00,\n darkViolet: 0xD30094,\n deepPink: 0x9314FF,\n deepSkyBlue: 0xFFBF00,\n dimGray: 0x696969,\n dimGrey: 0x696969,\n dodgerBlue: 0xFF901E,\n fireBrick: 0x2222B2,\n floralWhite: 0xF0FAFF,\n forestGreen: 0x228B22,\n fuchsia: 0xFF00FF,\n gainsboro: 0xDCDCDC,\n ghostWhite: 0xFFF8F8,\n gold: 0x00D7FF,\n goldenrod: 0x20A5DA,\n gray: 0x808080,\n green: 0x008000,\n greenYellow: 0x2FFFAD,\n grey: 0x808080,\n honeydew: 0xF0FFF0,\n hotPink: 0xB469FF,\n indianRed: 0x5C5CCD,\n indigo: 0x82004B,\n ivory: 0xF0FFFF,\n khaki: 0x8CE6F0,\n lavender: 0xFAE6E6,\n lavenderBlush: 0xF5F0FF,\n lawnGreen: 0x00FC7C,\n lemonChiffon: 0xCDFAFF,\n lightBlue: 0xE6D8AD,\n lightCoral: 0x8080F0,\n lightCyan: 0xFFFFE0,\n lightGoldenrodYellow: 0xD2FAFA,\n lightGray: 0xD3D3D3,\n lightGreen: 0x90EE90,\n lightGrey: 0xD3D3D3,\n lightPink: 0xC1B6FF,\n lightSalmon: 0x7AA0FF,\n lightSeagreen: 0xAAB220,\n lightSkyBlue: 0xFACE87,\n lightSlateGray: 0x998877,\n lightSlateGrey: 0x998877,\n lightSteelBlue: 0xDEC4B0,\n lightyellow: 0xE0FFFF,\n lime: 0x00FF00,\n limeGreen: 0x32CD32,\n linen: 0xE6F0FA,\n magenta: 0xFF00FF,\n maroon: 0x000080,\n mediumAquamarine: 0xAACD66,\n mediumBlue: 0xCD0000,\n mediumOrchid: 0xD355BA,\n mediumPurple: 0xDB7093,\n mediumSeaGreen: 0x71B33C,\n mediumSlateBlue: 0xEE687B,\n mediumSpringGreen: 0x9AFA00,\n mediumTurquoise: 0xCCD148,\n mediumVioletRed: 0x8515C7,\n midnightBlue: 0x701919,\n mintCream: 0xFAFFF5,\n mistyRose: 0xE1E4FF,\n moccasin: 0xB5E4FF,\n navajoWhite: 0xADDEFF,\n navy: 0x800000,\n oldLace: 0xE6F5FD,\n olive: 0x008080,\n oliveDrab: 0x238E6B,\n orange: 0x00A5FF,\n orangeRed: 0x0045FF,\n orchid: 0xD670DA,\n paleGoldenrod: 0xAAE8EE,\n paleGreen: 0x98FB98,\n paleTurquoise: 0xEEEEAF,\n paleVioletRed: 0x9370DB,\n papayaWhip: 0xD5EFFF,\n peachPuff: 0xB9DAFF,\n peru: 0x3F85CD,\n pink: 0xCBC0FF,\n plum: 0xDDA0DD,\n powderBlue: 0xE6E0B0,\n purple: 0x800080,\n rebeccaPurple: 0x993366,\n red: 0x0000FF,\n rosyBrown: 0x8F8FBC,\n royalBlue: 0xE16941,\n saddleBrown: 0x13458B,\n salmon: 0x7280FA,\n sandyBrown: 0x60A4F4,\n seaGreen: 0x578B2E,\n seaShell: 0xEEF5FF,\n sienna: 0x2D52A0,\n silver: 0xC0C0C0,\n skyBlue: 0xEBCE87,\n slateBlue: 0xCD5A6A,\n slateGray: 0x908070,\n slateGrey: 0x908070,\n snow: 0xFAFAFF,\n springGreen: 0x7FFF00,\n steelBlue: 0xB48246,\n tan: 0x8CB4D2,\n teal: 0x808000,\n thistle: 0xD8BFD8,\n tomato: 0x4763FF,\n turquoise: 0xD0E040,\n violet: 0xEE82EE,\n wheat: 0xB3DEF5,\n white: 0xFFFFFF,\n whiteSmoke: 0xF5F5F5,\n yellow: 0x00FFFF,\n yellowGreen: 0x32CD9A,\n};\n"]}
1
+ {"version":3,"file":"ColorByName.js","sourceRoot":"","sources":["../../src/ColorByName.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAyB;AACzB;;;;;GAKG;AACU,QAAA,WAAW,GAAG;IACzB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;IACxB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,QAAQ;IACnB,QAAQ,EAAE,QAAQ;IA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AAE,QAAQ;IACb,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,QAAQ;IACrB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,QAAQ;IACnB,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,QAAQ;CACtB,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 Symbology\r\n */\r\n\r\n// spell-checker: disable\r\n/** A set of known colors by [HTML color name](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value), as a 32-bit integer in the form 0xBBGGRR (red is the low byte).\r\n * This is different than color values in #RRGGBB format for HTML pages (red and blue are swapped).\r\n * @note If your colors don't look right, likely you're using 0xRRGGBB where ColorDef expects 0xBBGGRR.\r\n * @public\r\n * @extensions\r\n */\r\nexport const ColorByName = { // eslint-disable-line @typescript-eslint/naming-convention\r\n aliceBlue: 0xFFF8F0,\r\n amber: 0x00BFFF,\r\n antiqueWhite: 0xD7EBFA,\r\n aqua: 0xFFFF00,\r\n aquamarine: 0xD4FF7F,\r\n azure: 0xFFFFF0,\r\n beige: 0xDCF5F5,\r\n bisque: 0xC4E4FF,\r\n black: 0x000000,\r\n blanchedAlmond: 0xCDEBFF,\r\n blue: 0xFF0000,\r\n blueViolet: 0xE22B8A,\r\n brown: 0x2A2AA5,\r\n burlyWood: 0x87B8DE,\r\n cadetBlue: 0xA09E5F,\r\n chartreuse: 0x00FF7F,\r\n chocolate: 0x1E69D2,\r\n coral: 0x507FFF,\r\n cornflowerBlue: 0xED9564,\r\n cornSilk: 0xDCF8FF,\r\n crimson: 0x3C14DC,\r\n cyan: 0xFFFF00,\r\n darkBlue: 0x8B0000,\r\n darkBrown: 0x214365,\r\n darkCyan: 0x8B8B00,\r\n darkGoldenrod: 0x0B86B8,\r\n darkGray: 0xA9A9A9,\r\n darkGreen: 0x006400,\r\n darkGrey: 0xA9A9A9,\r\n darkKhaki: 0x6BB7BD,\r\n darkMagenta: 0x8B008B,\r\n darkOliveGreen: 0x2F6B55,\r\n darkOrange: 0x008CFF,\r\n darkOrchid: 0xCC3299,\r\n darkRed: 0x00008B,\r\n darkSalmon: 0x7A96E9,\r\n darkSeagreen: 0x8FBC8F,\r\n darkSlateBlue: 0x8B3D48,\r\n darkSlateGray: 0x4F4F2F,\r\n darkSlateGrey: 0x4F4F2F,\r\n darkTurquoise: 0xD1CE00,\r\n darkViolet: 0xD30094,\r\n deepPink: 0x9314FF,\r\n deepSkyBlue: 0xFFBF00,\r\n dimGray: 0x696969,\r\n dimGrey: 0x696969,\r\n dodgerBlue: 0xFF901E,\r\n fireBrick: 0x2222B2,\r\n floralWhite: 0xF0FAFF,\r\n forestGreen: 0x228B22,\r\n fuchsia: 0xFF00FF,\r\n gainsboro: 0xDCDCDC,\r\n ghostWhite: 0xFFF8F8,\r\n gold: 0x00D7FF,\r\n goldenrod: 0x20A5DA,\r\n gray: 0x808080,\r\n green: 0x008000,\r\n greenYellow: 0x2FFFAD,\r\n grey: 0x808080,\r\n honeydew: 0xF0FFF0,\r\n hotPink: 0xB469FF,\r\n indianRed: 0x5C5CCD,\r\n indigo: 0x82004B,\r\n ivory: 0xF0FFFF,\r\n khaki: 0x8CE6F0,\r\n lavender: 0xFAE6E6,\r\n lavenderBlush: 0xF5F0FF,\r\n lawnGreen: 0x00FC7C,\r\n lemonChiffon: 0xCDFAFF,\r\n lightBlue: 0xE6D8AD,\r\n lightCoral: 0x8080F0,\r\n lightCyan: 0xFFFFE0,\r\n lightGoldenrodYellow: 0xD2FAFA,\r\n lightGray: 0xD3D3D3,\r\n lightGreen: 0x90EE90,\r\n lightGrey: 0xD3D3D3,\r\n lightPink: 0xC1B6FF,\r\n lightSalmon: 0x7AA0FF,\r\n lightSeagreen: 0xAAB220,\r\n lightSkyBlue: 0xFACE87,\r\n lightSlateGray: 0x998877,\r\n lightSlateGrey: 0x998877,\r\n lightSteelBlue: 0xDEC4B0,\r\n lightyellow: 0xE0FFFF,\r\n lime: 0x00FF00,\r\n limeGreen: 0x32CD32,\r\n linen: 0xE6F0FA,\r\n magenta: 0xFF00FF,\r\n maroon: 0x000080,\r\n mediumAquamarine: 0xAACD66,\r\n mediumBlue: 0xCD0000,\r\n mediumOrchid: 0xD355BA,\r\n mediumPurple: 0xDB7093,\r\n mediumSeaGreen: 0x71B33C,\r\n mediumSlateBlue: 0xEE687B,\r\n mediumSpringGreen: 0x9AFA00,\r\n mediumTurquoise: 0xCCD148,\r\n mediumVioletRed: 0x8515C7,\r\n midnightBlue: 0x701919,\r\n mintCream: 0xFAFFF5,\r\n mistyRose: 0xE1E4FF,\r\n moccasin: 0xB5E4FF,\r\n navajoWhite: 0xADDEFF,\r\n navy: 0x800000,\r\n oldLace: 0xE6F5FD,\r\n olive: 0x008080,\r\n oliveDrab: 0x238E6B,\r\n orange: 0x00A5FF,\r\n orangeRed: 0x0045FF,\r\n orchid: 0xD670DA,\r\n paleGoldenrod: 0xAAE8EE,\r\n paleGreen: 0x98FB98,\r\n paleTurquoise: 0xEEEEAF,\r\n paleVioletRed: 0x9370DB,\r\n papayaWhip: 0xD5EFFF,\r\n peachPuff: 0xB9DAFF,\r\n peru: 0x3F85CD,\r\n pink: 0xCBC0FF,\r\n plum: 0xDDA0DD,\r\n powderBlue: 0xE6E0B0,\r\n purple: 0x800080,\r\n rebeccaPurple: 0x993366,\r\n red: 0x0000FF,\r\n rosyBrown: 0x8F8FBC,\r\n royalBlue: 0xE16941,\r\n saddleBrown: 0x13458B,\r\n salmon: 0x7280FA,\r\n sandyBrown: 0x60A4F4,\r\n seaGreen: 0x578B2E,\r\n seaShell: 0xEEF5FF,\r\n sienna: 0x2D52A0,\r\n silver: 0xC0C0C0,\r\n skyBlue: 0xEBCE87,\r\n slateBlue: 0xCD5A6A,\r\n slateGray: 0x908070,\r\n slateGrey: 0x908070,\r\n snow: 0xFAFAFF,\r\n springGreen: 0x7FFF00,\r\n steelBlue: 0xB48246,\r\n tan: 0x8CB4D2,\r\n teal: 0x808000,\r\n thistle: 0xD8BFD8,\r\n tomato: 0x4763FF,\r\n turquoise: 0xD0E040,\r\n violet: 0xEE82EE,\r\n wheat: 0xB3DEF5,\r\n white: 0xFFFFFF,\r\n whiteSmoke: 0xF5F5F5,\r\n yellow: 0x00FFFF,\r\n yellowGreen: 0x32CD9A,\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ColorDef.js","sourceRoot":"","sources":["../../src/ColorDef.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAgD;AAChD,+CAA4C;AAC5C,yCAAsC;AACtC,yCAAoD;AAEpD,+HAA+H;AAE/H,wEAAwE;AAExE,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AACvC,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAQ3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,QAAQ;IACF,KAAK,CAAS;IA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AAC;IAED,0EAA0E;IACnE,MAAM,CAAC,KAAe;QAC3B,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACpC,CAAC;IAED,iBAAiB;IACV,MAAM,CAAU,KAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;IAC/D,iBAAiB;IACV,MAAM,CAAU,KAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;IAC/D,eAAe;IACR,MAAM,CAAU,GAAG,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,GAAG,CAAC,CAAC;IAC3D,iBAAiB;IACV,MAAM,CAAU,KAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;IAC/D,gBAAgB;IACT,MAAM,CAAU,IAAI,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,IAAI,CAAC,CAAC;;AAnmB/D,4BAomBC","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 Symbology\n */\n\nimport { Geometry } from \"@itwin/core-geometry\";\nimport { ColorByName } from \"./ColorByName\";\nimport { HSLColor } from \"./HSLColor\";\nimport { HSVColor, HSVConstants } from \"./HSVColor\";\n\n// cspell: ignore ttbbggrr bbggrr rrggbb aabbggrr abgr rrggbb hsla lerp torgb dhue dsaturation dvalue intpart fractpart cyanish\n\n// portions adapted from Three.js Copyright © 2010-2024 three.js authors\n\nconst scratchBytes = new Uint8Array(4);\nconst scratchUInt32 = new Uint32Array(scratchBytes.buffer);\n\n/** The JSON representation of a [[ColorDef]] - an unsigned 32-bit integer in 0xTTBBGGRR format.\n * @public\n * @extensions\n */\nexport type ColorDefProps = number;\n\n/** An immutable integer representation of a color.\n *\n * A color consists of 4 components: Red, Blue, Green, and Transparency. Each component is an 8-bit unsigned integer in the range [0..255]. A value of zero means that component contributes nothing\n * to the color: e.g., a color with Red=0 contains no shade of red, and a color with Transparency=0 is fully opaque. A value of 255 means that component contributes its maximum\n * value to the color: e.g., a color with Red=255 is as red as it is possible to be, and a color with Transparency=255 is fully transparent.\n *\n * Internally, these 4 components are combined into a single 32-bit unsigned integer as represented by [[ColorDefProps]]. This representation can result in some confusion regarding:\n * 1. The ordering of the individual components; and\n * 2. Whether to specify transparency or opacity (sometimes referred to as \"alpha\").\n *\n * ColorDef uses `0xTTBBGGRR` internally, which uses Transparency and puts Red in the low byte and Transparency in the high byte. It can be converted to `0xRRGGBB` format (blue in the low byte)\n * using [[getRgb]] and `0xAABBGGRRx format (red in the low byte, using opacity instead of transparency) using [[getAbgr]].\n *\n * A ColorDef can be created from a numeric [[ColorDefProps]], from a string in one of the common HTML formats (e.g., [[fromString]]), or by specifying values for the individual components\n * (e.g., [[from]]).\n *\n * ColorDef is **immutable**. To obtain a modified copy of a ColorDef, use methods like [[adjustedForContrast]], [[inverse]], or [[withTransparency]]. For example:\n * ```ts\n * const semiTransparentBlue = ColorDef.blue.withTransparency(100);\n * ```\n * @public\n * @extensions\n */\nexport class ColorDef {\n private readonly _tbgr: number;\n\n private constructor(tbgr: number) {\n scratchUInt32[0] = tbgr; // Force to be a 32-bit unsigned integer\n this._tbgr = scratchUInt32[0];\n }\n\n /**\n * Create a new ColorDef.\n * @param val value to use.\n * If a number, it is interpreted as a 0xTTBBGGRR (Red in the low byte, high byte is transparency 0==fully opaque) value.\n * If a string, it must be in one of the forms supported by [[fromString]] - any unrecognized string will produce [[black]].\n */\n public static create(val?: string | ColorDefProps) {\n return this.fromTbgr(this.computeTbgr(val));\n }\n\n /** Compute the 0xTTBBGGRR value corresponding to the specified representation of a color.\n * @see [[fromString]] for a description of valid string representations.\n */\n public static computeTbgr(val?: string | ColorDefProps): ColorDefProps {\n switch (typeof val) {\n case \"number\":\n return val;\n case \"string\":\n return this.computeTbgrFromString(val);\n default:\n return 0;\n }\n }\n\n /** Convert this ColorDef to a 32 bit number representing the 0xTTBBGGRR value */\n public toJSON(): ColorDefProps { return this._tbgr; }\n\n /** Create a new ColorDef from a json object. If the json object is a number, it is assumed to be a 0xTTBBGGRR value. */\n public static fromJSON(json?: ColorDefProps): ColorDef {\n return this.create(json);\n }\n\n /** Create a ColorDef from Red, Green, Blue, Transparency values. All inputs should be integers between 0-255. */\n public static from(red: number, green: number, blue: number, transparency?: number): ColorDef {\n return this.fromTbgr(this.computeTbgrFromComponents(red, green, blue, transparency));\n }\n\n /** Compute the 0xTTBBGGRR value corresponding to the specified Red, Green, Blue, Transparency components. All inputs should be integers between 0-255. */\n public static computeTbgrFromComponents(red: number, green: number, blue: number, transparency?: number): ColorDefProps {\n scratchBytes[0] = red;\n scratchBytes[1] = green;\n scratchBytes[2] = blue;\n scratchBytes[3] = transparency || 0;\n return scratchUInt32[0];\n }\n\n /** Create a ColorDef from its 0xTTBBGGRR representation. */\n public static fromTbgr(tbgr: ColorDefProps): ColorDef {\n switch (tbgr) {\n case ColorByName.black:\n return this.black;\n case ColorByName.white:\n return this.white;\n case ColorByName.red:\n return this.red;\n case ColorByName.green:\n return this.green;\n case ColorByName.blue:\n return this.blue;\n default:\n return new ColorDef(tbgr);\n }\n }\n\n /** Create a ColorDef from its 0xAABBGGRR representation. */\n public static fromAbgr(abgr: number): ColorDef {\n return this.fromTbgr(this.getAbgr(abgr));\n }\n\n /** Create a ColorDef from a string representation. The following representations are supported:\n * *\"rgb(255,0,0)\"*\n * *\"rgba(255,0,0,.2)\"*\n * *\"rgb(100%,0%,0%)\"*\n * *\"hsl(120,50%,50%)\"*\n * *\"#rrbbgg\"*\n * *\"blanchedAlmond\"* (see possible values from [[ColorByName]]). Case-insensitive.\n *\n * If `val` is not a valid color string, this function returns [[black]].\n * @see [[isValidColor]] to determine if `val` is a valid color string.\n */\n public static fromString(val: string): ColorDef {\n return this.fromTbgr(this.computeTbgrFromString(val));\n }\n\n /** Determine whether the input is a valid representation of a ColorDef.\n * @see [[fromString]] for the definition of a valid string representation.\n * @see [[ColorDefProps]] for the definition of a valid numeric representation.\n */\n public static isValidColor(val: string | number): boolean {\n if (typeof val === \"number\")\n return val >= 0 && val <= 0xffffffff && Math.floor(val) === val;\n\n return undefined !== this.tryComputeTbgrFromString(val);\n }\n\n /** Compute the 0xTTBBGGRR value corresponding to a string representation of a color.\n * If `val` is not a valid color string, this function returns 0 (black).\n * @see [[fromString]] for the definition of a valid color string.\n * @see [[tryComputeTbgrFromString]] to determine if `val` is a valid color string.\n */\n public static computeTbgrFromString(val: string): ColorDefProps {\n return this.tryComputeTbgrFromString(val) ?? 0;\n }\n\n /** Try to compute the 0xTTBBGGRR value corresponding to a string representation of a ColorDef.\n * @returns the corresponding numeric representation, or `undefined` if the input does not represent a color.\n * @see [[fromString]] for the definition of a valid color string.\n */\n public static tryComputeTbgrFromString(val: string): ColorDefProps | undefined {\n if (typeof val !== \"string\")\n return undefined;\n\n val = val.toLowerCase();\n let m = /^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(val);\n if (m) { // rgb / hsl\n let color;\n const name = m[1];\n const components = m[2];\n\n const hasPercent = (str: string) => str[str.length - 1] === \"%\";\n const floatOrPercent = (str: string) => {\n const v = parseFloat(str);\n return 255 * Geometry.clamp(hasPercent(str) ? v / 100 : v, 0, 1);\n };\n const intOrPercent = (str: string) => {\n const v = hasPercent(str) ? (parseFloat(str) / 100) * 255 : parseInt(str, 10);\n return Geometry.clamp(v, 0, 255);\n };\n\n switch (name) {\n case \"rgb\":\n case \"rgba\":\n color = /^(\\d+%*)\\s*[, ]\\s*(\\d+%*)\\s*[, ]\\s*(\\d+%*)\\s*([,\\/]\\s*([0-9]*\\.?[0-9]+%*)\\s*)?$/.exec(components);\n if (color) { // rgb(255,0,0) rgba(255,0,0,0.5)\n return this.computeTbgrFromComponents(\n intOrPercent(color[1]),\n intOrPercent(color[2]),\n intOrPercent(color[3]),\n typeof color[5] === \"string\" ? 255 - floatOrPercent(color[5]) : 0);\n }\n\n break;\n case \"hsl\":\n case \"hsla\":\n color = /^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(components);\n if (color) { // hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n const h = parseFloat(color[1]) / 360;\n const s = parseInt(color[2], 10) / 100;\n const l = parseInt(color[3], 10) / 100;\n const t = typeof color[5] === \"string\" ? 255 - floatOrPercent(color[5]) : 0;\n return this.computeTbgrFromHSL(h, s, l, t);\n }\n\n break;\n }\n } else if (m = /^\\#([a-f0-9]+)$/.exec(val)) { // hex color\n const hex = m[1];\n const size = hex.length;\n\n if (size === 3) { // #ff0\n return this.computeTbgrFromComponents(\n parseInt(hex.charAt(0) + hex.charAt(0), 16),\n parseInt(hex.charAt(1) + hex.charAt(1), 16),\n parseInt(hex.charAt(2) + hex.charAt(2), 16), 0);\n }\n if (size === 6) { // #ff0000\n return this.computeTbgrFromComponents(\n parseInt(hex.charAt(0) + hex.charAt(1), 16),\n parseInt(hex.charAt(2) + hex.charAt(3), 16),\n parseInt(hex.charAt(4) + hex.charAt(5), 16), 0);\n }\n }\n\n if (val && val.length > 0) { // ColorRgb value\n for (const [key, value] of Object.entries(ColorByName))\n if (key.toLowerCase() === val)\n return value;\n }\n\n return undefined;\n }\n\n /** Get the red, green, blue, and transparency values from this ColorDef. Values will be integers between 0-255. */\n public get colors(): { r: number, g: number, b: number, t: number } {\n return ColorDef.getColors(this._tbgr);\n }\n\n /** Get the r,g,b,t values encoded in an 0xTTBBGGRR value. Values will be integers between 0-255. */\n public static getColors(tbgr: ColorDefProps) {\n scratchUInt32[0] = tbgr;\n return {\n b: scratchBytes[2],\n g: scratchBytes[1],\n r: scratchBytes[0],\n t: scratchBytes[3],\n };\n }\n\n /** The color value of this ColorDef as an integer in the form 0xTTBBGGRR (red in the low byte) */\n public get tbgr(): ColorDefProps { return this._tbgr; }\n\n /** Get the value of the color as a number in 0xAABBGGRR format (i.e. red is in low byte). Transparency (0==fully opaque) converted to alpha (0==fully transparent). */\n public getAbgr(): number {\n return ColorDef.getAbgr(this._tbgr);\n }\n\n /** Get the value of a 0xTTBBGGRR color as a number in 0xAABBGGRR format (i.e. red is in low byte). Transparency (0==fully opaque) converted to alpha (0==fully transparent). */\n public static getAbgr(tbgr: ColorDefProps): number {\n scratchUInt32[0] = tbgr;\n scratchBytes[3] = 255 - scratchBytes[3];\n return scratchUInt32[0];\n }\n\n /** Get the RGB value of the color as a number in 0xRRGGBB format (i.e blue is in the low byte). Transparency is ignored. Value will be from 0 to 2^24 */\n public getRgb(): number {\n return ColorDef.getRgb(this._tbgr);\n }\n\n /** Get the RGB value of the 0xTTBBGGRR color as a number in 0xRRGGBB format (i.e blue is in the low byte). Transparency is ignored. Value will be from 0 to 2^24 */\n public static getRgb(tbgr: ColorDefProps): number {\n scratchUInt32[0] = tbgr;\n return (scratchBytes[0] << 16) + (scratchBytes[1] << 8) + scratchBytes[2];\n }\n\n /** Return a copy of this ColorDef with the specified alpha component.\n * @param alpha the new alpha value as an integer between 0-255.\n * @returns A ColorDef with equivalent red, green, and blue components to this one but with the specified alpha.\n */\n public withAlpha(alpha: number): ColorDef {\n const tbgr = ColorDef.withAlpha(this._tbgr, alpha);\n return tbgr === this._tbgr ? this : ColorDef.fromTbgr(tbgr);\n }\n\n /** Return a color equivalent to the specified 0xTTBBGGRR but with modified alpha component.\n * @param alpha the new alpha value as an integer between 0-255.\n * @returns The 0xTTBBGGRR value equivalent to `tbgr` but with the specified alpha.\n */\n public static withAlpha(tbgr: ColorDefProps, alpha: number): number {\n scratchUInt32[0] = tbgr;\n scratchBytes[3] = 255 - (alpha | 0);\n return scratchUInt32[0];\n }\n\n /** Get the alpha value for this ColorDef. Will be between 0-255 */\n public getAlpha(): number {\n return ColorDef.getAlpha(this._tbgr);\n }\n\n /** Extract the alpha value from a 0xTTBBGGRR color. */\n public static getAlpha(tbgr: ColorDefProps): number {\n scratchUInt32[0] = tbgr;\n return 255 - scratchBytes[3];\n }\n\n /** True if this ColorDef is fully opaque. */\n public get isOpaque(): boolean {\n return ColorDef.isOpaque(this._tbgr);\n }\n\n /** True if the specified 0xTTBBGGRR color is fully opaque. */\n public static isOpaque(tbgr: ColorDefProps): boolean {\n return 255 === this.getAlpha(tbgr);\n }\n\n /** Get the transparency value for this ColorDef (inverse of alpha). Will be between 0-255. */\n public getTransparency(): number {\n return ColorDef.getTransparency(this._tbgr);\n }\n\n /** Extract the transparency component from a 0xTTBBGGRR color as an integer between 0-255.. */\n public static getTransparency(tbgr: ColorDefProps): number {\n scratchUInt32[0] = tbgr;\n return scratchBytes[3];\n }\n\n /** Create a copy of this ColorDef with the specified transparency.\n * @param transparency the new transparency value. Must be between 0-255, where 0 means 'fully opaque' and 255 means 'fully transparent'.\n * @returns a new ColorDef with the same color as this one and the specified transparency.\n */\n public withTransparency(transparency: number): ColorDef {\n const tbgr = ColorDef.withTransparency(this._tbgr, transparency);\n return tbgr === this._tbgr ? this : ColorDef.fromTbgr(tbgr);\n }\n\n /** Compute the 0xTTBBGGRR value of the specified color and transparency.\n * @param transparency the new transparency as an integer between 0-255.\n * @returns The 0xTTBBGGRR value equivalent to `tbgr` but with the specified transparency.\n */\n public static withTransparency(tbgr: ColorDefProps, transparency: number): ColorDefProps {\n return this.withAlpha(tbgr, 255 - transparency);\n }\n\n /** The \"known name\" for this ColorDef. Will be undefined if color value is not in [[ColorByName]] list */\n public get name(): string | undefined {\n return ColorDef.getName(this.tbgr);\n }\n\n /** Obtain the name of the color in the [[ColorByName]] list associated with the specified 0xTTBBGGRR value, or undefined if no such named color exists.\n * @note A handful of colors (like \"aqua\" and \"cyan\") have identical tbgr values; in such cases the first match will be returned.\n */\n public static getName(tbgr: ColorDefProps): string | undefined {\n for (const [key, value] of Object.entries(ColorByName))\n if (value === tbgr)\n return key;\n\n return undefined;\n }\n\n /** Convert this ColorDef to a string in the form \"#rrggbb\" where values are hex digits of the respective colors */\n public toHexString(): string {\n return ColorDef.toHexString(this.tbgr);\n }\n\n /** Convert the 0xTTBBGGRR value to a string in the form \"#rrggbb\". */\n public static toHexString(tbgr: ColorDefProps): string {\n return `#${(`000000${this.getRgb(tbgr).toString(16)}`).slice(-6)}`;\n }\n\n private static getColorsString(tbgr: ColorDefProps) {\n const c = this.getColors(tbgr);\n return `${c.r},${c.g},${c.b}`;\n }\n\n /** Convert this ColorDef to a string in the form \"rgb(r,g,b)\" where values are decimal digits of the respective colors. */\n public toRgbString(): string {\n return ColorDef.toRgbString(this.tbgr);\n }\n\n /** Convert the 0xTTBBGGRR color to a string in the form \"rgb(r,g,b)\" where each component is specified in decimal. */\n public static toRgbString(tbgr: ColorDefProps): string {\n return `rgb(${this.getColorsString(tbgr)})`;\n }\n\n /** Convert this ColorDef to a string in the form \"rgba(r,g,b,a)\" where color values are decimal digits and a is a fraction */\n public toRgbaString(): string {\n return ColorDef.toRgbaString(this.tbgr);\n }\n\n /** Convert the 0xTTBBGGRR color to a string of the form \"rgba(r,g,b,a)\" where the color components are specified in decimal and the alpha component is a fraction. */\n public static toRgbaString(tbgr: ColorDefProps): string {\n return `rgba(${this.getColorsString(tbgr)},${this.getAlpha(tbgr) / 255.})`;\n }\n\n /** Create a ColorDef that is the linear interpolation of this ColorDef and another ColorDef, using a weighting factor.\n * @param color2 The other color\n * @param weight The weighting factor for color2. 0.0 = this color, 1.0 = color2.\n * @param result Optional ColorDef to hold result. If undefined, a new ColorDef is created.\n */\n public lerp(color2: ColorDef, weight: number): ColorDef {\n return ColorDef.fromTbgr(ColorDef.lerp(this.tbgr, color2.tbgr, weight));\n }\n\n /** Interpolate between two 0xTTBBGGRR colors using a weighting factor.\n * @param tbgr1 The first color\n * @param tbgr2 The other color\n * @param weight The weighting factor in [0..1]. A value of 0.0 selects `tbgr1`; 1.0 selects `tbgr2`; 0.5 mixes them evenly; etc.\n * @returns The linear interpolation between `tbgr1` and `tbgr2` using the specified weight.\n */\n public static lerp(tbgr1: ColorDefProps, tbgr2: ColorDefProps, weight: number): ColorDefProps {\n const c = this.getColors(tbgr1);\n const color = this.getColors(tbgr2);\n c.r += (color.r - c.r) * weight;\n c.g += (color.g - c.g) * weight;\n c.b += (color.b - c.b) * weight;\n return this.computeTbgrFromComponents(c.r, c.g, c.b, c.t);\n }\n\n /** Create a new ColorDef that is the inverse (all colors set to 255 - this) of this color. Ignores transparency - result has 0 transparency. */\n public inverse(): ColorDef {\n return ColorDef.fromTbgr(ColorDef.inverse(this.tbgr));\n }\n\n /** Return a 0xTTBBGGRR color whose color components are the inverse of the input color. The result has 0 transparency. */\n public static inverse(tbgr: ColorDefProps): ColorDefProps {\n const colors = this.getColors(tbgr);\n return this.computeTbgrFromComponents(255 - colors.r, 255 - colors.g, 255 - colors.b);\n }\n\n /** Create a ColorDef from hue, saturation, lightness values */\n public static fromHSL(h: number, s: number, l: number, transparency = 0): ColorDef {\n return this.fromTbgr(this.computeTbgrFromHSL(h, s, l, transparency));\n }\n\n /** Compute the 0xTTBBGGRR color corresponding to the specified hue, saturation, lightness values. */\n public static computeTbgrFromHSL(h: number, s: number, l: number, transparency = 0): ColorDefProps {\n const torgb = (p1: number, q1: number, t: number) => {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n\n if (t < 1 / 6)\n return p1 + (q1 - p1) * 6 * t;\n if (t < 1 / 2)\n return q1;\n if (t < 2 / 3)\n return p1 + (q1 - p1) * 6 * (2 / 3 - t);\n\n return p1;\n };\n\n const hue2rgb = (p1: number, q1: number, t: number) => Math.round(torgb(p1, q1, t) * 255);\n const modulo = (n: number, m: number) => ((n % m) + m) % m;\n\n // h,s,l ranges are in 0.0 - 1.0\n h = modulo(h, 1);\n s = Geometry.clamp(s, 0, 1);\n l = Geometry.clamp(l, 0, 1);\n\n if (s === 0) {\n l *= 255;\n return this.computeTbgrFromComponents(l, l, l, transparency);\n }\n\n const p = l <= 0.5 ? l * (1 + s) : l + s - (l * s);\n const q = (2 * l) - p;\n return this.computeTbgrFromComponents(\n hue2rgb(q, p, h + 1 / 3),\n hue2rgb(q, p, h),\n hue2rgb(q, p, h - 1 / 3),\n transparency);\n }\n\n /** Create an [[HSLColor]] from this ColorDef */\n public toHSL(): HSLColor {\n // h,s,l ranges are in 0.0 - 1.0\n const col = this.colors;\n col.r /= 255;\n col.g /= 255;\n col.b /= 255;\n const max = Math.max(col.r, col.g, col.b);\n const min = Math.min(col.r, col.g, col.b);\n\n let hue = 0;\n let saturation;\n const lightness = (min + max) / 2.0;\n\n if (min === max) {\n saturation = 0;\n } else {\n const delta = max - min;\n saturation = lightness <= 0.5 ? delta / (max + min) : delta / (2 - max - min);\n switch (max) {\n case col.r:\n hue = (col.g - col.b) / delta + (col.g < col.b ? 6 : 0);\n break;\n case col.g:\n hue = (col.b - col.r) / delta + 2;\n break;\n case col.b:\n hue = (col.r - col.g) / delta + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSLColor(hue, saturation, lightness);\n }\n\n /** Create an [[HSVColor]] from this ColorDef */\n public toHSV(): HSVColor {\n const { r, g, b } = this.colors;\n let min = (r < g) ? r : g;\n if (b < min)\n min = b;\n\n let max = (r > g) ? r : g;\n if (b > max)\n max = b;\n\n /* amount of \"blackness\" present */\n const v = Math.floor((max / 255.0 * 100) + 0.5);\n const deltaRgb = max - min;\n const s = (max !== 0.0) ? Math.floor((deltaRgb / max * 100) + 0.5) : 0;\n let h = 0;\n\n if (s) {\n const redDistance = (max - r) / deltaRgb;\n const greenDistance = (max - g) / deltaRgb;\n const blueDistance = (max - b) / deltaRgb;\n\n let intermediateHue: number;\n if (r === max) /* color between yellow & magenta */\n intermediateHue = blueDistance - greenDistance;\n else if (g === max) /* color between cyan & yellow */\n intermediateHue = 2.0 + redDistance - blueDistance;\n else /* color between magenta & cyan */\n intermediateHue = 4.0 + greenDistance - redDistance;\n\n /* intermediate hue is [0..6] */\n intermediateHue *= 60;\n\n if (intermediateHue < 0.0)\n intermediateHue += 360;\n\n h = Math.floor(intermediateHue + 0.5);\n\n if (h >= 360)\n h = 0;\n } else {\n h = 0;\n }\n\n return new HSVColor(h, s, v);\n }\n\n /** Create a ColorDef from an HSVColor */\n public static fromHSV(hsv: HSVColor, transparency = 0): ColorDef {\n // Check for simple case first.\n if ((!hsv.s) || (hsv.h === -1)) {\n // hue must be undefined, have no color only white\n const white = 0xff & Math.floor(((255.0 * hsv.v) / 100.0) + 0.5 + 3.0e-14);\n return ColorDef.from(white, white, white, 0);\n }\n\n let dhue = hsv.h, dsaturation = hsv.s, dvalue = hsv.v;\n if (dhue === 360)\n dhue = 0.0;\n\n dhue /= 60; // hue is now [0..6]\n const hueIntpart = Math.floor(dhue); // convert double -> int\n const hueFractpart = dhue - hueIntpart;\n dvalue /= 100;\n dsaturation /= 100;\n\n const p = 0xff & Math.floor((dvalue * (1.0 - dsaturation) * 255.0) + 0.5);\n const q = 0xff & Math.floor((dvalue * (1.0 - (dsaturation * hueFractpart)) * 255.0) + 0.5);\n const t = 0xff & Math.floor((dvalue * (1.0 - (dsaturation * (1.0 - hueFractpart))) * 255.0) + 0.5);\n const v = 0xff & Math.floor(dvalue * 255 + 0.5);\n\n let r = 0, b = 0, g = 0;\n switch (hueIntpart) {\n case 0: r = v; g = t; b = p; break; // reddish\n case 1: r = q, g = v; b = p; break; // yellowish\n case 2: r = p, g = v; b = t; break; // greenish\n case 3: r = p, g = q; b = v; break; // cyanish\n case 4: r = t, g = p; b = v; break; // bluish\n case 5: r = v, g = p; b = q; break; // magenta-ish\n }\n\n return ColorDef.from(r, g, b, transparency);\n }\n\n private visibilityCheck(other: ColorDef): number {\n const fg = this.colors;\n const bg = other.colors;\n // Compute luminosity\n const red = Math.abs(fg.r - bg.r);\n const green = Math.abs(fg.g - bg.g);\n const blue = Math.abs(fg.b - bg.b);\n return (0.30 * red) + (0.59 * green) + (0.11 * blue);\n }\n\n /**\n * Create a new ColorDef that is adjusted from this ColorDef for maximum contrast against another color. The color will either be lighter\n * or darker, depending on which has more visibility against the other color.\n * @param other the color to contrast with\n * @param alpha optional alpha value for the adjusted color. If not supplied alpha from this color is used.\n */\n public adjustedForContrast(other: ColorDef, alpha?: number): ColorDef {\n const visibility = this.visibilityCheck(other);\n if (HSVConstants.VISIBILITY_GOAL <= visibility) {\n return undefined !== alpha ? this.withAlpha(alpha) : this;\n }\n\n const adjPercent = Math.floor(((HSVConstants.VISIBILITY_GOAL - visibility) / 255.0) * 100.0);\n let darkerHSV = this.toHSV();\n let brightHSV = darkerHSV.clone();\n\n darkerHSV = darkerHSV.adjusted(true, adjPercent);\n brightHSV = brightHSV.adjusted(false, adjPercent);\n\n if (undefined === alpha)\n alpha = this.getAlpha();\n\n const darker = ColorDef.fromHSV(darkerHSV).withAlpha(alpha);\n const bright = ColorDef.fromHSV(brightHSV).withAlpha(alpha);\n\n if (bright.getRgb() === other.getRgb()) // Couldn't adjust brighter...\n return darker;\n\n if (darker.getRgb() === other.getRgb()) // Couldn't adjust darker...\n return bright;\n\n // NOTE: Best choice is the one most visible against the other color...\n return (bright.visibilityCheck(other) >= darker.visibilityCheck(other)) ? bright : darker;\n }\n\n /** True if the value of this ColorDef is the same as another ColorDef. */\n public equals(other: ColorDef): boolean {\n return this._tbgr === other._tbgr;\n }\n\n /** pure black */\n public static readonly black = new ColorDef(ColorByName.black);\n /** pure white */\n public static readonly white = new ColorDef(ColorByName.white);\n /** pure red */\n public static readonly red = new ColorDef(ColorByName.red);\n /** pure green */\n public static readonly green = new ColorDef(ColorByName.green);\n /** pure blue */\n public static readonly blue = new ColorDef(ColorByName.blue);\n}\n"]}
1
+ {"version":3,"file":"ColorDef.js","sourceRoot":"","sources":["../../src/ColorDef.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAgD;AAChD,+CAA4C;AAC5C,yCAAsC;AACtC,yCAAoD;AAEpD,+HAA+H;AAE/H,wEAAwE;AAExE,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,CAA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QACvE,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5F,CAAC;IAED,0EAA0E;IACnE,MAAM,CAAC,KAAe;QAC3B,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACpC,CAAC;IAED,iBAAiB;IACV,MAAM,CAAU,KAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;IAC/D,iBAAiB;IACV,MAAM,CAAU,KAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;IAC/D,eAAe;IACR,MAAM,CAAU,GAAG,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,GAAG,CAAC,CAAC;IAC3D,iBAAiB;IACV,MAAM,CAAU,KAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;IAC/D,gBAAgB;IACT,MAAM,CAAU,IAAI,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,IAAI,CAAC,CAAC;;AAnmB/D,4BAomBC","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 Symbology\r\n */\r\n\r\nimport { Geometry } from \"@itwin/core-geometry\";\r\nimport { ColorByName } from \"./ColorByName\";\r\nimport { HSLColor } from \"./HSLColor\";\r\nimport { HSVColor, HSVConstants } from \"./HSVColor\";\r\n\r\n// cspell: ignore ttbbggrr bbggrr rrggbb aabbggrr abgr rrggbb hsla lerp torgb dhue dsaturation dvalue intpart fractpart cyanish\r\n\r\n// portions adapted from Three.js Copyright © 2010-2024 three.js authors\r\n\r\nconst scratchBytes = new Uint8Array(4);\r\nconst scratchUInt32 = new Uint32Array(scratchBytes.buffer);\r\n\r\n/** The JSON representation of a [[ColorDef]] - an unsigned 32-bit integer in 0xTTBBGGRR format.\r\n * @public\r\n * @extensions\r\n */\r\nexport type ColorDefProps = number;\r\n\r\n/** An immutable integer representation of a color.\r\n *\r\n * A color consists of 4 components: Red, Blue, Green, and Transparency. Each component is an 8-bit unsigned integer in the range [0..255]. A value of zero means that component contributes nothing\r\n * to the color: e.g., a color with Red=0 contains no shade of red, and a color with Transparency=0 is fully opaque. A value of 255 means that component contributes its maximum\r\n * value to the color: e.g., a color with Red=255 is as red as it is possible to be, and a color with Transparency=255 is fully transparent.\r\n *\r\n * Internally, these 4 components are combined into a single 32-bit unsigned integer as represented by [[ColorDefProps]]. This representation can result in some confusion regarding:\r\n * 1. The ordering of the individual components; and\r\n * 2. Whether to specify transparency or opacity (sometimes referred to as \"alpha\").\r\n *\r\n * ColorDef uses `0xTTBBGGRR` internally, which uses Transparency and puts Red in the low byte and Transparency in the high byte. It can be converted to `0xRRGGBB` format (blue in the low byte)\r\n * using [[getRgb]] and `0xAABBGGRRx format (red in the low byte, using opacity instead of transparency) using [[getAbgr]].\r\n *\r\n * A ColorDef can be created from a numeric [[ColorDefProps]], from a string in one of the common HTML formats (e.g., [[fromString]]), or by specifying values for the individual components\r\n * (e.g., [[from]]).\r\n *\r\n * ColorDef is **immutable**. To obtain a modified copy of a ColorDef, use methods like [[adjustedForContrast]], [[inverse]], or [[withTransparency]]. For example:\r\n * ```ts\r\n * const semiTransparentBlue = ColorDef.blue.withTransparency(100);\r\n * ```\r\n * @public\r\n * @extensions\r\n */\r\nexport class ColorDef {\r\n private readonly _tbgr: number;\r\n\r\n private constructor(tbgr: number) {\r\n scratchUInt32[0] = tbgr; // Force to be a 32-bit unsigned integer\r\n this._tbgr = scratchUInt32[0];\r\n }\r\n\r\n /**\r\n * Create a new ColorDef.\r\n * @param val value to use.\r\n * If a number, it is interpreted as a 0xTTBBGGRR (Red in the low byte, high byte is transparency 0==fully opaque) value.\r\n * If a string, it must be in one of the forms supported by [[fromString]] - any unrecognized string will produce [[black]].\r\n */\r\n public static create(val?: string | ColorDefProps) {\r\n return this.fromTbgr(this.computeTbgr(val));\r\n }\r\n\r\n /** Compute the 0xTTBBGGRR value corresponding to the specified representation of a color.\r\n * @see [[fromString]] for a description of valid string representations.\r\n */\r\n public static computeTbgr(val?: string | ColorDefProps): ColorDefProps {\r\n switch (typeof val) {\r\n case \"number\":\r\n return val;\r\n case \"string\":\r\n return this.computeTbgrFromString(val);\r\n default:\r\n return 0;\r\n }\r\n }\r\n\r\n /** Convert this ColorDef to a 32 bit number representing the 0xTTBBGGRR value */\r\n public toJSON(): ColorDefProps { return this._tbgr; }\r\n\r\n /** Create a new ColorDef from a json object. If the json object is a number, it is assumed to be a 0xTTBBGGRR value. */\r\n public static fromJSON(json?: ColorDefProps): ColorDef {\r\n return this.create(json);\r\n }\r\n\r\n /** Create a ColorDef from Red, Green, Blue, Transparency values. All inputs should be integers between 0-255. */\r\n public static from(red: number, green: number, blue: number, transparency?: number): ColorDef {\r\n return this.fromTbgr(this.computeTbgrFromComponents(red, green, blue, transparency));\r\n }\r\n\r\n /** Compute the 0xTTBBGGRR value corresponding to the specified Red, Green, Blue, Transparency components. All inputs should be integers between 0-255. */\r\n public static computeTbgrFromComponents(red: number, green: number, blue: number, transparency?: number): ColorDefProps {\r\n scratchBytes[0] = red;\r\n scratchBytes[1] = green;\r\n scratchBytes[2] = blue;\r\n scratchBytes[3] = transparency || 0;\r\n return scratchUInt32[0];\r\n }\r\n\r\n /** Create a ColorDef from its 0xTTBBGGRR representation. */\r\n public static fromTbgr(tbgr: ColorDefProps): ColorDef {\r\n switch (tbgr) {\r\n case ColorByName.black:\r\n return this.black;\r\n case ColorByName.white:\r\n return this.white;\r\n case ColorByName.red:\r\n return this.red;\r\n case ColorByName.green:\r\n return this.green;\r\n case ColorByName.blue:\r\n return this.blue;\r\n default:\r\n return new ColorDef(tbgr);\r\n }\r\n }\r\n\r\n /** Create a ColorDef from its 0xAABBGGRR representation. */\r\n public static fromAbgr(abgr: number): ColorDef {\r\n return this.fromTbgr(this.getAbgr(abgr));\r\n }\r\n\r\n /** Create a ColorDef from a string representation. The following representations are supported:\r\n * *\"rgb(255,0,0)\"*\r\n * *\"rgba(255,0,0,.2)\"*\r\n * *\"rgb(100%,0%,0%)\"*\r\n * *\"hsl(120,50%,50%)\"*\r\n * *\"#rrbbgg\"*\r\n * *\"blanchedAlmond\"* (see possible values from [[ColorByName]]). Case-insensitive.\r\n *\r\n * If `val` is not a valid color string, this function returns [[black]].\r\n * @see [[isValidColor]] to determine if `val` is a valid color string.\r\n */\r\n public static fromString(val: string): ColorDef {\r\n return this.fromTbgr(this.computeTbgrFromString(val));\r\n }\r\n\r\n /** Determine whether the input is a valid representation of a ColorDef.\r\n * @see [[fromString]] for the definition of a valid string representation.\r\n * @see [[ColorDefProps]] for the definition of a valid numeric representation.\r\n */\r\n public static isValidColor(val: string | number): boolean {\r\n if (typeof val === \"number\")\r\n return val >= 0 && val <= 0xffffffff && Math.floor(val) === val;\r\n\r\n return undefined !== this.tryComputeTbgrFromString(val);\r\n }\r\n\r\n /** Compute the 0xTTBBGGRR value corresponding to a string representation of a color.\r\n * If `val` is not a valid color string, this function returns 0 (black).\r\n * @see [[fromString]] for the definition of a valid color string.\r\n * @see [[tryComputeTbgrFromString]] to determine if `val` is a valid color string.\r\n */\r\n public static computeTbgrFromString(val: string): ColorDefProps {\r\n return this.tryComputeTbgrFromString(val) ?? 0;\r\n }\r\n\r\n /** Try to compute the 0xTTBBGGRR value corresponding to a string representation of a ColorDef.\r\n * @returns the corresponding numeric representation, or `undefined` if the input does not represent a color.\r\n * @see [[fromString]] for the definition of a valid color string.\r\n */\r\n public static tryComputeTbgrFromString(val: string): ColorDefProps | undefined {\r\n if (typeof val !== \"string\")\r\n return undefined;\r\n\r\n val = val.toLowerCase();\r\n let m = /^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(val);\r\n if (m) { // rgb / hsl\r\n let color;\r\n const name = m[1];\r\n const components = m[2];\r\n\r\n const hasPercent = (str: string) => str[str.length - 1] === \"%\";\r\n const floatOrPercent = (str: string) => {\r\n const v = parseFloat(str);\r\n return 255 * Geometry.clamp(hasPercent(str) ? v / 100 : v, 0, 1);\r\n };\r\n const intOrPercent = (str: string) => {\r\n const v = hasPercent(str) ? (parseFloat(str) / 100) * 255 : parseInt(str, 10);\r\n return Geometry.clamp(v, 0, 255);\r\n };\r\n\r\n switch (name) {\r\n case \"rgb\":\r\n case \"rgba\":\r\n color = /^(\\d+%*)\\s*[, ]\\s*(\\d+%*)\\s*[, ]\\s*(\\d+%*)\\s*([,\\/]\\s*([0-9]*\\.?[0-9]+%*)\\s*)?$/.exec(components);\r\n if (color) { // rgb(255,0,0) rgba(255,0,0,0.5)\r\n return this.computeTbgrFromComponents(\r\n intOrPercent(color[1]),\r\n intOrPercent(color[2]),\r\n intOrPercent(color[3]),\r\n typeof color[5] === \"string\" ? 255 - floatOrPercent(color[5]) : 0);\r\n }\r\n\r\n break;\r\n case \"hsl\":\r\n case \"hsla\":\r\n color = /^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(components);\r\n if (color) { // hsl(120,50%,50%) hsla(120,50%,50%,0.5)\r\n const h = parseFloat(color[1]) / 360;\r\n const s = parseInt(color[2], 10) / 100;\r\n const l = parseInt(color[3], 10) / 100;\r\n const t = typeof color[5] === \"string\" ? 255 - floatOrPercent(color[5]) : 0;\r\n return this.computeTbgrFromHSL(h, s, l, t);\r\n }\r\n\r\n break;\r\n }\r\n } else if (m = /^\\#([a-f0-9]+)$/.exec(val)) { // hex color\r\n const hex = m[1];\r\n const size = hex.length;\r\n\r\n if (size === 3) { // #ff0\r\n return this.computeTbgrFromComponents(\r\n parseInt(hex.charAt(0) + hex.charAt(0), 16),\r\n parseInt(hex.charAt(1) + hex.charAt(1), 16),\r\n parseInt(hex.charAt(2) + hex.charAt(2), 16), 0);\r\n }\r\n if (size === 6) { // #ff0000\r\n return this.computeTbgrFromComponents(\r\n parseInt(hex.charAt(0) + hex.charAt(1), 16),\r\n parseInt(hex.charAt(2) + hex.charAt(3), 16),\r\n parseInt(hex.charAt(4) + hex.charAt(5), 16), 0);\r\n }\r\n }\r\n\r\n if (val && val.length > 0) { // ColorRgb value\r\n for (const [key, value] of Object.entries(ColorByName))\r\n if (key.toLowerCase() === val)\r\n return value;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Get the red, green, blue, and transparency values from this ColorDef. Values will be integers between 0-255. */\r\n public get colors(): { r: number, g: number, b: number, t: number } {\r\n return ColorDef.getColors(this._tbgr);\r\n }\r\n\r\n /** Get the r,g,b,t values encoded in an 0xTTBBGGRR value. Values will be integers between 0-255. */\r\n public static getColors(tbgr: ColorDefProps) {\r\n scratchUInt32[0] = tbgr;\r\n return {\r\n b: scratchBytes[2],\r\n g: scratchBytes[1],\r\n r: scratchBytes[0],\r\n t: scratchBytes[3],\r\n };\r\n }\r\n\r\n /** The color value of this ColorDef as an integer in the form 0xTTBBGGRR (red in the low byte) */\r\n public get tbgr(): ColorDefProps { return this._tbgr; }\r\n\r\n /** Get the value of the color as a number in 0xAABBGGRR format (i.e. red is in low byte). Transparency (0==fully opaque) converted to alpha (0==fully transparent). */\r\n public getAbgr(): number {\r\n return ColorDef.getAbgr(this._tbgr);\r\n }\r\n\r\n /** Get the value of a 0xTTBBGGRR color as a number in 0xAABBGGRR format (i.e. red is in low byte). Transparency (0==fully opaque) converted to alpha (0==fully transparent). */\r\n public static getAbgr(tbgr: ColorDefProps): number {\r\n scratchUInt32[0] = tbgr;\r\n scratchBytes[3] = 255 - scratchBytes[3];\r\n return scratchUInt32[0];\r\n }\r\n\r\n /** Get the RGB value of the color as a number in 0xRRGGBB format (i.e blue is in the low byte). Transparency is ignored. Value will be from 0 to 2^24 */\r\n public getRgb(): number {\r\n return ColorDef.getRgb(this._tbgr);\r\n }\r\n\r\n /** Get the RGB value of the 0xTTBBGGRR color as a number in 0xRRGGBB format (i.e blue is in the low byte). Transparency is ignored. Value will be from 0 to 2^24 */\r\n public static getRgb(tbgr: ColorDefProps): number {\r\n scratchUInt32[0] = tbgr;\r\n return (scratchBytes[0] << 16) + (scratchBytes[1] << 8) + scratchBytes[2];\r\n }\r\n\r\n /** Return a copy of this ColorDef with the specified alpha component.\r\n * @param alpha the new alpha value as an integer between 0-255.\r\n * @returns A ColorDef with equivalent red, green, and blue components to this one but with the specified alpha.\r\n */\r\n public withAlpha(alpha: number): ColorDef {\r\n const tbgr = ColorDef.withAlpha(this._tbgr, alpha);\r\n return tbgr === this._tbgr ? this : ColorDef.fromTbgr(tbgr);\r\n }\r\n\r\n /** Return a color equivalent to the specified 0xTTBBGGRR but with modified alpha component.\r\n * @param alpha the new alpha value as an integer between 0-255.\r\n * @returns The 0xTTBBGGRR value equivalent to `tbgr` but with the specified alpha.\r\n */\r\n public static withAlpha(tbgr: ColorDefProps, alpha: number): number {\r\n scratchUInt32[0] = tbgr;\r\n scratchBytes[3] = 255 - (alpha | 0);\r\n return scratchUInt32[0];\r\n }\r\n\r\n /** Get the alpha value for this ColorDef. Will be between 0-255 */\r\n public getAlpha(): number {\r\n return ColorDef.getAlpha(this._tbgr);\r\n }\r\n\r\n /** Extract the alpha value from a 0xTTBBGGRR color. */\r\n public static getAlpha(tbgr: ColorDefProps): number {\r\n scratchUInt32[0] = tbgr;\r\n return 255 - scratchBytes[3];\r\n }\r\n\r\n /** True if this ColorDef is fully opaque. */\r\n public get isOpaque(): boolean {\r\n return ColorDef.isOpaque(this._tbgr);\r\n }\r\n\r\n /** True if the specified 0xTTBBGGRR color is fully opaque. */\r\n public static isOpaque(tbgr: ColorDefProps): boolean {\r\n return 255 === this.getAlpha(tbgr);\r\n }\r\n\r\n /** Get the transparency value for this ColorDef (inverse of alpha). Will be between 0-255. */\r\n public getTransparency(): number {\r\n return ColorDef.getTransparency(this._tbgr);\r\n }\r\n\r\n /** Extract the transparency component from a 0xTTBBGGRR color as an integer between 0-255.. */\r\n public static getTransparency(tbgr: ColorDefProps): number {\r\n scratchUInt32[0] = tbgr;\r\n return scratchBytes[3];\r\n }\r\n\r\n /** Create a copy of this ColorDef with the specified transparency.\r\n * @param transparency the new transparency value. Must be between 0-255, where 0 means 'fully opaque' and 255 means 'fully transparent'.\r\n * @returns a new ColorDef with the same color as this one and the specified transparency.\r\n */\r\n public withTransparency(transparency: number): ColorDef {\r\n const tbgr = ColorDef.withTransparency(this._tbgr, transparency);\r\n return tbgr === this._tbgr ? this : ColorDef.fromTbgr(tbgr);\r\n }\r\n\r\n /** Compute the 0xTTBBGGRR value of the specified color and transparency.\r\n * @param transparency the new transparency as an integer between 0-255.\r\n * @returns The 0xTTBBGGRR value equivalent to `tbgr` but with the specified transparency.\r\n */\r\n public static withTransparency(tbgr: ColorDefProps, transparency: number): ColorDefProps {\r\n return this.withAlpha(tbgr, 255 - transparency);\r\n }\r\n\r\n /** The \"known name\" for this ColorDef. Will be undefined if color value is not in [[ColorByName]] list */\r\n public get name(): string | undefined {\r\n return ColorDef.getName(this.tbgr);\r\n }\r\n\r\n /** Obtain the name of the color in the [[ColorByName]] list associated with the specified 0xTTBBGGRR value, or undefined if no such named color exists.\r\n * @note A handful of colors (like \"aqua\" and \"cyan\") have identical tbgr values; in such cases the first match will be returned.\r\n */\r\n public static getName(tbgr: ColorDefProps): string | undefined {\r\n for (const [key, value] of Object.entries(ColorByName))\r\n if (value === tbgr)\r\n return key;\r\n\r\n return undefined;\r\n }\r\n\r\n /** Convert this ColorDef to a string in the form \"#rrggbb\" where values are hex digits of the respective colors */\r\n public toHexString(): string {\r\n return ColorDef.toHexString(this.tbgr);\r\n }\r\n\r\n /** Convert the 0xTTBBGGRR value to a string in the form \"#rrggbb\". */\r\n public static toHexString(tbgr: ColorDefProps): string {\r\n return `#${(`000000${this.getRgb(tbgr).toString(16)}`).slice(-6)}`;\r\n }\r\n\r\n private static getColorsString(tbgr: ColorDefProps) {\r\n const c = this.getColors(tbgr);\r\n return `${c.r},${c.g},${c.b}`;\r\n }\r\n\r\n /** Convert this ColorDef to a string in the form \"rgb(r,g,b)\" where values are decimal digits of the respective colors. */\r\n public toRgbString(): string {\r\n return ColorDef.toRgbString(this.tbgr);\r\n }\r\n\r\n /** Convert the 0xTTBBGGRR color to a string in the form \"rgb(r,g,b)\" where each component is specified in decimal. */\r\n public static toRgbString(tbgr: ColorDefProps): string {\r\n return `rgb(${this.getColorsString(tbgr)})`;\r\n }\r\n\r\n /** Convert this ColorDef to a string in the form \"rgba(r,g,b,a)\" where color values are decimal digits and a is a fraction */\r\n public toRgbaString(): string {\r\n return ColorDef.toRgbaString(this.tbgr);\r\n }\r\n\r\n /** Convert the 0xTTBBGGRR color to a string of the form \"rgba(r,g,b,a)\" where the color components are specified in decimal and the alpha component is a fraction. */\r\n public static toRgbaString(tbgr: ColorDefProps): string {\r\n return `rgba(${this.getColorsString(tbgr)},${this.getAlpha(tbgr) / 255.})`;\r\n }\r\n\r\n /** Create a ColorDef that is the linear interpolation of this ColorDef and another ColorDef, using a weighting factor.\r\n * @param color2 The other color\r\n * @param weight The weighting factor for color2. 0.0 = this color, 1.0 = color2.\r\n * @param result Optional ColorDef to hold result. If undefined, a new ColorDef is created.\r\n */\r\n public lerp(color2: ColorDef, weight: number): ColorDef {\r\n return ColorDef.fromTbgr(ColorDef.lerp(this.tbgr, color2.tbgr, weight));\r\n }\r\n\r\n /** Interpolate between two 0xTTBBGGRR colors using a weighting factor.\r\n * @param tbgr1 The first color\r\n * @param tbgr2 The other color\r\n * @param weight The weighting factor in [0..1]. A value of 0.0 selects `tbgr1`; 1.0 selects `tbgr2`; 0.5 mixes them evenly; etc.\r\n * @returns The linear interpolation between `tbgr1` and `tbgr2` using the specified weight.\r\n */\r\n public static lerp(tbgr1: ColorDefProps, tbgr2: ColorDefProps, weight: number): ColorDefProps {\r\n const c = this.getColors(tbgr1);\r\n const color = this.getColors(tbgr2);\r\n c.r += (color.r - c.r) * weight;\r\n c.g += (color.g - c.g) * weight;\r\n c.b += (color.b - c.b) * weight;\r\n return this.computeTbgrFromComponents(c.r, c.g, c.b, c.t);\r\n }\r\n\r\n /** Create a new ColorDef that is the inverse (all colors set to 255 - this) of this color. Ignores transparency - result has 0 transparency. */\r\n public inverse(): ColorDef {\r\n return ColorDef.fromTbgr(ColorDef.inverse(this.tbgr));\r\n }\r\n\r\n /** Return a 0xTTBBGGRR color whose color components are the inverse of the input color. The result has 0 transparency. */\r\n public static inverse(tbgr: ColorDefProps): ColorDefProps {\r\n const colors = this.getColors(tbgr);\r\n return this.computeTbgrFromComponents(255 - colors.r, 255 - colors.g, 255 - colors.b);\r\n }\r\n\r\n /** Create a ColorDef from hue, saturation, lightness values */\r\n public static fromHSL(h: number, s: number, l: number, transparency = 0): ColorDef {\r\n return this.fromTbgr(this.computeTbgrFromHSL(h, s, l, transparency));\r\n }\r\n\r\n /** Compute the 0xTTBBGGRR color corresponding to the specified hue, saturation, lightness values. */\r\n public static computeTbgrFromHSL(h: number, s: number, l: number, transparency = 0): ColorDefProps {\r\n const torgb = (p1: number, q1: number, t: number) => {\r\n if (t < 0)\r\n t += 1;\r\n if (t > 1)\r\n t -= 1;\r\n\r\n if (t < 1 / 6)\r\n return p1 + (q1 - p1) * 6 * t;\r\n if (t < 1 / 2)\r\n return q1;\r\n if (t < 2 / 3)\r\n return p1 + (q1 - p1) * 6 * (2 / 3 - t);\r\n\r\n return p1;\r\n };\r\n\r\n const hue2rgb = (p1: number, q1: number, t: number) => Math.round(torgb(p1, q1, t) * 255);\r\n const modulo = (n: number, m: number) => ((n % m) + m) % m;\r\n\r\n // h,s,l ranges are in 0.0 - 1.0\r\n h = modulo(h, 1);\r\n s = Geometry.clamp(s, 0, 1);\r\n l = Geometry.clamp(l, 0, 1);\r\n\r\n if (s === 0) {\r\n l *= 255;\r\n return this.computeTbgrFromComponents(l, l, l, transparency);\r\n }\r\n\r\n const p = l <= 0.5 ? l * (1 + s) : l + s - (l * s);\r\n const q = (2 * l) - p;\r\n return this.computeTbgrFromComponents(\r\n hue2rgb(q, p, h + 1 / 3),\r\n hue2rgb(q, p, h),\r\n hue2rgb(q, p, h - 1 / 3),\r\n transparency);\r\n }\r\n\r\n /** Create an [[HSLColor]] from this ColorDef */\r\n public toHSL(): HSLColor {\r\n // h,s,l ranges are in 0.0 - 1.0\r\n const col = this.colors;\r\n col.r /= 255;\r\n col.g /= 255;\r\n col.b /= 255;\r\n const max = Math.max(col.r, col.g, col.b);\r\n const min = Math.min(col.r, col.g, col.b);\r\n\r\n let hue = 0;\r\n let saturation;\r\n const lightness = (min + max) / 2.0;\r\n\r\n if (min === max) {\r\n saturation = 0;\r\n } else {\r\n const delta = max - min;\r\n saturation = lightness <= 0.5 ? delta / (max + min) : delta / (2 - max - min);\r\n switch (max) {\r\n case col.r:\r\n hue = (col.g - col.b) / delta + (col.g < col.b ? 6 : 0);\r\n break;\r\n case col.g:\r\n hue = (col.b - col.r) / delta + 2;\r\n break;\r\n case col.b:\r\n hue = (col.r - col.g) / delta + 4;\r\n break;\r\n }\r\n\r\n hue /= 6;\r\n }\r\n\r\n return new HSLColor(hue, saturation, lightness);\r\n }\r\n\r\n /** Create an [[HSVColor]] from this ColorDef */\r\n public toHSV(): HSVColor {\r\n const { r, g, b } = this.colors;\r\n let min = (r < g) ? r : g;\r\n if (b < min)\r\n min = b;\r\n\r\n let max = (r > g) ? r : g;\r\n if (b > max)\r\n max = b;\r\n\r\n /* amount of \"blackness\" present */\r\n const v = Math.floor((max / 255.0 * 100) + 0.5);\r\n const deltaRgb = max - min;\r\n const s = (max !== 0.0) ? Math.floor((deltaRgb / max * 100) + 0.5) : 0;\r\n let h = 0;\r\n\r\n if (s) {\r\n const redDistance = (max - r) / deltaRgb;\r\n const greenDistance = (max - g) / deltaRgb;\r\n const blueDistance = (max - b) / deltaRgb;\r\n\r\n let intermediateHue: number;\r\n if (r === max) /* color between yellow & magenta */\r\n intermediateHue = blueDistance - greenDistance;\r\n else if (g === max) /* color between cyan & yellow */\r\n intermediateHue = 2.0 + redDistance - blueDistance;\r\n else /* color between magenta & cyan */\r\n intermediateHue = 4.0 + greenDistance - redDistance;\r\n\r\n /* intermediate hue is [0..6] */\r\n intermediateHue *= 60;\r\n\r\n if (intermediateHue < 0.0)\r\n intermediateHue += 360;\r\n\r\n h = Math.floor(intermediateHue + 0.5);\r\n\r\n if (h >= 360)\r\n h = 0;\r\n } else {\r\n h = 0;\r\n }\r\n\r\n return new HSVColor(h, s, v);\r\n }\r\n\r\n /** Create a ColorDef from an HSVColor */\r\n public static fromHSV(hsv: HSVColor, transparency = 0): ColorDef {\r\n // Check for simple case first.\r\n if ((!hsv.s) || (hsv.h === -1)) {\r\n // hue must be undefined, have no color only white\r\n const white = 0xff & Math.floor(((255.0 * hsv.v) / 100.0) + 0.5 + 3.0e-14);\r\n return ColorDef.from(white, white, white, 0);\r\n }\r\n\r\n let dhue = hsv.h, dsaturation = hsv.s, dvalue = hsv.v;\r\n if (dhue === 360)\r\n dhue = 0.0;\r\n\r\n dhue /= 60; // hue is now [0..6]\r\n const hueIntpart = Math.floor(dhue); // convert double -> int\r\n const hueFractpart = dhue - hueIntpart;\r\n dvalue /= 100;\r\n dsaturation /= 100;\r\n\r\n const p = 0xff & Math.floor((dvalue * (1.0 - dsaturation) * 255.0) + 0.5);\r\n const q = 0xff & Math.floor((dvalue * (1.0 - (dsaturation * hueFractpart)) * 255.0) + 0.5);\r\n const t = 0xff & Math.floor((dvalue * (1.0 - (dsaturation * (1.0 - hueFractpart))) * 255.0) + 0.5);\r\n const v = 0xff & Math.floor(dvalue * 255 + 0.5);\r\n\r\n let r = 0, b = 0, g = 0;\r\n switch (hueIntpart) {\r\n case 0: r = v; g = t; b = p; break; // reddish\r\n case 1: r = q, g = v; b = p; break; // yellowish\r\n case 2: r = p, g = v; b = t; break; // greenish\r\n case 3: r = p, g = q; b = v; break; // cyanish\r\n case 4: r = t, g = p; b = v; break; // bluish\r\n case 5: r = v, g = p; b = q; break; // magenta-ish\r\n }\r\n\r\n return ColorDef.from(r, g, b, transparency);\r\n }\r\n\r\n private visibilityCheck(other: ColorDef): number {\r\n const fg = this.colors;\r\n const bg = other.colors;\r\n // Compute luminosity\r\n const red = Math.abs(fg.r - bg.r);\r\n const green = Math.abs(fg.g - bg.g);\r\n const blue = Math.abs(fg.b - bg.b);\r\n return (0.30 * red) + (0.59 * green) + (0.11 * blue);\r\n }\r\n\r\n /**\r\n * Create a new ColorDef that is adjusted from this ColorDef for maximum contrast against another color. The color will either be lighter\r\n * or darker, depending on which has more visibility against the other color.\r\n * @param other the color to contrast with\r\n * @param alpha optional alpha value for the adjusted color. If not supplied alpha from this color is used.\r\n */\r\n public adjustedForContrast(other: ColorDef, alpha?: number): ColorDef {\r\n const visibility = this.visibilityCheck(other);\r\n if (HSVConstants.VISIBILITY_GOAL <= visibility) {\r\n return undefined !== alpha ? this.withAlpha(alpha) : this;\r\n }\r\n\r\n const adjPercent = Math.floor(((HSVConstants.VISIBILITY_GOAL - visibility) / 255.0) * 100.0);\r\n let darkerHSV = this.toHSV();\r\n let brightHSV = darkerHSV.clone();\r\n\r\n darkerHSV = darkerHSV.adjusted(true, adjPercent);\r\n brightHSV = brightHSV.adjusted(false, adjPercent);\r\n\r\n if (undefined === alpha)\r\n alpha = this.getAlpha();\r\n\r\n const darker = ColorDef.fromHSV(darkerHSV).withAlpha(alpha);\r\n const bright = ColorDef.fromHSV(brightHSV).withAlpha(alpha);\r\n\r\n if (bright.getRgb() === other.getRgb()) // Couldn't adjust brighter...\r\n return darker;\r\n\r\n if (darker.getRgb() === other.getRgb()) // Couldn't adjust darker...\r\n return bright;\r\n\r\n // NOTE: Best choice is the one most visible against the other color...\r\n return (bright.visibilityCheck(other) >= darker.visibilityCheck(other)) ? bright : darker;\r\n }\r\n\r\n /** True if the value of this ColorDef is the same as another ColorDef. */\r\n public equals(other: ColorDef): boolean {\r\n return this._tbgr === other._tbgr;\r\n }\r\n\r\n /** pure black */\r\n public static readonly black = new ColorDef(ColorByName.black);\r\n /** pure white */\r\n public static readonly white = new ColorDef(ColorByName.white);\r\n /** pure red */\r\n public static readonly red = new ColorDef(ColorByName.red);\r\n /** pure green */\r\n public static readonly green = new ColorDef(ColorByName.green);\r\n /** pure blue */\r\n public static readonly blue = new ColorDef(ColorByName.blue);\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CommonLoggerCategory.js","sourceRoot":"","sources":["../../src/CommonLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,4EAA4E;IAC5E,+DAAuC,CAAA;IACvC,2EAA2E;IAC3E,iEAAyC,CAAA;IACzC,uEAAuE;IACvE,yDAAiC,CAAA;IACjC,sGAAsG;IACtG,yEAAiD,CAAA;IACjD,uGAAuG;IACvG,2EAAmD,CAAA;AACrD,CAAC,EAXW,oBAAoB,oCAApB,oBAAoB,QAW/B","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 Logging\n */\n\n/** Logger categories used by this package\n * @see [Logger]($bentley)\n * @public\n * @extensions\n */\nexport enum CommonLoggerCategory {\n /** The logger category used by common APIs relating to text annotations. */\n Annotations = \"core-common.Annotations\",\n /** The logger category used by common classes relating to ElementProps. */\n ElementProps = \"core-common.ElementProps\",\n /** The logger category used by common classes relating to Geometry. */\n Geometry = \"core-common.Geometry\",\n /** The logger category used by the portions of the RpcInterface framework that run on the backend. */\n RpcInterfaceBackend = \"core-backend.RpcInterface\",\n /** The logger category used by the portions of the RpcInterface framework that run on the frontend. */\n RpcInterfaceFrontend = \"core-frontend.RpcInterface\",\n}\n"]}
1
+ {"version":3,"file":"CommonLoggerCategory.js","sourceRoot":"","sources":["../../src/CommonLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,4EAA4E;IAC5E,+DAAuC,CAAA;IACvC,2EAA2E;IAC3E,iEAAyC,CAAA;IACzC,uEAAuE;IACvE,yDAAiC,CAAA;IACjC,sGAAsG;IACtG,yEAAiD,CAAA;IACjD,uGAAuG;IACvG,2EAAmD,CAAA;AACrD,CAAC,EAXW,oBAAoB,oCAApB,oBAAoB,QAW/B","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 Logging\r\n */\r\n\r\n/** Logger categories used by this package\r\n * @see [Logger]($bentley)\r\n * @public\r\n * @extensions\r\n */\r\nexport enum CommonLoggerCategory {\r\n /** The logger category used by common APIs relating to text annotations. */\r\n Annotations = \"core-common.Annotations\",\r\n /** The logger category used by common classes relating to ElementProps. */\r\n ElementProps = \"core-common.ElementProps\",\r\n /** The logger category used by common classes relating to Geometry. */\r\n Geometry = \"core-common.Geometry\",\r\n /** The logger category used by the portions of the RpcInterface framework that run on the backend. */\r\n RpcInterfaceBackend = \"core-backend.RpcInterface\",\r\n /** The logger category used by the portions of the RpcInterface framework that run on the frontend. */\r\n RpcInterfaceFrontend = \"core-frontend.RpcInterface\",\r\n}\r\n"]}