import { type Connectable, type EdgelessModel, type Selectable } from '../../_common/types.js'; import type { EdgelessPageService } from '../../page-block/edgeless/edgeless-page-service.js'; import { Overlay } from '../canvas-renderer/renderer.js'; import type { Connection, ConnectorElementModel } from '../element-model/connector.js'; import { AStarRunner } from '../utils/a-star.js'; import { Bound } from '../utils/bound.js'; import { PointLocation } from '../utils/point-location.js'; import type { IVec } from '../utils/vec.js'; export type OrthogonalConnectorInput = { startBound: Bound | null; endBound: Bound | null; startPoint: PointLocation; endPoint: PointLocation; }; export declare function isConnectorAndBindingsAllSelected(connector: ConnectorElementModel, selected: Selectable[]): boolean; export declare function getAnchors(ele: EdgelessModel): { point: PointLocation; coord: IVec; }[]; export declare function getNearestConnectableAnchor(ele: Connectable, point: IVec): PointLocation; export declare class ConnectionOverlay extends Overlay { private _service; points: IVec[]; highlightPoint: IVec | null; bound: Bound | null; constructor(_service: EdgelessPageService); private _findConnectablesInViews; render(ctx: CanvasRenderingContext2D): void; /** * Render the connector at the given point. It will try to find * the closest connectable element and render the connector. If the * point is not close to any connectable element, it will just render * the connector at the given point. * @param point the point to render the connector * @param excludedIds the ids of the elements that should be excluded * @returns the connection result */ renderConnector(point: IVec, excludedIds?: string[]): Connection; clear(): void; } export declare class ConnectorPathGenerator { private options; protected _aStarRunner: AStarRunner | null; constructor(options: { getElementById: (id: string) => EdgelessModel | Connectable | null; }); private _getConnectorEndElement; private _getConnectionPoint; private _generateStraightConnectorPath; private _computeStartEndPoint; private _generateCurveConnectorPath; private _prepareOrthogonalConnectorInfo; private _generateConnectorPath; updatePath(connector: ConnectorElementModel, path?: PointLocation[]): void; generateOrthogonalConnectorPath(input: OrthogonalConnectorInput): IVec[]; hasRelatedElement(connecter: ConnectorElementModel): boolean; } //# sourceMappingURL=connector-manager.d.ts.map