@itwin/core-common 5.0.0-dev.8 → 5.0.0-dev.83

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 (724) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/lib/cjs/AmbientOcclusion.js +17 -9
  3. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  4. package/lib/cjs/AnalysisStyle.d.ts +0 -3
  5. package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
  6. package/lib/cjs/AnalysisStyle.js +20 -4
  7. package/lib/cjs/AnalysisStyle.js.map +1 -1
  8. package/lib/cjs/Atmosphere.js +39 -21
  9. package/lib/cjs/Atmosphere.js.map +1 -1
  10. package/lib/cjs/BackgroundMapProvider.js +4 -0
  11. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  12. package/lib/cjs/BackgroundMapSettings.js +19 -0
  13. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  14. package/lib/cjs/BlobReader.js +8 -6
  15. package/lib/cjs/BlobReader.js.map +1 -1
  16. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  17. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  18. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  19. package/lib/cjs/Camera.js +3 -0
  20. package/lib/cjs/Camera.js.map +1 -1
  21. package/lib/cjs/ChangesetProps.d.ts +1 -1
  22. package/lib/cjs/ChangesetProps.js.map +1 -1
  23. package/lib/cjs/ClipStyle.js +31 -5
  24. package/lib/cjs/ClipStyle.js.map +1 -1
  25. package/lib/cjs/Code.d.ts +0 -5
  26. package/lib/cjs/Code.d.ts.map +1 -1
  27. package/lib/cjs/Code.js +16 -11
  28. package/lib/cjs/Code.js.map +1 -1
  29. package/lib/cjs/ColorDef.js +11 -10
  30. package/lib/cjs/ColorDef.js.map +1 -1
  31. package/lib/cjs/ConcurrentQuery.d.ts +37 -1
  32. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  33. package/lib/cjs/ConcurrentQuery.js +16 -3
  34. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  35. package/lib/cjs/ContextRealityModel.js +53 -27
  36. package/lib/cjs/ContextRealityModel.js.map +1 -1
  37. package/lib/cjs/ContourDisplay.js +40 -5
  38. package/lib/cjs/ContourDisplay.js.map +1 -1
  39. package/lib/cjs/DisplayStyleSettings.js +95 -63
  40. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  41. package/lib/cjs/ECSqlReader.d.ts +2 -0
  42. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  43. package/lib/cjs/ECSqlReader.js +56 -50
  44. package/lib/cjs/ECSqlReader.js.map +1 -1
  45. package/lib/cjs/ElementProps.d.ts.map +1 -1
  46. package/lib/cjs/ElementProps.js +7 -3
  47. package/lib/cjs/ElementProps.js.map +1 -1
  48. package/lib/cjs/EntityProps.js +31 -0
  49. package/lib/cjs/EntityProps.js.map +1 -1
  50. package/lib/cjs/Environment.js +25 -2
  51. package/lib/cjs/Environment.js.map +1 -1
  52. package/lib/cjs/FeatureIndex.js +15 -6
  53. package/lib/cjs/FeatureIndex.js.map +1 -1
  54. package/lib/cjs/FeatureSymbology.d.ts +25 -73
  55. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  56. package/lib/cjs/FeatureSymbology.js +88 -103
  57. package/lib/cjs/FeatureSymbology.js.map +1 -1
  58. package/lib/cjs/FeatureTable.d.ts +6 -108
  59. package/lib/cjs/FeatureTable.d.ts.map +1 -1
  60. package/lib/cjs/FeatureTable.js +13 -329
  61. package/lib/cjs/FeatureTable.js.map +1 -1
  62. package/lib/cjs/Fonts.d.ts +68 -10
  63. package/lib/cjs/Fonts.d.ts.map +1 -1
  64. package/lib/cjs/Fonts.js +19 -4
  65. package/lib/cjs/Fonts.js.map +1 -1
  66. package/lib/cjs/Frustum.js +2 -2
  67. package/lib/cjs/Frustum.js.map +1 -1
  68. package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
  69. package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
  70. package/lib/cjs/GeoCoordinateServices.js +2 -1
  71. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  72. package/lib/cjs/GeometryParams.js +58 -0
  73. package/lib/cjs/GeometryParams.js.map +1 -1
  74. package/lib/cjs/Gradient.d.ts +3 -4
  75. package/lib/cjs/Gradient.d.ts.map +1 -1
  76. package/lib/cjs/Gradient.js +21 -19
  77. package/lib/cjs/Gradient.js.map +1 -1
  78. package/lib/cjs/GraphicParams.js +14 -12
  79. package/lib/cjs/GraphicParams.js.map +1 -1
  80. package/lib/cjs/GroundPlane.js +8 -2
  81. package/lib/cjs/GroundPlane.js.map +1 -1
  82. package/lib/cjs/HSLColor.js +6 -0
  83. package/lib/cjs/HSLColor.js.map +1 -1
  84. package/lib/cjs/HSVColor.js +6 -0
  85. package/lib/cjs/HSVColor.js.map +1 -1
  86. package/lib/cjs/HiddenLine.d.ts +17 -18
  87. package/lib/cjs/HiddenLine.d.ts.map +1 -1
  88. package/lib/cjs/HiddenLine.js +24 -5
  89. package/lib/cjs/HiddenLine.js.map +1 -1
  90. package/lib/cjs/Hilite.js +10 -0
  91. package/lib/cjs/Hilite.js.map +1 -1
  92. package/lib/cjs/IModel.d.ts +3 -12
  93. package/lib/cjs/IModel.d.ts.map +1 -1
  94. package/lib/cjs/IModel.js +47 -23
  95. package/lib/cjs/IModel.js.map +1 -1
  96. package/lib/cjs/IModelError.d.ts +0 -2
  97. package/lib/cjs/IModelError.d.ts.map +1 -1
  98. package/lib/cjs/IModelError.js +3 -8
  99. package/lib/cjs/IModelError.js.map +1 -1
  100. package/lib/cjs/IModelVersion.js +4 -0
  101. package/lib/cjs/IModelVersion.js.map +1 -1
  102. package/lib/cjs/ITwinError.d.ts +63 -27
  103. package/lib/cjs/ITwinError.d.ts.map +1 -1
  104. package/lib/cjs/ITwinError.js +93 -45
  105. package/lib/cjs/ITwinError.js.map +1 -1
  106. package/lib/cjs/Image.d.ts +22 -8
  107. package/lib/cjs/Image.d.ts.map +1 -1
  108. package/lib/cjs/Image.js +20 -4
  109. package/lib/cjs/Image.js.map +1 -1
  110. package/lib/cjs/IpcAppProps.d.ts +2 -0
  111. package/lib/cjs/IpcAppProps.d.ts.map +1 -1
  112. package/lib/cjs/IpcAppProps.js.map +1 -1
  113. package/lib/cjs/LightSettings.js +39 -1
  114. package/lib/cjs/LightSettings.js.map +1 -1
  115. package/lib/cjs/Localization.d.ts +0 -10
  116. package/lib/cjs/Localization.d.ts.map +1 -1
  117. package/lib/cjs/Localization.js +0 -1
  118. package/lib/cjs/Localization.js.map +1 -1
  119. package/lib/cjs/MapImagerySettings.js +3 -2
  120. package/lib/cjs/MapImagerySettings.js.map +1 -1
  121. package/lib/cjs/MapLayerSettings.d.ts +20 -0
  122. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  123. package/lib/cjs/MapLayerSettings.js +50 -1
  124. package/lib/cjs/MapLayerSettings.js.map +1 -1
  125. package/lib/cjs/MassProperties.d.ts +2 -0
  126. package/lib/cjs/MassProperties.d.ts.map +1 -1
  127. package/lib/cjs/MassProperties.js.map +1 -1
  128. package/lib/cjs/ModelClipGroup.js +6 -0
  129. package/lib/cjs/ModelClipGroup.js.map +1 -1
  130. package/lib/cjs/OctEncodedNormal.js +4 -0
  131. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  132. package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
  133. package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
  134. package/lib/cjs/PlanProjectionSettings.js +8 -1
  135. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  136. package/lib/cjs/PlanarClipMask.d.ts +0 -12
  137. package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
  138. package/lib/cjs/PlanarClipMask.js +24 -2
  139. package/lib/cjs/PlanarClipMask.js.map +1 -1
  140. package/lib/cjs/QPoint.d.ts +5 -5
  141. package/lib/cjs/QPoint.d.ts.map +1 -1
  142. package/lib/cjs/QPoint.js +37 -29
  143. package/lib/cjs/QPoint.js.map +1 -1
  144. package/lib/cjs/RealityModelDisplaySettings.js +81 -4
  145. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  146. package/lib/cjs/RenderMaterial.d.ts +0 -43
  147. package/lib/cjs/RenderMaterial.d.ts.map +1 -1
  148. package/lib/cjs/RenderMaterial.js +6 -51
  149. package/lib/cjs/RenderMaterial.js.map +1 -1
  150. package/lib/cjs/RenderPolyline.d.ts +36 -0
  151. package/lib/cjs/RenderPolyline.d.ts.map +1 -0
  152. package/lib/cjs/RenderPolyline.js +26 -0
  153. package/lib/cjs/RenderPolyline.js.map +1 -0
  154. package/lib/cjs/RenderSchedule.d.ts +1 -2
  155. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  156. package/lib/cjs/RenderSchedule.js +138 -11
  157. package/lib/cjs/RenderSchedule.js.map +1 -1
  158. package/lib/cjs/RenderTexture.d.ts +5 -23
  159. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  160. package/lib/cjs/RenderTexture.js +13 -16
  161. package/lib/cjs/RenderTexture.js.map +1 -1
  162. package/lib/cjs/RgbColor.js +3 -0
  163. package/lib/cjs/RgbColor.js.map +1 -1
  164. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  165. package/lib/cjs/RpcInterface.js +7 -1
  166. package/lib/cjs/RpcInterface.js.map +1 -1
  167. package/lib/cjs/SkyBox.js +17 -4
  168. package/lib/cjs/SkyBox.js.map +1 -1
  169. package/lib/cjs/SolarShadows.js +5 -1
  170. package/lib/cjs/SolarShadows.js.map +1 -1
  171. package/lib/cjs/SpatialClassification.js +19 -1
  172. package/lib/cjs/SpatialClassification.js.map +1 -1
  173. package/lib/cjs/SubCategoryAppearance.js +35 -1
  174. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  175. package/lib/cjs/SubCategoryOverride.js +16 -2
  176. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  177. package/lib/cjs/TerrainSettings.d.ts +0 -7
  178. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  179. package/lib/cjs/TerrainSettings.js +19 -0
  180. package/lib/cjs/TerrainSettings.js.map +1 -1
  181. package/lib/cjs/TextureMapping.d.ts +17 -14
  182. package/lib/cjs/TextureMapping.d.ts.map +1 -1
  183. package/lib/cjs/TextureMapping.js +47 -19
  184. package/lib/cjs/TextureMapping.js.map +1 -1
  185. package/lib/cjs/ThematicDisplay.js +53 -2
  186. package/lib/cjs/ThematicDisplay.js.map +1 -1
  187. package/lib/cjs/Thumbnail.d.ts +1 -1
  188. package/lib/cjs/Thumbnail.js.map +1 -1
  189. package/lib/cjs/Tween.js +28 -19
  190. package/lib/cjs/Tween.js.map +1 -1
  191. package/lib/cjs/ViewDetails.js +10 -6
  192. package/lib/cjs/ViewDetails.js.map +1 -1
  193. package/lib/cjs/ViewFlags.d.ts +1 -3
  194. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  195. package/lib/cjs/ViewFlags.js +86 -5
  196. package/lib/cjs/ViewFlags.js.map +1 -1
  197. package/lib/cjs/ViewProps.d.ts +0 -4
  198. package/lib/cjs/ViewProps.d.ts.map +1 -1
  199. package/lib/cjs/ViewProps.js.map +1 -1
  200. package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
  201. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  202. package/lib/cjs/annotation/TextAnnotation.js +10 -0
  203. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  204. package/lib/cjs/annotation/TextBlock.js +27 -6
  205. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  206. package/lib/cjs/annotation/TextStyle.js +65 -19
  207. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  208. package/lib/cjs/core-common.d.ts +1 -2
  209. package/lib/cjs/core-common.d.ts.map +1 -1
  210. package/lib/cjs/core-common.js +1 -2
  211. package/lib/cjs/core-common.js.map +1 -1
  212. package/lib/cjs/geometry/AdditionalTransform.js +12 -0
  213. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  214. package/lib/cjs/geometry/AreaPattern.js +17 -0
  215. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  216. package/lib/cjs/geometry/BoundingSphere.js +4 -0
  217. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  218. package/lib/cjs/geometry/Cartographic.js +23 -20
  219. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  220. package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
  221. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  222. package/lib/cjs/geometry/ElementGeometry.js +26 -8
  223. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  224. package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
  225. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  226. package/lib/cjs/geometry/FrustumPlanes.js +1 -0
  227. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  228. package/lib/cjs/geometry/GeodeticDatum.js +100 -0
  229. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  230. package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
  231. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  232. package/lib/cjs/geometry/GeometryStream.js +19 -6
  233. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  234. package/lib/cjs/geometry/ImageGraphic.js +10 -0
  235. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  236. package/lib/cjs/geometry/LineStyle.js +14 -0
  237. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  238. package/lib/cjs/geometry/Placement.js +6 -0
  239. package/lib/cjs/geometry/Placement.js.map +1 -1
  240. package/lib/cjs/geometry/Projection.js +75 -0
  241. package/lib/cjs/geometry/Projection.js.map +1 -1
  242. package/lib/cjs/geometry/TextString.js +18 -0
  243. package/lib/cjs/geometry/TextString.js.map +1 -1
  244. package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  245. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
  246. package/lib/cjs/internal/BackendTypes.js.map +1 -0
  247. package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
  248. package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
  249. package/lib/cjs/internal/PackedFeatureTable.js +359 -0
  250. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
  251. package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
  252. package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
  253. package/lib/cjs/internal/RenderMaterialParams.js +68 -0
  254. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
  255. package/lib/cjs/internal/RenderMesh.d.ts +52 -0
  256. package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
  257. package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
  258. package/lib/cjs/internal/RenderMesh.js.map +1 -0
  259. package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
  260. package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
  261. package/lib/cjs/internal/RenderTextureParams.js +37 -0
  262. package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
  263. package/lib/cjs/internal/cross-package.d.ts +5 -0
  264. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  265. package/lib/cjs/internal/cross-package.js +16 -0
  266. package/lib/cjs/internal/cross-package.js.map +1 -1
  267. package/lib/cjs/ipc/IpcSession.js +1 -0
  268. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  269. package/lib/cjs/ipc/IpcSocket.d.ts +3 -0
  270. package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
  271. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  272. package/lib/cjs/ipc/IpcWebSocket.js +7 -6
  273. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  274. package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
  275. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  276. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  277. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  278. package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
  279. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  280. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  281. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  282. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  283. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  284. package/lib/cjs/rpc/TestRpcManager.js +1 -4
  285. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  286. package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
  287. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  288. package/lib/cjs/rpc/core/RpcControl.js +29 -38
  289. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  290. package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
  291. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  292. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
  293. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  294. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  295. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  296. package/lib/cjs/rpc/core/RpcOperation.js +29 -31
  297. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  298. package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
  299. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  300. package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
  301. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  302. package/lib/cjs/rpc/core/RpcPush.js +15 -8
  303. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  304. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  305. package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
  306. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  307. package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
  308. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  309. package/lib/cjs/rpc/core/RpcRequest.js +51 -29
  310. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  311. package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
  312. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  313. package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
  314. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  315. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
  316. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  317. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  318. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  319. package/lib/cjs/rpc/web/OpenAPI.js +2 -0
  320. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  321. package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
  322. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  323. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  324. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  325. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
  326. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  327. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
  328. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  329. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  330. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  331. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
  332. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  333. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  334. package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
  335. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  336. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  337. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  338. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
  339. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  340. package/lib/cjs/tile/B3dmTileIO.js +7 -0
  341. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  342. package/lib/cjs/tile/CompositeTileIO.js +3 -0
  343. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  344. package/lib/cjs/tile/GltfTileIO.js +4 -3
  345. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  346. package/lib/cjs/tile/I3dmTileIO.js +8 -0
  347. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  348. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  349. package/lib/cjs/tile/IModelTileIO.js +26 -3
  350. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  351. package/lib/cjs/tile/PntsTileIO.js +5 -0
  352. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  353. package/lib/cjs/tile/TileIO.js +2 -0
  354. package/lib/cjs/tile/TileIO.js.map +1 -1
  355. package/lib/cjs/tile/TileMetadata.js +9 -1
  356. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  357. package/lib/esm/AmbientOcclusion.js +17 -9
  358. package/lib/esm/AmbientOcclusion.js.map +1 -1
  359. package/lib/esm/AnalysisStyle.d.ts +0 -3
  360. package/lib/esm/AnalysisStyle.d.ts.map +1 -1
  361. package/lib/esm/AnalysisStyle.js +20 -4
  362. package/lib/esm/AnalysisStyle.js.map +1 -1
  363. package/lib/esm/Atmosphere.js +39 -21
  364. package/lib/esm/Atmosphere.js.map +1 -1
  365. package/lib/esm/BackgroundMapProvider.js +4 -0
  366. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  367. package/lib/esm/BackgroundMapSettings.js +19 -0
  368. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  369. package/lib/esm/BlobReader.js +8 -6
  370. package/lib/esm/BlobReader.js.map +1 -1
  371. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  372. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  373. package/lib/esm/BriefcaseTypes.js.map +1 -1
  374. package/lib/esm/Camera.js +3 -0
  375. package/lib/esm/Camera.js.map +1 -1
  376. package/lib/esm/ChangesetProps.d.ts +1 -1
  377. package/lib/esm/ChangesetProps.js.map +1 -1
  378. package/lib/esm/ClipStyle.js +31 -5
  379. package/lib/esm/ClipStyle.js.map +1 -1
  380. package/lib/esm/Code.d.ts +0 -5
  381. package/lib/esm/Code.d.ts.map +1 -1
  382. package/lib/esm/Code.js +16 -11
  383. package/lib/esm/Code.js.map +1 -1
  384. package/lib/esm/ColorDef.js +11 -10
  385. package/lib/esm/ColorDef.js.map +1 -1
  386. package/lib/esm/ConcurrentQuery.d.ts +37 -1
  387. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  388. package/lib/esm/ConcurrentQuery.js +16 -3
  389. package/lib/esm/ConcurrentQuery.js.map +1 -1
  390. package/lib/esm/ContextRealityModel.js +53 -27
  391. package/lib/esm/ContextRealityModel.js.map +1 -1
  392. package/lib/esm/ContourDisplay.js +40 -5
  393. package/lib/esm/ContourDisplay.js.map +1 -1
  394. package/lib/esm/DisplayStyleSettings.js +95 -63
  395. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  396. package/lib/esm/ECSqlReader.d.ts +2 -0
  397. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  398. package/lib/esm/ECSqlReader.js +56 -50
  399. package/lib/esm/ECSqlReader.js.map +1 -1
  400. package/lib/esm/ElementProps.d.ts.map +1 -1
  401. package/lib/esm/ElementProps.js +8 -4
  402. package/lib/esm/ElementProps.js.map +1 -1
  403. package/lib/esm/EntityProps.js +31 -0
  404. package/lib/esm/EntityProps.js.map +1 -1
  405. package/lib/esm/Environment.js +25 -2
  406. package/lib/esm/Environment.js.map +1 -1
  407. package/lib/esm/FeatureIndex.js +15 -6
  408. package/lib/esm/FeatureIndex.js.map +1 -1
  409. package/lib/esm/FeatureSymbology.d.ts +25 -73
  410. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  411. package/lib/esm/FeatureSymbology.js +88 -103
  412. package/lib/esm/FeatureSymbology.js.map +1 -1
  413. package/lib/esm/FeatureTable.d.ts +6 -108
  414. package/lib/esm/FeatureTable.d.ts.map +1 -1
  415. package/lib/esm/FeatureTable.js +11 -324
  416. package/lib/esm/FeatureTable.js.map +1 -1
  417. package/lib/esm/Fonts.d.ts +68 -10
  418. package/lib/esm/Fonts.d.ts.map +1 -1
  419. package/lib/esm/Fonts.js +19 -4
  420. package/lib/esm/Fonts.js.map +1 -1
  421. package/lib/esm/Frustum.js +2 -2
  422. package/lib/esm/Frustum.js.map +1 -1
  423. package/lib/esm/GeoCoordinateServices.d.ts +1 -0
  424. package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
  425. package/lib/esm/GeoCoordinateServices.js +2 -1
  426. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  427. package/lib/esm/GeometryParams.js +58 -0
  428. package/lib/esm/GeometryParams.js.map +1 -1
  429. package/lib/esm/Gradient.d.ts +3 -4
  430. package/lib/esm/Gradient.d.ts.map +1 -1
  431. package/lib/esm/Gradient.js +21 -19
  432. package/lib/esm/Gradient.js.map +1 -1
  433. package/lib/esm/GraphicParams.js +14 -12
  434. package/lib/esm/GraphicParams.js.map +1 -1
  435. package/lib/esm/GroundPlane.js +8 -2
  436. package/lib/esm/GroundPlane.js.map +1 -1
  437. package/lib/esm/HSLColor.js +6 -0
  438. package/lib/esm/HSLColor.js.map +1 -1
  439. package/lib/esm/HSVColor.js +6 -0
  440. package/lib/esm/HSVColor.js.map +1 -1
  441. package/lib/esm/HiddenLine.d.ts +17 -18
  442. package/lib/esm/HiddenLine.d.ts.map +1 -1
  443. package/lib/esm/HiddenLine.js +24 -5
  444. package/lib/esm/HiddenLine.js.map +1 -1
  445. package/lib/esm/Hilite.js +10 -0
  446. package/lib/esm/Hilite.js.map +1 -1
  447. package/lib/esm/IModel.d.ts +3 -12
  448. package/lib/esm/IModel.d.ts.map +1 -1
  449. package/lib/esm/IModel.js +47 -23
  450. package/lib/esm/IModel.js.map +1 -1
  451. package/lib/esm/IModelError.d.ts +0 -2
  452. package/lib/esm/IModelError.d.ts.map +1 -1
  453. package/lib/esm/IModelError.js +2 -1
  454. package/lib/esm/IModelError.js.map +1 -1
  455. package/lib/esm/IModelVersion.js +4 -0
  456. package/lib/esm/IModelVersion.js.map +1 -1
  457. package/lib/esm/ITwinError.d.ts +63 -27
  458. package/lib/esm/ITwinError.d.ts.map +1 -1
  459. package/lib/esm/ITwinError.js +87 -44
  460. package/lib/esm/ITwinError.js.map +1 -1
  461. package/lib/esm/Image.d.ts +22 -8
  462. package/lib/esm/Image.d.ts.map +1 -1
  463. package/lib/esm/Image.js +19 -4
  464. package/lib/esm/Image.js.map +1 -1
  465. package/lib/esm/IpcAppProps.d.ts +2 -0
  466. package/lib/esm/IpcAppProps.d.ts.map +1 -1
  467. package/lib/esm/IpcAppProps.js.map +1 -1
  468. package/lib/esm/LightSettings.js +39 -1
  469. package/lib/esm/LightSettings.js.map +1 -1
  470. package/lib/esm/Localization.d.ts +0 -10
  471. package/lib/esm/Localization.d.ts.map +1 -1
  472. package/lib/esm/Localization.js +0 -1
  473. package/lib/esm/Localization.js.map +1 -1
  474. package/lib/esm/MapImagerySettings.js +3 -2
  475. package/lib/esm/MapImagerySettings.js.map +1 -1
  476. package/lib/esm/MapLayerSettings.d.ts +20 -0
  477. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  478. package/lib/esm/MapLayerSettings.js +50 -1
  479. package/lib/esm/MapLayerSettings.js.map +1 -1
  480. package/lib/esm/MassProperties.d.ts +2 -0
  481. package/lib/esm/MassProperties.d.ts.map +1 -1
  482. package/lib/esm/MassProperties.js.map +1 -1
  483. package/lib/esm/ModelClipGroup.js +6 -0
  484. package/lib/esm/ModelClipGroup.js.map +1 -1
  485. package/lib/esm/OctEncodedNormal.js +4 -0
  486. package/lib/esm/OctEncodedNormal.js.map +1 -1
  487. package/lib/esm/PlanProjectionSettings.d.ts +1 -2
  488. package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
  489. package/lib/esm/PlanProjectionSettings.js +8 -1
  490. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  491. package/lib/esm/PlanarClipMask.d.ts +0 -12
  492. package/lib/esm/PlanarClipMask.d.ts.map +1 -1
  493. package/lib/esm/PlanarClipMask.js +24 -2
  494. package/lib/esm/PlanarClipMask.js.map +1 -1
  495. package/lib/esm/QPoint.d.ts +5 -5
  496. package/lib/esm/QPoint.d.ts.map +1 -1
  497. package/lib/esm/QPoint.js +37 -29
  498. package/lib/esm/QPoint.js.map +1 -1
  499. package/lib/esm/RealityModelDisplaySettings.js +81 -4
  500. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  501. package/lib/esm/RenderMaterial.d.ts +0 -43
  502. package/lib/esm/RenderMaterial.d.ts.map +1 -1
  503. package/lib/esm/RenderMaterial.js +6 -51
  504. package/lib/esm/RenderMaterial.js.map +1 -1
  505. package/lib/esm/RenderPolyline.d.ts +36 -0
  506. package/lib/esm/RenderPolyline.d.ts.map +1 -0
  507. package/lib/esm/RenderPolyline.js +23 -0
  508. package/lib/esm/RenderPolyline.js.map +1 -0
  509. package/lib/esm/RenderSchedule.d.ts +1 -2
  510. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  511. package/lib/esm/RenderSchedule.js +138 -11
  512. package/lib/esm/RenderSchedule.js.map +1 -1
  513. package/lib/esm/RenderTexture.d.ts +5 -23
  514. package/lib/esm/RenderTexture.d.ts.map +1 -1
  515. package/lib/esm/RenderTexture.js +13 -16
  516. package/lib/esm/RenderTexture.js.map +1 -1
  517. package/lib/esm/RgbColor.js +3 -0
  518. package/lib/esm/RgbColor.js.map +1 -1
  519. package/lib/esm/RpcInterface.d.ts.map +1 -1
  520. package/lib/esm/RpcInterface.js +8 -2
  521. package/lib/esm/RpcInterface.js.map +1 -1
  522. package/lib/esm/SkyBox.js +17 -4
  523. package/lib/esm/SkyBox.js.map +1 -1
  524. package/lib/esm/SolarShadows.js +5 -1
  525. package/lib/esm/SolarShadows.js.map +1 -1
  526. package/lib/esm/SpatialClassification.js +19 -1
  527. package/lib/esm/SpatialClassification.js.map +1 -1
  528. package/lib/esm/SubCategoryAppearance.js +35 -1
  529. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  530. package/lib/esm/SubCategoryOverride.js +16 -2
  531. package/lib/esm/SubCategoryOverride.js.map +1 -1
  532. package/lib/esm/TerrainSettings.d.ts +0 -7
  533. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  534. package/lib/esm/TerrainSettings.js +19 -0
  535. package/lib/esm/TerrainSettings.js.map +1 -1
  536. package/lib/esm/TextureMapping.d.ts +17 -14
  537. package/lib/esm/TextureMapping.d.ts.map +1 -1
  538. package/lib/esm/TextureMapping.js +47 -19
  539. package/lib/esm/TextureMapping.js.map +1 -1
  540. package/lib/esm/ThematicDisplay.js +53 -2
  541. package/lib/esm/ThematicDisplay.js.map +1 -1
  542. package/lib/esm/Thumbnail.d.ts +1 -1
  543. package/lib/esm/Thumbnail.js.map +1 -1
  544. package/lib/esm/Tween.js +28 -19
  545. package/lib/esm/Tween.js.map +1 -1
  546. package/lib/esm/ViewDetails.js +10 -6
  547. package/lib/esm/ViewDetails.js.map +1 -1
  548. package/lib/esm/ViewFlags.d.ts +1 -3
  549. package/lib/esm/ViewFlags.d.ts.map +1 -1
  550. package/lib/esm/ViewFlags.js +86 -5
  551. package/lib/esm/ViewFlags.js.map +1 -1
  552. package/lib/esm/ViewProps.d.ts +0 -4
  553. package/lib/esm/ViewProps.d.ts.map +1 -1
  554. package/lib/esm/ViewProps.js.map +1 -1
  555. package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
  556. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  557. package/lib/esm/annotation/TextAnnotation.js +10 -0
  558. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  559. package/lib/esm/annotation/TextBlock.js +27 -6
  560. package/lib/esm/annotation/TextBlock.js.map +1 -1
  561. package/lib/esm/annotation/TextStyle.js +65 -19
  562. package/lib/esm/annotation/TextStyle.js.map +1 -1
  563. package/lib/esm/core-common.d.ts +1 -2
  564. package/lib/esm/core-common.d.ts.map +1 -1
  565. package/lib/esm/core-common.js +1 -2
  566. package/lib/esm/core-common.js.map +1 -1
  567. package/lib/esm/geometry/AdditionalTransform.js +12 -0
  568. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  569. package/lib/esm/geometry/AreaPattern.js +17 -0
  570. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  571. package/lib/esm/geometry/BoundingSphere.js +4 -0
  572. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  573. package/lib/esm/geometry/Cartographic.js +23 -20
  574. package/lib/esm/geometry/Cartographic.js.map +1 -1
  575. package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
  576. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  577. package/lib/esm/geometry/ElementGeometry.js +26 -8
  578. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  579. package/lib/esm/geometry/ElementGeometryFB.js +54 -108
  580. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  581. package/lib/esm/geometry/FrustumPlanes.js +1 -0
  582. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  583. package/lib/esm/geometry/GeodeticDatum.js +100 -0
  584. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  585. package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
  586. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  587. package/lib/esm/geometry/GeometryStream.js +19 -6
  588. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  589. package/lib/esm/geometry/ImageGraphic.js +10 -0
  590. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  591. package/lib/esm/geometry/LineStyle.js +14 -0
  592. package/lib/esm/geometry/LineStyle.js.map +1 -1
  593. package/lib/esm/geometry/Placement.js +6 -0
  594. package/lib/esm/geometry/Placement.js.map +1 -1
  595. package/lib/esm/geometry/Projection.js +75 -0
  596. package/lib/esm/geometry/Projection.js.map +1 -1
  597. package/lib/esm/geometry/TextString.js +18 -0
  598. package/lib/esm/geometry/TextString.js.map +1 -1
  599. package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  600. package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
  601. package/lib/esm/internal/BackendTypes.js.map +1 -0
  602. package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
  603. package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
  604. package/lib/esm/internal/PackedFeatureTable.js +352 -0
  605. package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
  606. package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
  607. package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
  608. package/lib/esm/internal/RenderMaterialParams.js +64 -0
  609. package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
  610. package/lib/esm/internal/RenderMesh.d.ts +52 -0
  611. package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
  612. package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
  613. package/lib/esm/internal/RenderMesh.js.map +1 -0
  614. package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
  615. package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
  616. package/lib/esm/internal/RenderTextureParams.js +33 -0
  617. package/lib/esm/internal/RenderTextureParams.js.map +1 -0
  618. package/lib/esm/internal/cross-package.d.ts +5 -0
  619. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  620. package/lib/esm/internal/cross-package.js +4 -1
  621. package/lib/esm/internal/cross-package.js.map +1 -1
  622. package/lib/esm/ipc/IpcSession.js +1 -0
  623. package/lib/esm/ipc/IpcSession.js.map +1 -1
  624. package/lib/esm/ipc/IpcSocket.d.ts +3 -0
  625. package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
  626. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  627. package/lib/esm/ipc/IpcWebSocket.js +7 -6
  628. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  629. package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
  630. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  631. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  632. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  633. package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
  634. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  635. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  636. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  637. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  638. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  639. package/lib/esm/rpc/TestRpcManager.js +1 -4
  640. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  641. package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
  642. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  643. package/lib/esm/rpc/core/RpcControl.js +29 -38
  644. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  645. package/lib/esm/rpc/core/RpcInvocation.js +19 -13
  646. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  647. package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
  648. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  649. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  650. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  651. package/lib/esm/rpc/core/RpcOperation.js +29 -31
  652. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  653. package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
  654. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  655. package/lib/esm/rpc/core/RpcProtocol.js +32 -30
  656. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  657. package/lib/esm/rpc/core/RpcPush.js +15 -8
  658. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  659. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  660. package/lib/esm/rpc/core/RpcRegistry.js +10 -9
  661. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  662. package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
  663. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  664. package/lib/esm/rpc/core/RpcRequest.js +51 -29
  665. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  666. package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
  667. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  668. package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
  669. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  670. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
  671. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  672. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  673. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  674. package/lib/esm/rpc/web/OpenAPI.js +2 -0
  675. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  676. package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
  677. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  678. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  679. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  680. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
  681. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  682. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
  683. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  684. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  685. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  686. package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
  687. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  688. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  689. package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
  690. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  691. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  692. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  693. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
  694. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  695. package/lib/esm/tile/B3dmTileIO.js +7 -0
  696. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  697. package/lib/esm/tile/CompositeTileIO.js +3 -0
  698. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  699. package/lib/esm/tile/GltfTileIO.js +4 -3
  700. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  701. package/lib/esm/tile/I3dmTileIO.js +8 -0
  702. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  703. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  704. package/lib/esm/tile/IModelTileIO.js +26 -3
  705. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  706. package/lib/esm/tile/PntsTileIO.js +5 -0
  707. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  708. package/lib/esm/tile/TileIO.js +2 -0
  709. package/lib/esm/tile/TileIO.js.map +1 -1
  710. package/lib/esm/tile/TileMetadata.js +9 -1
  711. package/lib/esm/tile/TileMetadata.js.map +1 -1
  712. package/package.json +14 -14
  713. package/lib/cjs/BackendTypes.d.ts.map +0 -1
  714. package/lib/cjs/BackendTypes.js.map +0 -1
  715. package/lib/cjs/Render.d.ts +0 -85
  716. package/lib/cjs/Render.d.ts.map +0 -1
  717. package/lib/cjs/Render.js.map +0 -1
  718. package/lib/esm/BackendTypes.d.ts.map +0 -1
  719. package/lib/esm/BackendTypes.js.map +0 -1
  720. package/lib/esm/Render.d.ts +0 -85
  721. package/lib/esm/Render.d.ts.map +0 -1
  722. package/lib/esm/Render.js.map +0 -1
  723. /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
  724. /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
