/** * Copyright 2023-present DreamNum Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { IShapeProps } from '@univerjs/engine-render'; import { Shape } from '@univerjs/engine-render'; export interface ISheetBasicShapeConnectionSiteObjectProps extends IShapeProps { /** The target shape's ID that this connection site belongs to */ targetShapeId: string; /** The connection site index within the target shape */ cxnIndex: number; /** Unit ID */ unitId: string; /** Sub-unit ID */ subUnitId: string; /** Whether this connection site is highlighted (connector endpoint is nearby) */ isHighlighted?: boolean; } /** * Render object for displaying connection sites on shapes. * These are the points where connectors can attach. */ export declare class SheetBasicShapeConnectionSiteObject extends Shape { private _targetShapeId; private _cxnIndex; private _unitId; private _subUnitId; private _isHighlighted; constructor(key?: string, props?: ISheetBasicShapeConnectionSiteObjectProps); /** * Get the target shape info for this connection site */ getConnectionInfo(): { unitId: string; subUnitId: string; shapeId: string; cxnIndex: number; }; /** * Set whether this connection site is highlighted */ setHighlighted(highlighted: boolean): void; /** * Check if this connection site is highlighted */ isHighlighted(): boolean; setShapeProps(props: Partial): void; protected _draw(ctx: CanvasRenderingContext2D): void; }