import type { EditorHost } from '@blockeditor/lit'; import { type Y } from '@blockeditor/store'; import type { HitTestOptions, IEdgelessElement } from '../../page-block/edgeless/type.js'; import type { SurfaceBlockModel } from '../surface-model.js'; import { Bound } from '../utils/bound.js'; import { PointLocation } from '../utils/point-location.js'; import type { IVec } from '../utils/vec.js'; import { type SerializedXYWH } from '../utils/xywh.js'; import type { OmitFunctionsAndKeysAndReadOnly } from './utility-type.js'; export type ModelToProps = OmitFunctionsAndKeysAndReadOnly; export type BaseProps = { index: string; seed: number; }; export declare abstract class ElementModel implements IEdgelessElement { static propsToY(props: Record): Record; /** * When the ymap is not connected to the doc, its value cannot be read. * But we need to use those value during the creation, so the yfied decorated field's value will * be stored in this map too during the creation. * * After the ymap is connected to the doc, this map will be cleared. */ protected _preserved: Map; protected _stashed: Map; protected _local: Map; protected _onChange: (payload: { props: Record; oldValues: Record; }) => void; protected _observerDisposable: Record void>; yMap: Y.Map; surface: SurfaceBlockModel; abstract rotate: number; abstract xywh: SerializedXYWH; abstract get type(): string; index: string; seed: number; display: boolean; opacity: number; externalXYWH: SerializedXYWH | undefined; get externalBound(): Bound | null; constructor(options: { yMap: Y.Map; model: SurfaceBlockModel; stashedStore: Map; onChange: (payload: { props: Record; oldValues: Record; }) => void; }); get connectable(): boolean; get deserializedXYWH(): import("../utils/xywh.js").XYWH; get x(): number; get y(): number; get w(): number; get h(): number; get group(): import("./group.js").GroupElementModel | null; get groups(): import("./group.js").GroupElementModel[]; get id(): string; get elementBound(): Bound; stash(prop: keyof Props | string): void; pop(prop: keyof Props | string): void; containedByBounds(bounds: Bound): boolean; getNearestPoint(point: IVec): IVec; intersectWithLine(start: IVec, end: IVec): PointLocation[] | null; getRelativePointLocation(relativePoint: IVec): PointLocation; boxSelect(bound: Bound): boolean; hitTest(x: number, y: number, _: HitTestOptions, __?: EditorHost): boolean; serialize(): { [x: string]: any; }; } //# sourceMappingURL=base.d.ts.map