@@ -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;IAKf;;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;IAG5D,YAAY,SAAoB;QAC9B,IAAI,CAAC,IAAI,GAAG,mBAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,wBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,wBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAED,gEAAgE;IACzD,MAAM,CAAC,WAAW;QACvB,MAAM,EAAE,GAAG,mBAAI,CAAC,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CAAC,UAAU,CAAC,IAAI,EAAE,kBAAkB,IAAI,IAAI,CAAC;IAC1D,CAAC;IACD,IAAW,mBAAmB,CAAC,KAAc;QAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI;YACvB,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;QAE5B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClD,CAAC;CACF;AA1ED,4BA0EC","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 /** Will be true if the codes associated with this CodeSpec are managed along with the iModel and false if the codes are managed by an external service.\n * @deprecated in 3.6 Use scopeReq instead.\n */\n public get isManagedWithIModel(): boolean {\n return this.properties.spec?.isManagedWithDgnDb ?? true;\n }\n public set isManagedWithIModel(value: boolean) {\n if (!this.properties.spec)\n this.properties.spec = {};\n\n this.properties.spec.isManagedWithDgnDb = value;\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,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SAAS,KAAyB,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACrF,IAAW,SAAS,CAAC,SAA6B,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;IAEnG;;OAEG;IACH,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":["/*---------------------------------------------------------------------------------------------\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"]}
@@ -40,6 +40,7 @@ const scratchUInt32 = new Uint32Array(scratchBytes.buffer);
40
40
  * @extensions
41
41
  */
42
42
  class ColorDef {
43
+ _tbgr;
43
44
  constructor(tbgr) {
44
45
  scratchUInt32[0] = tbgr; // Force to be a 32-bit unsigned integer
45
46
  this._tbgr = scratchUInt32[0];
@@ -555,16 +556,16 @@ class ColorDef {
555
556
  equals(other) {
556
557
  return this._tbgr === other._tbgr;
557
558
  }
559
+ /** pure black */
560
+ static black = new ColorDef(ColorByName_1.ColorByName.black);
561
+ /** pure white */
562
+ static white = new ColorDef(ColorByName_1.ColorByName.white);
563
+ /** pure red */
564
+ static red = new ColorDef(ColorByName_1.ColorByName.red);
565
+ /** pure green */
566
+ static green = new ColorDef(ColorByName_1.ColorByName.green);
567
+ /** pure blue */
568
+ static blue = new ColorDef(ColorByName_1.ColorByName.blue);
558
569
  }
559
570
  exports.ColorDef = ColorDef;
560
- /** pure black */
561
- ColorDef.black = new ColorDef(ColorByName_1.ColorByName.black);
562
- /** pure white */
563
- ColorDef.white = new ColorDef(ColorByName_1.ColorByName.white);
564
- /** pure red */
565
- ColorDef.red = new ColorDef(ColorByName_1.ColorByName.red);
566
- /** pure green */
567
- ColorDef.green = new ColorDef(ColorByName_1.ColorByName.green);
568
- /** pure blue */
569
- ColorDef.blue = new ColorDef(ColorByName_1.ColorByName.blue);
570
571
  //# sourceMappingURL=ColorDef.js.map
@@ -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;IAGnB,YAAoB,IAAY;QAC9B,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAG,wCAAwC;QACnE,IAAI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AAK,CAAC;IACpC,CAAC;;AAxlBH,4BAomBC;AAVC,iBAAiB;AACM,cAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;AAC/D,iBAAiB;AACM,cAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;AAC/D,eAAe;AACQ,YAAG,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,GAAG,CAAC,CAAC;AAC3D,iBAAiB;AACM,cAAK,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,KAAK,CAAC,CAAC;AAC/D,gBAAgB;AACO,aAAI,GAAG,IAAI,QAAQ,CAAC,yBAAW,CAAC,IAAI,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module 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,CAAC,CAAC,CAAC;AACvC,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAQ3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,QAAQ;IACF,K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AAC;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":["/*---------------------------------------------------------------------------------------------\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"]}
@@ -53,8 +53,12 @@ export interface QueryPropertyMetaData {
53
53
  jsonName: string;
54
54
  /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */
55
55
  name: string;
56
- /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type is set to an empty string. */
56
+ /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extend type is set to an empty string.
57
+ * @deprecated in 4.11 Use extendedType instead
58
+ */
57
59
  extendType: string;
60
+ /** If this property is a PrimitiveECProperty, extended type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type will be undefined. */
61
+ extendedType?: string;
58
62
  /** The type name is set to 'navigation' if the property is a navigation property, otherwise, it is the type name for the property. */
59
63
  typeName: string;
60
64
  }
@@ -65,6 +69,7 @@ export interface DbRuntimeStats {
65
69
  timeLimit: number;
66
70
  memLimit: number;
67
71
  memUsed: number;
72
+ prepareTime: number;
68
73
  }
69
74
  /**
70
75
  * Quota hint for the query.
@@ -99,6 +104,10 @@ export interface BaseReaderOptions {
99
104
  * concurrent query is configure to honour it.
100
105
  */
101
106
  delay?: number;
107
+ /**
108
+ * @internal
109
+ */
110
+ testingArgs?: TestingArgs;
102
111
  }
103
112
  /**
104
113
  * ECSql query config
@@ -204,6 +213,13 @@ export declare class QueryOptionsBuilder {
204
213
  * @returns @type QueryOptionsBuilder for fluent interface.
205
214
  */
206
215
  setDelay(val: number): this;
216
+ /**
217
+ * @internal
218
+ * Use for testing internal logic. This parameter is ignored by default unless concurrent query is configure to not ignore it.
219
+ * @param val Testing arguments.
220
+ * @returns @type QueryOptionsBuilder for fluent interface.
221
+ */
222
+ setTestingArgs(val: TestingArgs): this;
207
223
  }
