@itwin/core-common 5.3.0-dev.1 → 5.3.0-dev.12
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 +20 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +24 -6
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.d.ts +4 -29
- package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
- package/lib/cjs/annotation/TextBlock.js +8 -35
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.d.ts +64 -36
- package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
- package/lib/cjs/annotation/TextStyle.js +63 -44
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +24 -6
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.d.ts +4 -29
- package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
- package/lib/esm/annotation/TextBlock.js +8 -35
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.js.map +1 -1
- package/lib/esm/annotation/TextStyle.d.ts +64 -36
- package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
- package/lib/esm/annotation/TextStyle.js +63 -44
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +7 -7
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.TextStyleSettings = exports.textAnnotationFrameShapes = exports.ListMarkerEnumerator = void 0;
|
|
11
11
|
const ColorDef_1 = require("../ColorDef");
|
|
12
|
+
const Fonts_1 = require("../Fonts");
|
|
12
13
|
/** Predefined markers for list items in text annotations.
|
|
13
14
|
* These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.
|
|
14
15
|
* @beta
|
|
@@ -30,6 +31,7 @@ var ListMarkerEnumerator;
|
|
|
30
31
|
*/
|
|
31
32
|
exports.textAnnotationFrameShapes = ["none", "line", "rectangle", "circle", "equilateralTriangle", "diamond", "square", "pentagon", "hexagon", "octagon", "capsule", "roundedRectangle"];
|
|
32
33
|
;
|
|
34
|
+
;
|
|
33
35
|
function deepFreeze(obj) {
|
|
34
36
|
if (obj === null || typeof obj !== "object" || Object.isFrozen(obj))
|
|
35
37
|
return;
|
|
@@ -50,20 +52,20 @@ function deepFreeze(obj) {
|
|
|
50
52
|
class TextStyleSettings {
|
|
51
53
|
/** The color of the text. */
|
|
52
54
|
color;
|
|
53
|
-
/** The
|
|
55
|
+
/** The font stored in an iModel, used to draw the contents of a [[TextRun]].
|
|
54
56
|
*/
|
|
55
|
-
|
|
56
|
-
/** The height
|
|
57
|
-
* For example, the height and offset from baseline of a subscript [[TextRun]] are computed as
|
|
58
|
-
*
|
|
57
|
+
font;
|
|
58
|
+
/** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.
|
|
59
|
+
* For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and
|
|
60
|
+
* textHeight * [[subScriptOffsetFactor]], respectively.
|
|
59
61
|
*/
|
|
60
|
-
|
|
62
|
+
textHeight;
|
|
61
63
|
/** Multiplier used to compute the vertical distance between two lines of text.
|
|
62
|
-
* The distance is computed in meters as lineSpacingFactor * [[
|
|
64
|
+
* The distance is computed in meters as lineSpacingFactor * [[textHeight]] of the [[TextBlock]].
|
|
63
65
|
*/
|
|
64
66
|
lineSpacingFactor;
|
|
65
67
|
/** Multiplier used to compute the vertical distance between two paragraphs of text.
|
|
66
|
-
* The distance is computed in meters as paragraphSpacingFactor * [[
|
|
68
|
+
* The distance is computed in meters as paragraphSpacingFactor * the [[TextBlock]]'s [[textHeight]].
|
|
67
69
|
*/
|
|
68
70
|
paragraphSpacingFactor;
|
|
69
71
|
/** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */
|
|
@@ -73,28 +75,28 @@ class TextStyleSettings {
|
|
|
73
75
|
/** Specifies whether the content of a [[TextRun]] should be underlined. */
|
|
74
76
|
isUnderlined;
|
|
75
77
|
/** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].
|
|
76
|
-
* The height is computed in meters as stackedFractionScale * [[
|
|
78
|
+
* The height is computed in meters as stackedFractionScale * [[textHeight]].
|
|
77
79
|
*/
|
|
78
80
|
stackedFractionScale;
|
|
79
81
|
/** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */
|
|
80
82
|
stackedFractionType;
|
|
81
83
|
/** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].
|
|
82
|
-
* The offset is computed in meters as subScriptOffsetFactor * [[
|
|
84
|
+
* The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].
|
|
83
85
|
*/
|
|
84
86
|
subScriptOffsetFactor;
|
|
85
87
|
/** Multiplier used to compute the height of a subscript [[TextRun]].
|
|
86
|
-
* The height is computed as subScriptScale * [[
|
|
88
|
+
* The height is computed as subScriptScale * [[textHeight]].
|
|
87
89
|
*/
|
|
88
90
|
subScriptScale;
|
|
89
91
|
/** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].
|
|
90
|
-
* The offset is computed in meters as superScriptOffsetFactor * [[
|
|
92
|
+
* The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].
|
|
91
93
|
*/
|
|
92
94
|
superScriptOffsetFactor;
|
|
93
95
|
/** Multiplier used to compute the height of a superscript [[TextRun]].
|
|
94
|
-
* The height is computed as superScriptScale * [[
|
|
96
|
+
* The height is computed as superScriptScale * [[textHeight]].
|
|
95
97
|
*/
|
|
96
98
|
superScriptScale;
|
|
97
|
-
/** Multiplier used to compute the width of each glyph, relative to [[
|
|
99
|
+
/** Multiplier used to compute the width of each glyph, relative to [[textHeight]]. */
|
|
98
100
|
widthFactor;
|
|
99
101
|
/** Properties describing appearance of leaders in a [[TextAnnotation]].
|
|
100
102
|
* Used when producing geometry for [[TextAnnotation]].
|
|
@@ -119,11 +121,15 @@ class TextStyleSettings {
|
|
|
119
121
|
listMarker;
|
|
120
122
|
/** The frame settings of the [[TextAnnotation]]. */
|
|
121
123
|
frame;
|
|
122
|
-
/**
|
|
124
|
+
/** The margins to surround the document content. */
|
|
125
|
+
margins;
|
|
126
|
+
/** The alignment of the text content. */
|
|
127
|
+
justification;
|
|
128
|
+
/** A fully-populated JSON representation of the default settings. A real `font` must be provided before use. */
|
|
123
129
|
static defaultProps = {
|
|
124
130
|
color: "subcategory",
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
font: { name: "", type: Fonts_1.FontType.TrueType },
|
|
132
|
+
textHeight: 1,
|
|
127
133
|
lineSpacingFactor: 0.5,
|
|
128
134
|
paragraphSpacingFactor: 0.5,
|
|
129
135
|
isBold: false,
|
|
@@ -148,10 +154,17 @@ class TextStyleSettings {
|
|
|
148
154
|
listMarker: { enumerator: "1", terminator: "period", case: "lower" },
|
|
149
155
|
frame: {
|
|
150
156
|
shape: "none",
|
|
151
|
-
|
|
152
|
-
|
|
157
|
+
fillColor: "none",
|
|
158
|
+
borderColor: ColorDef_1.ColorDef.black.toJSON(),
|
|
153
159
|
borderWeight: 1,
|
|
154
160
|
},
|
|
161
|
+
margins: {
|
|
162
|
+
left: 0,
|
|
163
|
+
right: 0,
|
|
164
|
+
top: 0,
|
|
165
|
+
bottom: 0
|
|
166
|
+
},
|
|
167
|
+
justification: "left",
|
|
155
168
|
};
|
|
156
169
|
/** Settings initialized to all default values. */
|
|
157
170
|
static defaults = new TextStyleSettings({});
|
|
@@ -160,8 +173,12 @@ class TextStyleSettings {
|
|
|
160
173
|
defaults = TextStyleSettings.defaultProps;
|
|
161
174
|
}
|
|
162
175
|
this.color = props.color ?? defaults.color;
|
|
163
|
-
|
|
164
|
-
|
|
176
|
+
const font = {
|
|
177
|
+
name: props.font?.name ?? defaults.font.name,
|
|
178
|
+
type: props.font?.type ?? defaults.font.type,
|
|
179
|
+
};
|
|
180
|
+
this.font = Object.freeze(font);
|
|
181
|
+
this.textHeight = props.textHeight ?? defaults.textHeight;
|
|
165
182
|
this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;
|
|
166
183
|
this.paragraphSpacingFactor = props.paragraphSpacingFactor ?? defaults.paragraphSpacingFactor;
|
|
167
184
|
this.isBold = props.isBold ?? defaults.isBold;
|
|
@@ -187,34 +204,30 @@ class TextStyleSettings {
|
|
|
187
204
|
this.listMarker = props.listMarker ?? defaults.listMarker;
|
|
188
205
|
const frame = {
|
|
189
206
|
shape: props.frame?.shape ?? defaults.frame.shape,
|
|
190
|
-
|
|
191
|
-
|
|
207
|
+
fillColor: props.frame?.fillColor ?? defaults.frame.fillColor,
|
|
208
|
+
borderColor: props.frame?.borderColor ?? defaults.frame.borderColor,
|
|
192
209
|
borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,
|
|
193
210
|
};
|
|
194
211
|
// Cast to indicate to TypeScript that the frame properties are all defined
|
|
195
212
|
this.frame = Object.freeze(frame);
|
|
213
|
+
this.margins = Object.freeze({
|
|
214
|
+
left: props.margins?.left ?? defaults.margins.left,
|
|
215
|
+
right: props.margins?.right ?? defaults.margins.right,
|
|
216
|
+
top: props.margins?.top ?? defaults.margins.top,
|
|
217
|
+
bottom: props.margins?.bottom ?? defaults.margins.bottom,
|
|
218
|
+
});
|
|
219
|
+
this.justification = props.justification ?? defaults.justification;
|
|
196
220
|
}
|
|
197
221
|
/** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */
|
|
198
222
|
clone(alteredProps) {
|
|
199
223
|
return alteredProps ? new TextStyleSettings(alteredProps, this) : this;
|
|
200
224
|
}
|
|
201
|
-
/** Creates a deep copy of the `TextStyleSettingsProps`. */
|
|
202
|
-
static cloneProps(props) {
|
|
203
|
-
const copy = { ...props };
|
|
204
|
-
if (props.leader) {
|
|
205
|
-
copy.leader = { ...props.leader };
|
|
206
|
-
}
|
|
207
|
-
if (props.frame) {
|
|
208
|
-
copy.frame = { ...props.frame };
|
|
209
|
-
}
|
|
210
|
-
return copy;
|
|
211
|
-
}
|
|
212
225
|
/** Create settings from their JSON representation. */
|
|
213
226
|
static fromJSON(props) {
|
|
214
227
|
return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;
|
|
215
228
|
}
|
|
216
229
|
toJSON() {
|
|
217
|
-
return
|
|
230
|
+
return structuredClone(this);
|
|
218
231
|
}
|
|
219
232
|
/** Compare two [[TextLeaderStyleProps]] for equality.
|
|
220
233
|
* @param other The other leader style properties to compare against.
|
|
@@ -227,21 +240,27 @@ class TextStyleSettings {
|
|
|
227
240
|
}
|
|
228
241
|
frameEquals(other) {
|
|
229
242
|
return this.frame?.shape === other.shape
|
|
230
|
-
&& this.frame?.
|
|
231
|
-
&& this.frame?.
|
|
243
|
+
&& this.frame?.fillColor === other.fillColor
|
|
244
|
+
&& this.frame?.borderColor === other.borderColor
|
|
232
245
|
&& this.frame?.borderWeight === other.borderWeight;
|
|
233
246
|
}
|
|
247
|
+
marginsEqual(other) {
|
|
248
|
+
return Object.entries(this.margins).every(([key, value]) => value === other[key]);
|
|
249
|
+
}
|
|
234
250
|
equals(other) {
|
|
235
|
-
return this.color === other.color && this.
|
|
236
|
-
&& this.
|
|
251
|
+
return this.color === other.color && this.font.name === other.font.name && this.font.type === other.font.type
|
|
252
|
+
&& this.textHeight === other.textHeight && this.widthFactor === other.widthFactor
|
|
253
|
+
&& this.lineSpacingFactor === other.lineSpacingFactor && this.paragraphSpacingFactor === other.paragraphSpacingFactor
|
|
237
254
|
&& this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined
|
|
238
255
|
&& this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale
|
|
239
256
|
&& this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale
|
|
240
257
|
&& this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale
|
|
241
258
|
&& this.tabInterval === other.tabInterval && this.indentation === other.indentation
|
|
242
259
|
&& this.listMarker.case === other.listMarker.case && this.listMarker.enumerator === other.listMarker.enumerator && this.listMarker.terminator === other.listMarker.terminator
|
|
260
|
+
&& this.justification === other.justification
|
|
243
261
|
&& this.leaderEquals(other.leader)
|
|
244
|
-
&& this.frameEquals(other.frame)
|
|
262
|
+
&& this.frameEquals(other.frame)
|
|
263
|
+
&& this.marginsEqual(other.margins);
|
|
245
264
|
}
|
|
246
265
|
/**
|
|
247
266
|
* Returns a list of validation errors for this instance.
|
|
@@ -255,11 +274,11 @@ class TextStyleSettings {
|
|
|
255
274
|
*/
|
|
256
275
|
getValidationErrors() {
|
|
257
276
|
const errorMessages = [];
|
|
258
|
-
if (this.
|
|
259
|
-
errorMessages.push("
|
|
277
|
+
if (this.font.name.trim() === "") {
|
|
278
|
+
errorMessages.push("font name must be provided");
|
|
260
279
|
}
|
|
261
|
-
if (this.
|
|
262
|
-
errorMessages.push("
|
|
280
|
+
if (this.textHeight <= 0) {
|
|
281
|
+
errorMessages.push("textHeight must be greater than 0");
|
|
263
282
|
}
|
|
264
283
|
if (this.stackedFractionScale <= 0) {
|
|
265
284
|
errorMessages.push("stackedFractionScale must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,aAAa,CAAC;IACvB,CAAC;;AA1OH,8CA2OC;AAED,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAC3C,UAAU,CAAC,iBAAiB,CAAC,QAAQ,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 Annotation\n */\n\nimport { DeepReadonlyObject, DeepRequiredObject } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\n\n/** Predefined markers for list items in text annotations.\n * These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.\n * @beta\n */\nexport enum ListMarkerEnumerator {\n /** English Alphabet */\n Letter = \"A\",\n RomanNumeral = \"I\",\n Number = \"1\",\n Bullet = \"•\",\n Circle = \"○\",\n Square = \"■\",\n /** EM Dash */\n Dash = \"–\",\n}\n\n/** A settings to specify how to mark or denote the start of a list item in a [[List]].\n * @beta\n */\nexport interface ListMarker {\n /** This can be either one of the predefined markers in [[ListMarkerEnumerator]], or any arbitrary string. */\n enumerator: ListMarkerEnumerator | string,\n /** The punctuation to follow the enumerator. */\n terminator?: \"parenthesis\" | \"period\",\n /** Whether to use upper or lower case for alphabetic or roman numeral enumerators. Ignored if [[enumerator]] is not alphabetic or roman numeral. */\n case?: \"upper\" | \"lower\",\n}\n\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport const textAnnotationFrameShapes = [\"none\", \"line\", \"rectangle\", \"circle\", \"equilateralTriangle\", \"diamond\", \"square\", \"pentagon\", \"hexagon\", \"octagon\", \"capsule\", \"roundedRectangle\"] as const;\n\n/** Describes a predefined shape that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];\n\n/**\n * Describes what color to use when filling the frame around a [[TextBlock]].\n * If `background` is specified, [[GeometryParams.BackgroundFill]] will be set to `BackgroundFill.Outline`.\n * If `none` is specified, no fill will be applied.\n * @beta\n */\nexport type TextAnnotationFillColor = TextStyleColor | \"background\" | \"none\";\n\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\n * @beta\n */\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\n\n/** Describes the color in which to draw the text in a [[TextRun]].\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\n * text.\n * @beta\n */\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\n\n/**\n * Describes how to draw the frame around a [[TextAnnotation]].\n * The frame can be a simple line, a filled shape, or both.\n * If only a subset of properties are specified, the others will be set to their default value.\n * @beta\n */\nexport interface TextFrameStyleProps {\n /** Shape of the frame. Default: \"none\" */\n shape?: TextAnnotationFrameShape;\n /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: \"none\" */\n fill?: TextAnnotationFillColor;\n /** The color of the text frame's outline. Default: black */\n border?: TextStyleColor;\n /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */\n borderWeight?: number;\n};\n\n/** Properties describing the appearance of [[TextAnnotationLeader]] in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n * @beta\n */\nexport interface TextLeaderStyleProps {\n /** The color of the leader.\n * If `inherit` is specified, the [[TextAnnotationLeader]] will use the color specified in the parent [[TextStyleSettings]]`.\n * Default: \"inherit\".\n */\n color?: TextStyleColor | \"inherit\";\n /** Whether to use an elbow in the leader.\n * Default: false\n */\n wantElbow?: boolean;\n /** Multiplier used to compute length of the elbow in the leader.\n * The elbowLength is computed in meters as elbowLength * [[lineHeight]].\n * Default: 1.0\n */\n elbowLength?: number;\n /** Multiplier to compute height of the leader terminator.\n * The terminator height is computed in meters as terminatorHeight * [[lineHeight]].\n * Default: 1.0\n */\n terminatorHeightFactor?: number;\n /** Multiplier to compute width of the leader terminator.\n * The terminator width is computed in meters as terminatorWidth * [[lineHeight]].\n * Default: 1.0\n */\n terminatorWidthFactor?: number;\n}\n\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [AnnotationTextStyle]($backend)'s properties.\n * @beta\n */\nexport interface TextStyleSettingsProps {\n /** The color of the text.\n * Default: \"subcategory\".\n */\n color?: TextStyleColor;\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\n * Default: \"\" (an invalid font name).\n */\n fontName?: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n * Default: 1.0. */\n lineHeight?: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n * Default: 0.5.\n */\n lineSpacingFactor?: number;\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\n * The distance is computed in meters as paragraphSpacingFactor * [[lineHeight]].\n * Default: 0.5.\n */\n paragraphSpacingFactor?: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\n * Default: false.\n */\n isBold?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\n * Default: false.\n */\n isItalic?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined.\n * Default: false.\n */\n isUnderlined?: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n * Default: 0.7.\n */\n stackedFractionScale?: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\n * Default: \"horizontal\".\n */\n stackedFractionType?: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n * Default: -0.15.\n */\n subScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n subScriptScale?: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n * Default: -0.5.\n */\n superScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n superScriptScale?: number;\n /** A scale applied to the width of each glyph.\n * Default: 1.0\n */\n widthFactor?: number;\n\n /** Properties describing appearance of leaders in a [[TextAnnotation]]\n * Used when producing geometry for [[TextAnnotation]]\n * Default: {color:\"subcategory\", wantElbow:\"false\",elbowLength:1, terminatorWidthFactor:1, terminatorHeightFactor:1}.\n */\n leader?: TextLeaderStyleProps;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock.\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n * Default: 4 meters.\n */\n tabInterval?: number;\n /**\n * A description of the frame around the text annotation.\n * Used when producing geometry for [[TextAnnotation]]s.\n * Default: {shape: \"none\", fill: \"none\", border: black, borderWeight: 1} for no frame.\n */\n frame?: TextFrameStyleProps;\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\n * In lists, the indentation is added to offset of list items.\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n * Default: 0 meters.\n */\n indentation?: number;\n /** The marker used to indicate the start of a list item.\n * Default: \"1.\".\n */\n listMarker?: ListMarker;\n}\n\nfunction deepFreeze<T>(obj: T) {\n if (obj === null || typeof obj !== \"object\" || Object.isFrozen(obj))\n return;\n Object.getOwnPropertyNames(obj).forEach((prop) => {\n const value = (obj as any)[prop];\n if (value && typeof value === \"object\") {\n deepFreeze(value);\n }\n });\n Object.freeze(obj);\n}\n\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\n * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\n * @beta\n */\nexport class TextStyleSettings {\n /** The color of the text. */\n public readonly color: TextStyleColor;\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\n */\n public readonly fontName: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n */\n public readonly lineHeight: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n */\n public readonly lineSpacingFactor: number;\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\n * The distance is computed in meters as paragraphSpacingFactor * [[lineHeight]].\n */\n public readonly paragraphSpacingFactor: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\n public readonly isBold: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\n public readonly isItalic: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\n public readonly isUnderlined: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n */\n public readonly stackedFractionScale: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\n public readonly stackedFractionType: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n */\n public readonly subScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n */\n public readonly subScriptScale: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n */\n public readonly superScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n */\n public readonly superScriptScale: number;\n /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */\n public readonly widthFactor: number;\n /** Properties describing appearance of leaders in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n */\n public readonly leader: Readonly<Required<TextLeaderStyleProps>>;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock.\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n */\n public readonly tabInterval: number;\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\n * In lists, the indentation is added to offset of list items.\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n */\n public readonly indentation: number;\n /** The marker used to indicate the start of a list item.\n * Default: [[ListMarkerEnumerator.Number]].\n */\n public readonly listMarker: ListMarker;\n /** The frame settings of the [[TextAnnotation]]. */\n public readonly frame: Readonly<Required<TextFrameStyleProps>>;\n\n /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */\n public static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>> = {\n color: \"subcategory\",\n fontName: \"\",\n lineHeight: 1,\n lineSpacingFactor: 0.5,\n paragraphSpacingFactor: 0.5,\n isBold: false,\n isItalic: false,\n isUnderlined: false,\n stackedFractionScale: 0.7,\n stackedFractionType: \"horizontal\",\n subScriptOffsetFactor: -0.15,\n subScriptScale: 2 / 3,\n superScriptOffsetFactor: 0.5,\n superScriptScale: 2 / 3,\n widthFactor: 1,\n leader: {\n color: \"inherit\",\n wantElbow: false,\n elbowLength: 1.0,\n terminatorHeightFactor: 1.0,\n terminatorWidthFactor: 1.0,\n },\n tabInterval: 4,\n indentation: 0,\n listMarker: { enumerator: \"1\", terminator: \"period\", case: \"lower\" },\n frame: {\n shape: \"none\",\n fill: \"none\",\n border: ColorDef.black.toJSON(),\n borderWeight: 1,\n },\n };\n\n /** Settings initialized to all default values. */\n public static defaults: TextStyleSettings = new TextStyleSettings({});\n\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\n if (!defaults) {\n defaults = TextStyleSettings.defaultProps;\n }\n\n this.color = props.color ?? defaults.color;\n this.fontName = props.fontName ?? defaults.fontName;\n this.lineHeight = props.lineHeight ?? defaults.lineHeight;\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\n this.paragraphSpacingFactor = props.paragraphSpacingFactor ?? defaults.paragraphSpacingFactor;\n this.isBold = props.isBold ?? defaults.isBold;\n this.isItalic = props.isItalic ?? defaults.isItalic;\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\n const leader = {\n color: props.leader?.color ?? defaults.leader.color,\n wantElbow: props.leader?.wantElbow ?? defaults.leader.wantElbow,\n elbowLength: props.leader?.elbowLength ?? defaults.leader.elbowLength,\n terminatorHeightFactor: props.leader?.terminatorHeightFactor ?? defaults.leader.terminatorHeightFactor,\n terminatorWidthFactor: props.leader?.terminatorWidthFactor ?? defaults.leader.terminatorWidthFactor,\n }\n this.leader = Object.freeze(leader) as Readonly<Required<TextLeaderStyleProps>>;\n this.tabInterval = props.tabInterval ?? defaults.tabInterval;\n this.indentation = props.indentation ?? defaults.indentation;\n this.listMarker = props.listMarker ?? defaults.listMarker;\n\n const frame = {\n shape: props.frame?.shape ?? defaults.frame.shape,\n fill: props.frame?.fill ?? defaults.frame.fill,\n border: props.frame?.border ?? defaults.frame.border,\n borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,\n };\n // Cast to indicate to TypeScript that the frame properties are all defined\n this.frame = Object.freeze(frame) as Readonly<Required<TextFrameStyleProps>>;\n }\n\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\n }\n\n /** Creates a deep copy of the `TextStyleSettingsProps`. */\n public static cloneProps(props: TextStyleSettingsProps): TextStyleSettingsProps {\n const copy = { ...props };\n if (props.leader) {\n copy.leader = { ...props.leader };\n }\n if (props.frame) {\n copy.frame = { ...props.frame };\n }\n return copy;\n }\n\n /** Create settings from their JSON representation. */\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\n }\n\n public toJSON(): TextStyleSettingsProps {\n return { ...this };\n }\n\n /** Compare two [[TextLeaderStyleProps]] for equality.\n * @param other The other leader style properties to compare against.\n * @returns true if the two leader styles are equal, false otherwise.\n */\n public leaderEquals(other: TextLeaderStyleProps): boolean {\n return this.leader.color === other.color && this.leader.wantElbow === other.wantElbow\n && this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor\n && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;\n }\n\n public frameEquals(other: TextFrameStyleProps): boolean {\n return this.frame?.shape === other.shape\n && this.frame?.fill === other.fill\n && this.frame?.border === other.border\n && this.frame?.borderWeight === other.borderWeight;\n }\n\n public equals(other: TextStyleSettings): boolean {\n return this.color === other.color && this.fontName === other.fontName\n && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.paragraphSpacingFactor === other.paragraphSpacingFactor && this.widthFactor === other.widthFactor\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale\n && this.tabInterval === other.tabInterval && this.indentation === other.indentation\n && this.listMarker.case === other.listMarker.case && this.listMarker.enumerator === other.listMarker.enumerator && this.listMarker.terminator === other.listMarker.terminator\n && this.leaderEquals(other.leader)\n && this.frameEquals(other.frame)\n }\n\n /**\n * Returns a list of validation errors for this instance.\n *\n * A TextStyleSettings object may contain values that are invalid in all contexts.\n * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.\n *\n * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.\n *\n * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.\n */\n public getValidationErrors(): string[] {\n const errorMessages: string[] = [];\n if (this.fontName.trim() === \"\") {\n errorMessages.push(\"fontName must be provided\");\n }\n\n if (this.lineHeight <= 0) {\n errorMessages.push(\"lineHeight must be greater than 0\");\n }\n\n if (this.stackedFractionScale <= 0) {\n errorMessages.push(\"stackedFractionScale must be greater than 0\");\n }\n\n return errorMessages;\n }\n}\n\ndeepFreeze(TextStyleSettings.defaultProps);\ndeepFreeze(TextStyleSettings.defaults);"]}
|
|
1
|
+
{"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["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IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW;eAChF,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,KAAK,CAAC,UAAU,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,CAAC,UAAU;eAC1K,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC1C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;eAC/B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC;eAC7B,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;;;OASG;IACI,mBAAmB;QACxB,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACjC,aAAa,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC;YACzB,aAAa,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,EAAE,CAAC;YACnC,aAAa,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;QACpE,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;;AA5PH,8CA6PC;AAED,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAC3C,UAAU,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Annotation\r\n */\r\n\r\nimport { DeepReadonlyObject, DeepRequiredObject } from \"@itwin/core-bentley\";\r\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\r\nimport { FontFamilySelector, FontType } from \"../Fonts\";\r\n\r\n/** Predefined markers for list items in text annotations.\r\n * These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.\r\n * @beta\r\n */\r\nexport enum ListMarkerEnumerator {\r\n /** English Alphabet */\r\n Letter = \"A\",\r\n RomanNumeral = \"I\",\r\n Number = \"1\",\r\n Bullet = \"•\",\r\n Circle = \"○\",\r\n Square = \"■\",\r\n /** EM Dash */\r\n Dash = \"–\",\r\n}\r\n\r\n/** A settings to specify how to mark or denote the start of a list item in a [[List]].\r\n * @beta\r\n */\r\nexport interface ListMarker {\r\n /** This can be either one of the predefined markers in [[ListMarkerEnumerator]], or any arbitrary string. */\r\n enumerator: ListMarkerEnumerator | string,\r\n /** The punctuation to follow the enumerator. */\r\n terminator?: \"parenthesis\" | \"period\",\r\n /** Whether to use upper or lower case for alphabetic or roman numeral enumerators. Ignored if [[enumerator]] is not alphabetic or roman numeral. */\r\n case?: \"upper\" | \"lower\",\r\n}\r\n\r\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\r\n * @beta\r\n*/\r\nexport const textAnnotationFrameShapes = [\"none\", \"line\", \"rectangle\", \"circle\", \"equilateralTriangle\", \"diamond\", \"square\", \"pentagon\", \"hexagon\", \"octagon\", \"capsule\", \"roundedRectangle\"] as const;\r\n\r\n/** Describes a predefined shape that can be computed and drawn around the margins of a [[TextBlock]]\r\n * @beta\r\n*/\r\nexport type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];\r\n\r\n/**\r\n * Describes what color to use when filling the frame around a [[TextBlock]].\r\n * If `background` is specified, [[GeometryParams.BackgroundFill]] will be set to `BackgroundFill.Outline`.\r\n * If `none` is specified, no fill will be applied.\r\n * @beta\r\n */\r\nexport type TextAnnotationFillColor = TextStyleColor | \"background\" | \"none\";\r\n\r\n/** Describes the margins around the content inside a [[TextBlock]], measured in meters.\r\n * All margins default to zero if `undefined`.\r\n * @beta\r\n */\r\nexport interface TextBlockMargins {\r\n /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n left?: number;\r\n /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n right?: number;\r\n /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n top?: number;\r\n /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n bottom?: number;\r\n};\r\n\r\n/** Describes the relative alignment of text.\r\n * @beta\r\n*/\r\nexport type TextJustification = \"left\" | \"center\" | \"right\";\r\n\r\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\r\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\r\n * @beta\r\n */\r\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\r\n\r\n/** Describes the color in which to draw the text in a [[TextRun]].\r\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\r\n * text.\r\n * @beta\r\n */\r\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\r\n\r\n/**\r\n * Describes how to draw the frame around a [[TextAnnotation]].\r\n * The frame can be a simple line, a filled shape, or both.\r\n * If only a subset of properties are specified, the others will be set to their default value.\r\n * @beta\r\n */\r\nexport interface TextFrameStyleProps {\r\n /** Shape of the frame. Default: \"none\" */\r\n shape?: TextAnnotationFrameShape;\r\n /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: \"none\" */\r\n fillColor?: TextAnnotationFillColor;\r\n /** The color of the text frame's outline. Default: black */\r\n borderColor?: TextStyleColor;\r\n /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */\r\n borderWeight?: number;\r\n};\r\n\r\n/** Properties describing the appearance of [[TextAnnotationLeader]] in a [[TextAnnotation]].\r\n * Used when producing geometry for [[TextAnnotation]].\r\n * @beta\r\n */\r\nexport interface TextLeaderStyleProps {\r\n /** The color of the leader.\r\n * If `inherit` is specified, the [[TextAnnotationLeader]] will use the color specified in the parent [[TextStyleSettings]]`.\r\n * Default: \"inherit\".\r\n */\r\n color?: TextStyleColor | \"inherit\";\r\n /** Whether to use an elbow in the leader.\r\n * Default: false\r\n */\r\n wantElbow?: boolean;\r\n /** Multiplier used to compute length of the elbow in the leader.\r\n * The elbowLength is computed in meters as elbowLength * [[textHeight]].\r\n * Default: 1.0\r\n */\r\n elbowLength?: number;\r\n /** Multiplier to compute height of the leader terminator.\r\n * The terminator height is computed in meters as terminatorHeight * [[textHeight]].\r\n * Default: 1.0\r\n */\r\n terminatorHeightFactor?: number;\r\n /** Multiplier to compute width of the leader terminator.\r\n * The terminator width is computed in meters as terminatorWidth * [[textHeight]].\r\n * Default: 1.0\r\n */\r\n terminatorWidthFactor?: number;\r\n}\r\n\r\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [AnnotationTextStyle]($backend)'s properties.\r\n * @beta\r\n */\r\nexport interface TextStyleSettingsProps {\r\n /** The color of the text.\r\n * Default: \"subcategory\".\r\n */\r\n color?: TextStyleColor;\r\n /** The font stored in an iModel, used to draw the contents of a [[TextRun]].\r\n * Default: { name: \"\" } (an invalid font name).\r\n */\r\n font?: FontFamilySelector;\r\n /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.\r\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and\r\n * textHeight * [[subScriptOffsetFactor]], respectively.\r\n * Default: 1.0. */\r\n textHeight?: number;\r\n /** Multiplier used to compute the vertical distance between two lines of text.\r\n * The distance is computed in meters as lineSpacingFactor * [[textHeight]].\r\n * Default: 0.5.\r\n */\r\n lineSpacingFactor?: number;\r\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\r\n * The distance is computed in meters as paragraphSpacingFactor * [[textHeight]].\r\n * Default: 0.5.\r\n */\r\n paragraphSpacingFactor?: number;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\r\n * Default: false.\r\n */\r\n isBold?: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\r\n * Default: false.\r\n */\r\n isItalic?: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be underlined.\r\n * Default: false.\r\n */\r\n isUnderlined?: boolean;\r\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\r\n * The height is computed in meters as stackedFractionScale * [[textHeight]].\r\n * Default: 0.7.\r\n */\r\n stackedFractionScale?: number;\r\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\r\n * Default: \"horizontal\".\r\n */\r\n stackedFractionType?: StackedFractionType;\r\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\r\n * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].\r\n * Default: -0.15.\r\n */\r\n subScriptOffsetFactor?: number;\r\n /** Multiplier used to compute the height of a subscript [[TextRun]].\r\n * The height is computed as subScriptScale * [[textHeight]].\r\n * Default: 2/3\r\n */\r\n subScriptScale?: number;\r\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\r\n * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].\r\n * Default: -0.5.\r\n */\r\n superScriptOffsetFactor?: number;\r\n /** Multiplier used to compute the height of a superscript [[TextRun]].\r\n * The height is computed as superScriptScale * [[textHeight]].\r\n * Default: 2/3\r\n */\r\n superScriptScale?: number;\r\n /** A scale applied to the width of each glyph.\r\n * Default: 1.0\r\n */\r\n widthFactor?: number;\r\n\r\n /** Properties describing appearance of leaders in a [[TextAnnotation]]\r\n * Used when producing geometry for [[TextAnnotation]]\r\n * Default: {color:\"subcategory\", wantElbow:\"false\",elbowLength:1, terminatorWidthFactor:1, terminatorHeightFactor:1}.\r\n */\r\n leader?: TextLeaderStyleProps;\r\n /** The size (in meters) used to calculate the tab stops in a run.\r\n * These are equally spaced from the left edge of the TextBlock.\r\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\r\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\r\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\r\n * Default: 4 meters.\r\n */\r\n tabInterval?: number;\r\n /**\r\n * A description of the frame around the text annotation.\r\n * Used when producing geometry for [[TextAnnotation]]s.\r\n * Default: {shape: \"none\", fill: \"none\", border: black, borderWeight: 1} for no frame.\r\n */\r\n frame?: TextFrameStyleProps;\r\n /** The margins to surround the document content.\r\n * Default: 0 margins on all sides */\r\n margins?: TextBlockMargins;\r\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\r\n * In lists, the indentation is added to offset of list items.\r\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\r\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\r\n * Default: 0 meters.\r\n */\r\n indentation?: number;\r\n /** The marker used to indicate the start of a list item.\r\n * Default: \"1.\".\r\n */\r\n listMarker?: ListMarker;\r\n /** The alignment of the text content.\r\n * Default: \"left\". */\r\n justification?: TextJustification;\r\n}\r\n\r\nfunction deepFreeze<T>(obj: T) {\r\n if (obj === null || typeof obj !== \"object\" || Object.isFrozen(obj))\r\n return;\r\n Object.getOwnPropertyNames(obj).forEach((prop) => {\r\n const value = (obj as any)[prop];\r\n if (value && typeof value === \"object\") {\r\n deepFreeze(value);\r\n }\r\n });\r\n Object.freeze(obj);\r\n}\r\n\r\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\r\n * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.\r\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\r\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\r\n * @beta\r\n */\r\nexport class TextStyleSettings {\r\n /** The color of the text. */\r\n public readonly color: TextStyleColor;\r\n /** The font stored in an iModel, used to draw the contents of a [[TextRun]].\r\n */\r\n public readonly font: Readonly<Required<FontFamilySelector>>;\r\n /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.\r\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and\r\n * textHeight * [[subScriptOffsetFactor]], respectively.\r\n */\r\n public readonly textHeight: number;\r\n /** Multiplier used to compute the vertical distance between two lines of text.\r\n * The distance is computed in meters as lineSpacingFactor * [[textHeight]] of the [[TextBlock]].\r\n */\r\n public readonly lineSpacingFactor: number;\r\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\r\n * The distance is computed in meters as paragraphSpacingFactor * the [[TextBlock]]'s [[textHeight]].\r\n */\r\n public readonly paragraphSpacingFactor: number;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\r\n public readonly isBold: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\r\n public readonly isItalic: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\r\n public readonly isUnderlined: boolean;\r\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\r\n * The height is computed in meters as stackedFractionScale * [[textHeight]].\r\n */\r\n public readonly stackedFractionScale: number;\r\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\r\n public readonly stackedFractionType: StackedFractionType;\r\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\r\n * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].\r\n */\r\n public readonly subScriptOffsetFactor: number;\r\n /** Multiplier used to compute the height of a subscript [[TextRun]].\r\n * The height is computed as subScriptScale * [[textHeight]].\r\n */\r\n public readonly subScriptScale: number;\r\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\r\n * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].\r\n */\r\n public readonly superScriptOffsetFactor: number;\r\n /** Multiplier used to compute the height of a superscript [[TextRun]].\r\n * The height is computed as superScriptScale * [[textHeight]].\r\n */\r\n public readonly superScriptScale: number;\r\n /** Multiplier used to compute the width of each glyph, relative to [[textHeight]]. */\r\n public readonly widthFactor: number;\r\n /** Properties describing appearance of leaders in a [[TextAnnotation]].\r\n * Used when producing geometry for [[TextAnnotation]].\r\n */\r\n public readonly leader: Readonly<Required<TextLeaderStyleProps>>;\r\n /** The size (in meters) used to calculate the tab stops in a run.\r\n * These are equally spaced from the left edge of the TextBlock.\r\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\r\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\r\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\r\n */\r\n public readonly tabInterval: number;\r\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\r\n * In lists, the indentation is added to offset of list items.\r\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\r\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\r\n */\r\n public readonly indentation: number;\r\n /** The marker used to indicate the start of a list item.\r\n * Default: [[ListMarkerEnumerator.Number]].\r\n */\r\n public readonly listMarker: ListMarker;\r\n /** The frame settings of the [[TextAnnotation]]. */\r\n public readonly frame: Readonly<Required<TextFrameStyleProps>>;\r\n /** The margins to surround the document content. */\r\n public readonly margins: Readonly<Required<TextBlockMargins>>;\r\n /** The alignment of the text content. */\r\n public readonly justification: TextJustification;\r\n\r\n /** A fully-populated JSON representation of the default settings. A real `font` must be provided before use. */\r\n public static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>> = {\r\n color: \"subcategory\",\r\n font: { name: \"\", type: FontType.TrueType },\r\n textHeight: 1,\r\n lineSpacingFactor: 0.5,\r\n paragraphSpacingFactor: 0.5,\r\n isBold: false,\r\n isItalic: false,\r\n isUnderlined: false,\r\n stackedFractionScale: 0.7,\r\n stackedFractionType: \"horizontal\",\r\n subScriptOffsetFactor: -0.15,\r\n subScriptScale: 2 / 3,\r\n superScriptOffsetFactor: 0.5,\r\n superScriptScale: 2 / 3,\r\n widthFactor: 1,\r\n leader: {\r\n color: \"inherit\",\r\n wantElbow: false,\r\n elbowLength: 1.0,\r\n terminatorHeightFactor: 1.0,\r\n terminatorWidthFactor: 1.0,\r\n },\r\n tabInterval: 4,\r\n indentation: 0,\r\n listMarker: { enumerator: \"1\", terminator: \"period\", case: \"lower\" },\r\n frame: {\r\n shape: \"none\",\r\n fillColor: \"none\",\r\n borderColor: ColorDef.black.toJSON(),\r\n borderWeight: 1,\r\n },\r\n margins: {\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n },\r\n justification: \"left\",\r\n };\r\n\r\n /** Settings initialized to all default values. */\r\n public static defaults: TextStyleSettings = new TextStyleSettings({});\r\n\r\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\r\n if (!defaults) {\r\n defaults = TextStyleSettings.defaultProps;\r\n }\r\n\r\n this.color = props.color ?? defaults.color;\r\n const font = {\r\n name: props.font?.name ?? defaults.font.name,\r\n type: props.font?.type ?? defaults.font.type,\r\n }\r\n this.font = Object.freeze(font) as Readonly<Required<FontFamilySelector>>;\r\n this.textHeight = props.textHeight ?? defaults.textHeight;\r\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\r\n this.paragraphSpacingFactor = props.paragraphSpacingFactor ?? defaults.paragraphSpacingFactor;\r\n this.isBold = props.isBold ?? defaults.isBold;\r\n this.isItalic = props.isItalic ?? defaults.isItalic;\r\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\r\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\r\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\r\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\r\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\r\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\r\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\r\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\r\n const leader = {\r\n color: props.leader?.color ?? defaults.leader.color,\r\n wantElbow: props.leader?.wantElbow ?? defaults.leader.wantElbow,\r\n elbowLength: props.leader?.elbowLength ?? defaults.leader.elbowLength,\r\n terminatorHeightFactor: props.leader?.terminatorHeightFactor ?? defaults.leader.terminatorHeightFactor,\r\n terminatorWidthFactor: props.leader?.terminatorWidthFactor ?? defaults.leader.terminatorWidthFactor,\r\n }\r\n this.leader = Object.freeze(leader) as Readonly<Required<TextLeaderStyleProps>>;\r\n this.tabInterval = props.tabInterval ?? defaults.tabInterval;\r\n this.indentation = props.indentation ?? defaults.indentation;\r\n this.listMarker = props.listMarker ?? defaults.listMarker;\r\n const frame = {\r\n shape: props.frame?.shape ?? defaults.frame.shape,\r\n fillColor: props.frame?.fillColor ?? defaults.frame.fillColor,\r\n borderColor: props.frame?.borderColor ?? defaults.frame.borderColor,\r\n borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,\r\n };\r\n // Cast to indicate to TypeScript that the frame properties are all defined\r\n this.frame = Object.freeze(frame) as Readonly<Required<TextFrameStyleProps>>;\r\n this.margins = Object.freeze({\r\n left: props.margins?.left ?? defaults.margins.left,\r\n right: props.margins?.right ?? defaults.margins.right,\r\n top: props.margins?.top ?? defaults.margins.top,\r\n bottom: props.margins?.bottom ?? defaults.margins.bottom,\r\n }) as Readonly<Required<TextBlockMargins>>;\r\n this.justification = props.justification ?? defaults.justification;\r\n }\r\n\r\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\r\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\r\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\r\n }\r\n\r\n /** Create settings from their JSON representation. */\r\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\r\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\r\n }\r\n\r\n public toJSON(): TextStyleSettingsProps {\r\n return structuredClone(this);\r\n }\r\n\r\n /** Compare two [[TextLeaderStyleProps]] for equality.\r\n * @param other The other leader style properties to compare against.\r\n * @returns true if the two leader styles are equal, false otherwise.\r\n */\r\n public leaderEquals(other: TextLeaderStyleProps): boolean {\r\n return this.leader.color === other.color && this.leader.wantElbow === other.wantElbow\r\n && this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor\r\n && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;\r\n }\r\n\r\n public frameEquals(other: TextFrameStyleProps): boolean {\r\n return this.frame?.shape === other.shape\r\n && this.frame?.fillColor === other.fillColor\r\n && this.frame?.borderColor === other.borderColor\r\n && this.frame?.borderWeight === other.borderWeight;\r\n }\r\n\r\n public marginsEqual(other: TextBlockMargins): boolean {\r\n return Object.entries(this.margins).every(([key, value]) =>\r\n value === (other as any)[key]\r\n );\r\n }\r\n\r\n public equals(other: TextStyleSettings): boolean {\r\n return this.color === other.color && this.font.name === other.font.name && this.font.type === other.font.type\r\n && this.textHeight === other.textHeight && this.widthFactor === other.widthFactor\r\n && this.lineSpacingFactor === other.lineSpacingFactor && this.paragraphSpacingFactor === other.paragraphSpacingFactor\r\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\r\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\r\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\r\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale\r\n && this.tabInterval === other.tabInterval && this.indentation === other.indentation\r\n && this.listMarker.case === other.listMarker.case && this.listMarker.enumerator === other.listMarker.enumerator && this.listMarker.terminator === other.listMarker.terminator\r\n && this.justification === other.justification\r\n && this.leaderEquals(other.leader)\r\n && this.frameEquals(other.frame)\r\n && this.marginsEqual(other.margins);\r\n }\r\n\r\n /**\r\n * Returns a list of validation errors for this instance.\r\n *\r\n * A TextStyleSettings object may contain values that are invalid in all contexts.\r\n * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.\r\n *\r\n * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.\r\n *\r\n * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.\r\n */\r\n public getValidationErrors(): string[] {\r\n const errorMessages: string[] = [];\r\n if (this.font.name.trim() === \"\") {\r\n errorMessages.push(\"font name must be provided\");\r\n }\r\n\r\n if (this.textHeight <= 0) {\r\n errorMessages.push(\"textHeight must be greater than 0\");\r\n }\r\n\r\n if (this.stackedFractionScale <= 0) {\r\n errorMessages.push(\"stackedFractionScale must be greater than 0\");\r\n }\r\n\r\n return errorMessages;\r\n }\r\n}\r\n\r\ndeepFreeze(TextStyleSettings.defaultProps);\r\ndeepFreeze(TextStyleSettings.defaults);"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,kDAAgC;AAChC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AACnD,yDAAuC;AACvC,yDAAuC;AACvC,+CAA6B;AAC7B,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,2CAAyB;AACzB,kDAAgC;AAChC,oDAAkC;AAClC,oDAAkC;AAClC,mDAAiC;AACjC,8CAA4B;AAC5B,yCAAuB;AACvB,gDAA8B;AAC9B,6CAA2B;AAC3B,yDAAuC;AACvC,wDAAsC;AACtC,yDAAuC;AACvC,mEAAiD;AACjD,gEAA8C;AAC9C,kDAAgC;AAChC,+CAA6B;AAC7B,gDAA8B;AAC9B,iD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DAAkC;AAClC,mDAAiC;AACjC,8CAA4B;AAC5B,8CAA4B;AAC5B,0CAAwB;AACxB,8CAA4B;AAC5B,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,0DAAwC;AACxC,wDAAsC;AACtC,2DAAyC;AACzC,kEAAgD;AAChD,2DAAyC;AACzC,0DAAwC;AACxC,6DAA2C;AAC3C,yDAAuC;AACvC,yDAAuC;AACvC,wDAAsC;AACtC,+DAA6C;AAC7C,6DAA2C;AAC3C,qDAAmC;AACnC,8DAA4C;AAC5C,6DAA2C;AAC3C,+DAA6C;AAC7C,+DAA6C;AAC7C,mEAAiD;AACjD,uDAAqC;AACrC,iDAA+B;AAC/B,mEAAiD;AACjD,oEAAkD;AAClD,oDAAkC;AAClC,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C;AAC3C,6DAA2C;AAC3C,oDAAkC;AAClC,yDAAuC;AACvC,yDAAuC;AACvC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B;AAC9B,sDAAoC;AACpC,yDAAuC;AACvC,iEAA+C;AAE/C,2DAAyC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextField\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./CatalogIModel\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinCoreErrors\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./CesiumIonAssets\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
|
|
1
|
+
{"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,kDAAgC;AAChC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AACnD,yDAAuC;AACvC,yDAAuC;AACvC,+CAA6B;AAC7B,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,2CAAyB;AACzB,kDAAgC;AAChC,oDAAkC;AAClC,oDAAkC;AAClC,mDAAiC;AACjC,8CAA4B;AAC5B,yCAAuB;AACvB,gDAA8B;AAC9B,6CAA2B;AAC3B,yDAAuC;AACvC,wDAAsC;AACtC,yDAAuC;AACvC,mEAAiD;AACjD,gEAA8C;AAC9C,kDAAgC;AAChC,+CAA6B;AAC7B,gDAA8B;AAC9B,iDAA+B;AAC/B,2DAAyC;AACzC,gDAA8B;AAC9B,oDAAkC;AAClC,gDAA8B;AAC9B,iDAA+B;AAC/B,qDAAmC;AACnC,iDAA+B;AAC/B,0CAAwB;AACxB,4CAA0B;AAC1B,0DAAwC;AACxC,0DAAwC;AACxC,iEAA+C;AAC/C,yDAAuC;AACvC,4DAA0C;AAC1C,0DAAwC;AACxC,uEAAqD;AACrD,6DAA2C;AAC3C,2DAAyC;AACzC,2DAAyC;AACzC,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,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C,+DAA6C;AAC7C,mEAAiD;AACjD,uDAAqC;AACrC,iDAA+B;AAC/B,mEAAiD;AACjD,oEAAkD;AAClD,oDAAkC;AAClC,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C;AAC3C,6DAA2C;AAC3C,oDAAkC;AAClC,yDAAuC;AACvC,yDAAuC;AACvC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B;AAC9B,sDAAoC;AACpC,yDAAuC;AACvC,iEAA+C;AAE/C,2DAAyC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./AmbientOcclusion\";\r\nexport * from \"./AnalysisStyle\";\r\nexport * from \"./annotation/TextAnnotation\";\r\nexport * from \"./annotation/TextBlock\";\r\nexport * from \"./annotation/TextBlockGeometryProps\";\r\nexport * from \"./annotation/TextBlockLayoutResult\";\r\nexport * from \"./annotation/TextField\";\r\nexport * from \"./annotation/TextStyle\";\r\nexport * from \"./Atmosphere\";\r\nexport * from \"./AuthorizationClient\";\r\nexport * from \"./BackgroundMapProvider\";\r\nexport * from \"./BackgroundMapSettings\";\r\nexport * from \"./Base64EncodedString\";\r\nexport * from \"./BriefcaseTypes\";\r\nexport * from \"./Camera\";\r\nexport * from \"./CatalogIModel\";\r\nexport * from \"./ChangedElements\";\r\nexport * from \"./ChangedEntities\";\r\nexport * from \"./ChangesetProps\";\r\nexport * from \"./ClipStyle\";\r\nexport * from \"./Code\";\r\nexport * from \"./ColorByName\";\r\nexport * from \"./ColorDef\";\r\nexport * from \"./CommonLoggerCategory\";\r\nexport * from \"./ContextRealityModel\";\r\nexport * from \"./DisplayStyleSettings\";\r\nexport * from \"./domains/FunctionalElementProps\";\r\nexport * from \"./domains/GenericElementProps\";\r\nexport * from \"./ECSchemaProps\";\r\nexport * from \"./ECSqlTypes\";\r\nexport * from \"./ElementMesh\";\r\nexport * from \"./ElementProps\";\r\nexport * from \"./EmphasizeElementsProps\";\r\nexport * from \"./EntityProps\";\r\nexport * from \"./EntityReference\";\r\nexport * from \"./Environment\";\r\nexport * from \"./FeatureIndex\";\r\nexport * from \"./FeatureSymbology\";\r\nexport * from \"./FeatureTable\";\r\nexport * from \"./Fonts\";\r\nexport * from \"./Frustum\";\r\nexport * from \"./GenericInstanceFilter\";\r\nexport * from \"./GeoCoordinateServices\";\r\nexport * from \"./geometry/AdditionalTransform\";\r\nexport * from \"./geometry/AreaPattern\";\r\nexport * from \"./geometry/BoundingSphere\";\r\nexport * from \"./geometry/Cartographic\";\r\nexport * from \"./geometry/CoordinateReferenceSystem\";\r\nexport * from \"./geometry/ElementGeometry\";\r\nexport * from \"./geometry/FrustumPlanes\";\r\nexport * from \"./geometry/GeodeticDatum\";\r\nexport * from \"./geometry/GeodeticEllipsoid\";\r\nexport * from \"./geometry/GeometryStream\";\r\nexport * from \"./geometry/ImageGraphic\";\r\nexport * from \"./geometry/LineStyle\";\r\nexport * from \"./geometry/Placement\";\r\nexport * from \"./geometry/Projection\";\r\nexport * from \"./geometry/TextString\";\r\nexport * from \"./GeometryContainment\";\r\nexport * from \"./GeometryParams\";\r\nexport * from \"./GeometrySummary\";\r\nexport * from \"./Gradient\";\r\nexport * from \"./GraphicParams\";\r\nexport * from \"./GroundPlane\";\r\nexport * from \"./HiddenLine\";\r\nexport * from \"./Hilite\";\r\nexport * from \"./HSLColor\";\r\nexport * from \"./HSVColor\";\r\nexport * from \"./Image\";\r\nexport * from \"./IModel\";\r\nexport * from \"./IModelError\";\r\nexport * from \"./IModelVersion\";\r\nexport * from \"./ITwinCoreErrors\";\r\nexport * from \"./ipc/IpcSocket\";\r\nexport * from \"./ipc/IpcWebSocket\";\r\nexport * from \"./ipc/IpcWebSocketTransport\";\r\nexport * from \"./ipc/IpcSession\";\r\nexport * from \"./IpcAppProps\";\r\nexport * from \"./LightSettings\";\r\nexport * from \"./LinePixels\";\r\nexport * from \"./Localization\";\r\nexport * from \"./MapImagerySettings\";\r\nexport * from \"./MapLayerSettings\";\r\nexport * from \"./MassProperties\";\r\nexport * from \"./MaterialProps\";\r\nexport * from \"./ModelClipGroup\";\r\nexport * from \"./ModelProps\";\r\nexport * from \"./NativeAppProps\";\r\nexport * from \"./OctEncodedNormal\";\r\nexport * from \"./ConcurrentQuery\";\r\nexport * from \"./ECSqlReader\";\r\nexport * from \"./PlanarClipMask\";\r\nexport * from \"./ModelGeometryChanges\";\r\nexport * from \"./PlanProjectionSettings\";\r\nexport * from \"./QPoint\";\r\nexport * from \"./RealityDataAccessProps\";\r\nexport * from \"./RealityModelDisplaySettings\";\r\nexport * from \"./RenderPolyline\";\r\nexport * from \"./RenderMaterial\";\r\nexport * from \"./RenderSchedule\";\r\nexport * from \"./RenderTexture\";\r\nexport * from \"./RgbColor\";\r\nexport * from \"./RpcManager\";\r\nexport * from \"./SessionProps\";\r\nexport * from \"./SkyBox\";\r\nexport * from \"./SolarCalculate\";\r\nexport * from \"./SolarShadows\";\r\nexport * from \"./SpatialClassification\";\r\nexport * from \"./SubCategoryAppearance\";\r\nexport * from \"./SubCategoryOverride\";\r\nexport * from \"./CesiumIonAssets\";\r\nexport * from \"./TerrainSettings\";\r\nexport * from \"./TextureMapping\";\r\nexport * from \"./TextureProps\";\r\nexport * from \"./ThematicDisplay\";\r\nexport * from \"./ContourDisplay\";\r\nexport * from \"./Thumbnail\";\r\nexport * from \"./TileProps\";\r\nexport * from \"./Tween\";\r\nexport * from \"./TxnAction\";\r\nexport * from \"./ViewDetails\";\r\nexport * from \"./ViewFlags\";\r\nexport * from \"./ViewProps\";\r\nexport * from \"./rpc/core/RpcConstants\";\r\nexport * from \"./rpc/core/RpcControl\";\r\nexport * from \"./rpc/core/RpcInvocation\";\r\nexport * from \"./rpc/core/RpcSessionInvocation\";\r\nexport * from \"./rpc/core/RpcMarshaling\";\r\nexport * from \"./rpc/core/RpcOperation\";\r\nexport * from \"./rpc/core/RpcPendingQueue\";\r\nexport * from \"./rpc/core/RpcProtocol\";\r\nexport * from \"./rpc/core/RpcRegistry\";\r\nexport * from \"./rpc/core/RpcRequest\";\r\nexport * from \"./rpc/core/RpcRequestContext\";\r\nexport * from \"./rpc/core/RpcRoutingToken\";\r\nexport * from \"./rpc/core/RpcPush\";\r\nexport * from \"./rpc/core/RpcConfiguration\";\r\nexport * from \"./rpc/DevToolsRpcInterface\";\r\nexport * from \"./rpc/IModelReadRpcInterface\";\r\nexport * from \"./rpc/IModelTileRpcInterface\";\r\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\r\nexport * from \"./rpc/TestRpcManager\";\r\nexport * from \"./RpcInterface\";\r\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\r\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\r\nexport * from \"./rpc/web/OpenAPI\";\r\nexport * from \"./rpc/web/RpcMultipart\";\r\nexport * from \"./rpc/web/WebAppRpcProtocol\";\r\nexport * from \"./rpc/web/WebAppRpcRequest\";\r\nexport * from \"./rpc/web/WebAppRpcLogging\";\r\nexport * from \"./tile/B3dmTileIO\";\r\nexport * from \"./tile/CompositeTileIO\";\r\nexport * from \"./tile/ElementGraphics\";\r\nexport * from \"./tile/GltfTileIO\";\r\nexport * from \"./tile/I3dmTileIO\";\r\nexport * from \"./tile/IModelTileIO\";\r\nexport * from \"./tile/PntsTileIO\";\r\nexport * from \"./tile/TileIO\";\r\nexport * from \"./tile/TileMetadata\";\r\nexport * from \"./tile/Tileset3dSchema\";\r\nexport * from \"./WhiteOnWhiteReversalSettings\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n/** @docs-package-description\r\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Entities\r\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\r\n */\r\n/**\r\n * @docs-group-description Geometry\r\n * Types for working with geometry.\r\n */\r\n/**\r\n * @docs-group-description Serialization\r\n * Types for serializing geometry\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Types for defining graphical views of the contents of an iModel.\r\n */\r\n/**\r\n * @docs-group-description DisplayStyles\r\n * Types for describing how the contents of Views should be rendered.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Types describing geometry, views, and symbology for consumption by a display system.\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Types that define the appearance of geometry.\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description IpcSocket\r\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description CloudStorage\r\n * Types for working with Cloud Storage.\r\n */\r\n/**\r\n * @docs-group-description Tween\r\n * Tweening library adapted from tween.js.\r\n */\r\n/**\r\n * @docs-group-description Tile\r\n * Types for working with 3d tile formats.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * [Native applications]($docs/learning/NativeApps.md)\r\n */\r\n/**\r\n * @docs-group-description Localization\r\n * Classes for internationalization and localization of your app.\r\n */\r\n/**\r\n * @docs-group-description Authorization\r\n * Classes for managing AccessToken used for all requests in other classes.\r\n */\r\n/**\r\n * @docs-group-description RealityData\r\n * Types for working with the RealityData API.\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Types for working with the MapLayers API.\r\n */\r\n/**\r\n * @docs-group-description Annotation\r\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\r\n */\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionalElementProps.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { ElementProps, RelatedElementProps } from \"../ElementProps\";\n\n/**\n * @public\n * @extensions\n */\nexport interface FunctionalElementProps extends ElementProps {\n typeDefinition?: RelatedElementProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FunctionalElementProps.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { ElementProps, RelatedElementProps } from \"../ElementProps\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FunctionalElementProps extends ElementProps {\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericElementProps.js","sourceRoot":"","sources":["../../../src/domains/GenericElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { GeometricElement2dProps, RelatedElementProps } from \"../ElementProps\";\n\n/**\n * @public\n * @extensions\n */\nexport interface ViewAttachmentLabelProps extends GeometricElement2dProps {\n viewAttachment?: RelatedElementProps;\n}\n\n/**\n * @public\n * @extensions\n */\nexport interface CalloutProps extends GeometricElement2dProps {\n drawingModel?: RelatedElementProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GenericElementProps.js","sourceRoot":"","sources":["../../../src/domains/GenericElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { GeometricElement2dProps, RelatedElementProps } from \"../ElementProps\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentLabelProps extends GeometricElement2dProps {\r\n viewAttachment?: RelatedElementProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CalloutProps extends GeometricElement2dProps {\r\n drawingModel?: RelatedElementProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdditionalTransform.js","sourceRoot":"","sources":["../../../src/geometry/AdditionalTransform.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,wBAAwB;;;AAExB,wDAAiG;AAwBjG;;;;;;;;;GASG;AACH,MAAa,oBAAoB;IAC/B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,wCAAwC;IACjC,YAAY,CAAU;IAC7B,oEAAoE;IAC7D,MAAM,CAAU;IACvB,iFAAiF;IAC1E,KAAK,CAAU;IAEtB,YAAY,IAAgC;QAC1C,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,CAAC;IACH,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA+B;QACpD,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IACvJ,CAAC;IAED;kBACc;IACP,MAAM,CAAC,KAA2B;QACvC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAA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,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjI,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA8B;QACnD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7D,CAAC;IAED;kBACc;IACP,MAAM,CAAC,KAA0B;QACtC,IAAI,CAAC,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,KAAK,SAAS,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAqB,CAAC;YAC7F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlCD,kDAkCC","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 Geometry\n */\n// cspell:ignore Helmert\n\nimport { Angle, AxisIndex, Geometry, Matrix3d, Transform, Vector3d } from \"@itwin/core-geometry\";\n\n/** An affine transformation with an additional Z Offset.\n * The equations are:\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\n * X = a * x - b * y + translationX\n * Y = b * x + a * y + translationY\n * Z = z + translationZ\n * @public\n * @extensions\n */\nexport interface Helmert2DWithZOffsetProps {\n /** The X post translation */\n translationX: number;\n /** The Y post-translation */\n translationY: number;\n /** The Z post-translation or Z offset*/\n translationZ: number;\n /** The rotation in the trigonometric (CCW) direction in degrees. */\n rotDeg: number;\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\n scale: number;\n}\n\n/** An affine transformation with an additional Z Offset.\n * The equations are:\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\n * X = a * x - b * y + translationX\n * Y = b * x + a * y + translationY\n * Z = z + translationZ\n *\n * Note that the class only implements the definition and not the operation.\n * @public\n */\nexport class Helmert2DWithZOffset implements Helmert2DWithZOffsetProps {\n /** The X post translation */\n public translationX!: number;\n /** The Y post-translation */\n public translationY!: number;\n /** The Z post-translation or Z offset*/\n public translationZ!: number;\n /** The rotation in the trigonometric (CCW) direction in degrees. */\n public rotDeg!: number;\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\n public scale!: number;\n\n constructor(data?: Helmert2DWithZOffsetProps) {\n if (data) {\n this.translationX = data.translationX;\n this.translationY = data.translationY;\n this.translationZ = data.translationZ;\n this.rotDeg = data.rotDeg;\n this.scale = data.scale;\n }\n }\n\n /** Creates an Helmert Transform from JSON representation.\n * @public */\n public static fromJSON(data: Helmert2DWithZOffsetProps): Helmert2DWithZOffset {\n return new Helmert2DWithZOffset(data);\n }\n\n /** Creates a JSON from the Helmert Transform definition\n * @public */\n public toJSON(): Helmert2DWithZOffsetProps {\n return { translationX: this.translationX, translationY: this.translationY, translationZ: this.translationZ, rotDeg: this.rotDeg, scale: this.scale };\n }\n\n /** Compares two Helmert2DWithZOffset objects applying a minuscule tolerance.\n * @public */\n public equals(other: Helmert2DWithZOffset): boolean {\n return (Math.abs(this.translationX - other.translationX) < Geometry.smallMetricDistance &&\n Math.abs(this.translationY - other.translationY) < Geometry.smallMetricDistance &&\n Math.abs(this.translationZ - other.translationZ) < Geometry.smallMetricDistance &&\n Math.abs(this.rotDeg - other.rotDeg) < Geometry.smallAngleDegrees &&\n Math.abs(this.scale - other.scale) < Geometry.smallFraction);\n }\n\n /** Convert Helmert2DWithZOffset object into Transfrom object\n * @public */\n public convertHelmertToTransform(): Transform {\n const rotationXY = Matrix3d.createRotationAroundAxisIndex(\n AxisIndex.Z,\n Angle.createDegrees(this?.rotDeg)\n );\n rotationXY.scaleColumnsInPlace(this.scale, this.scale, 1.0);\n const translation = Vector3d.create(\n this.translationX,\n this.translationY,\n this.translationZ\n );\n const helmertTransform = Transform.createRefs(translation, rotationXY);\n\n return helmertTransform;\n }\n}\n\n/** Additional Transform definition\n * @public\n * @extensions\n */\nexport interface AdditionalTransformProps {\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\n helmert2DWithZOffset?: Helmert2DWithZOffsetProps;\n}\n\n/** Additional Transform implementation.\n * An additional transform is a transformation that can apply to either the horizontal or vertical coordinates of a\n * geographic CRS. The transformation is applied after the latitude/longitude have been projected thus the process\n * is applied to the result Cartesian coordinates of the projection process.\n * @public\n*/\nexport class AdditionalTransform implements AdditionalTransformProps {\n\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\n public readonly helmert2DWithZOffset?: Helmert2DWithZOffset;\n\n public constructor(data?: AdditionalTransformProps) {\n if (data)\n this.helmert2DWithZOffset = data.helmert2DWithZOffset ? Helmert2DWithZOffset.fromJSON(data.helmert2DWithZOffset) : undefined;\n }\n\n /** Creates an Additional Transform from JSON representation.\n * @public */\n public static fromJSON(data: AdditionalTransformProps): AdditionalTransform {\n return new AdditionalTransform(data);\n }\n\n /** Creates a JSON from the Additional Transform definition\n * @public */\n public toJSON(): AdditionalTransformProps {\n return { helmert2DWithZOffset: this.helmert2DWithZOffset };\n }\n\n /** Compares two additional transforms applying a minuscule tolerance to comparing numbers.\n * @public */\n public equals(other: AdditionalTransform): boolean {\n if ((this.helmert2DWithZOffset === undefined) !== (other.helmert2DWithZOffset === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.helmert2DWithZOffset && !this.helmert2DWithZOffset.equals(other.helmert2DWithZOffset!))\n return false;\n\n return true;\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"AdditionalTransform.js","sourceRoot":"","sources":["../../../src/geometry/AdditionalTransform.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;AACH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AED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7D,CAAC;IAED;kBACc;IACP,MAAM,CAAC,KAA0B;QACtC,IAAI,CAAC,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,KAAK,SAAS,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAqB,CAAC;YAC7F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlCD,kDAkCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n// cspell:ignore Helmert\r\n\r\nimport { Angle, AxisIndex, Geometry, Matrix3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\n\r\n/** An affine transformation with an additional Z Offset.\r\n * The equations are:\r\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\r\n * X = a * x - b * y + translationX\r\n * Y = b * x + a * y + translationY\r\n * Z = z + translationZ\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Helmert2DWithZOffsetProps {\r\n /** The X post translation */\r\n translationX: number;\r\n /** The Y post-translation */\r\n translationY: number;\r\n /** The Z post-translation or Z offset*/\r\n translationZ: number;\r\n /** The rotation in the trigonometric (CCW) direction in degrees. */\r\n rotDeg: number;\r\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\r\n scale: number;\r\n}\r\n\r\n/** An affine transformation with an additional Z Offset.\r\n * The equations are:\r\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\r\n * X = a * x - b * y + translationX\r\n * Y = b * x + a * y + translationY\r\n * Z = z + translationZ\r\n *\r\n * Note that the class only implements the definition and not the operation.\r\n * @public\r\n */\r\nexport class Helmert2DWithZOffset implements Helmert2DWithZOffsetProps {\r\n /** The X post translation */\r\n public translationX!: number;\r\n /** The Y post-translation */\r\n public translationY!: number;\r\n /** The Z post-translation or Z offset*/\r\n public translationZ!: number;\r\n /** The rotation in the trigonometric (CCW) direction in degrees. */\r\n public rotDeg!: number;\r\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\r\n public scale!: number;\r\n\r\n constructor(data?: Helmert2DWithZOffsetProps) {\r\n if (data) {\r\n this.translationX = data.translationX;\r\n this.translationY = data.translationY;\r\n this.translationZ = data.translationZ;\r\n this.rotDeg = data.rotDeg;\r\n this.scale = data.scale;\r\n }\r\n }\r\n\r\n /** Creates an Helmert Transform from JSON representation.\r\n * @public */\r\n public static fromJSON(data: Helmert2DWithZOffsetProps): Helmert2DWithZOffset {\r\n return new Helmert2DWithZOffset(data);\r\n }\r\n\r\n /** Creates a JSON from the Helmert Transform definition\r\n * @public */\r\n public toJSON(): Helmert2DWithZOffsetProps {\r\n return { translationX: this.translationX, translationY: this.translationY, translationZ: this.translationZ, rotDeg: this.rotDeg, scale: this.scale };\r\n }\r\n\r\n /** Compares two Helmert2DWithZOffset objects applying a minuscule tolerance.\r\n * @public */\r\n public equals(other: Helmert2DWithZOffset): boolean {\r\n return (Math.abs(this.translationX - other.translationX) < Geometry.smallMetricDistance &&\r\n Math.abs(this.translationY - other.translationY) < Geometry.smallMetricDistance &&\r\n Math.abs(this.translationZ - other.translationZ) < Geometry.smallMetricDistance &&\r\n Math.abs(this.rotDeg - other.rotDeg) < Geometry.smallAngleDegrees &&\r\n Math.abs(this.scale - other.scale) < Geometry.smallFraction);\r\n }\r\n\r\n /** Convert Helmert2DWithZOffset object into Transfrom object\r\n * @public */\r\n public convertHelmertToTransform(): Transform {\r\n const rotationXY = Matrix3d.createRotationAroundAxisIndex(\r\n AxisIndex.Z,\r\n Angle.createDegrees(this?.rotDeg)\r\n );\r\n rotationXY.scaleColumnsInPlace(this.scale, this.scale, 1.0);\r\n const translation = Vector3d.create(\r\n this.translationX,\r\n this.translationY,\r\n this.translationZ\r\n );\r\n const helmertTransform = Transform.createRefs(translation, rotationXY);\r\n\r\n return helmertTransform;\r\n }\r\n}\r\n\r\n/** Additional Transform definition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AdditionalTransformProps {\r\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\r\n helmert2DWithZOffset?: Helmert2DWithZOffsetProps;\r\n}\r\n\r\n/** Additional Transform implementation.\r\n * An additional transform is a transformation that can apply to either the horizontal or vertical coordinates of a\r\n * geographic CRS. The transformation is applied after the latitude/longitude have been projected thus the process\r\n * is applied to the result Cartesian coordinates of the projection process.\r\n * @public\r\n*/\r\nexport class AdditionalTransform implements AdditionalTransformProps {\r\n\r\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\r\n public readonly helmert2DWithZOffset?: Helmert2DWithZOffset;\r\n\r\n public constructor(data?: AdditionalTransformProps) {\r\n if (data)\r\n this.helmert2DWithZOffset = data.helmert2DWithZOffset ? Helmert2DWithZOffset.fromJSON(data.helmert2DWithZOffset) : undefined;\r\n }\r\n\r\n /** Creates an Additional Transform from JSON representation.\r\n * @public */\r\n public static fromJSON(data: AdditionalTransformProps): AdditionalTransform {\r\n return new AdditionalTransform(data);\r\n }\r\n\r\n /** Creates a JSON from the Additional Transform definition\r\n * @public */\r\n public toJSON(): AdditionalTransformProps {\r\n return { helmert2DWithZOffset: this.helmert2DWithZOffset };\r\n }\r\n\r\n /** Compares two additional transforms applying a minuscule tolerance to comparing numbers.\r\n * @public */\r\n public equals(other: AdditionalTransform): boolean {\r\n if ((this.helmert2DWithZOffset === undefined) !== (other.helmert2DWithZOffset === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.helmert2DWithZOffset && !this.helmert2DWithZOffset.equals(other.helmert2DWithZOffset!))\r\n return false;\r\n\r\n return true;\r\n }\r\n}\r\n\r\n"]}
|