import { type Y } from '@blockeditor/store'; import type { HitTestOptions } from '../../page-block/edgeless/type.js'; import type { SerializedXYWH } from '../index.js'; import type { Bound } from '../utils/bound.js'; import type { PointLocation } from '../utils/point-location.js'; import { type IVec2 } from '../utils/vec.js'; import { type BaseProps, ElementModel } from './base.js'; import { FontWeight } from './common.js'; import { type FontStyle, type StrokeStyle, type TextAlign, type VerticalAlign } from './common.js'; import { rect } from './utils/shape/rect.js'; export declare const shapeMethods: { [key in ShapeType]: typeof rect; }; export type ShapeType = 'rect' | 'triangle' | 'ellipse' | 'diamond'; export type ShapeStyle = 'General' | 'Scribbled'; export declare enum ShapeTextFontSize { SMALL = 12, MEDIUM = 20, LARGE = 28, XLARGE = 36 } export type ShapeProps = BaseProps & { shapeType: ShapeType; radius: number; filled: boolean; fillColor: string; strokeWidth: number; strokeColor: string; strokeStyle: StrokeStyle; shapeStyle: ShapeStyle; roughness?: number; text?: Y.Text; color?: string; fontSize?: number; fontFamily?: string; fontWeight?: FontWeight; fontStyle?: FontStyle; textAlign?: TextAlign; textHorizontalAlign?: TextAlign; textVerticalAlign?: VerticalAlign; }; export declare class ShapeElementModel extends ElementModel { static propsToY(props: ShapeProps): ShapeProps; get type(): string; textDisplay: boolean; xywh: SerializedXYWH; rotate: number; shapeType: ShapeType; radius: number; filled: boolean; fillColor: string; strokeWidth: number; strokeColor: string; strokeStyle: StrokeStyle; shapeStyle: ShapeStyle; roughness: number; text?: Y.Text; color: string; fontSize: number; fontFamily: string; fontWeight: FontWeight; fontStyle: FontStyle; textAlign: TextAlign; textHorizontalAlign: TextAlign; textVerticalAlign: VerticalAlign; hitTest(x: number, y: number, options: HitTestOptions): boolean; containedByBounds(bounds: Bound): boolean; intersectWithLine(start: IVec2, end: IVec2): PointLocation[] | null; getNearestPoint(point: IVec2): IVec2; getRelativePointLocation(point: IVec2): PointLocation; } //# sourceMappingURL=shape.d.ts.map