208
224
  /** @beta */
209
225
  export declare class BlobOptionsBuilder {
@@ -405,6 +421,7 @@ export declare enum DbResponseStatus {
405
421
  Partial = 3,/* query was running but ran out of quota.*/
406
422
  Timeout = 4,/* query time quota expired while it was in queue.*/
407
423
  QueueFull = 5,/* could not submit the query as queue was full.*/
424
+ ShuttingDown = 6,/* Shutdown is in progress. */
408
425
  Error = 100,/* generic error*/
409
426
  Error_ECSql_PreparedFailed = 101,/* ecsql prepared failed*/
410
427
  Error_ECSql_StepFailed = 102,/* ecsql step failed*/
@@ -414,6 +431,10 @@ export declare enum DbResponseStatus {
414
431
  Error_BlobIO_OutOfRange = 106
415
432
  }
416
433
  /** @internal */
434
+ export interface TestingArgs {
435
+ interrupt?: boolean;
436
+ }
437
+ /** @internal */
417
438
  export declare enum DbValueFormat {
418
439
  ECSqlNames = 0,
419
440
  JsNames = 1
@@ -421,6 +442,7 @@ export declare enum DbValueFormat {
421
442
  /** @internal */
422
443
  export interface DbRequest extends BaseReaderOptions {
423
444
  kind?: DbRequestKind;
445
+ testingArgs?: TestingArgs;
424
446
  }
425
447
  /** @internal */
426
448
  export interface DbQueryRequest extends DbRequest, QueryOptions {
@@ -466,9 +488,23 @@ export interface DbRequestExecutor<TRequest extends DbRequest, TResponse extends
466
488
  /** @internal */
467
489
  export interface DbQueryConfig {
468
490
  globalQuota?: QueryQuota;
491
+ /** For testing */
469
492
  ignoreDelay?: boolean;
493
+ /** Priority of request is ignored */
470
494
  ignorePriority?: boolean;
495
+ /** Max queue size after which queries are rejected with error QueueFull */
471
496
  requestQueueSize?: number;
497
+ /** Number of worker thread, default to 4 */
472
498
  workerThreads?: number;
499
+ doNotUsePrimaryConnToPrepare?: boolean;
500
+ /** After no activity for given time concurrenty query will automatically shutdown */
501
+ autoShutdowWhenIdlelForSeconds?: number;
502
+ /** Maximum number of statement cache per worker. Default to 40 */
503
+ statementCacheSizePerWorker?: number;
504
+ monitorPollInterval?: number;
505
+ /** Set memory map io for each worker connection size in bytes. Default to zero mean do not use mmap io */
506
+ memoryMapFileSize?: number;
507
+ /** Used by test to simulate certain test cases. Its is false by default. */
508
+ allowTestingArgs?: boolean;
473
509
  }
474
510
  //# sourceMappingURL=ConcurrentQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConcurrentQuery.d.ts","sourceRoot":"","sources":["../../src/ConcurrentQuery.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAqB,QAAQ,EAAQ,UAAU,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvH,OAAO,EAAE,OAAO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AAE,EAAE,CAAC,EAAE,QAAQ;WAGhF,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG;CAQxD;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAiB,CAAC,QAAQ,SAAS,SAAS,EAAE,SAAS,SAAS,UAAU;IACzF,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CAChD;AAED,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,kBAAkB;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qCAAqC;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,qFAAqF;IACrF,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,kEAAkE;IAClE,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAErC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0GAA0G;IAC1G,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
@@ -35,6 +35,7 @@ var QueryRowFormat;
35
35
  })(QueryRowFormat || (exports.QueryRowFormat = QueryRowFormat = {}));
36
36
  /** @public */
37
37
  class QueryOptionsBuilder {
38
+ _options;
38
39
  constructor(_options = {}) {
39
40
  this._options = _options;
40
41
  }
@@ -132,10 +133,21 @@ class QueryOptionsBuilder {
132
133
  this._options.delay = val;
133
134
  return this;
134
135
  }
136
+ /**
137
+ * @internal
138
+ * Use for testing internal logic. This parameter is ignored by default unless concurrent query is configure to not ignore it.
139
+ * @param val Testing arguments.
140
+ * @returns @type QueryOptionsBuilder for fluent interface.
141
+ */
142
+ setTestingArgs(val) {
143
+ this._options.testingArgs = val;
144
+ return this;
145
+ }
135
146
  }
136
147
  exports.QueryOptionsBuilder = QueryOptionsBuilder;
137
148
  /** @beta */
138
149
  class BlobOptionsBuilder {
150
+ _options;
139
151
  constructor(_options = {}) {
140
152
  this._options = _options;
141
153
  }
@@ -245,9 +257,7 @@ var QueryParamType;
245
257
  * @public
246
258
  */
247
259
  class QueryBinder {
248
- constructor() {
249
- this._args = {};
250
- }
260
+ _args = {};
251
261
  verify(indexOrName) {
252
262
  if (typeof indexOrName === "number") {
253
263
  if (indexOrName < 1)
@@ -544,6 +554,7 @@ var DbResponseStatus;
544
554
  DbResponseStatus[DbResponseStatus["Partial"] = 3] = "Partial";
545
555
  DbResponseStatus[DbResponseStatus["Timeout"] = 4] = "Timeout";
546
556
  DbResponseStatus[DbResponseStatus["QueueFull"] = 5] = "QueueFull";
557
+ DbResponseStatus[DbResponseStatus["ShuttingDown"] = 6] = "ShuttingDown";
547
558
  DbResponseStatus[DbResponseStatus["Error"] = 100] = "Error";
548
559
  DbResponseStatus[DbResponseStatus["Error_ECSql_PreparedFailed"] = 101] = "Error_ECSql_PreparedFailed";
549
560
  DbResponseStatus[DbResponseStatus["Error_ECSql_StepFailed"] = 102] = "Error_ECSql_StepFailed";
@@ -560,6 +571,8 @@ var DbValueFormat;
560
571
  })(DbValueFormat || (exports.DbValueFormat = DbValueFormat = {}));
561
572
  /** @public */
562
573
  class DbQueryError extends core_bentley_1.BentleyError {
574
+ response;
575
+ request;
563
576
  constructor(response, request, rc) {
564
577
  super(rc ?? core_bentley_1.DbResult.BE_SQLITE_ERROR, response.error, { response, request });
565
578
  this.response = response;