@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.
- package/CHANGELOG.md +50 -1
- package/lib/cjs/AmbientOcclusion.js +17 -9
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.d.ts +0 -3
- package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
- package/lib/cjs/AnalysisStyle.js +20 -4
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js +39 -21
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js +4 -0
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js +19 -0
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/BlobReader.js +8 -6
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.d.ts +2 -2
- package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js +3 -0
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/ChangesetProps.d.ts +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js +31 -5
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.d.ts +0 -5
- package/lib/cjs/Code.d.ts.map +1 -1
- package/lib/cjs/Code.js +16 -11
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorDef.js +11 -10
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts +37 -1
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.js +16 -3
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js +53 -27
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js +40 -5
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +95 -63
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlReader.d.ts +2 -0
- package/lib/cjs/ECSqlReader.d.ts.map +1 -1
- package/lib/cjs/ECSqlReader.js +56 -50
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js +7 -3
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EntityProps.js +31 -0
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/Environment.js +25 -2
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js +15 -6
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts +25 -73
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +88 -103
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.d.ts +6 -108
- package/lib/cjs/FeatureTable.d.ts.map +1 -1
- package/lib/cjs/FeatureTable.js +13 -329
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.d.ts +68 -10
- package/lib/cjs/Fonts.d.ts.map +1 -1
- package/lib/cjs/Fonts.js +19 -4
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js +2 -2
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
- package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +2 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryParams.js +58 -0
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/Gradient.d.ts +3 -4
- package/lib/cjs/Gradient.d.ts.map +1 -1
- package/lib/cjs/Gradient.js +21 -19
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js +14 -12
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js +8 -2
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js +6 -0
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js +6 -0
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.d.ts +17 -18
- package/lib/cjs/HiddenLine.d.ts.map +1 -1
- package/lib/cjs/HiddenLine.js +24 -5
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js +10 -0
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.d.ts +3 -12
- package/lib/cjs/IModel.d.ts.map +1 -1
- package/lib/cjs/IModel.js +47 -23
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.d.ts +0 -2
- package/lib/cjs/IModelError.d.ts.map +1 -1
- package/lib/cjs/IModelError.js +3 -8
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js +4 -0
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinError.d.ts +63 -27
- package/lib/cjs/ITwinError.d.ts.map +1 -1
- package/lib/cjs/ITwinError.js +93 -45
- package/lib/cjs/ITwinError.js.map +1 -1
- package/lib/cjs/Image.d.ts +22 -8
- package/lib/cjs/Image.d.ts.map +1 -1
- package/lib/cjs/Image.js +20 -4
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.d.ts +2 -0
- package/lib/cjs/IpcAppProps.d.ts.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js +39 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/Localization.d.ts +0 -10
- package/lib/cjs/Localization.d.ts.map +1 -1
- package/lib/cjs/Localization.js +0 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js +3 -2
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.d.ts +20 -0
- package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
- package/lib/cjs/MapLayerSettings.js +50 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.d.ts +2 -0
- package/lib/cjs/MassProperties.d.ts.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js +6 -0
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js +4 -0
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
- package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js +8 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.d.ts +0 -12
- package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
- package/lib/cjs/PlanarClipMask.js +24 -2
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.d.ts +5 -5
- package/lib/cjs/QPoint.d.ts.map +1 -1
- package/lib/cjs/QPoint.js +37 -29
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js +81 -4
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.d.ts +0 -43
- package/lib/cjs/RenderMaterial.d.ts.map +1 -1
- package/lib/cjs/RenderMaterial.js +6 -51
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.d.ts +36 -0
- package/lib/cjs/RenderPolyline.d.ts.map +1 -0
- package/lib/cjs/RenderPolyline.js +26 -0
- package/lib/cjs/RenderPolyline.js.map +1 -0
- package/lib/cjs/RenderSchedule.d.ts +1 -2
- package/lib/cjs/RenderSchedule.d.ts.map +1 -1
- package/lib/cjs/RenderSchedule.js +138 -11
- package/lib/cjs/RenderSchedule.js.map +1 -1
- package/lib/cjs/RenderTexture.d.ts +5 -23
- package/lib/cjs/RenderTexture.d.ts.map +1 -1
- package/lib/cjs/RenderTexture.js +13 -16
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js +3 -0
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.d.ts.map +1 -1
- package/lib/cjs/RpcInterface.js +7 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/SkyBox.js +17 -4
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarShadows.js +5 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js +19 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js +35 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js +16 -2
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.d.ts +0 -7
- package/lib/cjs/TerrainSettings.d.ts.map +1 -1
- package/lib/cjs/TerrainSettings.js +19 -0
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.d.ts +17 -14
- package/lib/cjs/TextureMapping.d.ts.map +1 -1
- package/lib/cjs/TextureMapping.js +47 -19
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js +53 -2
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.d.ts +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/Tween.js +28 -19
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/ViewDetails.js +10 -6
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.d.ts +1 -3
- package/lib/cjs/ViewFlags.d.ts.map +1 -1
- package/lib/cjs/ViewFlags.js +86 -5
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.d.ts +0 -4
- package/lib/cjs/ViewProps.d.ts.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js +10 -0
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js +27 -6
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js +65 -19
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.d.ts +1 -2
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +1 -2
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js +12 -0
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js +17 -0
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js +4 -0
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js +23 -20
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +26 -8
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js +1 -0
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js +100 -0
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js +19 -6
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js +10 -0
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js +14 -0
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js +6 -0
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js +75 -0
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js +18 -0
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
- package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
- package/lib/cjs/internal/BackendTypes.js.map +1 -0
- package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
- package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
- package/lib/cjs/internal/PackedFeatureTable.js +359 -0
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
- package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
- package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
- package/lib/cjs/internal/RenderMaterialParams.js +68 -0
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
- package/lib/cjs/internal/RenderMesh.d.ts +52 -0
- package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
- package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
- package/lib/cjs/internal/RenderMesh.js.map +1 -0
- package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
- package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
- package/lib/cjs/internal/RenderTextureParams.js +37 -0
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +5 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +16 -0
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js +1 -0
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.d.ts +3 -0
- package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js +7 -6
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js +1 -4
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js +29 -38
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
- package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js +29 -31
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js +15 -8
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
- package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js +51 -29
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js +2 -0
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
- package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js +7 -0
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js +3 -0
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js +4 -3
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js +8 -0
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
- package/lib/cjs/tile/IModelTileIO.js +26 -3
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js +5 -0
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js +2 -0
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +9 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js +17 -9
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.d.ts +0 -3
- package/lib/esm/AnalysisStyle.d.ts.map +1 -1
- package/lib/esm/AnalysisStyle.js +20 -4
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js +39 -21
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js +4 -0
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js +19 -0
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/BlobReader.js +8 -6
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.d.ts +2 -2
- package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js +3 -0
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/ChangesetProps.d.ts +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js +31 -5
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.d.ts +0 -5
- package/lib/esm/Code.d.ts.map +1 -1
- package/lib/esm/Code.js +16 -11
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorDef.js +11 -10
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +37 -1
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.js +16 -3
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js +53 -27
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js +40 -5
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +95 -63
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlReader.d.ts +2 -0
- package/lib/esm/ECSqlReader.d.ts.map +1 -1
- package/lib/esm/ECSqlReader.js +56 -50
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js +8 -4
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EntityProps.js +31 -0
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/Environment.js +25 -2
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js +15 -6
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts +25 -73
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +88 -103
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.d.ts +6 -108
- package/lib/esm/FeatureTable.d.ts.map +1 -1
- package/lib/esm/FeatureTable.js +11 -324
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.d.ts +68 -10
- package/lib/esm/Fonts.d.ts.map +1 -1
- package/lib/esm/Fonts.js +19 -4
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js +2 -2
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.d.ts +1 -0
- package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/esm/GeoCoordinateServices.js +2 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryParams.js +58 -0
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/Gradient.d.ts +3 -4
- package/lib/esm/Gradient.d.ts.map +1 -1
- package/lib/esm/Gradient.js +21 -19
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js +14 -12
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js +8 -2
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js +6 -0
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js +6 -0
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.d.ts +17 -18
- package/lib/esm/HiddenLine.d.ts.map +1 -1
- package/lib/esm/HiddenLine.js +24 -5
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js +10 -0
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.d.ts +3 -12
- package/lib/esm/IModel.d.ts.map +1 -1
- package/lib/esm/IModel.js +47 -23
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.d.ts +0 -2
- package/lib/esm/IModelError.d.ts.map +1 -1
- package/lib/esm/IModelError.js +2 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js +4 -0
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinError.d.ts +63 -27
- package/lib/esm/ITwinError.d.ts.map +1 -1
- package/lib/esm/ITwinError.js +87 -44
- package/lib/esm/ITwinError.js.map +1 -1
- package/lib/esm/Image.d.ts +22 -8
- package/lib/esm/Image.d.ts.map +1 -1
- package/lib/esm/Image.js +19 -4
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.d.ts +2 -0
- package/lib/esm/IpcAppProps.d.ts.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js +39 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/Localization.d.ts +0 -10
- package/lib/esm/Localization.d.ts.map +1 -1
- package/lib/esm/Localization.js +0 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js +3 -2
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.d.ts +20 -0
- package/lib/esm/MapLayerSettings.d.ts.map +1 -1
- package/lib/esm/MapLayerSettings.js +50 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.d.ts +2 -0
- package/lib/esm/MassProperties.d.ts.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/ModelClipGroup.js +6 -0
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js +4 -0
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.d.ts +1 -2
- package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
- package/lib/esm/PlanProjectionSettings.js +8 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.d.ts +0 -12
- package/lib/esm/PlanarClipMask.d.ts.map +1 -1
- package/lib/esm/PlanarClipMask.js +24 -2
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.d.ts +5 -5
- package/lib/esm/QPoint.d.ts.map +1 -1
- package/lib/esm/QPoint.js +37 -29
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js +81 -4
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.d.ts +0 -43
- package/lib/esm/RenderMaterial.d.ts.map +1 -1
- package/lib/esm/RenderMaterial.js +6 -51
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.d.ts +36 -0
- package/lib/esm/RenderPolyline.d.ts.map +1 -0
- package/lib/esm/RenderPolyline.js +23 -0
- package/lib/esm/RenderPolyline.js.map +1 -0
- package/lib/esm/RenderSchedule.d.ts +1 -2
- package/lib/esm/RenderSchedule.d.ts.map +1 -1
- package/lib/esm/RenderSchedule.js +138 -11
- package/lib/esm/RenderSchedule.js.map +1 -1
- package/lib/esm/RenderTexture.d.ts +5 -23
- package/lib/esm/RenderTexture.d.ts.map +1 -1
- package/lib/esm/RenderTexture.js +13 -16
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js +3 -0
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.d.ts.map +1 -1
- package/lib/esm/RpcInterface.js +8 -2
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/SkyBox.js +17 -4
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarShadows.js +5 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js +19 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js +35 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js +16 -2
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.d.ts +0 -7
- package/lib/esm/TerrainSettings.d.ts.map +1 -1
- package/lib/esm/TerrainSettings.js +19 -0
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.d.ts +17 -14
- package/lib/esm/TextureMapping.d.ts.map +1 -1
- package/lib/esm/TextureMapping.js +47 -19
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/ThematicDisplay.js +53 -2
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.d.ts +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/Tween.js +28 -19
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/ViewDetails.js +10 -6
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.d.ts +1 -3
- package/lib/esm/ViewFlags.d.ts.map +1 -1
- package/lib/esm/ViewFlags.js +86 -5
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.d.ts +0 -4
- package/lib/esm/ViewProps.d.ts.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js +10 -0
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js +27 -6
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js +65 -19
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.d.ts +1 -2
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +1 -2
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js +12 -0
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js +17 -0
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js +4 -0
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js +23 -20
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +26 -8
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js +54 -108
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js +1 -0
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js +100 -0
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js +19 -6
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js +10 -0
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js +14 -0
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js +6 -0
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js +75 -0
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js +18 -0
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
- package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
- package/lib/esm/internal/BackendTypes.js.map +1 -0
- package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
- package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
- package/lib/esm/internal/PackedFeatureTable.js +352 -0
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
- package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
- package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
- package/lib/esm/internal/RenderMaterialParams.js +64 -0
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
- package/lib/esm/internal/RenderMesh.d.ts +52 -0
- package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
- package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
- package/lib/esm/internal/RenderMesh.js.map +1 -0
- package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
- package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
- package/lib/esm/internal/RenderTextureParams.js +33 -0
- package/lib/esm/internal/RenderTextureParams.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +5 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +4 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js +1 -0
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.d.ts +3 -0
- package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js +7 -6
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js +1 -4
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js +29 -38
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +19 -13
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
- package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js +29 -31
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js +32 -30
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js +15 -8
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js +10 -9
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
- package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js +51 -29
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js +2 -0
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js +14 -13
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
- package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js +7 -0
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js +3 -0
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js +4 -3
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js +8 -0
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.d.ts +2 -2
- package/lib/esm/tile/IModelTileIO.js +26 -3
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js +5 -0
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js +2 -0
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js +9 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package.json +14 -14
- package/lib/cjs/BackendTypes.d.ts.map +0 -1
- package/lib/cjs/BackendTypes.js.map +0 -1
- package/lib/cjs/Render.d.ts +0 -85
- package/lib/cjs/Render.d.ts.map +0 -1
- package/lib/cjs/Render.js.map +0 -1
- package/lib/esm/BackendTypes.d.ts.map +0 -1
- package/lib/esm/BackendTypes.js.map +0 -1
- package/lib/esm/Render.d.ts +0 -85
- package/lib/esm/Render.d.ts.map +0 -1
- package/lib/esm/Render.js.map +0 -1
- /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
- /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
package/lib/cjs/ITwinError.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { LoggingMetaData } from "@itwin/core-bentley";
|
|
5
5
|
import { LockState } from "./IModelError";
|
|
6
|
+
import { BriefcaseId } from "./BriefcaseTypes";
|
|
6
7
|
/**
|
|
7
8
|
* Detailed information about a particular object Lock that is causing the Lock update conflict.
|
|
8
9
|
* An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.
|
|
@@ -17,20 +18,34 @@ export interface InUseLock {
|
|
|
17
18
|
*/
|
|
18
19
|
state: LockState;
|
|
19
20
|
/** An array of Briefcase ids that hold this lock. */
|
|
20
|
-
briefcaseIds:
|
|
21
|
+
briefcaseIds: BriefcaseId[];
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* iTwinjs Core namespace namespace for a developer/application.
|
|
25
|
+
* @beta
|
|
26
|
+
*/
|
|
27
|
+
export declare const iTwinjsCoreNamespace = "itwinjs-core";
|
|
28
|
+
/**
|
|
29
|
+
* error keys object used to describe an error keys for a developer/application.
|
|
30
|
+
* @beta
|
|
31
|
+
*/
|
|
32
|
+
export declare const iTwinErrorKeys: {
|
|
33
|
+
readonly inUseLocks: "in-use-locks";
|
|
34
|
+
readonly channelNest: "channel-may-not-nest";
|
|
35
|
+
readonly channelNotAllowed: "channel-not-allowed";
|
|
36
|
+
readonly channelRootExists: "channel-root-exists";
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Record for all itwin error messages.
|
|
40
|
+
* @beta
|
|
41
|
+
*/
|
|
42
|
+
export declare const iTwinErrorMessages: Record<keyof typeof iTwinErrorKeys, (...args: any[]) => string>;
|
|
22
43
|
/**
|
|
23
44
|
* An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.
|
|
24
45
|
* This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.
|
|
25
|
-
* When extending ITwinError, one should typically add a type guard function and a function to throw the error either to a namespace for their error or as standalone functions.
|
|
26
|
-
* See [[InUseLocksError.throwInUseLocksError]] and [[InUseLocksError.isInUseLocksError]] for examples of how to throw and check that an error is of type InUseLocksError.
|
|
27
|
-
* * Example of catching a ITwinError:
|
|
28
|
-
* ``` ts
|
|
29
|
-
* [[include:ITwinError.catchAndHandleITwinError]]
|
|
30
|
-
* ```
|
|
31
46
|
* @beta
|
|
32
47
|
*/
|
|
33
|
-
export interface ITwinError {
|
|
48
|
+
export interface ITwinError extends Error {
|
|
34
49
|
/** namespace for the error. This is a unique qualifier for the errorKey. */
|
|
35
50
|
namespace: string;
|
|
36
51
|
/** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */
|
|
@@ -48,25 +63,46 @@ export interface ITwinError {
|
|
|
48
63
|
* @beta
|
|
49
64
|
*/
|
|
50
65
|
export interface InUseLocksError extends ITwinError {
|
|
51
|
-
namespace: "itwinjs-core";
|
|
52
|
-
errorKey: "in-use-locks";
|
|
53
66
|
inUseLocks: InUseLock[];
|
|
54
67
|
}
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
/**
|
|
69
|
+
* A function which will be used to construct an [[ITwinError]].
|
|
70
|
+
* @param namespace The namespace associated with the error.
|
|
71
|
+
* @param errorKey The errorKey associated with the error.
|
|
72
|
+
* @param message The message associated with the error.
|
|
73
|
+
* @param metadata Metadata associated with the error.
|
|
74
|
+
* @beta
|
|
75
|
+
*/
|
|
76
|
+
export declare function constructITwinError(namespace: string, errorKey: string, message?: string, metadata?: LoggingMetaData): ITwinError;
|
|
77
|
+
/**
|
|
78
|
+
* A function which constructs a detailed error for example [[ InUseLocksError ]] above.
|
|
79
|
+
* @param namespace The namespace associated with the error.
|
|
80
|
+
* @param errorKey The errorKey associated with the error.
|
|
81
|
+
* @param details Other details associated with the error.
|
|
82
|
+
* @param message The message associated with the error.
|
|
83
|
+
* @param metadata Metadata associated with the error.
|
|
84
|
+
* @beta
|
|
85
|
+
*/
|
|
86
|
+
export declare function constructDetailedError<T extends ITwinError>(namespace: string, errorKey: string, details: Omit<T, keyof ITwinError>, message?: string, metadata?: LoggingMetaData): T;
|
|
87
|
+
/**
|
|
88
|
+
* a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]
|
|
89
|
+
* @param namespace The namespace associated with the error.
|
|
90
|
+
* @param errorKey The errorKey associated with the error.
|
|
91
|
+
* @beta
|
|
92
|
+
*/
|
|
93
|
+
export declare function createITwinErrorTypeAsserter<T extends ITwinError>(namespace: string, errorKey: string): (error: unknown) => error is T;
|
|
94
|
+
/**
|
|
95
|
+
* get the meta data associated with this ITwinError, if any.
|
|
96
|
+
* @param error The error for which metadata is required.
|
|
97
|
+
* @beta
|
|
98
|
+
*/
|
|
99
|
+
export declare function getITwinErrorMetaData(error: ITwinError): object | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* type guard function that returns whether or not the passed in parameter is an [[ITwinError]]
|
|
102
|
+
* @param error The error which is to ve verified.
|
|
103
|
+
* @param namespace The namespace associated with the error.
|
|
104
|
+
* @param errorKey The errorKey associated with the error.
|
|
105
|
+
* @beta
|
|
106
|
+
*/
|
|
107
|
+
export declare function isITwinError(error: unknown, namespace?: string, errorKey?: string): error is ITwinError;
|
|
72
108
|
//# sourceMappingURL=ITwinError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITwinError.d.ts","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"ITwinError.d.ts","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MA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EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,UAAU,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,CAAC,CAKrL;AAED;;;;;EAKE;AACF,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WACrF,OAAO,KAAG,KAAK,IAAI,CAAC,CACpC;AAED;;;;EAIE;AACF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED;;;;;;EAME;AACF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAKvG"}
|
package/lib/cjs/ITwinError.js
CHANGED
|
@@ -7,49 +7,97 @@
|
|
|
7
7
|
* @module iModels
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
;
|
|
10
|
+
exports.iTwinErrorMessages = exports.iTwinErrorKeys = exports.iTwinjsCoreNamespace = void 0;
|
|
11
|
+
exports.constructITwinError = constructITwinError;
|
|
12
|
+
exports.constructDetailedError = constructDetailedError;
|
|
13
|
+
exports.createITwinErrorTypeAsserter = createITwinErrorTypeAsserter;
|
|
14
|
+
exports.getITwinErrorMetaData = getITwinErrorMetaData;
|
|
15
|
+
exports.isITwinError = isITwinError;
|
|
16
|
+
/**
|
|
17
|
+
* iTwinjs Core namespace namespace for a developer/application.
|
|
18
|
+
* @beta
|
|
19
|
+
*/
|
|
20
|
+
exports.iTwinjsCoreNamespace = "itwinjs-core";
|
|
21
|
+
/**
|
|
22
|
+
* error keys object used to describe an error keys for a developer/application.
|
|
23
|
+
* @beta
|
|
24
|
+
*/
|
|
25
|
+
exports.iTwinErrorKeys = {
|
|
26
|
+
inUseLocks: "in-use-locks",
|
|
27
|
+
channelNest: "channel-may-not-nest",
|
|
28
|
+
channelNotAllowed: "channel-not-allowed",
|
|
29
|
+
channelRootExists: "channel-root-exists"
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Record for all itwin error messages.
|
|
33
|
+
* @beta
|
|
34
|
+
*/
|
|
35
|
+
exports.iTwinErrorMessages = {
|
|
36
|
+
"inUseLocks": () => 'Objects are locked by another briefcase',
|
|
37
|
+
"channelNest": (id) => `Channel ${id} may not nest`,
|
|
38
|
+
"channelNotAllowed": (id) => `Channel ${id} is not allowed`,
|
|
39
|
+
"channelRootExists": (id) => `Channel ${id} root already exist`,
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A function which will be used to construct an [[ITwinError]].
|
|
43
|
+
* @param namespace The namespace associated with the error.
|
|
44
|
+
* @param errorKey The errorKey associated with the error.
|
|
45
|
+
* @param message The message associated with the error.
|
|
46
|
+
* @param metadata Metadata associated with the error.
|
|
47
|
+
* @beta
|
|
48
|
+
*/
|
|
49
|
+
function constructITwinError(namespace, errorKey, message, metadata) {
|
|
50
|
+
const error = new Error();
|
|
51
|
+
error.message = message ?? `${errorKey} occurred`;
|
|
52
|
+
error.name = `${namespace}:${errorKey}`;
|
|
53
|
+
error.namespace = namespace;
|
|
54
|
+
error.errorKey = errorKey;
|
|
55
|
+
error.metadata = metadata;
|
|
56
|
+
Error.captureStackTrace(error, constructITwinError); // Optional, but this would hide constructITwinError from stack.
|
|
57
|
+
return error;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A function which constructs a detailed error for example [[ InUseLocksError ]] above.
|
|
61
|
+
* @param namespace The namespace associated with the error.
|
|
62
|
+
* @param errorKey The errorKey associated with the error.
|
|
63
|
+
* @param details Other details associated with the error.
|
|
64
|
+
* @param message The message associated with the error.
|
|
65
|
+
* @param metadata Metadata associated with the error.
|
|
66
|
+
* @beta
|
|
67
|
+
*/
|
|
68
|
+
function constructDetailedError(namespace, errorKey, details, message, metadata) {
|
|
69
|
+
const baseError = constructITwinError(namespace, errorKey, message, metadata);
|
|
70
|
+
Error.captureStackTrace(baseError, constructDetailedError); // Optional, but this would hide constructDetailedError from stack.
|
|
71
|
+
return Object.assign(baseError, details);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]
|
|
75
|
+
* @param namespace The namespace associated with the error.
|
|
76
|
+
* @param errorKey The errorKey associated with the error.
|
|
77
|
+
* @beta
|
|
78
|
+
*/
|
|
79
|
+
function createITwinErrorTypeAsserter(namespace, errorKey) {
|
|
80
|
+
return (error) => isITwinError(error, namespace, errorKey);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* get the meta data associated with this ITwinError, if any.
|
|
84
|
+
* @param error The error for which metadata is required.
|
|
85
|
+
* @beta
|
|
86
|
+
*/
|
|
87
|
+
function getITwinErrorMetaData(error) {
|
|
88
|
+
return (typeof error.metadata === "function") ? error.metadata() : error.metadata;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* type guard function that returns whether or not the passed in parameter is an [[ITwinError]]
|
|
92
|
+
* @param error The error which is to ve verified.
|
|
93
|
+
* @param namespace The namespace associated with the error.
|
|
94
|
+
* @param errorKey The errorKey associated with the error.
|
|
95
|
+
* @beta
|
|
96
|
+
*/
|
|
97
|
+
function isITwinError(error, namespace, errorKey) {
|
|
98
|
+
return error !== undefined && error !== null && typeof error === "object"
|
|
99
|
+
&& "namespace" in error && "errorKey" in error && "message" in error
|
|
100
|
+
&& (namespace === undefined || error.namespace === namespace)
|
|
101
|
+
&& (errorKey === undefined || error.errorKey === errorKey);
|
|
102
|
+
}
|
|
55
103
|
//# sourceMappingURL=ITwinError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITwinError.js","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"ITwinError.js","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuFH,kDAWC;AAWD,wDAKC;AAQD,oEAEC;AAOD,sDAEC;AASD,oCAKC;AA5HD;;;GAGG;AACU,QAAA,oBAAoB,GAAG,cAAc,CAAC;AAEnD;;;GAGG;AACU,QAAA,cAAc,GAAG;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,sBAAsB;IACnC,iBAAiB,EAAE,qBAAqB;IACxC,iBAAiB,EAAE,qBAAqB;CAChC,CAAC;AAEX;;;GAGG;AACU,QAAA,kBAAkB,GAAoE;IACjG,YAAY,EAAE,GAAG,EAAE,CAAC,yCAAyC;IAC7D,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,eAAe;IACnD,mBAAmB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,iBAAiB;IAC3D,mBAAmB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,qBAAqB;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C,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;AACpF,CAAC;AAED;;;;;;EAME;AACF,SAAgB,YAAY,CAAC,KAAc,EAAE,SAAkB,EAAE,QAAiB;IAChF,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;WACpE,WAAW,IAAI,KAAK,IAAI,UAAU,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK;WACjE,CAAC,SAAS,KAAK,SAAS,IAAK,KAAoB,CAAC,SAAS,KAAK,SAAS,CAAC;WAC1E,CAAC,QAAQ,KAAK,SAAS,IAAK,KAAoB,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;AAC/E,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 iModels\n */\n\nimport { LoggingMetaData } from \"@itwin/core-bentley\";\nimport { LockState } from \"./IModelError\";\nimport { BriefcaseId } from \"./BriefcaseTypes\";\n\n/**\n * Detailed information about a particular object Lock that is causing the Lock update conflict.\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\n * @beta\n */\nexport interface InUseLock {\n /** Id of the object that is causing conflict. */\n objectId: string;\n /**\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\n * See {@link LockState}.\n */\n state: LockState;\n /** An array of Briefcase ids that hold this lock. */\n briefcaseIds: BriefcaseId[];\n}\n\n/**\n * iTwinjs Core namespace namespace for a developer/application.\n * @beta\n */\nexport const iTwinjsCoreNamespace = \"itwinjs-core\";\n\n/**\n * error keys object used to describe an error keys for a developer/application.\n * @beta\n */\nexport const iTwinErrorKeys = {\n inUseLocks: \"in-use-locks\",\n channelNest: \"channel-may-not-nest\",\n channelNotAllowed: \"channel-not-allowed\",\n channelRootExists: \"channel-root-exists\"\n} as const;\n\n/**\n * Record for all itwin error messages.\n * @beta\n */\nexport const iTwinErrorMessages: Record<keyof typeof iTwinErrorKeys, (...args: any[]) => string> = {\n \"inUseLocks\": () => 'Objects are locked by another briefcase',\n \"channelNest\": (id) => `Channel ${id} may not nest`,\n \"channelNotAllowed\": (id) => `Channel ${id} is not allowed`,\n \"channelRootExists\": (id) => `Channel ${id} root already exist`,\n};\n\n\n/**\n * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.\n * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.\n * @beta\n */\nexport interface ITwinError extends Error {\n /** namespace for the error. This is a unique qualifier for the errorKey. */\n namespace: string;\n /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */\n errorKey: string;\n /** explanation of what went wrong. Intended to be read by a developer. */\n message: string;\n /** stack trace of the error. */\n stack?: string;\n /** metadata about the exception. */\n metadata?: LoggingMetaData;\n}\n\n/**\n * An error raised when there is a lock conflict detected.\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\n * @beta\n*/\nexport interface InUseLocksError extends ITwinError {\n inUseLocks: InUseLock[];\n}\n\n/**\n* A function which will be used to construct an [[ITwinError]].\n* @param namespace The namespace associated with the error.\n* @param errorKey The errorKey associated with the error.\n* @param message The message associated with the error.\n* @param metadata Metadata associated with the error.\n* @beta\n*/\nexport function constructITwinError(namespace: string, errorKey: string, message?: string, metadata?: LoggingMetaData): ITwinError {\n\n const error = new Error() as ITwinError;\n error.message = message ?? `${errorKey} occurred`;\n error.name = `${namespace}:${errorKey}`;\n error.namespace = namespace;\n error.errorKey = errorKey;\n error.metadata = metadata;\n\n Error.captureStackTrace(error, constructITwinError); // Optional, but this would hide constructITwinError from stack.\n return error;\n}\n\n/**\n* A function which constructs a detailed error for example [[ InUseLocksError ]] above.\n* @param namespace The namespace associated with the error.\n* @param errorKey The errorKey associated with the error.\n* @param details Other details associated with the error.\n* @param message The message associated with the error.\n* @param metadata Metadata associated with the error.\n* @beta\n*/\nexport function constructDetailedError<T extends ITwinError>(namespace: string, errorKey: string, details: Omit<T, keyof ITwinError>, message?: string, metadata?: LoggingMetaData): T {\n const baseError = constructITwinError(namespace, errorKey, message, metadata);\n\n Error.captureStackTrace(baseError, constructDetailedError); // Optional, but this would hide constructDetailedError from stack.\n return Object.assign(baseError, details) as T;\n}\n\n/**\n * a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]\n * @param namespace The namespace associated with the error.\n * @param errorKey The errorKey associated with the error.\n * @beta\n*/\nexport function createITwinErrorTypeAsserter<T extends ITwinError>(namespace: string, errorKey: string) {\n return (error: unknown): error is T => isITwinError(error, namespace, errorKey);\n}\n\n/**\n * get the meta data associated with this ITwinError, if any.\n * @param error The error for which metadata is required.\n * @beta\n*/\nexport function getITwinErrorMetaData(error: ITwinError): object | undefined {\n return (typeof error.metadata === \"function\") ? error.metadata() : error.metadata;\n}\n\n/**\n * type guard function that returns whether or not the passed in parameter is an [[ITwinError]]\n * @param error The error which is to ve verified.\n * @param namespace The namespace associated with the error.\n * @param errorKey The errorKey associated with the error.\n * @beta\n*/\nexport function isITwinError(error: unknown, namespace?: string, errorKey?: string): error is ITwinError {\n return error !== undefined && error !== null && typeof error === \"object\"\n && \"namespace\" in error && \"errorKey\" in error && \"message\" in error\n && (namespace === undefined || (error as ITwinError).namespace === namespace)\n && (errorKey === undefined || (error as ITwinError).errorKey === errorKey);\n}\n"]}
|
package/lib/cjs/Image.d.ts
CHANGED
|
@@ -40,12 +40,9 @@ export declare class ImageBuffer {
|
|
|
40
40
|
* @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.
|
|
41
41
|
*/
|
|
42
42
|
static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
protected static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number;
|
|
47
|
-
/** @internal */
|
|
48
|
-
protected constructor(data: Uint8Array, format: ImageBufferFormat, width: number);
|
|
43
|
+
private static isValidData;
|
|
44
|
+
private static computeHeight;
|
|
45
|
+
private constructor();
|
|
49
46
|
}
|
|
50
47
|
/** Returns whether the input is a power of two.
|
|
51
48
|
* @note Floating point inputs are truncated.
|
|
@@ -71,8 +68,10 @@ export declare enum ImageSourceFormat {
|
|
|
71
68
|
*/
|
|
72
69
|
Svg = 3
|
|
73
70
|
}
|
|
74
|
-
/**
|
|
75
|
-
|
|
71
|
+
/** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
export declare function isValidImageSourceFormat(format: number): format is ImageSourceFormat;
|
|
76
75
|
/** Image data encoded and compressed in either Jpeg or Png format.
|
|
77
76
|
* @public
|
|
78
77
|
*/
|
|
@@ -84,4 +83,19 @@ export declare class ImageSource {
|
|
|
84
83
|
/** Construct a new ImageSource, which takes ownership of the Uint8Array. */
|
|
85
84
|
constructor(data: Uint8Array | string, format: ImageSourceFormat);
|
|
86
85
|
}
|
|
86
|
+
/** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded
|
|
87
|
+
* in string format as an Svg.
|
|
88
|
+
* Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export interface BinaryImageSource {
|
|
92
|
+
/** The format in which the [[data]] is encoded. */
|
|
93
|
+
readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;
|
|
94
|
+
/** The image data encoded according to [[format]]. */
|
|
95
|
+
readonly data: Uint8Array;
|
|
96
|
+
}
|
|
97
|
+
/** Returns true if `source` is a [[BinaryImageSource]].
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
export declare function isBinaryImageSource(source: ImageSource): source is BinaryImageSource;
|
|
87
101
|
//# sourceMappingURL=Image.d.ts.map
|
package/lib/cjs/Image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;GAKG;AACH,oBAAY,iBAAiB;IAC3B,uCAAuC;IACvC,IAAI,IAAI;IACR,sCAAsC;IACtC,GAAG,IAAI;IACP,wBAAwB;IACxB,KAAK,IAAI;CACV;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,sGAAsG;IACtG,SAAgB,IAAI,EAAE,UAAU,CAAC;IACjC,wCAAwC;IACxC,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAC1C,+BAA+B;IAC/B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAE9B,2DAA2D;IAC3D,IAAW,gBAAgB,IAAI,MAAM,CAAyD;IAE9F,0FAA0F;WAC5E,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM;IAQpE,8CAA8C;IAC9C,IAAW,MAAM,IAAI,MAAM,CAA0E;IAErG;;;;;;;OAOG;WACW,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW;IAO7F,
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;GAKG;AACH,oBAAY,iBAAiB;IAC3B,uCAAuC;IACvC,IAAI,IAAI;IACR,sCAAsC;IACtC,GAAG,IAAI;IACP,wBAAwB;IACxB,KAAK,IAAI;CACV;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,sGAAsG;IACtG,SAAgB,IAAI,EAAE,UAAU,CAAC;IACjC,wCAAwC;IACxC,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAC1C,+BAA+B;IAC/B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAE9B,2DAA2D;IAC3D,IAAW,gBAAgB,IAAI,MAAM,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AI,iBAAiB,CAEpF"}
|
package/lib/cjs/Image.js
CHANGED
|
@@ -11,6 +11,7 @@ exports.ImageSource = exports.ImageSourceFormat = exports.ImageBuffer = exports.
|
|
|
11
11
|
exports.isPowerOfTwo = isPowerOfTwo;
|
|
12
12
|
exports.nextHighestPowerOfTwo = nextHighestPowerOfTwo;
|
|
13
13
|
exports.isValidImageSourceFormat = isValidImageSourceFormat;
|
|
14
|
+
exports.isBinaryImageSource = isBinaryImageSource;
|
|
14
15
|
/** Format of an [[ImageBuffer]].
|
|
15
16
|
* The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.
|
|
16
17
|
* @see [[ImageBuffer.getNumBytesPerPixel]]
|
|
@@ -30,6 +31,12 @@ var ImageBufferFormat;
|
|
|
30
31
|
* @public
|
|
31
32
|
*/
|
|
32
33
|
class ImageBuffer {
|
|
34
|
+
/** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */
|
|
35
|
+
data;
|
|
36
|
+
/** Format of the bytes in the image. */
|
|
37
|
+
format;
|
|
38
|
+
/** Width of image in pixels */
|
|
39
|
+
width;
|
|
33
40
|
/** Return the number of bytes allocated for each pixel. */
|
|
34
41
|
get numBytesPerPixel() { return ImageBuffer.getNumBytesPerPixel(this.format); }
|
|
35
42
|
/** Determine the number of bytes allocated to a single pixel for the specified format. */
|
|
@@ -55,16 +62,13 @@ class ImageBuffer {
|
|
|
55
62
|
throw new Error("The number of bytes supplied for ImageBuffer do not match its width and format.");
|
|
56
63
|
return new ImageBuffer(data, format, width);
|
|
57
64
|
}
|
|
58
|
-
/** @internal */
|
|
59
65
|
static isValidData(data, format, width) {
|
|
60
66
|
const height = this.computeHeight(data, format, width);
|
|
61
67
|
return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;
|
|
62
68
|
}
|
|
63
|
-
/** @internal */
|
|
64
69
|
static computeHeight(data, format, width) {
|
|
65
70
|
return data.length / (width * this.getNumBytesPerPixel(format));
|
|
66
71
|
}
|
|
67
|
-
/** @internal */
|
|
68
72
|
constructor(data, format, width) {
|
|
69
73
|
this.data = data;
|
|
70
74
|
this.format = format;
|
|
@@ -104,7 +108,9 @@ var ImageSourceFormat;
|
|
|
104
108
|
*/
|
|
105
109
|
ImageSourceFormat[ImageSourceFormat["Svg"] = 3] = "Svg";
|
|
106
110
|
})(ImageSourceFormat || (exports.ImageSourceFormat = ImageSourceFormat = {}));
|
|
107
|
-
/**
|
|
111
|
+
/** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
108
114
|
function isValidImageSourceFormat(format) {
|
|
109
115
|
switch (format) {
|
|
110
116
|
case ImageSourceFormat.Jpeg:
|
|
@@ -119,6 +125,10 @@ function isValidImageSourceFormat(format) {
|
|
|
119
125
|
* @public
|
|
120
126
|
*/
|
|
121
127
|
class ImageSource {
|
|
128
|
+
/** The content of the image, compressed */
|
|
129
|
+
data;
|
|
130
|
+
/** The compression type. */
|
|
131
|
+
format;
|
|
122
132
|
/** Construct a new ImageSource, which takes ownership of the Uint8Array. */
|
|
123
133
|
constructor(data, format) {
|
|
124
134
|
this.data = data;
|
|
@@ -126,4 +136,10 @@ class ImageSource {
|
|
|
126
136
|
}
|
|
127
137
|
}
|
|
128
138
|
exports.ImageSource = ImageSource;
|
|
139
|
+
/** Returns true if `source` is a [[BinaryImageSource]].
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
function isBinaryImageSource(source) {
|
|
143
|
+
return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;
|
|
144
|
+
}
|
|
129
145
|
//# sourceMappingURL=Image.js.map
|
package/lib/cjs/Image.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"Image.js","sourceRoot":"","sources":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AC3B,kDAAkD;IAClD,yDAAQ,CAAA;IACR,iDAAiD;IACjD,uDAAO,CAAA;IACP;;OAEG;IACH,uDAAO,CAAA;AACT,CAAC,EATW,iBAAiB,iCAAjB,iBAAiB,QAS5B;AAED;;GAEG;AACH,SAAgB,wBAAwB,CAAC,MAAc;IACrD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,iBAAiB,CAAC,IAAI,CAAC;QAC5B,KAAK,iBAAiB,CAAC,GAAG,CAAC;QAC3B,KAAK,iBAAiB,CAAC,GAAG;YACxB,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAa,WAAW;IACtB,2CAA2C;IAC3B,IAAI,CAAsB;IAC1C,4BAA4B;IACZ,MAAM,CAAoB;IAE1C,4EAA4E;IAC5E,YAAmB,IAAyB,EAAE,MAAyB;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAXD,kCAWC;AAcD;;GAEG;AACH,SAAgB,mBAAmB,CAAC,MAAmB;IACrD,OAAO,MAAM,CAAC,MAAM,KAAK,iBAAiB,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,YAAY,UAAU,CAAC;AACtF,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 Rendering\n */\n\n/** Format of an [[ImageBuffer]].\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\n * @see [[ImageBuffer.getNumBytesPerPixel]]\n * @public\n * @extensions\n */\nexport enum ImageBufferFormat {\n /** RGBA format - 4 bytes per pixel. */\n Rgba = 0,\n /** RGB format - 3 bytes per pixel. */\n Rgb = 2,\n /** 1 byte per pixel. */\n Alpha = 5,\n}\n\n/** Uncompressed rectangular bitmap image data.\n * @public\n */\nexport class ImageBuffer {\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\n public readonly data: Uint8Array;\n /** Format of the bytes in the image. */\n public readonly format: ImageBufferFormat;\n /** Width of image in pixels */\n public readonly width: number;\n\n /** Return the number of bytes allocated for each pixel. */\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\n\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\n switch (format) {\n case ImageBufferFormat.Alpha: return 1;\n case ImageBufferFormat.Rgb: return 3;\n default: return 4;\n }\n }\n\n /** Get the height of this image in pixels. */\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\n\n /** Create a new ImageBuffer.\n * @note The ImageBuffer takes ownership of the input Uint8Array.\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\n * @param format The format of the image.\n * @param width The width of the image in pixels.\n * @returns A new ImageBuffer.\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\n */\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\n if (!this.isValidData(data, format, width))\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\n\n return new ImageBuffer(data, format, width);\n }\n\n private static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\n const height = this.computeHeight(data, format, width);\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\n }\n\n private static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\n return data.length / (width * this.getNumBytesPerPixel(format));\n }\n\n private constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\n this.data = data;\n this.format = format;\n this.width = width;\n }\n}\n\n/** Returns whether the input is a power of two.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function isPowerOfTwo(num: number): boolean {\n return 0 === (num & (num - 1));\n}\n\n/** Returns the first power-of-two value greater than or equal to the input.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function nextHighestPowerOfTwo(num: number): number {\n --num;\n for (let i = 1; i < 32; i <<= 1)\n num = num | num >> i;\n\n return num + 1;\n}\n\n/** The format of an ImageSource.\n * @public\n * @extensions\n */\nexport enum ImageSourceFormat {\n /** Image data is stored with JPEG compression. */\n Jpeg = 0,\n /** Image data is stored with PNG compression. */\n Png = 2,\n /** Image is stored as an Svg stream.\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\n */\n Svg = 3,\n}\n\n/** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.\n * @public\n */\nexport function isValidImageSourceFormat(format: number): format is ImageSourceFormat {\n switch (format) {\n case ImageSourceFormat.Jpeg:\n case ImageSourceFormat.Png:\n case ImageSourceFormat.Svg:\n return true;\n default:\n return false;\n }\n}\n\n/** Image data encoded and compressed in either Jpeg or Png format.\n * @public\n */\nexport class ImageSource {\n /** The content of the image, compressed */\n public readonly data: Uint8Array | string;\n /** The compression type. */\n public readonly format: ImageSourceFormat;\n\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\n this.data = data;\n this.format = format;\n }\n}\n\n/** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded\n * in string format as an Svg.\n * Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.\n * @public\n */\nexport interface BinaryImageSource {\n /** The format in which the [[data]] is encoded. */\n readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;\n /** The image data encoded according to [[format]]. */\n readonly data: Uint8Array;\n}\n\n/** Returns true if `source` is a [[BinaryImageSource]].\n * @public\n */\nexport function isBinaryImageSource(source: ImageSource): source is BinaryImageSource {\n return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;\n}\n"]}
|
package/lib/cjs/IpcAppProps.d.ts
CHANGED
|
@@ -136,6 +136,8 @@ export interface IpcAppFunctions {
|
|
|
136
136
|
closeIModel: (key: string) => Promise<void>;
|
|
137
137
|
/** see BriefcaseConnection.saveChanges */
|
|
138
138
|
saveChanges: (key: string, description?: string) => Promise<void>;
|
|
139
|
+
/** see BriefcaseConnection.abandonChanges */
|
|
140
|
+
abandonChanges: (key: string) => Promise<void>;
|
|
139
141
|
/** see BriefcaseTxns.hasPendingTxns */
|
|
140
142
|
hasPendingTxns: (key: string) => Promise<boolean>;
|
|
141
143
|
/** see BriefcaseTxns.isUndoPossible */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcAppProps.d.ts","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAClJ,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;A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AAE,WAAW,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAErF,2BAA2B,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACvF,2BAA2B,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAE/D,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3E,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACrD,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD,4FAA4F;IAC5F,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuBH;;GAEG;AACI,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,sBAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAAvG,QAAA,wBAAwB,4BAA+E;AAwBpH,gBAAgB;AACH,QAAA,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,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 NativeApp\n */\n\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\nimport { ChangedEntities } from \"./ChangedEntities\";\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\n\n/** Options for pulling changes into iModel.\n * @internal\n */\nexport interface PullChangesOptions {\n /** Enables progress reporting. */\n reportProgress?: boolean;\n /** Interval for reporting progress (in milliseconds). */\n progressInterval?: number;\n /** Enables checks for abort. */\n enableCancellation?: boolean;\n}\n\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\n * @internal\n */\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\n\n/** Identifies a list of tile content Ids belonging to a single tile tree.\n * @internal\n */\nexport interface TileTreeContentIds {\n treeId: string;\n contentIds: string[];\n}\n\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ModelIdAndGeometryGuid {\n /** The model's Id. */\n id: Id64String;\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\n */\n guid: GuidString;\n}\n\n/** @internal */\nexport const ipcAppChannels = {\n functions: \"itwinjs-core/ipc-app\",\n appNotify: \"itwinjs-core/ipcApp-notify\",\n txns: \"itwinjs-core/txns\",\n editingScope: \"itwinjs-core/editing-scope\",\n} as const;\n\n/**\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\n * @internal\n */\nexport interface IpcAppNotifications {\n notifyApp: () => void;\n}\n\n/** @internal */\nexport interface NotifyEntitiesChangedMetadata {\n /** Class full name (\"Schema:Class\") */\n name: string;\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\n bases: number[];\n}\n\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\n * @internal\n */\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\n /** An array of the same length as [[ChangedEntities.inserted]] (or empty if that array is undefined), containing the index in the [[meta]] array at which the\n * metadata for each entity's class is located.\n */\n insertedMeta: number[];\n /** See insertedMeta. */\n updatedMeta: number[];\n /** See insertedMeta. */\n deletedMeta: number[];\n\n /** Metadata describing each unique class of entity in this set of changes, followed by each unique direct or indirect base class of those classes. */\n meta: NotifyEntitiesChangedMetadata[];\n}\n\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\n * @see [TxnManager]($backend) for the source of these events.\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\n * @internal\n */\nexport interface TxnNotifications {\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\n notifyCommit: () => void;\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\n notifyReplayExternalTxns: () => void;\n notifyReplayedExternalTxns: () => void;\n notifyChangesApplied: () => void;\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\n notifyAfterUndoRedo: (isUndo: boolean) => void;\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n\n notifyIModelNameChanged: (name: string) => void;\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\n}\n\n/**\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\n * @internal\n */\nexport interface EditingScopeNotifications {\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\n}\n\n/**\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\n * @internal\n */\nexport interface IpcAppFunctions {\n /** Send frontend log to backend.\n * @param _level Specify log level.\n * @param _category Specify log category.\n * @param _message Specify log message.\n * @param _metaData metaData if any.\n */\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\n\n /** see BriefcaseConnection.openFile */\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\n /** see SnapshotConnection.openFile */\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.close */\n closeIModel: (key: string) => Promise<void>;\n /** see BriefcaseConnection.saveChanges */\n saveChanges: (key: string, description?: string) => Promise<void>;\n /** see BriefcaseTxns.hasPendingTxns */\n hasPendingTxns: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isUndoPossible */\n isUndoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isRedoPossible */\n isRedoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.getUndoString */\n getUndoString: (key: string) => Promise<string>;\n /** see BriefcaseTxns.getRedoString */\n getRedoString: (key: string) => Promise<string>;\n\n /** see BriefcaseConnection.pullChanges */\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\n /** Cancels pull of changes. */\n cancelPullChangesRequest: (key: string) => Promise<void>;\n /** see BriefcaseConnection.pushChanges */\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\n /** Cancels currently pending or active generation of tile content. */\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\n\n /** Cancel element graphics requests.\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\n */\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\n\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\n\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\n reinstateTxn: (key: string) => Promise<IModelStatus>;\n restartTxnSession: (key: string) => Promise<void>;\n\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuBH;;GAEG;AACI,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,sBAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAAvG,QAAA,wBAAwB,4BAA+E;AAwBpH,gBAAgB;AACH,QAAA,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,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 NativeApp\n */\n\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\nimport { ChangedEntities } from \"./ChangedEntities\";\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\n\n/** Options for pulling changes into iModel.\n * @internal\n */\nexport interface PullChangesOptions {\n /** Enables progress reporting. */\n reportProgress?: boolean;\n /** Interval for reporting progress (in milliseconds). */\n progressInterval?: number;\n /** Enables checks for abort. */\n enableCancellation?: boolean;\n}\n\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\n * @internal\n */\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\n\n/** Identifies a list of tile content Ids belonging to a single tile tree.\n * @internal\n */\nexport interface TileTreeContentIds {\n treeId: string;\n contentIds: string[];\n}\n\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ModelIdAndGeometryGuid {\n /** The model's Id. */\n id: Id64String;\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\n */\n guid: GuidString;\n}\n\n/** @internal */\nexport const ipcAppChannels = {\n functions: \"itwinjs-core/ipc-app\",\n appNotify: \"itwinjs-core/ipcApp-notify\",\n txns: \"itwinjs-core/txns\",\n editingScope: \"itwinjs-core/editing-scope\",\n} as const;\n\n/**\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\n * @internal\n */\nexport interface IpcAppNotifications {\n notifyApp: () => void;\n}\n\n/** @internal */\nexport interface NotifyEntitiesChangedMetadata {\n /** Class full name (\"Schema:Class\") */\n name: string;\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\n bases: number[];\n}\n\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\n * @internal\n */\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\n /** An array of the same length as [[ChangedEntities.inserted]] (or empty if that array is undefined), containing the index in the [[meta]] array at which the\n * metadata for each entity's class is located.\n */\n insertedMeta: number[];\n /** See insertedMeta. */\n updatedMeta: number[];\n /** See insertedMeta. */\n deletedMeta: number[];\n\n /** Metadata describing each unique class of entity in this set of changes, followed by each unique direct or indirect base class of those classes. */\n meta: NotifyEntitiesChangedMetadata[];\n}\n\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\n * @see [TxnManager]($backend) for the source of these events.\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\n * @internal\n */\nexport interface TxnNotifications {\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\n notifyCommit: () => void;\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\n notifyReplayExternalTxns: () => void;\n notifyReplayedExternalTxns: () => void;\n notifyChangesApplied: () => void;\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\n notifyAfterUndoRedo: (isUndo: boolean) => void;\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n\n notifyIModelNameChanged: (name: string) => void;\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\n}\n\n/**\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\n * @internal\n */\nexport interface EditingScopeNotifications {\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\n}\n\n/**\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\n * @internal\n */\nexport interface IpcAppFunctions {\n /** Send frontend log to backend.\n * @param _level Specify log level.\n * @param _category Specify log category.\n * @param _message Specify log message.\n * @param _metaData metaData if any.\n */\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\n\n /** see BriefcaseConnection.openFile */\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\n /** see SnapshotConnection.openFile */\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.close */\n closeIModel: (key: string) => Promise<void>;\n /** see BriefcaseConnection.saveChanges */\n saveChanges: (key: string, description?: string) => Promise<void>;\n /** see BriefcaseConnection.abandonChanges */\n abandonChanges: (key: string) => Promise<void>;\n /** see BriefcaseTxns.hasPendingTxns */\n hasPendingTxns: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isUndoPossible */\n isUndoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isRedoPossible */\n isRedoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.getUndoString */\n getUndoString: (key: string) => Promise<string>;\n /** see BriefcaseTxns.getRedoString */\n getRedoString: (key: string) => Promise<string>;\n\n /** see BriefcaseConnection.pullChanges */\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\n /** Cancels pull of changes. */\n cancelPullChangesRequest: (key: string) => Promise<void>;\n /** see BriefcaseConnection.pushChanges */\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\n /** Cancels currently pending or active generation of tile content. */\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\n\n /** Cancel element graphics requests.\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\n */\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\n\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\n\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\n reinstateTxn: (key: string) => Promise<IModelStatus>;\n restartTxnSession: (key: string) => Promise<void>;\n\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\n}\n\n"]}
|