@itwin/core-backend 5.1.0-dev.9 → 5.1.1
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 +160 -1
- package/lib/cjs/BackendHubAccess.d.ts +1 -1
- package/lib/cjs/BackendHubAccess.js +1 -1
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
- package/lib/cjs/BisCoreSchema.js +4 -2
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts +10 -2
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +16 -0
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CatalogDb.js.map +1 -1
- package/lib/cjs/Category.d.ts +4 -4
- package/lib/cjs/Category.js +4 -4
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +2 -2
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
- package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +490 -275
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.d.ts +9 -1
- package/lib/cjs/ClassRegistry.d.ts.map +1 -1
- package/lib/cjs/ClassRegistry.js +14 -6
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.js +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/CodeSpecs.d.ts +1 -1
- package/lib/cjs/CodeSpecs.js +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +4 -4
- package/lib/cjs/DisplayStyle.js +3 -3
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +4 -4
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +4 -4
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.d.ts +15 -6
- package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
- package/lib/cjs/ECSqlStatement.js +19 -4
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.d.ts +54 -51
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +67 -52
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +8 -8
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +8 -8
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementGraphics.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/Entity.d.ts +10 -7
- package/lib/cjs/Entity.d.ts.map +1 -1
- package/lib/cjs/Entity.js +35 -13
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/EntityReferences.js.map +1 -1
- package/lib/cjs/ExportGraphics.d.ts +54 -8
- package/lib/cjs/ExportGraphics.d.ts.map +1 -1
- package/lib/cjs/ExportGraphics.js +158 -59
- package/lib/cjs/ExportGraphics.js.map +1 -1
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/FontFile.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.d.ts +6 -2
- package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
- package/lib/cjs/GeographicCRSServices.js +1 -1
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/GeometrySummary.js +47 -47
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +37 -26
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +132 -55
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelDbFonts.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +1 -1
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +2 -3
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +2 -3
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +36 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.js +69 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -0
- package/lib/cjs/IModelJsFs.js.map +1 -1
- package/lib/cjs/ImageSourceConversion.js.map +1 -1
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LineStyle.js.map +1 -1
- package/lib/cjs/LocalHub.d.ts.map +1 -1
- package/lib/cjs/LocalHub.js +6 -4
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/LockControl.js.map +1 -1
- package/lib/cjs/Material.d.ts +4 -3
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +5 -5
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +22 -22
- package/lib/cjs/Model.js +22 -22
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/NativeAppStorage.js.map +1 -1
- package/lib/cjs/NativeHost.js.map +1 -1
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/PromiseMemoizer.js.map +1 -1
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +3 -0
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +15 -0
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/RpcBackend.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +1 -1
- package/lib/cjs/SQLiteDb.js +1 -1
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.d.ts +25 -0
- package/lib/cjs/Schema.d.ts.map +1 -1
- package/lib/cjs/Schema.js +25 -0
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/lib/cjs/SheetIndex.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.d.ts +1 -1
- package/lib/cjs/SqliteStatement.d.ts.map +1 -1
- package/lib/cjs/SqliteStatement.js +1 -1
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/Texture.d.ts +1 -1
- package/lib/cjs/Texture.js +1 -1
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +4 -4
- package/lib/cjs/TxnManager.js +1 -1
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +40 -14
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +42 -14
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStateHydrator.js.map +1 -1
- package/lib/cjs/ViewStore.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +110 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -0
- package/lib/cjs/annotations/FrameGeometry.d.ts +51 -0
- package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/FrameGeometry.js +249 -0
- package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
- package/lib/cjs/annotations/LeaderGeometry.d.ts +53 -0
- package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/LeaderGeometry.js +184 -0
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -0
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +204 -0
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
- package/lib/cjs/annotations/TextAnnotationElement.js +411 -0
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +33 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.js +137 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
- package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
- package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
- package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
- package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
- package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
- package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
- package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +174 -49
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
- package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
- package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
- package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
- package/lib/cjs/core-backend.d.ts +7 -3
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +27 -6
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/domains/GenericSchema.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.d.ts +23 -0
- package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.js +167 -3
- package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
- package/lib/cjs/internal/FontFileImpl.js.map +1 -1
- package/lib/cjs/internal/HubMock.js.map +1 -1
- package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/cjs/internal/NativePlatform.js.map +1 -1
- package/lib/cjs/internal/NoLocks.js.map +1 -1
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
- package/lib/cjs/internal/Symbols.d.ts +1 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -1
- package/lib/cjs/internal/Symbols.js +2 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.d.ts +22 -0
- package/lib/cjs/internal/annotations/fields.d.ts.map +1 -0
- package/lib/cjs/internal/annotations/fields.js +237 -0
- package/lib/cjs/internal/annotations/fields.js.map +1 -0
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/cjs/rpc/multipart.js.map +1 -1
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc/web/logging.js.map +1 -1
- package/lib/cjs/rpc/web/request.js.map +1 -1
- package/lib/cjs/rpc/web/response.js.map +1 -1
- package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
- package/lib/cjs/workspace/Workspace.d.ts +0 -1
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
- package/lib/esm/BackendHubAccess.d.ts +1 -1
- package/lib/esm/BackendHubAccess.js +1 -1
- package/lib/esm/BackendHubAccess.js.map +1 -1
- package/lib/esm/BackendLoggerCategory.js.map +1 -1
- package/lib/esm/BisCoreSchema.d.ts.map +1 -1
- package/lib/esm/BisCoreSchema.js +4 -2
- package/lib/esm/BisCoreSchema.js.map +1 -1
- package/lib/esm/BlobContainerService.js.map +1 -1
- package/lib/esm/BriefcaseManager.d.ts +10 -2
- package/lib/esm/BriefcaseManager.d.ts.map +1 -1
- package/lib/esm/BriefcaseManager.js +17 -1
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/CatalogDb.js.map +1 -1
- package/lib/esm/Category.d.ts +4 -4
- package/lib/esm/Category.js +4 -4
- package/lib/esm/Category.js.map +1 -1
- package/lib/esm/ChangeSummaryManager.js +2 -2
- package/lib/esm/ChangeSummaryManager.js.map +1 -1
- package/lib/esm/ChangedElementsDb.js.map +1 -1
- package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
- package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/esm/ChangesetECAdaptor.js +490 -275
- package/lib/esm/ChangesetECAdaptor.js.map +1 -1
- package/lib/esm/ChannelControl.js.map +1 -1
- package/lib/esm/CheckpointManager.js.map +1 -1
- package/lib/esm/ClassRegistry.d.ts +9 -1
- package/lib/esm/ClassRegistry.d.ts.map +1 -1
- package/lib/esm/ClassRegistry.js +14 -6
- package/lib/esm/ClassRegistry.js.map +1 -1
- package/lib/esm/CloudSqlite.js +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/CodeService.js.map +1 -1
- package/lib/esm/CodeSpecs.d.ts +1 -1
- package/lib/esm/CodeSpecs.js +1 -1
- package/lib/esm/CodeSpecs.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/CustomViewState3dCreator.js.map +1 -1
- package/lib/esm/DevTools.js.map +1 -1
- package/lib/esm/DisplayStyle.d.ts +4 -4
- package/lib/esm/DisplayStyle.js +3 -3
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/ECDb.d.ts +4 -4
- package/lib/esm/ECDb.d.ts.map +1 -1
- package/lib/esm/ECDb.js +4 -4
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/ECSchemaXmlContext.js.map +1 -1
- package/lib/esm/ECSqlStatement.d.ts +15 -6
- package/lib/esm/ECSqlStatement.d.ts.map +1 -1
- package/lib/esm/ECSqlStatement.js +19 -4
- package/lib/esm/ECSqlStatement.js.map +1 -1
- package/lib/esm/Element.d.ts +54 -51
- package/lib/esm/Element.d.ts.map +1 -1
- package/lib/esm/Element.js +67 -52
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.d.ts +8 -8
- package/lib/esm/ElementAspect.d.ts.map +1 -1
- package/lib/esm/ElementAspect.js +8 -8
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/ElementGraphics.js.map +1 -1
- package/lib/esm/ElementTreeWalker.js.map +1 -1
- package/lib/esm/Entity.d.ts +10 -7
- package/lib/esm/Entity.d.ts.map +1 -1
- package/lib/esm/Entity.js +36 -14
- package/lib/esm/Entity.js.map +1 -1
- package/lib/esm/EntityReferences.js.map +1 -1
- package/lib/esm/ExportGraphics.d.ts +54 -8
- package/lib/esm/ExportGraphics.d.ts.map +1 -1
- package/lib/esm/ExportGraphics.js +156 -58
- package/lib/esm/ExportGraphics.js.map +1 -1
- package/lib/esm/ExternalSource.js.map +1 -1
- package/lib/esm/FontFile.js.map +1 -1
- package/lib/esm/GeoCoordConfig.js.map +1 -1
- package/lib/esm/GeographicCRSServices.d.ts +6 -2
- package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
- package/lib/esm/GeographicCRSServices.js +1 -1
- package/lib/esm/GeographicCRSServices.js.map +1 -1
- package/lib/esm/GeometrySummary.js +47 -47
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +37 -26
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +136 -59
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelDbFonts.js.map +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/esm/IModelElementCloneContext.js +1 -1
- package/lib/esm/IModelElementCloneContext.js.map +1 -1
- package/lib/esm/IModelHost.d.ts +2 -3
- package/lib/esm/IModelHost.d.ts.map +1 -1
- package/lib/esm/IModelHost.js +2 -3
- package/lib/esm/IModelHost.js.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts +36 -0
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -0
- package/lib/esm/IModelIncrementalSchemaLocater.js +65 -0
- package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -0
- package/lib/esm/IModelJsFs.js.map +1 -1
- package/lib/esm/ImageSourceConversion.js.map +1 -1
- package/lib/esm/IpcHost.js.map +1 -1
- package/lib/esm/LineStyle.js.map +1 -1
- package/lib/esm/LocalHub.d.ts.map +1 -1
- package/lib/esm/LocalHub.js +6 -4
- package/lib/esm/LocalHub.js.map +1 -1
- package/lib/esm/LocalhostIpcHost.js.map +1 -1
- package/lib/esm/LockControl.js.map +1 -1
- package/lib/esm/Material.d.ts +4 -3
- package/lib/esm/Material.d.ts.map +1 -1
- package/lib/esm/Material.js +5 -5
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/Model.d.ts +22 -22
- package/lib/esm/Model.js +22 -22
- package/lib/esm/Model.js.map +1 -1
- package/lib/esm/NativeAppStorage.js.map +1 -1
- package/lib/esm/NativeHost.js.map +1 -1
- package/lib/esm/NavigationRelationship.js.map +1 -1
- package/lib/esm/PromiseMemoizer.js.map +1 -1
- package/lib/esm/PropertyStore.js.map +1 -1
- package/lib/esm/Relationship.d.ts +3 -0
- package/lib/esm/Relationship.d.ts.map +1 -1
- package/lib/esm/Relationship.js +15 -0
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/RpcBackend.js.map +1 -1
- package/lib/esm/SQLiteDb.d.ts +1 -1
- package/lib/esm/SQLiteDb.js +1 -1
- package/lib/esm/SQLiteDb.js.map +1 -1
- package/lib/esm/Schema.d.ts +25 -0
- package/lib/esm/Schema.d.ts.map +1 -1
- package/lib/esm/Schema.js +25 -0
- package/lib/esm/Schema.js.map +1 -1
- package/lib/esm/SchemaSync.js.map +1 -1
- package/lib/esm/SchemaUtils.js.map +1 -1
- package/lib/esm/SheetIndex.js.map +1 -1
- package/lib/esm/SqliteChangesetReader.js.map +1 -1
- package/lib/esm/SqliteStatement.d.ts +1 -1
- package/lib/esm/SqliteStatement.d.ts.map +1 -1
- package/lib/esm/SqliteStatement.js +1 -1
- package/lib/esm/SqliteStatement.js.map +1 -1
- package/lib/esm/Texture.d.ts +1 -1
- package/lib/esm/Texture.js +1 -1
- package/lib/esm/Texture.js.map +1 -1
- package/lib/esm/TileStorage.js.map +1 -1
- package/lib/esm/TxnManager.d.ts +4 -4
- package/lib/esm/TxnManager.js +1 -1
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.d.ts +40 -14
- package/lib/esm/ViewDefinition.d.ts.map +1 -1
- package/lib/esm/ViewDefinition.js +42 -14
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/ViewStateHydrator.js.map +1 -1
- package/lib/esm/ViewStore.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js +105 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -0
- package/lib/esm/annotations/FrameGeometry.d.ts +51 -0
- package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/FrameGeometry.js +244 -0
- package/lib/esm/annotations/FrameGeometry.js.map +1 -0
- package/lib/esm/annotations/LeaderGeometry.d.ts +53 -0
- package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/LeaderGeometry.js +179 -0
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -0
- package/lib/esm/annotations/TextAnnotationElement.d.ts +204 -0
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
- package/lib/esm/annotations/TextAnnotationElement.js +405 -0
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts +33 -0
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/TextAnnotationGeometry.js +134 -0
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
- package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
- package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
- package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
- package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
- package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
- package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
- package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +172 -48
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
- package/lib/esm/core-backend.d.ts +7 -3
- package/lib/esm/core-backend.d.ts.map +1 -1
- package/lib/esm/core-backend.js +27 -3
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/domains/FunctionalElements.js.map +1 -1
- package/lib/esm/domains/FunctionalSchema.js.map +1 -1
- package/lib/esm/domains/GenericElements.js.map +1 -1
- package/lib/esm/domains/GenericSchema.js.map +1 -1
- package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/esm/internal/ChannelAdmin.js.map +1 -1
- package/lib/esm/internal/ElementLRUCache.d.ts +23 -0
- package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/esm/internal/ElementLRUCache.js +165 -2
- package/lib/esm/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/internal/FontFileImpl.js.map +1 -1
- package/lib/esm/internal/HubMock.js.map +1 -1
- package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/esm/internal/NativePlatform.js.map +1 -1
- package/lib/esm/internal/NoLocks.js.map +1 -1
- package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
- package/lib/esm/internal/Symbols.d.ts +1 -0
- package/lib/esm/internal/Symbols.d.ts.map +1 -1
- package/lib/esm/internal/Symbols.js +1 -0
- package/lib/esm/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/annotations/fields.d.ts +22 -0
- package/lib/esm/internal/annotations/fields.d.ts.map +1 -0
- package/lib/esm/internal/annotations/fields.js +231 -0
- package/lib/esm/internal/annotations/fields.js.map +1 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/esm/rpc/multipart.js.map +1 -1
- package/lib/esm/rpc/tracing.js.map +1 -1
- package/lib/esm/rpc/web/logging.js.map +1 -1
- package/lib/esm/rpc/web/request.js.map +1 -1
- package/lib/esm/rpc/web/response.js.map +1 -1
- package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/esm/test/AdvancedEqual.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.d.ts +15 -0
- package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -0
- package/lib/esm/test/AnnotationTestUtils.js +41 -0
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -0
- package/lib/esm/test/AttachDb.test.js +11 -11
- package/lib/esm/test/AttachDb.test.js.map +1 -1
- package/lib/esm/test/ElementLRUCache.test.js +224 -1
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/GeometryTestUtil.js.map +1 -1
- package/lib/esm/test/IModelHost.test.js.map +1 -1
- package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
- package/lib/esm/test/IModelTestUtils.js +1 -0
- package/lib/esm/test/IModelTestUtils.js.map +1 -1
- package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
- package/lib/esm/test/IpcHost.test.js.map +1 -1
- package/lib/esm/test/KnownTestLocations.js.map +1 -1
- package/lib/esm/test/PrintElementTree.js.map +1 -1
- package/lib/esm/test/PropertyDb.test.js.map +1 -1
- package/lib/esm/test/RevisionUtility.js.map +1 -1
- package/lib/esm/test/SchemaUtils.test.js +25 -25
- package/lib/esm/test/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
- package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
- package/lib/esm/test/TestUtils.d.ts +1 -1
- package/lib/esm/test/TestUtils.d.ts.map +1 -1
- package/lib/esm/test/TestUtils.js +1 -1
- package/lib/esm/test/TestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.d.ts +2 -0
- package/lib/esm/test/annotations/Fields.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/Fields.test.js +576 -0
- package/lib/esm/test/annotations/Fields.test.js.map +1 -0
- package/lib/esm/test/annotations/FrameGeometry.test.d.ts +2 -0
- package/lib/esm/test/annotations/FrameGeometry.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/FrameGeometry.test.js +86 -0
- package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.d.ts +2 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.js +256 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -0
- package/lib/esm/test/annotations/TextAnnotation.test.js +269 -1047
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
- package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/TextBlock.test.js +1199 -0
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts +60 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js +69 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +1442 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +817 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -0
- package/lib/esm/test/categories/Category.test.js.map +1 -1
- package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
- package/lib/esm/test/ecdb/CTE.test.js +88 -88
- package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts +2 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts.map +1 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js +164 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -0
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +35 -45
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDb.test.js +86 -65
- package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
- package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
- package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -55
- package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
- package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +484 -292
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
- package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
- package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
- package/lib/esm/test/element/ElementAspect.test.js +22 -22
- package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
- package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
- package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
- package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
- package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
- package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
- package/lib/esm/test/element/NullStructArray.test.js +13 -13
- package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
- package/lib/esm/test/element/UrlLink.test.js.map +1 -1
- package/lib/esm/test/font/FontFile.test.js.map +1 -1
- package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
- package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts +2 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts.map +1 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js +86 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -0
- package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
- package/lib/esm/test/imageData.js.map +1 -1
- package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
- package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
- package/lib/esm/test/imodel/IModel.test.js +313 -5
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
- package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts +2 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +343 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts +2 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +207 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +11 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +36 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +17 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +116 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +9 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +20 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -0
- package/lib/esm/test/index.js.map +1 -1
- package/lib/esm/test/misc/DevTools.test.js.map +1 -1
- package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
- package/lib/esm/test/misc/GeoServices.test.js +36 -10
- package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
- package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
- package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
- package/lib/esm/test/rpc/response.test.js.map +1 -1
- package/lib/esm/test/schema/ClassRegistry.test.js +175 -73
- package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
- package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
- package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
- package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
- package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +575 -164
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
- package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
- package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
- package/lib/esm/test/standalone/ExportGraphics.test.js +67 -15
- package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
- package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
- package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
- package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
- package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
- package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
- package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
- package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
- package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
- package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
- package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js +24 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
- package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
- package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
- package/lib/esm/test/standalone/Setting.test.js.map +1 -1
- package/lib/esm/test/standalone/Settings.test.js.map +1 -1
- package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Texture.test.js.map +1 -1
- package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
- package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
- package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
- package/lib/esm/workspace/Settings.js.map +1 -1
- package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
- package/lib/esm/workspace/Workspace.d.ts +0 -1
- package/lib/esm/workspace/Workspace.d.ts.map +1 -1
- package/lib/esm/workspace/Workspace.js.map +1 -1
- package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
- package/package.json +22 -16
- package/lib/cjs/TextAnnotationElement.d.ts +0 -54
- package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationElement.js +0 -94
- package/lib/cjs/TextAnnotationElement.js.map +0 -1
- package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
- package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
- package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationLayout.js.map +0 -1
- package/lib/esm/TextAnnotationElement.d.ts +0 -54
- package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
- package/lib/esm/TextAnnotationElement.js +0 -89
- package/lib/esm/TextAnnotationElement.js.map +0 -1
- package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
- package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
- package/lib/esm/TextAnnotationGeometry.js.map +0 -1
- package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
- package/lib/esm/TextAnnotationLayout.js.map +0 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module ElementGeometry
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.appendLeadersToBuilder = appendLeadersToBuilder;
|
|
11
|
+
exports.computeElbowDirection = computeElbowDirection;
|
|
12
|
+
exports.computeLeaderAttachmentPoint = computeLeaderAttachmentPoint;
|
|
13
|
+
const core_common_1 = require("@itwin/core-common");
|
|
14
|
+
const core_geometry_1 = require("@itwin/core-geometry");
|
|
15
|
+
const FrameGeometry_1 = require("./FrameGeometry");
|
|
16
|
+
/**
|
|
17
|
+
* Constructs and appends leader lines and their terminators to the provided geometry builder for a text annotation.
|
|
18
|
+
*
|
|
19
|
+
* This function processes an array of `TextAnnotationLeader` objects, computes their attachment points
|
|
20
|
+
* relative to a text frame (or a default rectangular frame if none is provided), and appends the leader
|
|
21
|
+
* line and terminator geometry to the builder. It also applies color overrides if specified
|
|
22
|
+
* in the leader's style overrides.
|
|
23
|
+
*
|
|
24
|
+
* @param builder - The geometry builder to which the leader geometries will be appended.
|
|
25
|
+
* @param leaders - An array of leader properties.
|
|
26
|
+
* @param layout - The layout information for the text block, including its range.
|
|
27
|
+
* @param transform - The transform to apply to the frame and leader geometry.
|
|
28
|
+
* @param params - The geometry parameters, such as color, to use for the leader lines.
|
|
29
|
+
* @param frame - (Optional) The style properties for the text frame. If not provided or set to "none", a default rectangle is used.
|
|
30
|
+
* @returns `true` if at least one leader with a terminator was successfully appended; otherwise, `false`.
|
|
31
|
+
* @beta
|
|
32
|
+
*/
|
|
33
|
+
function appendLeadersToBuilder(builder, leaders, layout, transform, params, textStyleResolver) {
|
|
34
|
+
let result = true;
|
|
35
|
+
const scaledLineHeight = textStyleResolver.blockSettings.lineHeight * textStyleResolver.scaleFactor;
|
|
36
|
+
let frame = textStyleResolver.blockSettings.frame;
|
|
37
|
+
// If there is no frame, use a rectangular frame to compute the attachmentPoints for leaders.
|
|
38
|
+
if (frame === undefined || frame.shape === "none") {
|
|
39
|
+
frame = { shape: "rectangle" };
|
|
40
|
+
}
|
|
41
|
+
if (frame.shape === undefined || frame.shape === "none")
|
|
42
|
+
return false;
|
|
43
|
+
const frameCurve = (0, FrameGeometry_1.computeFrame)({ frame: frame.shape, range: layout.range, transform });
|
|
44
|
+
for (const leader of leaders) {
|
|
45
|
+
const leaderStyle = textStyleResolver.resolveTextAnnotationLeaderSettings(leader);
|
|
46
|
+
let effectiveColor = "subcategory";
|
|
47
|
+
if (leaderStyle.leader.color === "inherit") {
|
|
48
|
+
effectiveColor = leaderStyle.color;
|
|
49
|
+
}
|
|
50
|
+
else if (leaderStyle.leader.color !== "subcategory") {
|
|
51
|
+
effectiveColor = leaderStyle.leader.color;
|
|
52
|
+
}
|
|
53
|
+
if (effectiveColor !== "subcategory") {
|
|
54
|
+
params.lineColor = core_common_1.ColorDef.fromJSON(effectiveColor);
|
|
55
|
+
result = result && builder.appendGeometryParamsChange(params);
|
|
56
|
+
}
|
|
57
|
+
const attachmentPoint = computeLeaderAttachmentPoint(leader, frameCurve, layout, transform);
|
|
58
|
+
if (!attachmentPoint)
|
|
59
|
+
return false;
|
|
60
|
+
// Leader line geometry
|
|
61
|
+
const leaderLinePoints = [];
|
|
62
|
+
leaderLinePoints.push(leader.startPoint);
|
|
63
|
+
leader.intermediatePoints?.forEach((point) => {
|
|
64
|
+
leaderLinePoints.push(point);
|
|
65
|
+
});
|
|
66
|
+
if (leaderStyle.leader.wantElbow) {
|
|
67
|
+
const elbowLength = leaderStyle.leader.elbowLength * scaledLineHeight;
|
|
68
|
+
const elbowDirection = computeElbowDirection(attachmentPoint, frameCurve, elbowLength);
|
|
69
|
+
if (elbowDirection)
|
|
70
|
+
leaderLinePoints.push(attachmentPoint.plusScaled(elbowDirection, elbowLength));
|
|
71
|
+
}
|
|
72
|
+
leaderLinePoints.push(attachmentPoint);
|
|
73
|
+
result = result && builder.appendGeometryQuery(core_geometry_1.LineString3d.create(leaderLinePoints));
|
|
74
|
+
// Terminator geometry
|
|
75
|
+
const terminatorDirection = core_geometry_1.Vector3d.createStartEnd(leaderLinePoints[0], leaderLinePoints[1]).normalize();
|
|
76
|
+
const termY = terminatorDirection?.unitCrossProduct(core_geometry_1.Vector3d.unitZ());
|
|
77
|
+
if (!termY || !terminatorDirection)
|
|
78
|
+
continue; // Assuming leaders without terminators is a valid case.
|
|
79
|
+
const terminatorHeight = leaderStyle.leader.terminatorHeightFactor * scaledLineHeight;
|
|
80
|
+
const terminatorWidth = leaderStyle.leader.terminatorWidthFactor * scaledLineHeight;
|
|
81
|
+
const basePoint = leader.startPoint.plusScaled(terminatorDirection, terminatorWidth);
|
|
82
|
+
const termPointA = basePoint.plusScaled(termY, terminatorHeight);
|
|
83
|
+
const termPointB = basePoint.plusScaled(termY.negate(), terminatorHeight);
|
|
84
|
+
result = result && builder.appendGeometryQuery(core_geometry_1.LineString3d.create([termPointA, leader.startPoint, termPointB]));
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Computes the direction vector for an "elbow" for leader based on the attachment point and a frame curve.
|
|
90
|
+
* The elbow direction is determined by whether the attachment point is closer to the left or right side of the frame.
|
|
91
|
+
* If the computed elbow would be tangent to the frame at the intersection, no elbow direction is returned.
|
|
92
|
+
*
|
|
93
|
+
* @param attachmentPoint - The point where the leader attaches.
|
|
94
|
+
* @param frameCurve - The frame curve (either a Loop or Path) to which the leader is attached.
|
|
95
|
+
* @param elbowLength - The length of the elbow segment to be created.
|
|
96
|
+
* @returns The direction vector for the elbow, or `undefined` if the elbow would be tangent to the frame.
|
|
97
|
+
* @beta
|
|
98
|
+
*/
|
|
99
|
+
function computeElbowDirection(attachmentPoint, frameCurve, elbowLength) {
|
|
100
|
+
let elbowDirection;
|
|
101
|
+
// Determine the direction based on the closest point's position relative to the frame
|
|
102
|
+
const isCloserToLeft = Math.abs(attachmentPoint.x - frameCurve.range().low.x) < Math.abs(attachmentPoint.x - frameCurve.range().high.x);
|
|
103
|
+
// Decide the direction: left (-X) or right (+X)
|
|
104
|
+
elbowDirection = isCloserToLeft ? core_geometry_1.Vector3d.unitX().negate() : core_geometry_1.Vector3d.unitX();
|
|
105
|
+
// Verify if the elbow is a tangent to the frame, if yes, do not create an elbow
|
|
106
|
+
const elbowPoint = attachmentPoint.plusScaled(elbowDirection, elbowLength);
|
|
107
|
+
const elbowLine = core_geometry_1.LineSegment3d.create(attachmentPoint, elbowPoint);
|
|
108
|
+
// Find intersection points between the elbow and the frame
|
|
109
|
+
const intersections = core_geometry_1.CurveCurve.intersectionXYZPairs(elbowLine, false, frameCurve, false);
|
|
110
|
+
// As the elbow will intersect the frame only at one point, we can safely use the first intersection
|
|
111
|
+
const intersection = intersections[0];
|
|
112
|
+
const curveFraction = intersection.detailB.fraction;
|
|
113
|
+
const derivative = intersection.detailB.curve?.fractionToPointAndDerivative(curveFraction);
|
|
114
|
+
const tangent = derivative?.direction.normalize();
|
|
115
|
+
const lineDirection = core_geometry_1.Vector3d.createStartEnd(elbowLine.point0Ref, elbowLine.point1Ref).normalize();
|
|
116
|
+
if (tangent && lineDirection) {
|
|
117
|
+
const dot = tangent.dotProduct(lineDirection);
|
|
118
|
+
// If the tangent and line direction are aligned (dot product close to 1 or -1), it's tangent
|
|
119
|
+
if (Math.abs(dot) > 0.999) {
|
|
120
|
+
elbowDirection = undefined;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return elbowDirection;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Computes the attachment point for a leader line on a text annotation frame.
|
|
127
|
+
*
|
|
128
|
+
* The attachment point is determined based on the leader's attachment mode:
|
|
129
|
+
* - `"Nearest"`: Finds the closest point on the frame curve to the leader's start point.
|
|
130
|
+
* - `"KeyPoint"`: Uses a specific curve segment and fraction along that segment to determine the point.
|
|
131
|
+
* - `"TextPoint"`: Calculates a point on the text layout (top/bottom, left/right) and projects it onto the frame curve.
|
|
132
|
+
*
|
|
133
|
+
* @param leader - The leader props.
|
|
134
|
+
* @param frameCurve - The curve (Loop or Path) representing the annotation frame.
|
|
135
|
+
* @param textLayout - The layout information for the text block.
|
|
136
|
+
* @param transform - The transform applied to the text layout.
|
|
137
|
+
* @returns The computed attachment point as a `Point3d`, or `undefined` if it cannot be determined.
|
|
138
|
+
* @beta
|
|
139
|
+
*/
|
|
140
|
+
function computeLeaderAttachmentPoint(leader, frameCurve, textLayout, transform) {
|
|
141
|
+
let attachmentPoint;
|
|
142
|
+
if (leader.attachment.mode === "Nearest") {
|
|
143
|
+
attachmentPoint = frameCurve.closestPoint(leader.startPoint)?.point;
|
|
144
|
+
}
|
|
145
|
+
else if (leader.attachment.mode === "KeyPoint") {
|
|
146
|
+
const curves = frameCurve.collectCurvePrimitives(undefined, false, true);
|
|
147
|
+
const curveIndex = leader.attachment.curveIndex;
|
|
148
|
+
const fraction = leader.attachment.fraction;
|
|
149
|
+
if (curveIndex >= curves.length) {
|
|
150
|
+
// If the curveIndex is invalid, use the last curve
|
|
151
|
+
// This is a fallback to avoid out-of-bounds access
|
|
152
|
+
attachmentPoint = curves[curves.length - 1].fractionToPoint(fraction);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
attachmentPoint = curves[curveIndex].fractionToPoint(fraction);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else { // attachment.mode="TextPoint"
|
|
159
|
+
let scaleDirection = transform.matrix.getColumn(0).negate(); // direction to draw a scaled line from text attachment point to find intersection point on frame
|
|
160
|
+
let lineIndex;
|
|
161
|
+
if (leader.attachment.position.includes("Top")) {
|
|
162
|
+
lineIndex = 0;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
lineIndex = textLayout.lines.length - 1;
|
|
166
|
+
}
|
|
167
|
+
const lineRange = textLayout.lines[lineIndex].range;
|
|
168
|
+
const lineOffset = textLayout.lines[lineIndex].offsetFromDocument;
|
|
169
|
+
const origin = transform.multiplyPoint3d(core_geometry_1.Point3d.fromJSON(lineOffset));
|
|
170
|
+
let attachmentPointOnText = origin.plusScaled(transform.matrix.getColumn(1), ((lineRange.yLength()) / 2));
|
|
171
|
+
if (leader.attachment.position.includes("Right")) {
|
|
172
|
+
attachmentPointOnText = attachmentPointOnText.plusScaled(transform.matrix.getColumn(0), lineRange.xLength());
|
|
173
|
+
scaleDirection = scaleDirection.negate();
|
|
174
|
+
}
|
|
175
|
+
// Find the nearest intersection point on the frame to get the correct attachment point
|
|
176
|
+
// Extend the direction vector to create a target point far along the direction
|
|
177
|
+
const targetPoint = attachmentPointOnText.plusScaled(scaleDirection, 1e6); // Scale the direction vector to a large value
|
|
178
|
+
const intersectionLine = core_geometry_1.LineSegment3d.create(attachmentPointOnText, targetPoint);
|
|
179
|
+
const closestPointDetail = core_geometry_1.CurveCurve.intersectionXYZPairs(intersectionLine, false, frameCurve, false);
|
|
180
|
+
attachmentPoint = closestPointDetail[0]?.detailA.point;
|
|
181
|
+
}
|
|
182
|
+
return attachmentPoint;
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=LeaderGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeaderGeometry.js","sourceRoot":"","sources":["../../../src/annotations/LeaderGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAwBH,wDAmEC;AAcD,sDA4BC;AAiBD,oEA8CC;AAlMD,oDAA0I;AAC1I,wDAAyH;AACzH,mDAA+C;AAG/C;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,sBAAsB,CAAC,OAAgC,EAAE,OAA+B,EAAE,MAAuB,EAAE,SAAoB,EAAE,MAAsB,EAAE,iBAAoC;IACnN,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,aAAa,CAAC,UAAU,GAAG,iBAAiB,CAAC,WAAW,CAAC;IACpG,IAAI,KAAK,GAAoC,iBAAiB,CAAC,aAAa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QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACjD,qBAAqB,GAAG,qBAAqB,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;YAC7G,cAAc,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC;QAC3C,CAAC;QACD,uFAAuF;QACvF,+EAA+E;QAC/E,MAAM,WAAW,GAAG,qBAAqB,CAAC,UAAU,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAC,8CAA8C;QACzH,MAAM,gBAAgB,GAAG,6BAAa,CAAC,MAAM,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC;QAClF,MAAM,kBAAkB,GAAG,0BAAU,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QACvG,eAAe,GAAG,kBAAkB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC;IACzD,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,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 ElementGeometry\r\n */\r\n\r\nimport { ColorDef, ElementGeometry, GeometryParams, TextAnnotationLeader, TextFrameStyleProps, TextStyleColor } from \"@itwin/core-common\";\r\nimport { CurveCurve, LineSegment3d, LineString3d, Loop, Path, Point3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { computeFrame } from \"./FrameGeometry\";\r\nimport { TextBlockLayout, TextStyleResolver } from \"./TextBlockLayout\";\r\n\r\n/**\r\n * Constructs and appends leader lines and their terminators to the provided geometry builder for a text annotation.\r\n *\r\n * This function processes an array of `TextAnnotationLeader` objects, computes their attachment points\r\n * relative to a text frame (or a default rectangular frame if none is provided), and appends the leader\r\n * line and terminator geometry to the builder. It also applies color overrides if specified\r\n * in the leader's style overrides.\r\n *\r\n * @param builder - The geometry builder to which the leader geometries will be appended.\r\n * @param leaders - An array of leader properties.\r\n * @param layout - The layout information for the text block, including its range.\r\n * @param transform - The transform to apply to the frame and leader geometry.\r\n * @param params - The geometry parameters, such as color, to use for the leader lines.\r\n * @param frame - (Optional) The style properties for the text frame. If not provided or set to \"none\", a default rectangle is used.\r\n * @returns `true` if at least one leader with a terminator was successfully appended; otherwise, `false`.\r\n * @beta\r\n */\r\nexport function appendLeadersToBuilder(builder: ElementGeometry.Builder, leaders: TextAnnotationLeader[], layout: TextBlockLayout, transform: Transform, params: GeometryParams, textStyleResolver: TextStyleResolver): boolean {\r\n let result = true;\r\n const scaledLineHeight = textStyleResolver.blockSettings.lineHeight * textStyleResolver.scaleFactor;\r\n let frame: TextFrameStyleProps | undefined = textStyleResolver.blockSettings.frame;\r\n\r\n // If there is no frame, use a rectangular frame to compute the attachmentPoints for leaders.\r\n if (frame === undefined || frame.shape === \"none\") {\r\n frame = { shape: \"rectangle\" }\r\n }\r\n if (frame.shape === undefined || frame.shape === \"none\") return false;\r\n const frameCurve = computeFrame({ frame: frame.shape, range: layout.range, transform });\r\n\r\n for (const leader of leaders) {\r\n const leaderStyle = textStyleResolver.resolveTextAnnotationLeaderSettings(leader);\r\n\r\n let effectiveColor: TextStyleColor = \"subcategory\";\r\n\r\n if (leaderStyle.leader.color === \"inherit\") {\r\n effectiveColor = leaderStyle.color;\r\n } else if (leaderStyle.leader.color !== \"subcategory\") {\r\n effectiveColor = leaderStyle.leader.color;\r\n }\r\n\r\n if (effectiveColor !== \"subcategory\") {\r\n params.lineColor = ColorDef.fromJSON(effectiveColor);\r\n result = result && builder.appendGeometryParamsChange(params);\r\n }\r\n\r\n const attachmentPoint = computeLeaderAttachmentPoint(leader, frameCurve, layout, transform);\r\n if (!attachmentPoint) return false;\r\n\r\n // Leader line geometry\r\n const leaderLinePoints: Point3d[] = [];\r\n\r\n leaderLinePoints.push(leader.startPoint)\r\n\r\n leader.intermediatePoints?.forEach((point) => {\r\n leaderLinePoints.push(point);\r\n });\r\n\r\n if (leaderStyle.leader.wantElbow) {\r\n const elbowLength = leaderStyle.leader.elbowLength * scaledLineHeight;\r\n const elbowDirection = computeElbowDirection(attachmentPoint, frameCurve, elbowLength);\r\n if (elbowDirection)\r\n leaderLinePoints.push(attachmentPoint.plusScaled(elbowDirection, elbowLength))\r\n }\r\n\r\n leaderLinePoints.push(attachmentPoint)\r\n\r\n result = result && builder.appendGeometryQuery(LineString3d.create(leaderLinePoints));\r\n\r\n // Terminator geometry\r\n const terminatorDirection = Vector3d.createStartEnd(\r\n leaderLinePoints[0], leaderLinePoints[1]\r\n ).normalize();\r\n\r\n const termY = terminatorDirection?.unitCrossProduct(Vector3d.unitZ());\r\n if (!termY || !terminatorDirection) continue; // Assuming leaders without terminators is a valid case.\r\n const terminatorHeight = leaderStyle.leader.terminatorHeightFactor * scaledLineHeight;\r\n const terminatorWidth = leaderStyle.leader.terminatorWidthFactor * scaledLineHeight;\r\n const basePoint = leader.startPoint.plusScaled(terminatorDirection, terminatorWidth);\r\n const termPointA = basePoint.plusScaled(termY, terminatorHeight);\r\n const termPointB = basePoint.plusScaled(termY.negate(), terminatorHeight);\r\n result = result && builder.appendGeometryQuery(LineString3d.create([termPointA, leader.startPoint, termPointB]));\r\n\r\n }\r\n return result;\r\n}\r\n\r\n\r\n/**\r\n * Computes the direction vector for an \"elbow\" for leader based on the attachment point and a frame curve.\r\n * The elbow direction is determined by whether the attachment point is closer to the left or right side of the frame.\r\n * If the computed elbow would be tangent to the frame at the intersection, no elbow direction is returned.\r\n *\r\n * @param attachmentPoint - The point where the leader attaches.\r\n * @param frameCurve - The frame curve (either a Loop or Path) to which the leader is attached.\r\n * @param elbowLength - The length of the elbow segment to be created.\r\n * @returns The direction vector for the elbow, or `undefined` if the elbow would be tangent to the frame.\r\n * @beta\r\n */\r\nexport function computeElbowDirection(attachmentPoint: Point3d, frameCurve: Loop | Path, elbowLength: number): Vector3d | undefined {\r\n\r\n let elbowDirection: Vector3d | undefined;\r\n // Determine the direction based on the closest point's position relative to the frame\r\n const isCloserToLeft = Math.abs(attachmentPoint.x - frameCurve.range().low.x) < Math.abs(attachmentPoint.x - frameCurve.range().high.x);\r\n\r\n // Decide the direction: left (-X) or right (+X)\r\n elbowDirection = isCloserToLeft ? Vector3d.unitX().negate() : Vector3d.unitX();\r\n\r\n // Verify if the elbow is a tangent to the frame, if yes, do not create an elbow\r\n const elbowPoint = attachmentPoint.plusScaled(elbowDirection, elbowLength);\r\n const elbowLine = LineSegment3d.create(attachmentPoint, elbowPoint);\r\n // Find intersection points between the elbow and the frame\r\n const intersections = CurveCurve.intersectionXYZPairs(elbowLine, false, frameCurve, false);\r\n // As the elbow will intersect the frame only at one point, we can safely use the first intersection\r\n const intersection = intersections[0];\r\n const curveFraction = intersection.detailB.fraction;\r\n const derivative = intersection.detailB.curve?.fractionToPointAndDerivative(curveFraction);\r\n const tangent = derivative?.direction.normalize();\r\n const lineDirection = Vector3d.createStartEnd(elbowLine.point0Ref, elbowLine.point1Ref).normalize();\r\n if (tangent && lineDirection) {\r\n const dot = tangent.dotProduct(lineDirection);\r\n // If the tangent and line direction are aligned (dot product close to 1 or -1), it's tangent\r\n if (Math.abs(dot) > 0.999) {\r\n elbowDirection = undefined;\r\n }\r\n }\r\n return elbowDirection;\r\n}\r\n\r\n/**\r\n * Computes the attachment point for a leader line on a text annotation frame.\r\n *\r\n * The attachment point is determined based on the leader's attachment mode:\r\n * - `\"Nearest\"`: Finds the closest point on the frame curve to the leader's start point.\r\n * - `\"KeyPoint\"`: Uses a specific curve segment and fraction along that segment to determine the point.\r\n * - `\"TextPoint\"`: Calculates a point on the text layout (top/bottom, left/right) and projects it onto the frame curve.\r\n *\r\n * @param leader - The leader props.\r\n * @param frameCurve - The curve (Loop or Path) representing the annotation frame.\r\n * @param textLayout - The layout information for the text block.\r\n * @param transform - The transform applied to the text layout.\r\n * @returns The computed attachment point as a `Point3d`, or `undefined` if it cannot be determined.\r\n * @beta\r\n */\r\nexport function computeLeaderAttachmentPoint(\r\n leader: TextAnnotationLeader,\r\n frameCurve: Loop | Path,\r\n textLayout: TextBlockLayout,\r\n transform: Transform\r\n): Point3d | undefined {\r\n let attachmentPoint: Point3d | undefined;\r\n\r\n if (leader.attachment.mode === \"Nearest\") {\r\n attachmentPoint = frameCurve.closestPoint(leader.startPoint)?.point;\r\n } else if (leader.attachment.mode === \"KeyPoint\") {\r\n const curves = frameCurve.collectCurvePrimitives(undefined, false, true);\r\n const curveIndex = leader.attachment.curveIndex;\r\n const fraction = leader.attachment.fraction;\r\n if (curveIndex >= curves.length) {\r\n // If the curveIndex is invalid, use the last curve\r\n // This is a fallback to avoid out-of-bounds access\r\n attachmentPoint = curves[curves.length - 1].fractionToPoint(fraction);\r\n } else {\r\n attachmentPoint = curves[curveIndex].fractionToPoint(fraction);\r\n }\r\n } else { // attachment.mode=\"TextPoint\"\r\n let scaleDirection = transform.matrix.getColumn(0).negate(); // direction to draw a scaled line from text attachment point to find intersection point on frame\r\n let lineIndex: number;\r\n if (leader.attachment.position.includes(\"Top\")) {\r\n lineIndex = 0\r\n } else {\r\n lineIndex = textLayout.lines.length - 1\r\n }\r\n const lineRange = textLayout.lines[lineIndex].range;\r\n const lineOffset = textLayout.lines[lineIndex].offsetFromDocument;\r\n const origin = transform.multiplyPoint3d(Point3d.fromJSON(lineOffset));\r\n let attachmentPointOnText = origin.plusScaled(transform.matrix.getColumn(1), ((lineRange.yLength()) / 2));\r\n\r\n if (leader.attachment.position.includes(\"Right\")) {\r\n attachmentPointOnText = attachmentPointOnText.plusScaled(transform.matrix.getColumn(0), lineRange.xLength());\r\n scaleDirection = scaleDirection.negate();\r\n }\r\n // Find the nearest intersection point on the frame to get the correct attachment point\r\n // Extend the direction vector to create a target point far along the direction\r\n const targetPoint = attachmentPointOnText.plusScaled(scaleDirection, 1e6); // Scale the direction vector to a large value\r\n const intersectionLine = LineSegment3d.create(attachmentPointOnText, targetPoint);\r\n const closestPointDetail = CurveCurve.intersectionXYZPairs(intersectionLine, false, frameCurve, false);\r\n attachmentPoint = closestPointDetail[0]?.detailA.point;\r\n }\r\n return attachmentPoint;\r\n}"]}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Elements
|
|
3
|
+
*/
|
|
4
|
+
import { AnnotationTextStyleProps, Code, CodeProps, CodeScopeProps, EntityReferenceSet, Placement2dProps, Placement3dProps, TextAnnotation, TextAnnotation2dProps, TextAnnotation3dProps, TextAnnotationProps, TextStyleSettings, TextStyleSettingsProps } from "@itwin/core-common";
|
|
5
|
+
import { IModelDb } from "../IModelDb";
|
|
6
|
+
import { AnnotationElement2d, DefinitionElement, GraphicalElement3d, OnElementIdArg, OnElementPropsArg } from "../Element";
|
|
7
|
+
import { Id64String } from "@itwin/core-bentley";
|
|
8
|
+
import { TextBlockAndId } from "./ElementDrivesTextAnnotation";
|
|
9
|
+
/** An element that displays textual content within a 2d model.
|
|
10
|
+
* The text is stored as a [TextAnnotation]($common) from which the element's [geometry]($docs/learning/common/GeometryStream.md) and [Placement]($common) are computed.
|
|
11
|
+
* @see [[setAnnotation]] to change the textual content.
|
|
12
|
+
* @public @preview
|
|
13
|
+
*/
|
|
14
|
+
export declare class TextAnnotation2d extends AnnotationElement2d {
|
|
15
|
+
/** @internal */
|
|
16
|
+
static get className(): string;
|
|
17
|
+
/** Optional string containing the data associated with the text annotation. */
|
|
18
|
+
private _textAnnotationData?;
|
|
19
|
+
/** Extract the textual content, if present.
|
|
20
|
+
* @see [[setAnnotation]] to change it.
|
|
21
|
+
*/
|
|
22
|
+
getAnnotation(): TextAnnotation | undefined;
|
|
23
|
+
/** Change the textual content of the `TextAnnotation2d`.
|
|
24
|
+
* @see [[getAnnotation]] to extract the current annotation.
|
|
25
|
+
* @param annotation The new annotation
|
|
26
|
+
*/
|
|
27
|
+
setAnnotation(annotation: TextAnnotation): void;
|
|
28
|
+
protected constructor(props: TextAnnotation2dProps, iModel: IModelDb);
|
|
29
|
+
/** Creates a new instance of `TextAnnotation2d` from its JSON representation. */
|
|
30
|
+
static fromJSON(props: TextAnnotation2dProps, iModel: IModelDb): TextAnnotation2d;
|
|
31
|
+
/**
|
|
32
|
+
* Converts the current `TextAnnotation2d` instance to its JSON representation.
|
|
33
|
+
* It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.
|
|
34
|
+
|
|
35
|
+
* @inheritdoc
|
|
36
|
+
*/
|
|
37
|
+
toJSON(): TextAnnotation2dProps;
|
|
38
|
+
/** Creates a new `TextAnnotation2d` instance with the specified properties.
|
|
39
|
+
* @param iModelDb The iModel.
|
|
40
|
+
* @param category The category ID for the annotation.
|
|
41
|
+
* @param model The model ID where the annotation will be placed.
|
|
42
|
+
* @param placement The placement properties for the annotation.
|
|
43
|
+
* @param textAnnotationData Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation2d`. Essentially an empty element if not provided.
|
|
44
|
+
* @param code Optional code for the element.
|
|
45
|
+
*/
|
|
46
|
+
static create(iModelDb: IModelDb, category: Id64String, model: Id64String, placement: Placement2dProps, textAnnotationData?: TextAnnotationProps, code?: CodeProps): TextAnnotation2d;
|
|
47
|
+
/**
|
|
48
|
+
* Updates the geometry of the TextAnnotation2d on insert.
|
|
49
|
+
* @inheritdoc
|
|
50
|
+
* @beta
|
|
51
|
+
*/
|
|
52
|
+
protected static onInsert(arg: OnElementPropsArg): void;
|
|
53
|
+
/**
|
|
54
|
+
* Updates the geometry of the TextAnnotation2d on update.
|
|
55
|
+
* @inheritdoc
|
|
56
|
+
* @beta
|
|
57
|
+
*/
|
|
58
|
+
protected static onUpdate(arg: OnElementPropsArg): void;
|
|
59
|
+
/**
|
|
60
|
+
* Populates the `elementGeometryBuilderParams` property in the [TextAnnotation2dProps]($common).
|
|
61
|
+
* It only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.
|
|
62
|
+
*/
|
|
63
|
+
protected static updateGeometry(iModelDb: IModelDb, props: TextAnnotation2dProps): void;
|
|
64
|
+
/**
|
|
65
|
+
* Collects reference IDs used by this `TextAnnotation2d`.
|
|
66
|
+
* @inheritdoc
|
|
67
|
+
*/
|
|
68
|
+
protected collectReferenceIds(ids: EntityReferenceSet): void;
|
|
69
|
+
/** @internal */
|
|
70
|
+
getTextBlocks(): Iterable<TextBlockAndId>;
|
|
71
|
+
/** @internal */
|
|
72
|
+
updateTextBlocks(textBlocks: TextBlockAndId[]): void;
|
|
73
|
+
/** @internal */
|
|
74
|
+
static onInserted(arg: OnElementIdArg): void;
|
|
75
|
+
/** @internal */
|
|
76
|
+
static onUpdated(arg: OnElementIdArg): void;
|
|
77
|
+
}
|
|
78
|
+
/** An element that displays textual content within a 3d model.
|
|
79
|
+
* The text is stored as a [TextAnnotation]($common) from which the element's [geometry]($docs/learning/common/GeometryStream.md) and [Placement]($common) are computed.
|
|
80
|
+
* @see [[setAnnotation]] to change the textual content.
|
|
81
|
+
* @public @preview
|
|
82
|
+
*/
|
|
83
|
+
export declare class TextAnnotation3d extends GraphicalElement3d {
|
|
84
|
+
/** @internal */
|
|
85
|
+
static get className(): string;
|
|
86
|
+
/** Optional string containing the data associated with the text annotation. */
|
|
87
|
+
private _textAnnotationData?;
|
|
88
|
+
/** Extract the textual content, if present.
|
|
89
|
+
* @see [[setAnnotation]] to change it.
|
|
90
|
+
*/
|
|
91
|
+
getAnnotation(): TextAnnotation | undefined;
|
|
92
|
+
/** Change the textual content of the `TextAnnotation3d`.
|
|
93
|
+
* @see [[getAnnotation]] to extract the current annotation.
|
|
94
|
+
* @param annotation The new annotation
|
|
95
|
+
*/
|
|
96
|
+
setAnnotation(annotation: TextAnnotation): void;
|
|
97
|
+
protected constructor(props: TextAnnotation3dProps, iModel: IModelDb);
|
|
98
|
+
/** Creates a new instance of `TextAnnotation3d` from its JSON representation. */
|
|
99
|
+
static fromJSON(props: TextAnnotation3dProps, iModel: IModelDb): TextAnnotation3d;
|
|
100
|
+
/**
|
|
101
|
+
* Converts the current `TextAnnotation3d` instance to its JSON representation.
|
|
102
|
+
* It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.
|
|
103
|
+
* @inheritdoc
|
|
104
|
+
*/
|
|
105
|
+
toJSON(): TextAnnotation3dProps;
|
|
106
|
+
/** Creates a new `TextAnnotation3d` instance with the specified properties.
|
|
107
|
+
* @param iModelDb The iModel.
|
|
108
|
+
* @param category The category ID for the annotation.
|
|
109
|
+
* @param model The model ID where the annotation will be placed.
|
|
110
|
+
* @param placement The placement properties for the annotation.
|
|
111
|
+
* @param textAnnotationData Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation3d`. Essentially an empty element if not provided.
|
|
112
|
+
* @param code Optional code for the element.
|
|
113
|
+
*/
|
|
114
|
+
static create(iModelDb: IModelDb, category: Id64String, model: Id64String, placement: Placement3dProps, textAnnotationData?: TextAnnotationProps, code?: CodeProps): TextAnnotation3d;
|
|
115
|
+
/**
|
|
116
|
+
* Updates the geometry of the TextAnnotation3d on insert.
|
|
117
|
+
* @inheritdoc
|
|
118
|
+
* @beta
|
|
119
|
+
*/
|
|
120
|
+
protected static onInsert(arg: OnElementPropsArg): void;
|
|
121
|
+
/**
|
|
122
|
+
* Updates the geometry of the TextAnnotation3d on update.
|
|
123
|
+
* @inheritdoc
|
|
124
|
+
* @beta
|
|
125
|
+
*/
|
|
126
|
+
protected static onUpdate(arg: OnElementPropsArg): void;
|
|
127
|
+
/**
|
|
128
|
+
* Populates the `elementGeometryBuilderParams` property in the [TextAnnotation3dProps]($common).
|
|
129
|
+
* It only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.
|
|
130
|
+
*/
|
|
131
|
+
protected static updateGeometry(iModelDb: IModelDb, props: TextAnnotation3dProps): void;
|
|
132
|
+
/**
|
|
133
|
+
* Collects reference IDs used by this `TextAnnotation3d`.
|
|
134
|
+
* @inheritdoc
|
|
135
|
+
*/
|
|
136
|
+
protected collectReferenceIds(ids: EntityReferenceSet): void;
|
|
137
|
+
/** @internal */
|
|
138
|
+
getTextBlocks(): Iterable<TextBlockAndId>;
|
|
139
|
+
/** @internal */
|
|
140
|
+
updateTextBlocks(textBlocks: TextBlockAndId[]): void;
|
|
141
|
+
/** @internal */
|
|
142
|
+
static onInserted(arg: OnElementIdArg): void;
|
|
143
|
+
/** @internal */
|
|
144
|
+
static onUpdated(arg: OnElementIdArg): void;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The definition element that holds text style information.
|
|
148
|
+
* The style is stored as a [TextStyleSettings]($common).
|
|
149
|
+
* @beta
|
|
150
|
+
*/
|
|
151
|
+
export declare class AnnotationTextStyle extends DefinitionElement {
|
|
152
|
+
/** @internal */
|
|
153
|
+
static get className(): string;
|
|
154
|
+
/**
|
|
155
|
+
* Optional text describing the `AnnotationTextStyle`.
|
|
156
|
+
*/
|
|
157
|
+
description?: string;
|
|
158
|
+
/**
|
|
159
|
+
* The text style settings for the `AnnotationTextStyle`.
|
|
160
|
+
* @see [[TextStyleSettings]] for more information.
|
|
161
|
+
*/
|
|
162
|
+
settings: TextStyleSettings;
|
|
163
|
+
protected constructor(props: AnnotationTextStyleProps, iModel: IModelDb);
|
|
164
|
+
/**
|
|
165
|
+
* Creates a Code for an `AnnotationTextStyle` given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
166
|
+
*
|
|
167
|
+
* @param iModel - The IModelDb.
|
|
168
|
+
* @param definitionModelId - The ID of the DefinitionModel that contains the AnnotationTextStyle and provides the scope for its name.
|
|
169
|
+
* @param name - The AnnotationTextStyle name.
|
|
170
|
+
*/
|
|
171
|
+
static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code;
|
|
172
|
+
/**
|
|
173
|
+
* Creates a new instance of `AnnotationTextStyle` with the specified properties.
|
|
174
|
+
*
|
|
175
|
+
* @param iModelDb - The iModelDb.
|
|
176
|
+
* @param definitionModelId - The ID of the [[DefinitionModel]].
|
|
177
|
+
* @param name - The name to assign to the `AnnotationTextStyle`.
|
|
178
|
+
* @param settings - Optional text style settings used to create the `AnnotationTextStyle`. Default settings will be used if not provided.
|
|
179
|
+
* @param description - Optional description for the `AnnotationTextStyle`.
|
|
180
|
+
*/
|
|
181
|
+
static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, settings?: TextStyleSettingsProps, description?: string): AnnotationTextStyle;
|
|
182
|
+
/**
|
|
183
|
+
* Converts the current `AnnotationTextStyle` instance to its JSON representation.
|
|
184
|
+
* @inheritdoc
|
|
185
|
+
*/
|
|
186
|
+
toJSON(): AnnotationTextStyleProps;
|
|
187
|
+
/** Creates a new instance of `AnnotationTextStyle` from its JSON representation. */
|
|
188
|
+
static fromJSON(props: AnnotationTextStyleProps, iModel: IModelDb): AnnotationTextStyle;
|
|
189
|
+
/**
|
|
190
|
+
* Validates that the AnnotationTextStyle's settings are valid before insert.
|
|
191
|
+
* @inheritdoc
|
|
192
|
+
* @beta
|
|
193
|
+
*/
|
|
194
|
+
protected static onInsert(arg: OnElementPropsArg): void;
|
|
195
|
+
/**
|
|
196
|
+
* Validates that the AnnotationTextStyle's settings are valid before update.
|
|
197
|
+
* @inheritdoc
|
|
198
|
+
* @beta
|
|
199
|
+
*/
|
|
200
|
+
protected static onUpdate(arg: OnElementPropsArg): void;
|
|
201
|
+
private static validateSettings;
|
|
202
|
+
private static parseTextStyleSettings;
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=TextAnnotationElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAnnotationElement.d.ts","sourceRoot":"","sources":["../../../src/annotations/TextAnnotationElement.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAe,IAAI,EAAE,SAAS,EAAE,cAAc,EAA2D,kBAAkB,EAAe,gBAAgB,EAAe,gBAAgB,EAAkB,cAAc,EAAE,qBAAqB,EAAE,qBAAqB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