@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/annotation/TextBlock.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAw1BH,gEAOC;AAUD,sCA0BC;AAj4BD,2CAA0G;AA0D1G,SAAS,mBAAmB,CAAC,SAAuC,EAAE,OAA+B;IACnG,SAAS,CAAC,cAAc,GAAG,EAAE,CAAC;IAC9B,IAAI,CAAC,OAAO,EAAE,yBAAyB,EAAE,CAAC;QACxC,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACvC,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAsB,kBAAkB;IAC9B,eAAe,CAAyB;IAEhD,gBAAgB;IAChB,YAAsB,KAA+B;QACnD,IAAI,CAAC,eAAe,GAAG,6BAAiB,CAAC,UAAU,CAAC,KAAK,EAAE,cAAc,IAAI,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;OAGG;IACH,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAW,cAAc,CAAC,SAAiC;QACzD,IAAI,CAAC,eAAe,GAAG,6BAAiB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC;IAED,8DAA8D;IACvD,mBAAmB,CAAC,QAAgC;QACzD,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;IAED,4HAA4H;IAC5H,IAAW,cAAc;QACvB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,GAAG,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AAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,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 { ListMarker, ListMarkerEnumerator, TextStyleSettings, TextStyleSettingsProps } from \"./TextStyle\";\nimport { FieldFormatOptions, FieldPropertyHost, FieldPropertyPath } from \"./TextField\";\n\n/** Options supplied to [[TextBlockComponent.clearStyleOverrides]] to control how the style overrides are cleared on the component and its child components.\n * @beta\n */\nexport interface ClearTextStyleOptions {\n /** Controls whether the styleOverrides of any child components are retained.\n * By default, all overrides are cleared.\n */\n preserveChildrenOverrides?: boolean;\n}\n\n/** The JSON representation of a [[TextBlockComponent]].\n * @beta\n */\nexport interface TextBlockComponentProps {\n /** Deviations from the base [[TextStyleSettings]] defined by the [AnnotationTextStyle]($backend) applied to this component.\n * This permits you to, e.g., create a [[TextBlock]] using \"Arial\" font and override one of its [[TextRun]]s to use \"Comic Sans\" instead.\n */\n styleOverrides?: TextStyleSettingsProps;\n}\n\n/** Options supplied to [[TextBlockComponent.stringify]] to control how the content is formatted.\n * @beta\n */\nexport interface TextBlockStringifyOptions {\n /** A string to insert in between each [[Paragraph]].\n * Default: \" \" - a single space.\n */\n paragraphBreak?: string;\n /** A string to insert for each [[LineBreakRun]].\n * Default: \" \" - a single space.\n */\n lineBreak?: string;\n /** A string to insert between the numerator and denominator of each [[FractionRun]].\n * Default: \"/\"\n */\n fractionSeparator?: string;\n /** The number of spaces to use for tabs. If not provided, tabs will be represented by a tab character: \"\\t\".\n * Default: \"undefined\" - use \"\\t\".\n */\n tabsAsSpaces?: number;\n /** A string to insert in between the list marker and the list item.\n * Default: \" \" - a single space.\n */\n listMarkerBreak?: string;\n}\n\n/**\n * Context information that may be useful when converting a [[TextBlock]] to a string.\n * @beta\n */\nexport interface TextBlockStringifyContext {\n /** The current depth of the text block in the document structure. */\n depth: number;\n}\n\nfunction clearStyleOverrides(component: StructuralTextBlockComponent, options?: ClearTextStyleOptions): void {\n component.styleOverrides = {};\n if (!options?.preserveChildrenOverrides) {\n for (const child of component.children) {\n child.clearStyleOverrides(options);\n }\n }\n}\n\n/**\n * Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s and [[StructuralTextBlockComponent]]s.\n * The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents.\n * Each component can specify an optional [[styleOverrides]] to customize that formatting.\n * @beta\n */\nexport abstract class TextBlockComponent {\n private _styleOverrides: TextStyleSettingsProps;\n\n /** @internal */\n protected constructor(props?: TextBlockComponentProps) {\n this._styleOverrides = TextStyleSettings.cloneProps(props?.styleOverrides ?? {});\n }\n\n /** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend).\n * For example, if the style uses the \"Arial\" font, you can override that by settings `styleOverrides.fontName` to \"Comic Sans\".\n * @see [[clearStyleOverrides]] to reset this to an empty object.\n */\n public get styleOverrides(): TextStyleSettingsProps {\n return this._styleOverrides;\n }\n\n public set styleOverrides(overrides: TextStyleSettingsProps) {\n this._styleOverrides = TextStyleSettings.cloneProps(overrides);\n }\n\n /** Reset any [[styleOverrides]] applied to this component. */\n public clearStyleOverrides(_options?: ClearTextStyleOptions): void {\n this.styleOverrides = {};\n }\n\n /** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */\n public get overridesStyle(): boolean {\n return Object.keys(this.styleOverrides).length > 0;\n }\n\n /** Create a deep copy of this component. */\n public abstract clone(): TextBlockComponent;\n\n /** Compute a string representation of the contents of this component and all of its sub-components. */\n public abstract stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string;\n\n /** Returns true if this component has no content or children. */\n public abstract get isEmpty(): boolean;\n\n /**\n * Returns true if the string representation of this component consists only of whitespace characters.\n * Useful for checking if the component is visually empty (producing no graphics) or contains only spaces, tabs, or line breaks.\n */\n public get isWhitespace(): boolean {\n return /^\\s*$/g.test(this.stringify());\n };\n\n /** Convert this component to its JSON representation. */\n public toJSON(): TextBlockComponentProps {\n return {\n styleOverrides: TextStyleSettings.cloneProps(this.styleOverrides),\n };\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: TextBlockComponent): boolean {\n const myKeys = Object.keys(this.styleOverrides);\n const yrKeys = Object.keys(other._styleOverrides);\n if (myKeys.length !== yrKeys.length) {\n return false;\n }\n\n for (const name of myKeys) {\n const key = name as keyof TextStyleSettingsProps;\n if (this.styleOverrides[key] !== other.styleOverrides[key]) {\n return false;\n }\n }\n\n return true;\n }\n}\n\n/** [[TextBlockComponent]]s contained within a [[Paragraph]].\n * @beta\n */\nexport type Run = TextRun | FractionRun | TabRun | LineBreakRun | FieldRun;\n\n/** The JSON representation of a [[Run]].\n * Use the `type` field to discriminate between the different kinds of runs.\n * @beta\n */\nexport type RunProps = TextRunProps | FractionRunProps | TabRunProps | LineBreakRunProps | FieldRunProps;\n\n/** A sequence of characters within a [[Paragraph]] that share a single style. Runs are the leaf nodes of a [[TextBlock]] document. When laid out for display, a single run may span\n * multiple lines, but it will never contain different styling.\n * Use the `type` field to discriminate between the different kinds of runs.\n * @beta\n */\nexport namespace Run { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Create a run from its JSON representation.\n * @see [[TextRun.create]], [[FractionRun.create]], [[FieldRun.create]], [[TabRun.create]], and [[LineBreakRun.create]] to create a run directly.\n */\n export function fromJSON(props: RunProps): Run {\n switch (props.type) {\n case \"field\": return FieldRun.create(props);\n case \"fraction\": return FractionRun.create(props);\n case \"linebreak\": return LineBreakRun.create(props);\n case \"tab\": return TabRun.create(props);\n case \"text\": return TextRun.create(props);\n }\n }\n}\n\n/** Describes whether the characters of a [[TextRun]] should be displayed normally, in subscript, or in superscript.\n * [[TextStyleSettings.superScriptScale]], [[TextStyleSettings.subScriptScale]], [[TextStyleSettings.superScriptOffsetFactor]], and [[TextStyleSettings.subScriptOffsetFactor]]\n * affect how the content is rendered.\n * @beta\n */\nexport type BaselineShift = \"subscript\" | \"superscript\" | \"none\";\n\n/** JSON representation of a [[TextRun]].\n * @beta\n */\nexport interface TextRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"text\";\n /** The characters displayed by the run.\n * Default: an empty string.\n */\n content?: string;\n /** Whether to display [[content]] as a subscript, superscript, or normally.\n * Default: \"none\"\n */\n baselineShift?: BaselineShift;\n}\n\n/** The most common type of [[Run]], containing a sequence of characters to be displayed using a single style.\n * @beta\n */\nexport class TextRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"text\";\n /** The sequence of characters to be displayed by the run. */\n public content: string;\n /** Whether to display [[content]] as a subscript, superscript, or normally. */\n public baselineShift: BaselineShift;\n\n private constructor(props: TextRunProps) {\n super(props);\n this.content = props?.content ?? \"\";\n this.baselineShift = props?.baselineShift ?? \"none\";\n }\n\n public override clone(): TextRun {\n return new TextRun(this.toJSON());\n }\n\n public override toJSON(): TextRunProps {\n return {\n ...super.toJSON(),\n type: \"text\",\n content: this.content,\n baselineShift: this.baselineShift,\n };\n }\n\n public static create(props?: Omit<TextRunProps, \"type\">): TextRun {\n return new TextRun({ ...props, type: \"text\" });\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /** Simply returns [[content]]. */\n public override stringify(): string {\n return this.content;\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof TextRun && this.content === other.content && this.baselineShift === other.baselineShift && super.equals(other);\n }\n}\n\n/** JSON representation of a [[FractionRun]].\n * @beta\n */\nexport interface FractionRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"fraction\";\n /** The text displayed before or above the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\n numerator?: string;\n /** The text displayed after or below the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\n denominator?: string;\n}\n\n/** A [[Run]] containing a numeric ratio to be displayed as a numerator and denominator separated by a horizontal or diagonal bar.\n * @note The [[numerator]] and [[denominator]] are stored as strings. They are not technically required to contain a numeric representation.\n * @beta\n */\nexport class FractionRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"fraction\";\n /** The fraction's numerator. */\n public numerator: string;\n /** The fraction's denominator. */\n public denominator: string;\n\n private constructor(props: FractionRunProps) {\n super(props);\n this.numerator = props?.numerator ?? \"\";\n this.denominator = props?.denominator ?? \"\";\n }\n\n public override toJSON(): FractionRunProps {\n return {\n ...super.toJSON(),\n type: \"fraction\",\n numerator: this.numerator,\n denominator: this.denominator,\n };\n }\n\n public override clone(): FractionRun {\n return new FractionRun(this.toJSON());\n }\n\n public static create(props?: Omit<FractionRunProps, \"type\">): FractionRun {\n return new FractionRun({ ...props, type: \"fraction\" });\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /** Formats the fraction as a string with the [[numerator]] and [[denominator]] separated by [[TextBlockStringifyOptions.fractionSeparator]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n const sep = options?.fractionSeparator ?? \"/\";\n return `${this.numerator}${sep}${this.denominator}`;\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof FractionRun && this.numerator === other.numerator && this.denominator === other.denominator && super.equals(other);\n }\n}\n\n/** JSON representation of a [[LineBreakRun]].\n * @beta\n */\nexport interface LineBreakRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"linebreak\";\n}\n\n/** A [[Run]] that represents the end of a line of text within a [[Paragraph]]. It contains no content of its own - it simply causes subsequent content to display on a new line.\n * @beta\n */\nexport class LineBreakRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"linebreak\";\n\n private constructor(props: LineBreakRunProps) {\n super(props);\n }\n\n public override toJSON(): LineBreakRunProps {\n return {\n ...super.toJSON(),\n type: \"linebreak\",\n };\n }\n\n public static create(props?: Omit<LineBreakRunProps, \"type\">) {\n return new LineBreakRun({ ...props, type: \"linebreak\" });\n }\n\n public override clone(): LineBreakRun {\n return new LineBreakRun(this.toJSON());\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /** Simply returns [[TextBlockStringifyOptions.lineBreak]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n return options?.lineBreak ?? \" \";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof LineBreakRun && super.equals(other);\n }\n}\n\n/** JSON representation of a [[TabRun]].\n * @beta\n */\nexport interface TabRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"tab\";\n}\n\n/** A [[TabRun]] is used to shift the next tab stop.\n * @note Only left-justified tabs are supported at this tab.\n * @beta\n */\nexport class TabRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"tab\";\n\n public override toJSON(): TabRunProps {\n return {\n ...super.toJSON(),\n type: \"tab\",\n };\n }\n\n public override clone(): TabRun {\n return new TabRun(this.toJSON());\n }\n\n public static create(props?: Omit<TabRunProps, \"type\">): TabRun {\n return new TabRun(props);\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /**\n * Converts a [[TabRun]] to its string representation.\n * If the `tabsAsSpaces` option is provided, returns a string of spaces of the specified length.\n * Otherwise, returns a tab character (\"\\t\").\n */\n public override stringify(options?: TextBlockStringifyOptions): string {\n if (options?.tabsAsSpaces) {\n return \" \".repeat(options.tabsAsSpaces);\n }\n\n return \"\\t\";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof TabRun && super.equals(other);\n }\n}\n\n/** JSON representation of a [[FieldRun]].\n * @beta\n */\nexport interface FieldRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"field\";\n /** The element and BIS class containing the property described by [[propertyPath]]. */\n propertyHost: FieldPropertyHost;\n /** Describes how to obtain the property value from [[propertyHost]]. */\n propertyPath: FieldPropertyPath;\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]].\n * The specific options used depend upon the field's [[propertyType]].\n */\n formatOptions?: FieldFormatOptions;\n /** The field's most recently evaluated display string.\n * @note It is unnecessary to specify this when creating a field as part of an element like a [[TextAnnotation2d]], because\n * all of the element's fields will be re-evaluated when inserting or updating the element in the iModel.\n */\n cachedContent?: string;\n}\n\n/** A [[Run]] that displays the formatted value of a property of some [Element]($backend).\n * When a [[TextBlock]] containing a [[FieldRun]] is written into the iModel as an [ITextAnnotation]($backend) element,\n * a dependency is established between the two elements via the [ElementDrivesTextAnnotation]($backend) relationship such that\n * whenever the source element specified by [[propertyHost]] is modified or the `ITextAnnotation` element is inserted or updated in the iModel,\n * the field(s) in the `ITextAnnotation` element are automatically\n * recalculated, causing their [[cachedContent]] to update. If the field's display string cannot be evaluated (for example, because the specified element or\n * property does not exist), then its cached content is set to [[FieldRun.invalidContentIndicator]].\n * A [[FieldRun]] displays its [[cachedContent]] in the same way that [[TextRun]]s display their `content`, including word wrapping where appropriate.\n * @beta\n */\nexport class FieldRun extends TextBlockComponent {\n /** Display string used to signal an error in computing the field's value. */\n public static invalidContentIndicator = \"####\";\n\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"field\";\n /** The element and BIS class containing the property described by [[propertyPath]]. */\n public readonly propertyHost: Readonly<FieldPropertyHost>;\n /** Describes how to obtain the property value from [[propertyHost]]. */\n public readonly propertyPath: Readonly<FieldPropertyPath>;\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]].\n * The specific options used depend upon the [[FieldPropertyType]].\n */\n public readonly formatOptions?: FieldFormatOptions;\n private _cachedContent: string;\n\n /** The field's most recently evaluated display string. */\n public get cachedContent(): string {\n return this._cachedContent;\n }\n\n /** @internal Used by core-backend when re-evaluating field content. */\n public setCachedContent(content: string | undefined): void {\n this._cachedContent = content ?? FieldRun.invalidContentIndicator;\n }\n\n private constructor(props: FieldRunProps) {\n super(props);\n\n this._cachedContent = props.cachedContent ?? FieldRun.invalidContentIndicator;\n this.propertyHost = props.propertyHost\n this.propertyPath = props.propertyPath;\n this.formatOptions = props.formatOptions;\n }\n\n /** Create a FieldRun from its JSON representation. */\n public static create(props: Omit<FieldRunProps, \"type\">): FieldRun {\n return new FieldRun({\n ...props,\n propertyHost: { ...props.propertyHost },\n propertyPath: structuredClone(props.propertyPath),\n formatOptions: structuredClone(props.formatOptions),\n type: \"field\",\n });\n }\n\n /** Convert the FieldRun to its JSON representation. */\n public override toJSON(): FieldRunProps {\n const json: FieldRunProps = {\n ...super.toJSON(),\n type: \"field\",\n propertyHost: { ...this.propertyHost },\n propertyPath: structuredClone(this.propertyPath),\n };\n\n if (this.cachedContent !== FieldRun.invalidContentIndicator) {\n json.cachedContent = this.cachedContent;\n }\n\n if (this.formatOptions) {\n json.formatOptions = structuredClone(this.formatOptions);\n }\n\n return json;\n }\n\n /** Create a deep copy of this FieldRun. */\n public override clone(): FieldRun {\n return new FieldRun(this.toJSON());\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /** Convert this FieldRun to a simple string representation. */\n public override stringify(): string {\n return this.cachedContent;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof FieldRun) || !super.equals(other)) {\n return false;\n }\n\n if (\n this.propertyHost.elementId !== other.propertyHost.elementId ||\n this.propertyHost.className !== other.propertyHost.className ||\n this.propertyHost.schemaName !== other.propertyHost.schemaName\n ) {\n return false;\n }\n\n if (this.propertyPath.propertyName !== other.propertyPath.propertyName) {\n return false;\n }\n\n const thisAccessors = this.propertyPath.accessors ?? [];\n const otherAccessors = other.propertyPath.accessors ?? [];\n\n if (thisAccessors.length !== otherAccessors.length) {\n return false;\n }\n\n if (!thisAccessors.every((value, index) => value === otherAccessors[index])) {\n return false;\n }\n\n if (this.formatOptions && other.formatOptions) {\n // We anticipate new formatting options being added in the future.\n // So to account for properties we don't know about, just compare the string representations.\n if (JSON.stringify(this.formatOptions) !== JSON.stringify(other.formatOptions)) {\n return false;\n }\n } else if (this.formatOptions || other.formatOptions) {\n return false;\n }\n\n return true;\n }\n}\n\n/** JSON representation of a [[Paragraph]].\n * @beta\n */\nexport interface ParagraphProps extends TextBlockComponentProps {\n children?: Array<ListProps | RunProps>;\n}\n\n/** A collection of [[Run]]s and [[List]]s. Paragraphs can be appended to [[List]]s and [[TextBlock]]s.\n * Each paragraph is laid out on a separate line. If included in a [[List]], the paragraph will be treated as a list item.\n * @beta\n */\nexport class Paragraph extends TextBlockComponent {\n public readonly type = \"paragraph\";\n public readonly children: Array<List | Run>;\n\n private constructor(props?: ParagraphProps) {\n super(props);\n\n this.children = props?.children?.map((child) =>\n child.type === \"list\" ? List.create(child) : Run.fromJSON(child)\n ) ?? [];\n }\n\n /** Create a paragraph from its JSON representation. */\n public static create(props?: Omit<ParagraphProps, \"type\">): Paragraph {\n return new Paragraph(props);\n }\n\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n clearStyleOverrides(this, options);\n }\n\n public override get isEmpty() {\n return this.children.length === 0;\n }\n\n public override clone(): Paragraph {\n return new Paragraph(this.toJSON());\n }\n\n public override toJSON(): ParagraphProps {\n return {\n ...super.toJSON(),\n children: this.children.map((child) => child.toJSON()),\n };\n }\n\n /** Compute a string representation of this paragraph by concatenating the string representations of all of its children. */\n public override stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string {\n return this.children.map((x, index) => (index > 0 && x.type === \"list\") ? `${options?.paragraphBreak ?? \" \"}${x.stringify(options, context)}` : x.stringify(options, context)).join(\"\") ?? \"\";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return (other instanceof Paragraph) && super.equals(other);\n }\n}\n\n/** JSON representation of a [[List]].\n * @beta\n */\nexport interface ListProps extends TextBlockComponentProps {\n readonly type: \"list\";\n children?: ParagraphProps[];\n}\n\n/** A collection of list items ([[Paragraph]]s). Lists can be appended to [[Paragraph]]s.\n * Lists will be laid out on a new line. Each item in a list is laid out on a separate line.\n * @beta\n */\nexport class List extends TextBlockComponent {\n public readonly type = \"list\";\n public readonly children: Paragraph[];\n\n protected constructor(props?: ListProps) {\n super(props);\n\n this.children = props?.children?.map((child) => Paragraph.create(child)) ?? [];\n }\n\n /** Create a list from its JSON representation. */\n public static create(props?: Omit<ListProps, \"type\">): List {\n return new List({ ...props, type: \"list\" });\n }\n\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n clearStyleOverrides(this, options);\n }\n\n public override get isEmpty() {\n return this.children.length === 0;\n }\n\n public override clone(): List {\n return new List(this.toJSON());\n }\n\n public override toJSON(): ListProps {\n return {\n ...super.toJSON(),\n type: \"list\",\n children: this.children.map((run) => run.toJSON()),\n };\n }\n\n /** Compute a string representation of this list by concatenating the string representations of all of its [[children]]. */\n public override stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string {\n const children = this.children.map((x, index) => {\n const depth = context?.depth ?? 0;\n const marker = getMarkerText(this.styleOverrides.listMarker ?? TextStyleSettings.defaultProps.listMarker, index + 1);\n const tab = (options?.tabsAsSpaces ? \" \".repeat(options.tabsAsSpaces) : \"\\t\").repeat(depth);\n return `${tab}${marker}${options?.listMarkerBreak ?? \" \"}${x.stringify(options, { depth: depth + 1 })}`;\n });\n return children.join(options?.paragraphBreak ?? \" \") ?? \"\";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return (other instanceof List) && super.equals(other);\n }\n}\n\n\n/** Describes the relative alignment of the content of a [[TextBlock]].\n * @beta\n */\nexport type TextBlockJustification = \"left\" | \"center\" | \"right\";\n\n/** Describes the margins around the content inside a [[TextBlock]]. It's measured in meters.\n * @beta\n */\nexport interface TextBlockMargins {\n /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n left: number;\n /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n right: number;\n /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n top: number;\n /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n bottom: number;\n};\n\n/** JSON representation of a [[TextBlock]].\n * @beta\n */\nexport interface TextBlockProps extends TextBlockComponentProps {\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\n * A value less than or equal to zero indicates no wrapping is to be applied.\n * Default: 0\n */\n width?: number;\n /** The alignment of the document content. Default: \"left\". */\n justification?: TextBlockJustification;\n /** The margins to surround the document content. Default: 0 margins on all sides */\n margins?: Partial<TextBlockMargins>;\n children?: ParagraphProps[];\n}\n\n/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content.\n * No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.\n * @see [[TextAnnotation]] to position a text block as an annotation in 2d or 3d space.\n * @beta\n */\nexport class TextBlock extends TextBlockComponent {\n public readonly children: Paragraph[];\n\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\n * A value less than or equal to zero indicates no wrapping is to be applied.\n * Default: 0\n */\n public width: number;\n /** The alignment of the document's content. */\n public justification: TextBlockJustification;\n /** The margins of the document. */\n public margins: TextBlockMargins;\n\n private constructor(props: TextBlockProps) {\n super(props);\n this.width = props.width ?? 0;\n this.justification = props.justification ?? \"left\";\n\n // Assign default margins if not provided\n this.margins = {\n left: props.margins?.left ?? 0,\n right: props.margins?.right ?? 0,\n top: props.margins?.top ?? 0,\n bottom: props.margins?.bottom ?? 0,\n };\n\n this.children = props?.children?.map((para) => Paragraph.create(para)) ?? [];\n }\n\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n clearStyleOverrides(this, options);\n }\n\n public override toJSON(): TextBlockProps {\n return {\n ...super.toJSON(),\n width: this.width,\n justification: this.justification,\n margins: this.margins,\n children: this.children.map((x) => x.toJSON()),\n };\n }\n\n /** Create a text block from its JSON representation. */\n public static create(props?: Omit<TextBlockProps, \"type\">): TextBlock {\n return new TextBlock(props ?? {});\n }\n\n /** Returns true if every paragraph in this text block is empty. */\n public override get isEmpty(): boolean {\n return !this.children || this.children.every((child) => child.isEmpty);\n }\n\n public override clone(): TextBlock {\n return new TextBlock(this.toJSON());\n }\n\n /** Compute a string representation of the document's contents by concatenating the string representations of each of its [[children]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */\n public stringify(options?: TextBlockStringifyOptions): string {\n return this.children.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? \" \") || \"\";\n }\n\n /** Add and return a new paragraph.\n * By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.\n * @param seedFromLast If true and [[children]] is not empty, the new paragraph will inherit the style overrides of the last child in this block.\n * @note Be sure you pass in [[ParagraphProps]] and not [[Paragraph]] or style overrides will be ignored.\n */\n public appendParagraph(props?: ParagraphProps, seedFromLast = false): Paragraph {\n const seed = seedFromLast ? this.children[this.children.length - 1] : undefined;\n const styleOverrides = { ...seed?.styleOverrides, ...props?.styleOverrides };\n const paragraph = Paragraph.create({ ...props, styleOverrides });\n this.children.push(paragraph);\n return paragraph;\n }\n\n /** Append a run to the last [[Paragraph]] in this block.\n * If the block contains no [[children]], a new [[Paragraph]] will first be created using [[appendParagraph]].\n */\n public appendRun(run: Run): void {\n const paragraph = this.children[this.children.length - 1] ?? this.appendParagraph();\n paragraph.children.push(run);\n }\n\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof TextBlock)) {\n return false;\n }\n\n if (!super.equals(other)) {\n return false;\n }\n\n if (this.width !== other.width || this.justification !== other.justification) {\n return false;\n }\n\n const marginsAreEqual = Object.entries(this.margins).every(([key, value]) =>\n value === (other.margins as any)[key]\n );\n\n if (!marginsAreEqual) return false;\n\n if (this.children && other.children) {\n if (this.children.length !== other.children.length) {\n return false;\n }\n\n return this.children.every((child, index) => other.children && child.equals(other.children[index]));\n }\n\n return true;\n }\n}\n\n/**\n * A union of all the [[TextBlockComponent]]s that can contain other components.\n * @beta\n */\nexport type StructuralTextBlockComponent = List | Paragraph | TextBlock;\n\n/**\n * Recursively traverses a [[StructuralTextBlockComponent]] tree, yielding each child component along with its parent container.\n * This generator enables depth-first iteration over all components in a text block structure, including paragraphs, lists, and runs.\n *\n * @param parent The root container whose children should be traversed.\n * @returns An IterableIterator yielding objects with the child component and its parent container.\n * @beta\n */\nexport function* traverseTextBlockComponent(parent: StructuralTextBlockComponent): IterableIterator<{ parent: StructuralTextBlockComponent, child: List | Paragraph | Run }> {\n for (const child of parent.children) {\n yield { parent, child };\n if (child.type === \"list\" || child.type === \"paragraph\") {\n yield* traverseTextBlockComponent(child);\n }\n }\n}\n\n/**\n * Returns the formatted marker text for a list item based on the marker type and item number.\n * Supports ordered and unordered list markers, including alphabetic, Roman numeral, and numeric formats.\n * @param marker The type of list marker to use.\n * @param num The item number in the list.\n * @returns The formatted marker string for the list item.\n * @beta\n */\nexport function getMarkerText(marker: ListMarker, num: number): string {\n let markerString = \"\";\n\n switch (marker.enumerator) {\n case undefined:\n case ListMarkerEnumerator.Number:\n markerString = `${num}`;\n break;\n case ListMarkerEnumerator.Letter:\n markerString = integerToAlpha(num);\n break;\n case ListMarkerEnumerator.RomanNumeral:\n markerString = integerToRoman(num);\n break;\n default:\n markerString = marker.enumerator;\n break;\n }\n\n if (marker.case) {\n markerString = marker.case === \"upper\" ? markerString.toUpperCase() : markerString.toLowerCase();\n }\n\n const terminator = marker.terminator === \"period\" ? \".\" : marker.terminator === \"parenthesis\" ? \")\" : \"\";\n\n return `${markerString}${terminator}`;\n}\n\n/**\n * Converts an integer to its Roman numeral representation.\n * Supports numbers from 1 and above.\n * @param num The integer to convert.\n * @returns The Roman numeral string.\n */\nfunction integerToRoman(num: number): string {\n const values =\n [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n const symbols =\n ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];\n let roman = '';\n for (let i = 0; i < values.length; i++) {\n while (num >= values[i]) {\n roman += symbols[i];\n num -= values[i];\n }\n }\n\n return roman;\n}\n\n/**\n * Converts an integer to its alphabetic representation (A-Z, AA-ZZ, etc.).\n * Used for ordered list markers with alphabetic styles.\n * @param num The integer to convert (1-based).\n * @returns The alphabetic string for the given number.\n */\nfunction integerToAlpha(num: number): string {\n const letterOffset = (num - 1) % 26;\n const letter = String.fromCharCode(65 + letterOffset);\n const depth = Math.ceil(num / 26);\n return letter.repeat(depth);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/annotation/TextBlock.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAgyBH,gEAOC;AAUD,sCA0BC;AAz0BD,2CAA0G;AA0D1G,SAAS,mBAAmB,CAAC,SAAuC,EAAE,OAA+B;IACnG,SAAS,CAAC,cAAc,GAAG,EAAE,CAAC;IAC9B,IAAI,CAAC,OAAO,EAAE,yBAAyB,EAAE,CAAC;QACxC,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACvC,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAsB,kBAAkB;IAC9B,eAAe,CAAyB;IAEhD,gBAAgB;IAChB,YAAsB,KAA+B;QACnD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC,KAAK,EAAE,cAAc,IAAI,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACH,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAW,cAAc,CAAC,SAAiC;QACzD,IAAI,CAAC,eAA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,EAAE,CAAC;QACvC,OAAO,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;YACpB,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,GAAW;IACjC,MAAM,YAAY,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,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 { ListMarker, ListMarkerEnumerator, TextStyleSettings, TextStyleSettingsProps } from \"./TextStyle\";\r\nimport { FieldFormatOptions, FieldPropertyHost, FieldPropertyPath } from \"./TextField\";\r\n\r\n/** Options supplied to [[TextBlockComponent.clearStyleOverrides]] to control how the style overrides are cleared on the component and its child components.\r\n * @beta\r\n */\r\nexport interface ClearTextStyleOptions {\r\n /** Controls whether the styleOverrides of any child components are retained.\r\n * By default, all overrides are cleared.\r\n */\r\n preserveChildrenOverrides?: boolean;\r\n}\r\n\r\n/** The JSON representation of a [[TextBlockComponent]].\r\n * @beta\r\n */\r\nexport interface TextBlockComponentProps {\r\n /** Deviations from the base [[TextStyleSettings]] defined by the [AnnotationTextStyle]($backend) applied to this component.\r\n * This permits you to, e.g., create a [[TextBlock]] using \"Arial\" font and override one of its [[TextRun]]s to use \"Comic Sans\" instead.\r\n */\r\n styleOverrides?: TextStyleSettingsProps;\r\n}\r\n\r\n/** Options supplied to [[TextBlockComponent.stringify]] to control how the content is formatted.\r\n * @beta\r\n */\r\nexport interface TextBlockStringifyOptions {\r\n /** A string to insert in between each [[Paragraph]].\r\n * Default: \" \" - a single space.\r\n */\r\n paragraphBreak?: string;\r\n /** A string to insert for each [[LineBreakRun]].\r\n * Default: \" \" - a single space.\r\n */\r\n lineBreak?: string;\r\n /** A string to insert between the numerator and denominator of each [[FractionRun]].\r\n * Default: \"/\"\r\n */\r\n fractionSeparator?: string;\r\n /** The number of spaces to use for tabs. If not provided, tabs will be represented by a tab character: \"\\t\".\r\n * Default: \"undefined\" - use \"\\t\".\r\n */\r\n tabsAsSpaces?: number;\r\n /** A string to insert in between the list marker and the list item.\r\n * Default: \" \" - a single space.\r\n */\r\n listMarkerBreak?: string;\r\n}\r\n\r\n/**\r\n * Context information that may be useful when converting a [[TextBlock]] to a string.\r\n * @beta\r\n */\r\nexport interface TextBlockStringifyContext {\r\n /** The current depth of the text block in the document structure. */\r\n depth: number;\r\n}\r\n\r\nfunction clearStyleOverrides(component: StructuralTextBlockComponent, options?: ClearTextStyleOptions): void {\r\n component.styleOverrides = {};\r\n if (!options?.preserveChildrenOverrides) {\r\n for (const child of component.children) {\r\n child.clearStyleOverrides(options);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s and [[StructuralTextBlockComponent]]s.\r\n * The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents.\r\n * Each component can specify an optional [[styleOverrides]] to customize that formatting.\r\n * @beta\r\n */\r\nexport abstract class TextBlockComponent {\r\n private _styleOverrides: TextStyleSettingsProps;\r\n\r\n /** @internal */\r\n protected constructor(props?: TextBlockComponentProps) {\r\n this._styleOverrides = structuredClone(props?.styleOverrides ?? {});\r\n }\r\n\r\n /** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend).\r\n * For example, if the style uses the \"Arial\" font, you can override that by settings `styleOverrides.font.name` to \"Comic Sans\".\r\n * @see [[clearStyleOverrides]] to reset this to an empty object.\r\n */\r\n public get styleOverrides(): TextStyleSettingsProps {\r\n return this._styleOverrides;\r\n }\r\n\r\n public set styleOverrides(overrides: TextStyleSettingsProps) {\r\n this._styleOverrides = structuredClone(overrides);\r\n }\r\n\r\n /** Reset any [[styleOverrides]] applied to this component. */\r\n public clearStyleOverrides(_options?: ClearTextStyleOptions): void {\r\n this.styleOverrides = {};\r\n }\r\n\r\n /** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */\r\n public get overridesStyle(): boolean {\r\n return Object.keys(this.styleOverrides).length > 0;\r\n }\r\n\r\n /** Create a deep copy of this component. */\r\n public abstract clone(): TextBlockComponent;\r\n\r\n /** Compute a string representation of the contents of this component and all of its sub-components. */\r\n public abstract stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string;\r\n\r\n /** Returns true if this component has no content or children. */\r\n public abstract get isEmpty(): boolean;\r\n\r\n /**\r\n * Returns true if the string representation of this component consists only of whitespace characters.\r\n * Useful for checking if the component is visually empty (producing no graphics) or contains only spaces, tabs, or line breaks.\r\n */\r\n public get isWhitespace(): boolean {\r\n return /^\\s*$/g.test(this.stringify());\r\n };\r\n\r\n /** Convert this component to its JSON representation. */\r\n public toJSON(): TextBlockComponentProps {\r\n return {\r\n styleOverrides: structuredClone(this.styleOverrides),\r\n };\r\n }\r\n\r\n /** Returns true if `this` is equivalent to `other`. */\r\n public equals(other: TextBlockComponent): boolean {\r\n const mySettings = TextStyleSettings.fromJSON(this.styleOverrides);\r\n const otherSettings = TextStyleSettings.fromJSON(other.styleOverrides);\r\n return mySettings.equals(otherSettings);\r\n }\r\n}\r\n\r\n/** [[TextBlockComponent]]s contained within a [[Paragraph]].\r\n * @beta\r\n */\r\nexport type Run = TextRun | FractionRun | TabRun | LineBreakRun | FieldRun;\r\n\r\n/** The JSON representation of a [[Run]].\r\n * Use the `type` field to discriminate between the different kinds of runs.\r\n * @beta\r\n */\r\nexport type RunProps = TextRunProps | FractionRunProps | TabRunProps | LineBreakRunProps | FieldRunProps;\r\n\r\n/** A sequence of characters within a [[Paragraph]] that share a single style. Runs are the leaf nodes of a [[TextBlock]] document. When laid out for display, a single run may span\r\n * multiple lines, but it will never contain different styling.\r\n * Use the `type` field to discriminate between the different kinds of runs.\r\n * @beta\r\n */\r\nexport namespace Run { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Create a run from its JSON representation.\r\n * @see [[TextRun.create]], [[FractionRun.create]], [[FieldRun.create]], [[TabRun.create]], and [[LineBreakRun.create]] to create a run directly.\r\n */\r\n export function fromJSON(props: RunProps): Run {\r\n switch (props.type) {\r\n case \"field\": return FieldRun.create(props);\r\n case \"fraction\": return FractionRun.create(props);\r\n case \"linebreak\": return LineBreakRun.create(props);\r\n case \"tab\": return TabRun.create(props);\r\n case \"text\": return TextRun.create(props);\r\n }\r\n }\r\n}\r\n\r\n/** Describes whether the characters of a [[TextRun]] should be displayed normally, in subscript, or in superscript.\r\n * [[TextStyleSettings.superScriptScale]], [[TextStyleSettings.subScriptScale]], [[TextStyleSettings.superScriptOffsetFactor]], and [[TextStyleSettings.subScriptOffsetFactor]]\r\n * affect how the content is rendered.\r\n * @beta\r\n */\r\nexport type BaselineShift = \"subscript\" | \"superscript\" | \"none\";\r\n\r\n/** JSON representation of a [[TextRun]].\r\n * @beta\r\n */\r\nexport interface TextRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"text\";\r\n /** The characters displayed by the run.\r\n * Default: an empty string.\r\n */\r\n content?: string;\r\n /** Whether to display [[content]] as a subscript, superscript, or normally.\r\n * Default: \"none\"\r\n */\r\n baselineShift?: BaselineShift;\r\n}\r\n\r\n/** The most common type of [[Run]], containing a sequence of characters to be displayed using a single style.\r\n * @beta\r\n */\r\nexport class TextRun extends TextBlockComponent {\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"text\";\r\n /** The sequence of characters to be displayed by the run. */\r\n public content: string;\r\n /** Whether to display [[content]] as a subscript, superscript, or normally. */\r\n public baselineShift: BaselineShift;\r\n\r\n private constructor(props: TextRunProps) {\r\n super(props);\r\n this.content = props?.content ?? \"\";\r\n this.baselineShift = props?.baselineShift ?? \"none\";\r\n }\r\n\r\n public override clone(): TextRun {\r\n return new TextRun(this.toJSON());\r\n }\r\n\r\n public override toJSON(): TextRunProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"text\",\r\n content: this.content,\r\n baselineShift: this.baselineShift,\r\n };\r\n }\r\n\r\n public static create(props?: Omit<TextRunProps, \"type\">): TextRun {\r\n return new TextRun({ ...props, type: \"text\" });\r\n }\r\n\r\n public override get isEmpty(): boolean {\r\n return this.stringify().length === 0;\r\n }\r\n\r\n /** Simply returns [[content]]. */\r\n public override stringify(): string {\r\n return this.content;\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return other instanceof TextRun && this.content === other.content && this.baselineShift === other.baselineShift && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[FractionRun]].\r\n * @beta\r\n */\r\nexport interface FractionRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"fraction\";\r\n /** The text displayed before or above the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\r\n numerator?: string;\r\n /** The text displayed after or below the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\r\n denominator?: string;\r\n}\r\n\r\n/** A [[Run]] containing a numeric ratio to be displayed as a numerator and denominator separated by a horizontal or diagonal bar.\r\n * @note The [[numerator]] and [[denominator]] are stored as strings. They are not technically required to contain a numeric representation.\r\n * @beta\r\n */\r\nexport class FractionRun extends TextBlockComponent {\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"fraction\";\r\n /** The fraction's numerator. */\r\n public numerator: string;\r\n /** The fraction's denominator. */\r\n public denominator: string;\r\n\r\n private constructor(props: FractionRunProps) {\r\n super(props);\r\n this.numerator = props?.numerator ?? \"\";\r\n this.denominator = props?.denominator ?? \"\";\r\n }\r\n\r\n public override toJSON(): FractionRunProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"fraction\",\r\n numerator: this.numerator,\r\n denominator: this.denominator,\r\n };\r\n }\r\n\r\n public override clone(): FractionRun {\r\n return new FractionRun(this.toJSON());\r\n }\r\n\r\n public static create(props?: Omit<FractionRunProps, \"type\">): FractionRun {\r\n return new FractionRun({ ...props, type: \"fraction\" });\r\n }\r\n\r\n public override get isEmpty(): boolean {\r\n return this.stringify().length === 0;\r\n }\r\n\r\n /** Formats the fraction as a string with the [[numerator]] and [[denominator]] separated by [[TextBlockStringifyOptions.fractionSeparator]]. */\r\n public override stringify(options?: TextBlockStringifyOptions): string {\r\n const sep = options?.fractionSeparator ?? \"/\";\r\n return `${this.numerator}${sep}${this.denominator}`;\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return other instanceof FractionRun && this.numerator === other.numerator && this.denominator === other.denominator && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[LineBreakRun]].\r\n * @beta\r\n */\r\nexport interface LineBreakRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"linebreak\";\r\n}\r\n\r\n/** A [[Run]] that represents the end of a line of text within a [[Paragraph]]. It contains no content of its own - it simply causes subsequent content to display on a new line.\r\n * @beta\r\n */\r\nexport class LineBreakRun extends TextBlockComponent {\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"linebreak\";\r\n\r\n private constructor(props: LineBreakRunProps) {\r\n super(props);\r\n }\r\n\r\n public override toJSON(): LineBreakRunProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"linebreak\",\r\n };\r\n }\r\n\r\n public static create(props?: Omit<LineBreakRunProps, \"type\">) {\r\n return new LineBreakRun({ ...props, type: \"linebreak\" });\r\n }\r\n\r\n public override clone(): LineBreakRun {\r\n return new LineBreakRun(this.toJSON());\r\n }\r\n\r\n public override get isEmpty(): boolean {\r\n return this.stringify().length === 0;\r\n }\r\n\r\n /** Simply returns [[TextBlockStringifyOptions.lineBreak]]. */\r\n public override stringify(options?: TextBlockStringifyOptions): string {\r\n return options?.lineBreak ?? \" \";\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return other instanceof LineBreakRun && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[TabRun]].\r\n * @beta\r\n */\r\nexport interface TabRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"tab\";\r\n}\r\n\r\n/** A [[TabRun]] is used to shift the next tab stop.\r\n * @note Only left-justified tabs are supported at this tab.\r\n * @beta\r\n */\r\nexport class TabRun extends TextBlockComponent {\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"tab\";\r\n\r\n public override toJSON(): TabRunProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"tab\",\r\n };\r\n }\r\n\r\n public override clone(): TabRun {\r\n return new TabRun(this.toJSON());\r\n }\r\n\r\n public static create(props?: Omit<TabRunProps, \"type\">): TabRun {\r\n return new TabRun(props);\r\n }\r\n\r\n public override get isEmpty(): boolean {\r\n return this.stringify().length === 0;\r\n }\r\n\r\n /**\r\n * Converts a [[TabRun]] to its string representation.\r\n * If the `tabsAsSpaces` option is provided, returns a string of spaces of the specified length.\r\n * Otherwise, returns a tab character (\"\\t\").\r\n */\r\n public override stringify(options?: TextBlockStringifyOptions): string {\r\n if (options?.tabsAsSpaces) {\r\n return \" \".repeat(options.tabsAsSpaces);\r\n }\r\n\r\n return \"\\t\";\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return other instanceof TabRun && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[FieldRun]].\r\n * @beta\r\n */\r\nexport interface FieldRunProps extends TextBlockComponentProps {\r\n /** Discriminator field for the [[RunProps]] union. */\r\n readonly type: \"field\";\r\n /** The element and BIS class containing the property described by [[propertyPath]]. */\r\n propertyHost: FieldPropertyHost;\r\n /** Describes how to obtain the property value from [[propertyHost]]. */\r\n propertyPath: FieldPropertyPath;\r\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]].\r\n * The specific options used depend upon the field's [[propertyType]].\r\n */\r\n formatOptions?: FieldFormatOptions;\r\n /** The field's most recently evaluated display string.\r\n * @note It is unnecessary to specify this when creating a field as part of an element like a [[TextAnnotation2d]], because\r\n * all of the element's fields will be re-evaluated when inserting or updating the element in the iModel.\r\n */\r\n cachedContent?: string;\r\n}\r\n\r\n/** A [[Run]] that displays the formatted value of a property of some [Element]($backend).\r\n * When a [[TextBlock]] containing a [[FieldRun]] is written into the iModel as an [ITextAnnotation]($backend) element,\r\n * a dependency is established between the two elements via the [ElementDrivesTextAnnotation]($backend) relationship such that\r\n * whenever the source element specified by [[propertyHost]] is modified or the `ITextAnnotation` element is inserted or updated in the iModel,\r\n * the field(s) in the `ITextAnnotation` element are automatically\r\n * recalculated, causing their [[cachedContent]] to update. If the field's display string cannot be evaluated (for example, because the specified element or\r\n * property does not exist), then its cached content is set to [[FieldRun.invalidContentIndicator]].\r\n * A [[FieldRun]] displays its [[cachedContent]] in the same way that [[TextRun]]s display their `content`, including word wrapping where appropriate.\r\n * @beta\r\n */\r\nexport class FieldRun extends TextBlockComponent {\r\n /** Display string used to signal an error in computing the field's value. */\r\n public static invalidContentIndicator = \"####\";\r\n\r\n /** Discriminator field for the [[Run]] union. */\r\n public readonly type = \"field\";\r\n /** The element and BIS class containing the property described by [[propertyPath]]. */\r\n public propertyHost: FieldPropertyHost;\r\n /** Describes how to obtain the property value from [[propertyHost]]. */\r\n public propertyPath: FieldPropertyPath;\r\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]].\r\n * The specific options used depend upon the [[FieldPropertyType]].\r\n */\r\n public formatOptions?: FieldFormatOptions;\r\n private _cachedContent: string;\r\n\r\n /** The field's most recently evaluated display string. */\r\n public get cachedContent(): string {\r\n return this._cachedContent;\r\n }\r\n\r\n /** @internal Used by core-backend when re-evaluating field content. */\r\n public setCachedContent(content: string | undefined): void {\r\n this._cachedContent = content ?? FieldRun.invalidContentIndicator;\r\n }\r\n\r\n private constructor(props: FieldRunProps) {\r\n super(props);\r\n\r\n this._cachedContent = props.cachedContent ?? FieldRun.invalidContentIndicator;\r\n this.propertyHost = props.propertyHost\r\n this.propertyPath = props.propertyPath;\r\n this.formatOptions = props.formatOptions;\r\n }\r\n\r\n /** Create a FieldRun from its JSON representation. */\r\n public static create(props: Omit<FieldRunProps, \"type\">): FieldRun {\r\n return new FieldRun({\r\n ...props,\r\n propertyHost: { ...props.propertyHost },\r\n propertyPath: structuredClone(props.propertyPath),\r\n formatOptions: structuredClone(props.formatOptions),\r\n type: \"field\",\r\n });\r\n }\r\n\r\n /** Convert the FieldRun to its JSON representation. */\r\n public override toJSON(): FieldRunProps {\r\n const json: FieldRunProps = {\r\n ...super.toJSON(),\r\n type: \"field\",\r\n propertyHost: { ...this.propertyHost },\r\n propertyPath: structuredClone(this.propertyPath),\r\n };\r\n\r\n if (this.cachedContent !== FieldRun.invalidContentIndicator) {\r\n json.cachedContent = this.cachedContent;\r\n }\r\n\r\n if (this.formatOptions) {\r\n json.formatOptions = structuredClone(this.formatOptions);\r\n }\r\n\r\n return json;\r\n }\r\n\r\n /** Create a deep copy of this FieldRun. */\r\n public override clone(): FieldRun {\r\n return new FieldRun(this.toJSON());\r\n }\r\n\r\n public override get isEmpty(): boolean {\r\n return this.stringify().length === 0;\r\n }\r\n\r\n /** Convert this FieldRun to a simple string representation. */\r\n public override stringify(): string {\r\n return this.cachedContent;\r\n }\r\n\r\n /** Returns true if `this` is equivalent to `other`. */\r\n public override equals(other: TextBlockComponent): boolean {\r\n if (!(other instanceof FieldRun) || !super.equals(other)) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.propertyHost.elementId !== other.propertyHost.elementId ||\r\n this.propertyHost.className !== other.propertyHost.className ||\r\n this.propertyHost.schemaName !== other.propertyHost.schemaName\r\n ) {\r\n return false;\r\n }\r\n\r\n if (this.propertyPath.propertyName !== other.propertyPath.propertyName) {\r\n return false;\r\n }\r\n\r\n const thisAccessors = this.propertyPath.accessors ?? [];\r\n const otherAccessors = other.propertyPath.accessors ?? [];\r\n\r\n if (thisAccessors.length !== otherAccessors.length) {\r\n return false;\r\n }\r\n\r\n if (!thisAccessors.every((value, index) => value === otherAccessors[index])) {\r\n return false;\r\n }\r\n\r\n if (this.formatOptions && other.formatOptions) {\r\n // We anticipate new formatting options being added in the future.\r\n // So to account for properties we don't know about, just compare the string representations.\r\n if (JSON.stringify(this.formatOptions) !== JSON.stringify(other.formatOptions)) {\r\n return false;\r\n }\r\n } else if (this.formatOptions || other.formatOptions) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/** JSON representation of a [[Paragraph]].\r\n * @beta\r\n */\r\nexport interface ParagraphProps extends TextBlockComponentProps {\r\n children?: Array<ListProps | RunProps>;\r\n}\r\n\r\n/** A collection of [[Run]]s and [[List]]s. Paragraphs can be appended to [[List]]s and [[TextBlock]]s.\r\n * Each paragraph is laid out on a separate line. If included in a [[List]], the paragraph will be treated as a list item.\r\n * @beta\r\n */\r\nexport class Paragraph extends TextBlockComponent {\r\n public readonly type = \"paragraph\";\r\n public readonly children: Array<List | Run>;\r\n\r\n private constructor(props?: ParagraphProps) {\r\n super(props);\r\n\r\n this.children = props?.children?.map((child) =>\r\n child.type === \"list\" ? List.create(child) : Run.fromJSON(child)\r\n ) ?? [];\r\n }\r\n\r\n /** Create a paragraph from its JSON representation. */\r\n public static create(props?: Omit<ParagraphProps, \"type\">): Paragraph {\r\n return new Paragraph(props);\r\n }\r\n\r\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\r\n clearStyleOverrides(this, options);\r\n }\r\n\r\n public override get isEmpty() {\r\n return this.children.length === 0;\r\n }\r\n\r\n public override clone(): Paragraph {\r\n return new Paragraph(this.toJSON());\r\n }\r\n\r\n public override toJSON(): ParagraphProps {\r\n return {\r\n ...super.toJSON(),\r\n children: this.children.map((child) => child.toJSON()),\r\n };\r\n }\r\n\r\n /** Compute a string representation of this paragraph by concatenating the string representations of all of its children. */\r\n public override stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string {\r\n return this.children.map((x, index) => (index > 0 && x.type === \"list\") ? `${options?.paragraphBreak ?? \" \"}${x.stringify(options, context)}` : x.stringify(options, context)).join(\"\") ?? \"\";\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return (other instanceof Paragraph) && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[List]].\r\n * @beta\r\n */\r\nexport interface ListProps extends TextBlockComponentProps {\r\n readonly type: \"list\";\r\n children?: ParagraphProps[];\r\n}\r\n\r\n/** A collection of list items ([[Paragraph]]s). Lists can be appended to [[Paragraph]]s.\r\n * Lists will be laid out on a new line. Each item in a list is laid out on a separate line.\r\n * @beta\r\n */\r\nexport class List extends TextBlockComponent {\r\n public readonly type = \"list\";\r\n public readonly children: Paragraph[];\r\n\r\n protected constructor(props?: ListProps) {\r\n super(props);\r\n\r\n this.children = props?.children?.map((child) => Paragraph.create(child)) ?? [];\r\n }\r\n\r\n /** Create a list from its JSON representation. */\r\n public static create(props?: Omit<ListProps, \"type\">): List {\r\n return new List({ ...props, type: \"list\" });\r\n }\r\n\r\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\r\n clearStyleOverrides(this, options);\r\n }\r\n\r\n public override get isEmpty() {\r\n return this.children.length === 0;\r\n }\r\n\r\n public override clone(): List {\r\n return new List(this.toJSON());\r\n }\r\n\r\n public override toJSON(): ListProps {\r\n return {\r\n ...super.toJSON(),\r\n type: \"list\",\r\n children: this.children.map((run) => run.toJSON()),\r\n };\r\n }\r\n\r\n /** Compute a string representation of this list by concatenating the string representations of all of its [[children]]. */\r\n public override stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string {\r\n const children = this.children.map((x, index) => {\r\n const depth = context?.depth ?? 0;\r\n const marker = getMarkerText(this.styleOverrides.listMarker ?? TextStyleSettings.defaultProps.listMarker, index + 1);\r\n const tab = (options?.tabsAsSpaces ? \" \".repeat(options.tabsAsSpaces) : \"\\t\").repeat(depth);\r\n return `${tab}${marker}${options?.listMarkerBreak ?? \" \"}${x.stringify(options, { depth: depth + 1 })}`;\r\n });\r\n return children.join(options?.paragraphBreak ?? \" \") ?? \"\";\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n return (other instanceof List) && super.equals(other);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[TextBlock]].\r\n * @beta\r\n */\r\nexport interface TextBlockProps extends TextBlockComponentProps {\r\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\r\n * A value less than or equal to zero indicates no wrapping is to be applied.\r\n * Default: 0\r\n */\r\n width?: number;\r\n children?: ParagraphProps[];\r\n}\r\n\r\n/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content.\r\n * No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.\r\n * @see [[TextAnnotation]] to position a text block as an annotation in 2d or 3d space.\r\n * @beta\r\n */\r\nexport class TextBlock extends TextBlockComponent {\r\n public readonly children: Paragraph[];\r\n\r\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\r\n * A value less than or equal to zero indicates no wrapping is to be applied.\r\n * Default: 0\r\n */\r\n public width: number;\r\n\r\n private constructor(props: TextBlockProps) {\r\n super(props);\r\n this.width = props.width ?? 0;\r\n\r\n this.children = props?.children?.map((para) => Paragraph.create(para)) ?? [];\r\n }\r\n\r\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\r\n clearStyleOverrides(this, options);\r\n }\r\n\r\n public override toJSON(): TextBlockProps {\r\n return {\r\n ...super.toJSON(),\r\n width: this.width,\r\n children: this.children.map((x) => x.toJSON()),\r\n };\r\n }\r\n\r\n /** Create a text block from its JSON representation. */\r\n public static create(props?: Omit<TextBlockProps, \"type\">): TextBlock {\r\n return new TextBlock(props ?? {});\r\n }\r\n\r\n /** Returns true if every paragraph in this text block is empty. */\r\n public override get isEmpty(): boolean {\r\n return !this.children || this.children.every((child) => child.isEmpty);\r\n }\r\n\r\n public override clone(): TextBlock {\r\n return new TextBlock(this.toJSON());\r\n }\r\n\r\n /** Compute a string representation of the document's contents by concatenating the string representations of each of its [[children]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */\r\n public stringify(options?: TextBlockStringifyOptions): string {\r\n return this.children.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? \" \") || \"\";\r\n }\r\n\r\n /** Add and return a new paragraph.\r\n * By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.\r\n * @param seedFromLast If true and [[children]] is not empty, the new paragraph will inherit the style overrides of the last child in this block.\r\n * @note Be sure you pass in [[ParagraphProps]] and not [[Paragraph]] or style overrides will be ignored.\r\n */\r\n public appendParagraph(props?: ParagraphProps, seedFromLast = false): Paragraph {\r\n const seed = seedFromLast ? this.children[this.children.length - 1] : undefined;\r\n const styleOverrides = { ...seed?.styleOverrides, ...props?.styleOverrides };\r\n const paragraph = Paragraph.create({ ...props, styleOverrides });\r\n this.children.push(paragraph);\r\n return paragraph;\r\n }\r\n\r\n /** Append a run to the last [[Paragraph]] in this block.\r\n * If the block contains no [[children]], a new [[Paragraph]] will first be created using [[appendParagraph]].\r\n */\r\n public appendRun(run: Run): void {\r\n const paragraph = this.children[this.children.length - 1] ?? this.appendParagraph();\r\n paragraph.children.push(run);\r\n }\r\n\r\n public override equals(other: TextBlockComponent): boolean {\r\n if (!(other instanceof TextBlock)) {\r\n return false;\r\n }\r\n\r\n if (!super.equals(other)) {\r\n return false;\r\n }\r\n\r\n if (this.width !== other.width) {\r\n return false;\r\n }\r\n\r\n if (this.children && other.children) {\r\n if (this.children.length !== other.children.length) {\r\n return false;\r\n }\r\n\r\n return this.children.every((child, index) => other.children && child.equals(other.children[index]));\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * A union of all the [[TextBlockComponent]]s that can contain other components.\r\n * @beta\r\n */\r\nexport type StructuralTextBlockComponent = List | Paragraph | TextBlock;\r\n\r\n/**\r\n * Recursively traverses a [[StructuralTextBlockComponent]] tree, yielding each child component along with its parent container.\r\n * This generator enables depth-first iteration over all components in a text block structure, including paragraphs, lists, and runs.\r\n *\r\n * @param parent The root container whose children should be traversed.\r\n * @returns An IterableIterator yielding objects with the child component and its parent container.\r\n * @beta\r\n */\r\nexport function* traverseTextBlockComponent(parent: StructuralTextBlockComponent): IterableIterator<{ parent: StructuralTextBlockComponent, child: List | Paragraph | Run }> {\r\n for (const child of parent.children) {\r\n yield { parent, child };\r\n if (child.type === \"list\" || child.type === \"paragraph\") {\r\n yield* traverseTextBlockComponent(child);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Returns the formatted marker text for a list item based on the marker type and item number.\r\n * Supports ordered and unordered list markers, including alphabetic, Roman numeral, and numeric formats.\r\n * @param marker The type of list marker to use.\r\n * @param num The item number in the list.\r\n * @returns The formatted marker string for the list item.\r\n * @beta\r\n */\r\nexport function getMarkerText(marker: ListMarker, num: number): string {\r\n let markerString = \"\";\r\n\r\n switch (marker.enumerator) {\r\n case undefined:\r\n case ListMarkerEnumerator.Number:\r\n markerString = `${num}`;\r\n break;\r\n case ListMarkerEnumerator.Letter:\r\n markerString = integerToAlpha(num);\r\n break;\r\n case ListMarkerEnumerator.RomanNumeral:\r\n markerString = integerToRoman(num);\r\n break;\r\n default:\r\n markerString = marker.enumerator;\r\n break;\r\n }\r\n\r\n if (marker.case) {\r\n markerString = marker.case === \"upper\" ? markerString.toUpperCase() : markerString.toLowerCase();\r\n }\r\n\r\n const terminator = marker.terminator === \"period\" ? \".\" : marker.terminator === \"parenthesis\" ? \")\" : \"\";\r\n\r\n return `${markerString}${terminator}`;\r\n}\r\n\r\n/**\r\n * Converts an integer to its Roman numeral representation.\r\n * Supports numbers from 1 and above.\r\n * @param num The integer to convert.\r\n * @returns The Roman numeral string.\r\n */\r\nfunction integerToRoman(num: number): string {\r\n const values =\r\n [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\r\n const symbols =\r\n ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];\r\n let roman = '';\r\n for (let i = 0; i < values.length; i++) {\r\n while (num >= values[i]) {\r\n roman += symbols[i];\r\n num -= values[i];\r\n }\r\n }\r\n\r\n return roman;\r\n}\r\n\r\n/**\r\n * Converts an integer to its alphabetic representation (A-Z, AA-ZZ, etc.).\r\n * Used for ordered list markers with alphabetic styles.\r\n * @param num The integer to convert (1-based).\r\n * @returns The alphabetic string for the given number.\r\n */\r\nfunction integerToAlpha(num: number): string {\r\n const letterOffset = (num - 1) % 26;\r\n const letter = String.fromCharCode(65 + letterOffset);\r\n const depth = Math.ceil(num / 26);\r\n return letter.repeat(depth);\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlockGeometryProps.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockGeometryProps.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 Annotation\n */\n\nimport { XYZProps } from \"@itwin/core-geometry\";\nimport { TextStringProps } from \"../geometry/TextString\";\nimport { TextStyleColor } from \"./TextStyle\";\n\n/**\n * A single entry in a [[TextBlockGeometryProps]], representing one of the following primitive types:\n * - A [[TextString]],\n * - A fraction separator described by a [LineSegment3d]($geometry), or\n * - A change in color, to be applied to all subsequent primitives.\n * @beta\n */\nexport type TextBlockGeometryPropsEntry = {\n text: TextStringProps;\n separator?: never;\n color?: never;\n} | {\n text?: never;\n separator: {\n startPoint: XYZProps;\n endPoint: XYZProps;\n };\n color?: never;\n} | {\n text?: never;\n separator?: never;\n color: TextStyleColor;\n};\n\n/**\n * JSON representation of the geometric primitives that can be used to display a [[TextBlock]].\n * @see [appendTextAnnotationGeometry]($backend) to convert an annotation to its geometric representation.\n * @see [[GeometryStreamBuilder.appendTextBlock]] to add a block of text to a [GeometryStream]($docs/learning/common/GeometryStream.md).\n * @beta\n */\nexport interface TextBlockGeometryProps {\n /** The set of geometric primitives representing the contents of the [[TextBlock]]. */\n entries: TextBlockGeometryPropsEntry[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextBlockGeometryProps.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockGeometryProps.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 Annotation\r\n */\r\n\r\nimport { XYZProps } from \"@itwin/core-geometry\";\r\nimport { TextStringProps } from \"../geometry/TextString\";\r\nimport { TextStyleColor } from \"./TextStyle\";\r\n\r\n/**\r\n * A single entry in a [[TextBlockGeometryProps]], representing one of the following primitive types:\r\n * - A [[TextString]],\r\n * - A fraction separator described by a [LineSegment3d]($geometry), or\r\n * - A change in color, to be applied to all subsequent primitives.\r\n * @beta\r\n */\r\nexport type TextBlockGeometryPropsEntry = {\r\n text: TextStringProps;\r\n separator?: never;\r\n color?: never;\r\n} | {\r\n text?: never;\r\n separator: {\r\n startPoint: XYZProps;\r\n endPoint: XYZProps;\r\n };\r\n color?: never;\r\n} | {\r\n text?: never;\r\n separator?: never;\r\n color: TextStyleColor;\r\n};\r\n\r\n/**\r\n * JSON representation of the geometric primitives that can be used to display a [[TextBlock]].\r\n * @see [appendTextAnnotationGeometry]($backend) to convert an annotation to its geometric representation.\r\n * @see [[GeometryStreamBuilder.appendTextBlock]] to add a block of text to a [GeometryStream]($docs/learning/common/GeometryStream.md).\r\n * @beta\r\n */\r\nexport interface TextBlockGeometryProps {\r\n /** The set of geometric primitives representing the contents of the [[TextBlock]]. */\r\n entries: TextBlockGeometryPropsEntry[];\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlockLayoutResult.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockLayoutResult.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 Annotation\n */\n\nimport { Range2dProps, XAndY } from \"@itwin/core-geometry\";\nimport { FontId } from \"../Fonts\";\nimport { TextStyleSettingsProps } from \"./TextStyle\";\n\n/**\n * Represents a single run in a [[LineLayoutResult]].\n * @note Get the text content of the RunLayoutResult using a combination of the `sourceRunIndex`, `characterOffset`, and `characterCount`.\n * @beta\n */\nexport interface RunLayoutResult {\n /** The ID of the font for the run. */\n fontId: FontId;\n /**\n * The number of characters from the source [[Run]] that have already appeared in the layout.\n * @note A single source [[TextRun]] can be split into multiple lines to respect the [[TextBlock.width]].\n */\n characterOffset: number;\n /** The number of characters in the RunLayoutResult. */\n characterCount: number;\n /** The offset of the RunLayoutResult from the top and left of the [[LineLayoutResult]] */\n offsetFromLine: XAndY;\n /** Bounding box enclosing this RunLayoutResult's content. */\n range: Range2dProps;\n /** The resolved [[TextStyleSettings]] for the run. Takes into account overrides and styles on the parent classes. */\n textStyle: TextStyleSettingsProps;\n /** Bounding box used when justifying the run. This may be smaller than [[range]]. */\n justificationRange?: Range2dProps;\n /** The range containing the contents of the [[FractionRun]]'s numerator. */\n numeratorRange?: Range2dProps;\n /** The range containing the contents of the [[FractionRun]]'s denominator. */\n denominatorRange?: Range2dProps;\n}\n\n/**\n * Represents a single line in a [[TextBlockLayoutResult]].\n * @beta\n */\nexport interface LineLayoutResult {\n /** The runs contained in the line. */\n runs: RunLayoutResult[];\n /** The marker run for the line, if any */\n marker: RunLayoutResult | undefined;\n /** The range of all the runs (including the marker) contained in the line. */\n range: Range2dProps;\n /** Bounding box used when justifying the line. This may be smaller than [[range]]. */\n justificationRange: Range2dProps;\n /** The offset of the line from the top and left of the [[TextBlock]]. */\n offsetFromDocument: XAndY;\n}\n\n/**\n * Represents the result of laying out a [[TextBlock]]'s contents into a series of lines containing runs.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n * @beta\n */\nexport interface TextBlockLayoutResult {\n /** The laid out lines of a [[TextBlock]]. */\n lines: LineLayoutResult[];\n /** The range containing the contents of a [[TextBlock]]. */\n range: Range2dProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextBlockLayoutResult.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockLayoutResult.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 Annotation\r\n */\r\n\r\nimport { Range2dProps, XAndY } from \"@itwin/core-geometry\";\r\nimport { FontId } from \"../Fonts\";\r\nimport { TextStyleSettingsProps } from \"./TextStyle\";\r\n\r\n/**\r\n * Represents a single run in a [[LineLayoutResult]].\r\n * @note Get the text content of the RunLayoutResult using a combination of the `sourceRunIndex`, `characterOffset`, and `characterCount`.\r\n * @beta\r\n */\r\nexport interface RunLayoutResult {\r\n /** The ID of the font for the run. */\r\n fontId: FontId;\r\n /**\r\n * The number of characters from the source [[Run]] that have already appeared in the layout.\r\n * @note A single source [[TextRun]] can be split into multiple lines to respect the [[TextBlock.width]].\r\n */\r\n characterOffset: number;\r\n /** The number of characters in the RunLayoutResult. */\r\n characterCount: number;\r\n /** The offset of the RunLayoutResult from the top and left of the [[LineLayoutResult]] */\r\n offsetFromLine: XAndY;\r\n /** Bounding box enclosing this RunLayoutResult's content. */\r\n range: Range2dProps;\r\n /** The resolved [[TextStyleSettings]] for the run. Takes into account overrides and styles on the parent classes. */\r\n textStyle: TextStyleSettingsProps;\r\n /** Bounding box used when justifying the run. This may be smaller than [[range]]. */\r\n justificationRange?: Range2dProps;\r\n /** The range containing the contents of the [[FractionRun]]'s numerator. */\r\n numeratorRange?: Range2dProps;\r\n /** The range containing the contents of the [[FractionRun]]'s denominator. */\r\n denominatorRange?: Range2dProps;\r\n}\r\n\r\n/**\r\n * Represents a single line in a [[TextBlockLayoutResult]].\r\n * @beta\r\n */\r\nexport interface LineLayoutResult {\r\n /** The runs contained in the line. */\r\n runs: RunLayoutResult[];\r\n /** The marker run for the line, if any */\r\n marker: RunLayoutResult | undefined;\r\n /** The range of all the runs (including the marker) contained in the line. */\r\n range: Range2dProps;\r\n /** Bounding box used when justifying the line. This may be smaller than [[range]]. */\r\n justificationRange: Range2dProps;\r\n /** The offset of the line from the top and left of the [[TextBlock]]. */\r\n offsetFromDocument: XAndY;\r\n}\r\n\r\n/**\r\n * Represents the result of laying out a [[TextBlock]]'s contents into a series of lines containing runs.\r\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\r\n * @beta\r\n */\r\nexport interface TextBlockLayoutResult {\r\n /** The laid out lines of a [[TextBlock]]. */\r\n lines: LineLayoutResult[];\r\n /** The range containing the contents of a [[TextBlock]]. */\r\n range: Range2dProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../src/annotation/TextField.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 Annotation\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\n\n/** Enumerates the different kinds of [Property]($ecschema-metadata) values that can be used as the basis for a [[FieldRun]]'s display string.\n * A field's property type is derived from the property's [PrimitiveType]($ecschema-metadata) and other attributes like its [PrimitiveOrEnumPropertyBase.extendedTypeName]($ecschema-metadata).\n * The conversion of the raw property value into a display string can be customized by different [[FieldFormatOptions]] based on its type.\n * The following types are currently recognized:\n * - \"quantity\": an often-unitized scalar value like a distance or area, formatted using a quantity [Format]($core-quantity).\n * - \"coordinate\": a 2- or 3-dimensional point, with each component formatted as a \"quantity\".\n * - \"boolean\": a true or false value.\n * - \"datetime\": an ECMAScript [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).\n * - \"int-enum\": an integer [EnumerationProperty]($ecschema-metadata) formatted using the enum value's display label.\n * - \"string-enum\": a string [EnumerationProperty]($ecschema-metadata) formatted using the enum value's display label.\n * - \"string\": a value convertible to a string.\n * @note Currently, only formatting of \"string\" and \"datetime\" types is implemented. Other types are converted to and formatted as \"string\".\n * @beta\n */\nexport type FieldPropertyType = \"quantity\" | \"coordinate\" | \"string\" | \"boolean\" | \"datetime\" | \"int-enum\" | \"string-enum\";\n\n/** A chain of property accesses that resolves to a primitive value that forms the basis of the displayed content\n * of a [[FieldRun]].\n * The simplest property paths consist of a [[propertyName]] and nothing else, where `propertyName` identifies\n * a primitive property.\n * If `propertyName` identifies a struct or array property, then additional [[accessors]] are required to identify the specific value.\n * Some examples:\n * ```\n * | Access String | propertyName | accessors |\n * | ------------- | ------------ | --------- |\n * | name | \"name\" | undefined |\n * | spouse.name | \"spouse\" | [name] |\n * | colors[2] | \"colors\" | [2] |\n * | spouse.favoriteRestaurants[1].address | \"spouse\" | [\"favoriteRestaurants\", 1, \"address\"] |\n * ```\n * @beta\n */\nexport interface FieldPropertyPath {\n /** The name of the BIS property of the [[FieldPropertyHost]] that serves as the root of the path. */\n propertyName: string;\n /** Property names and/or array indices describing the path from [[propertyName]] to the ultimate BIS property. */\n accessors?: Array<string | number>;\n}\n\n/** Describes the source of the property value against which a [[FieldPropertyPath]] is evaluated.\n * A field property is always hosted by an [Element]($backend). It may be a property of the element's BIS class itself,\n * or that of one of its [ElementAspect]($backend)s.\n * The [[schemaName]] and [[className]] should always identify the exact class that contains [[FieldPropertyPath.propertyName]] - not a subclass thereof.\n * @beta\n */\nexport interface FieldPropertyHost {\n /** The Id of the [Element]($backend) that hosts the property. */\n elementId: Id64String;\n /** The name of the schema containing the class identified by [[className]]. */\n schemaName: string;\n /** The name of the exact class (not a subclass) containing the property identified by [[FieldPropertyPath.propertyName]]. */\n className: string;\n}\n\n/** As part of [[FieldFormatOptions]], specifies how to modify the case of the display string.\n * \"as-is\" leaves it unmodified. \"upper\" and \"lower\" convert it to all upper-case or all lower-case, respectively.\n * @beta\n */\nexport type FieldCase = \"as-is\" | \"upper\" | \"lower\";\n\n/** As part of a [[FieldFormatOptions]], specifies how to format properties of [[FieldPropertyType]] \"datetime\".\n * @beta\n */\nexport interface DateTimeFieldFormatOptions {\n /** The locale with which to localize the display string.\n * Default: \"en-US\".\n */\n locale?: Intl.UnicodeBCP47LocaleIdentifier;\n /** Describes how to produce the display string. */\n formatOptions?: Intl.DateTimeFormatOptions;\n}\n\n/** Customizes how to format the raw property value resolved by a [[FieldPropertyPath]] into a [[FieldRun]]'s display string.\n * The exact options used depend upon the [[FieldPropertyType]].\n * @beta\n */\nexport interface FieldFormatOptions {\n /** A string inserted before the formatted string. This string is not affected by [[case]]. */\n prefix?: string;\n /** A string inserted after the formatted string. This string is not affected by [[case]]. */\n suffix?: string;\n /** Modifies the case of the formatted string. */\n case?: FieldCase;\n /** Formatting options for [[FieldPropertyType]] \"datetime\". */\n dateTime?: DateTimeFieldFormatOptions;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../src/annotation/TextField.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 Annotation\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\n\r\n/** Enumerates the different kinds of [Property]($ecschema-metadata) values that can be used as the basis for a [[FieldRun]]'s display string.\r\n * A field's property type is derived from the property's [PrimitiveType]($ecschema-metadata) and other attributes like its [PrimitiveOrEnumPropertyBase.extendedTypeName]($ecschema-metadata).\r\n * The conversion of the raw property value into a display string can be customized by different [[FieldFormatOptions]] based on its type.\r\n * The following types are currently recognized:\r\n * - \"quantity\": an often-unitized scalar value like a distance or area, formatted using a quantity [Format]($core-quantity).\r\n * - \"coordinate\": a 2- or 3-dimensional point, with each component formatted as a \"quantity\".\r\n * - \"boolean\": a true or false value.\r\n * - \"datetime\": an ECMAScript [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).\r\n * - \"int-enum\": an integer [EnumerationProperty]($ecschema-metadata) formatted using the enum value's display label.\r\n * - \"string-enum\": a string [EnumerationProperty]($ecschema-metadata) formatted using the enum value's display label.\r\n * - \"string\": a value convertible to a string.\r\n * @note Currently, only formatting of \"string\" and \"datetime\" types is implemented. Other types are converted to and formatted as \"string\".\r\n * @beta\r\n */\r\nexport type FieldPropertyType = \"quantity\" | \"coordinate\" | \"string\" | \"boolean\" | \"datetime\" | \"int-enum\" | \"string-enum\";\r\n\r\n/** A chain of property accesses that resolves to a primitive value that forms the basis of the displayed content\r\n * of a [[FieldRun]].\r\n * The simplest property paths consist of a [[propertyName]] and nothing else, where `propertyName` identifies\r\n * a primitive property.\r\n * If `propertyName` identifies a struct or array property, then additional [[accessors]] are required to identify the specific value.\r\n * Some examples:\r\n * ```\r\n * | Access String | propertyName | accessors |\r\n * | ------------- | ------------ | --------- |\r\n * | name | \"name\" | undefined |\r\n * | spouse.name | \"spouse\" | [name] |\r\n * | colors[2] | \"colors\" | [2] |\r\n * | spouse.favoriteRestaurants[1].address | \"spouse\" | [\"favoriteRestaurants\", 1, \"address\"] |\r\n * ```\r\n * @beta\r\n */\r\nexport interface FieldPropertyPath {\r\n /** The name of the BIS property of the [[FieldPropertyHost]] that serves as the root of the path. */\r\n propertyName: string;\r\n /** Property names and/or array indices describing the path from [[propertyName]] to the ultimate BIS property. */\r\n accessors?: Array<string | number>;\r\n}\r\n\r\n/** Describes the source of the property value against which a [[FieldPropertyPath]] is evaluated.\r\n * A field property is always hosted by an [Element]($backend). It may be a property of the element's BIS class itself,\r\n * or that of one of its [ElementAspect]($backend)s.\r\n * The [[schemaName]] and [[className]] should always identify the exact class that contains [[FieldPropertyPath.propertyName]] - not a subclass thereof.\r\n * @beta\r\n */\r\nexport interface FieldPropertyHost {\r\n /** The Id of the [Element]($backend) that hosts the property. */\r\n elementId: Id64String;\r\n /** The name of the schema containing the class identified by [[className]]. */\r\n schemaName: string;\r\n /** The name of the exact class (not a subclass) containing the property identified by [[FieldPropertyPath.propertyName]]. */\r\n className: string;\r\n}\r\n\r\n/** As part of [[FieldFormatOptions]], specifies how to modify the case of the display string.\r\n * \"as-is\" leaves it unmodified. \"upper\" and \"lower\" convert it to all upper-case or all lower-case, respectively.\r\n * @beta\r\n */\r\nexport type FieldCase = \"as-is\" | \"upper\" | \"lower\";\r\n\r\n/** As part of a [[FieldFormatOptions]], specifies how to format properties of [[FieldPropertyType]] \"datetime\".\r\n * @beta\r\n */\r\nexport interface DateTimeFieldFormatOptions {\r\n /** The locale with which to localize the display string.\r\n * Default: \"en-US\".\r\n */\r\n locale?: Intl.UnicodeBCP47LocaleIdentifier;\r\n /** Describes how to produce the display string. */\r\n formatOptions?: Intl.DateTimeFormatOptions;\r\n}\r\n\r\n/** Customizes how to format the raw property value resolved by a [[FieldPropertyPath]] into a [[FieldRun]]'s display string.\r\n * The exact options used depend upon the [[FieldPropertyType]].\r\n * @beta\r\n */\r\nexport interface FieldFormatOptions {\r\n /** A string inserted before the formatted string. This string is not affected by [[case]]. */\r\n prefix?: string;\r\n /** A string inserted after the formatted string. This string is not affected by [[case]]. */\r\n suffix?: string;\r\n /** Modifies the case of the formatted string. */\r\n case?: FieldCase;\r\n /** Formatting options for [[FieldPropertyType]] \"datetime\". */\r\n dateTime?: DateTimeFieldFormatOptions;\r\n}\r\n"]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { DeepReadonlyObject, DeepRequiredObject } from "@itwin/core-bentley";
|
|
5
5
|
import { ColorDefProps } from "../ColorDef";
|
|
6
|
+
import { FontFamilySelector } from "../Fonts";
|
|
6
7
|
/** Predefined markers for list items in text annotations.
|
|
7
8
|
* These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.
|
|
8
9
|
* @beta
|
|
@@ -44,6 +45,24 @@ export type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];
|
|
|
44
45
|
* @beta
|
|
45
46
|
*/
|
|
46
47
|
export type TextAnnotationFillColor = TextStyleColor | "background" | "none";
|
|
48
|
+
/** Describes the margins around the content inside a [[TextBlock]], measured in meters.
|
|
49
|
+
* All margins default to zero if `undefined`.
|
|
50
|
+
* @beta
|
|
51
|
+
*/
|
|
52
|
+
export interface TextBlockMargins {
|
|
53
|
+
/** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
|
|
54
|
+
left?: number;
|
|
55
|
+
/** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
|
|
56
|
+
right?: number;
|
|
57
|
+
/** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
|
|
58
|
+
top?: number;
|
|
59
|
+
/** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
|
|
60
|
+
bottom?: number;
|
|
61
|
+
}
|
|
62
|
+
/** Describes the relative alignment of text.
|
|
63
|
+
* @beta
|
|
64
|
+
*/
|
|
65
|
+
export type TextJustification = "left" | "center" | "right";
|
|
47
66
|
/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.
|
|
48
67
|
* @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].
|
|
49
68
|
* @beta
|
|
@@ -65,9 +84,9 @@ export interface TextFrameStyleProps {
|
|
|
65
84
|
/** Shape of the frame. Default: "none" */
|
|
66
85
|
shape?: TextAnnotationFrameShape;
|
|
67
86
|
/** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: "none" */
|
|
68
|
-
|
|
87
|
+
fillColor?: TextAnnotationFillColor;
|
|
69
88
|
/** The color of the text frame's outline. Default: black */
|
|
70
|
-
|
|
89
|
+
borderColor?: TextStyleColor;
|
|
71
90
|
/** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */
|
|
72
91
|
borderWeight?: number;
|
|
73
92
|
}
|
|
@@ -86,17 +105,17 @@ export interface TextLeaderStyleProps {
|
|
|
86
105
|
*/
|
|
87
106
|
wantElbow?: boolean;
|
|
88
107
|
/** Multiplier used to compute length of the elbow in the leader.
|
|
89
|
-
* The elbowLength is computed in meters as elbowLength * [[
|
|
108
|
+
* The elbowLength is computed in meters as elbowLength * [[textHeight]].
|
|
90
109
|
* Default: 1.0
|
|
91
110
|
*/
|
|
92
111
|
elbowLength?: number;
|
|
93
112
|
/** Multiplier to compute height of the leader terminator.
|
|
94
|
-
* The terminator height is computed in meters as terminatorHeight * [[
|
|
113
|
+
* The terminator height is computed in meters as terminatorHeight * [[textHeight]].
|
|
95
114
|
* Default: 1.0
|
|
96
115
|
*/
|
|
97
116
|
terminatorHeightFactor?: number;
|
|
98
117
|
/** Multiplier to compute width of the leader terminator.
|
|
99
|
-
* The terminator width is computed in meters as terminatorWidth * [[
|
|
118
|
+
* The terminator width is computed in meters as terminatorWidth * [[textHeight]].
|
|
100
119
|
* Default: 1.0
|
|
101
120
|
*/
|
|
102
121
|
terminatorWidthFactor?: number;
|
|
@@ -109,22 +128,22 @@ export interface TextStyleSettingsProps {
|
|
|
109
128
|
* Default: "subcategory".
|
|
110
129
|
*/
|
|
111
130
|
color?: TextStyleColor;
|
|
112
|
-
/** The
|
|
113
|
-
* Default: "" (an invalid font name).
|
|
131
|
+
/** The font stored in an iModel, used to draw the contents of a [[TextRun]].
|
|
132
|
+
* Default: { name: "" } (an invalid font name).
|
|
114
133
|
*/
|
|
115
|
-
|
|
116
|
-
/** The height
|
|
117
|
-
* For example, the height and offset from baseline of a subscript [[TextRun]] are computed as
|
|
118
|
-
*
|
|
134
|
+
font?: FontFamilySelector;
|
|
135
|
+
/** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.
|
|
136
|
+
* For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and
|
|
137
|
+
* textHeight * [[subScriptOffsetFactor]], respectively.
|
|
119
138
|
* Default: 1.0. */
|
|
120
|
-
|
|
139
|
+
textHeight?: number;
|
|
121
140
|
/** Multiplier used to compute the vertical distance between two lines of text.
|
|
122
|
-
* The distance is computed in meters as lineSpacingFactor * [[
|
|
141
|
+
* The distance is computed in meters as lineSpacingFactor * [[textHeight]].
|
|
123
142
|
* Default: 0.5.
|
|
124
143
|
*/
|
|
125
144
|
lineSpacingFactor?: number;
|
|
126
145
|
/** Multiplier used to compute the vertical distance between two paragraphs of text.
|
|
127
|
-
* The distance is computed in meters as paragraphSpacingFactor * [[
|
|
146
|
+
* The distance is computed in meters as paragraphSpacingFactor * [[textHeight]].
|
|
128
147
|
* Default: 0.5.
|
|
129
148
|
*/
|
|
130
149
|
paragraphSpacingFactor?: number;
|
|
@@ -141,7 +160,7 @@ export interface TextStyleSettingsProps {
|
|
|
141
160
|
*/
|
|
142
161
|
isUnderlined?: boolean;
|
|
143
162
|
/** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].
|
|
144
|
-
* The height is computed in meters as stackedFractionScale * [[
|
|
163
|
+
* The height is computed in meters as stackedFractionScale * [[textHeight]].
|
|
145
164
|
* Default: 0.7.
|
|
146
165
|
*/
|
|
147
166
|
stackedFractionScale?: number;
|
|
@@ -150,22 +169,22 @@ export interface TextStyleSettingsProps {
|
|
|
150
169
|
*/
|
|
151
170
|
stackedFractionType?: StackedFractionType;
|
|
152
171
|
/** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].
|
|
153
|
-
* The offset is computed in meters as subScriptOffsetFactor * [[
|
|
172
|
+
* The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].
|
|
154
173
|
* Default: -0.15.
|
|
155
174
|
*/
|
|
156
175
|
subScriptOffsetFactor?: number;
|
|
157
176
|
/** Multiplier used to compute the height of a subscript [[TextRun]].
|
|
158
|
-
* The height is computed as subScriptScale * [[
|
|
177
|
+
* The height is computed as subScriptScale * [[textHeight]].
|
|
159
178
|
* Default: 2/3
|
|
160
179
|
*/
|
|
161
180
|
subScriptScale?: number;
|
|
162
181
|
/** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].
|
|
163
|
-
* The offset is computed in meters as superScriptOffsetFactor * [[
|
|
182
|
+
* The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].
|
|
164
183
|
* Default: -0.5.
|
|
165
184
|
*/
|
|
166
185
|
superScriptOffsetFactor?: number;
|
|
167
186
|
/** Multiplier used to compute the height of a superscript [[TextRun]].
|
|
168
|
-
* The height is computed as superScriptScale * [[
|
|
187
|
+
* The height is computed as superScriptScale * [[textHeight]].
|
|
169
188
|
* Default: 2/3
|
|
170
189
|
*/
|
|
171
190
|
superScriptScale?: number;
|
|
@@ -192,6 +211,9 @@ export interface TextStyleSettingsProps {
|
|
|
192
211
|
* Default: {shape: "none", fill: "none", border: black, borderWeight: 1} for no frame.
|
|
193
212
|
*/
|
|
194
213
|
frame?: TextFrameStyleProps;
|
|
214
|
+
/** The margins to surround the document content.
|
|
215
|
+
* Default: 0 margins on all sides */
|
|
216
|
+
margins?: TextBlockMargins;
|
|
195
217
|
/** The offset (in meters) from the left edge of the text block to the start of the line of text.
|
|
196
218
|
* In lists, the indentation is added to offset of list items.
|
|
197
219
|
* The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
|
|
@@ -203,6 +225,9 @@ export interface TextStyleSettingsProps {
|
|
|
203
225
|
* Default: "1.".
|
|
204
226
|
*/
|
|
205
227
|
listMarker?: ListMarker;
|
|
228
|
+
/** The alignment of the text content.
|
|
229
|
+
* Default: "left". */
|
|
230
|
+
justification?: TextJustification;
|
|
206
231
|
}
|
|
207
232
|
/** A description of the formatting to be applied to a [[TextBlockComponent]].
|
|
208
233
|
* Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.
|
|
@@ -213,20 +238,20 @@ export interface TextStyleSettingsProps {
|
|
|
213
238
|
export declare class TextStyleSettings {
|
|
214
239
|
/** The color of the text. */
|
|
215
240
|
readonly color: TextStyleColor;
|
|
216
|
-
/** The
|
|
241
|
+
/** The font stored in an iModel, used to draw the contents of a [[TextRun]].
|
|
217
242
|
*/
|
|
218
|
-
readonly
|
|
219
|
-
/** The height
|
|
220
|
-
* For example, the height and offset from baseline of a subscript [[TextRun]] are computed as
|
|
221
|
-
*
|
|
243
|
+
readonly font: Readonly<Required<FontFamilySelector>>;
|
|
244
|
+
/** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.
|
|
245
|
+
* For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and
|
|
246
|
+
* textHeight * [[subScriptOffsetFactor]], respectively.
|
|
222
247
|
*/
|
|
223
|
-
readonly
|
|
248
|
+
readonly textHeight: number;
|
|
224
249
|
/** Multiplier used to compute the vertical distance between two lines of text.
|
|
225
|
-
* The distance is computed in meters as lineSpacingFactor * [[
|
|
250
|
+
* The distance is computed in meters as lineSpacingFactor * [[textHeight]] of the [[TextBlock]].
|
|
226
251
|
*/
|
|
227
252
|
readonly lineSpacingFactor: number;
|
|
228
253
|
/** Multiplier used to compute the vertical distance between two paragraphs of text.
|
|
229
|
-
* The distance is computed in meters as paragraphSpacingFactor * [[
|
|
254
|
+
* The distance is computed in meters as paragraphSpacingFactor * the [[TextBlock]]'s [[textHeight]].
|
|
230
255
|
*/
|
|
231
256
|
readonly paragraphSpacingFactor: number;
|
|
232
257
|
/** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */
|
|
@@ -236,28 +261,28 @@ export declare class TextStyleSettings {
|
|
|
236
261
|
/** Specifies whether the content of a [[TextRun]] should be underlined. */
|
|
237
262
|
readonly isUnderlined: boolean;
|
|
238
263
|
/** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].
|
|
239
|
-
* The height is computed in meters as stackedFractionScale * [[
|
|
264
|
+
* The height is computed in meters as stackedFractionScale * [[textHeight]].
|
|
240
265
|
*/
|
|
241
266
|
readonly stackedFractionScale: number;
|
|
242
267
|
/** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */
|
|
243
268
|
readonly stackedFractionType: StackedFractionType;
|
|
244
269
|
/** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].
|
|
245
|
-
* The offset is computed in meters as subScriptOffsetFactor * [[
|
|
270
|
+
* The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].
|
|
246
271
|
*/
|
|
247
272
|
readonly subScriptOffsetFactor: number;
|
|
248
273
|
/** Multiplier used to compute the height of a subscript [[TextRun]].
|
|
249
|
-
* The height is computed as subScriptScale * [[
|
|
274
|
+
* The height is computed as subScriptScale * [[textHeight]].
|
|
250
275
|
*/
|
|
251
276
|
readonly subScriptScale: number;
|
|
252
277
|
/** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].
|
|
253
|
-
* The offset is computed in meters as superScriptOffsetFactor * [[
|
|
278
|
+
* The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].
|
|
254
279
|
*/
|
|
255
280
|
readonly superScriptOffsetFactor: number;
|
|
256
281
|
/** Multiplier used to compute the height of a superscript [[TextRun]].
|
|
257
|
-
* The height is computed as superScriptScale * [[
|
|
282
|
+
* The height is computed as superScriptScale * [[textHeight]].
|
|
258
283
|
*/
|
|
259
284
|
readonly superScriptScale: number;
|
|
260
|
-
/** Multiplier used to compute the width of each glyph, relative to [[
|
|
285
|
+
/** Multiplier used to compute the width of each glyph, relative to [[textHeight]]. */
|
|
261
286
|
readonly widthFactor: number;
|
|
262
287
|
/** Properties describing appearance of leaders in a [[TextAnnotation]].
|
|
263
288
|
* Used when producing geometry for [[TextAnnotation]].
|
|
@@ -282,15 +307,17 @@ export declare class TextStyleSettings {
|
|
|
282
307
|
readonly listMarker: ListMarker;
|
|
283
308
|
/** The frame settings of the [[TextAnnotation]]. */
|
|
284
309
|
readonly frame: Readonly<Required<TextFrameStyleProps>>;
|
|
285
|
-
/**
|
|
310
|
+
/** The margins to surround the document content. */
|
|
311
|
+
readonly margins: Readonly<Required<TextBlockMargins>>;
|
|
312
|
+
/** The alignment of the text content. */
|
|
313
|
+
readonly justification: TextJustification;
|
|
314
|
+
/** A fully-populated JSON representation of the default settings. A real `font` must be provided before use. */
|
|
286
315
|
static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>>;
|
|
287
316
|
/** Settings initialized to all default values. */
|
|
288
317
|
static defaults: TextStyleSettings;
|
|
289
318
|
private constructor();
|
|
290
319
|
/** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */
|
|
291
320
|
clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings;
|
|
292
|
-
/** Creates a deep copy of the `TextStyleSettingsProps`. */
|
|
293
|
-
static cloneProps(props: TextStyleSettingsProps): TextStyleSettingsProps;
|
|
294
321
|
/** Create settings from their JSON representation. */
|
|
295
322
|
static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings;
|
|
296
323
|
toJSON(): TextStyleSettingsProps;
|
|
@@ -300,6 +327,7 @@ export declare class TextStyleSettings {
|
|
|
300
327
|
*/
|
|
301
328
|
leaderEquals(other: TextLeaderStyleProps): boolean;
|
|
302
329
|
frameEquals(other: TextFrameStyleProps): boolean;
|
|
330
|
+
marginsEqual(other: TextBlockMargins): boolean;
|
|
303
331
|
equals(other: TextStyleSettings): boolean;
|
|
304
332
|
/**
|
|
305
333
|
* Returns a list of validation errors for this instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextStyle.d.ts","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAY,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"TextStyle.d.ts","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAY,aAAa,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAY,MAAM,UAAU,CAAC;AAExD;;;GAGG;AACH,oBAAY,oBAAoB;IAC9B,uBAAuB;IACvB,MAAM,MAAM;IACZ,YAAY,MAAM;IAClB,MAAM,MAAM;IACZ,MAAM,WAAM;IACZ,MAAM,WAAM;IACZ,MAAM,WAAM;IACZ,cAAc;IACd,IAAI,WAAM;CACX;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,6GAA6G;IAC7G,UAAU,EAAE,oBAAoB,GAAG,MAAM,CAAC;IAC1C,gDAAgD;IAChD,UAAU,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC;IACtC,oJAAoJ;IACpJ,IA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