import type * as Y from 'yjs'; import type { Renderer } from '../renderer.js'; import type { RoughCanvas } from '../rough/canvas.js'; import type { SurfaceManager } from '../surface.js'; import { Bound } from '../utils/bound.js'; import { type PointLocation } from '../utils/point-location.js'; import type { IVec } from '../utils/vec.js'; import { type SerializedXYWH, type XYWH } from '../utils/xywh.js'; export interface ISurfaceElement { id: string; type: string; xywh: SerializedXYWH; index: string; seed: number; rotate: number; batch: string | null; } export interface ISurfaceElementLocalRecord { display?: boolean; opacity?: number; } export interface HitTestOptions { expand?: number; ignoreTransparent?: boolean; pierce?: boolean; } export type ComputedValue = (value: string) => string; export declare abstract class SurfaceElement { abstract containedByBounds(bounds: Bound): boolean; abstract getNearestPoint(point: IVec): IVec; abstract intersectWithLine(start: IVec, end: IVec): PointLocation[] | null; abstract getRelativePointLocation(point: IVec): PointLocation; yMap: Y.Map; protected surface: SurfaceManager; protected renderer: Renderer | null; protected _connectable: boolean; computedValue: ComputedValue; constructor(yMap: Y.Map, surface: SurfaceManager, data?: Partial); get id(): T["id"]; get index(): T["index"]; get type(): T["type"]; get xywh(): T["xywh"]; get seed(): T["seed"]; get rotate(): T["rotate"]; get batch(): NonNullable | null; get gridBound(): Bound; get x(): number; get y(): number; get w(): number; get h(): number; get localRecord(): ISurfaceElementLocalRecord | import("./shape/types.js").IShapeLocalRecord | import("./frame/types.js").IFrameLocalRecord | undefined; get connectable(): boolean; getLocalRecord(): L; applyUpdate(updates: Partial): void; deserializeXYWH(): XYWH; serialize(): T; hitTest(x: number, y: number, _options?: HitTestOptions): boolean; private _onMap; mount(renderer: Renderer): void; unmount(): void; render(_ctx: CanvasRenderingContext2D, _matrix: DOMMatrix, _rc: RoughCanvas): void; } //# sourceMappingURL=surface-element.d.ts.map