import type { MarkOptional } from "@excalidraw/common/utility-types"; import type { ExcalidrawImageElement, ExcalidrawTextElement, ExcalidrawLinearElement, ExcalidrawGenericElement, NonDeleted, TextAlign, VerticalAlign, Arrowhead, ExcalidrawFreeDrawElement, FontFamilyValues, ExcalidrawTextContainer, ExcalidrawFrameElement, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawIframeElement, ElementsMap, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement } from "./types"; export type ElementConstructorOpts = MarkOptional, "width" | "height" | "angle" | "groupIds" | "frameId" | "index" | "boundElements" | "seed" | "version" | "versionNonce" | "link" | "strokeStyle" | "fillStyle" | "strokeColor" | "backgroundColor" | "roughness" | "strokeWidth" | "roundness" | "locked" | "opacity" | "customData">; export declare const newElement: (opts: { type: ExcalidrawGenericElement["type"]; } & ElementConstructorOpts) => NonDeleted; export declare const newEmbeddableElement: (opts: { type: "embeddable"; } & ElementConstructorOpts) => NonDeleted; export declare const newIframeElement: (opts: { type: "iframe"; } & ElementConstructorOpts) => NonDeleted; export declare const newFrameElement: (opts: { name?: string; } & ElementConstructorOpts) => NonDeleted; export declare const newMagicFrameElement: (opts: { name?: string; } & ElementConstructorOpts) => NonDeleted; export declare const newTextElement: (opts: { text: string; originalText?: string; fontSize?: number; fontFamily?: FontFamilyValues; textAlign?: TextAlign; verticalAlign?: VerticalAlign; containerId?: ExcalidrawTextContainer["id"] | null; lineHeight?: ExcalidrawTextElement["lineHeight"]; autoResize?: ExcalidrawTextElement["autoResize"]; } & ElementConstructorOpts) => NonDeleted; export declare const refreshTextDimensions: (textElement: ExcalidrawTextElement, container: ExcalidrawTextContainer | null, elementsMap: ElementsMap, text?: string) => { x: number; y: number; width: number; height: number; text: string; } | undefined; export declare const newFreeDrawElement: (opts: { type: "freedraw"; points?: ExcalidrawFreeDrawElement["points"]; simulatePressure: boolean; pressures?: ExcalidrawFreeDrawElement["pressures"]; } & ElementConstructorOpts) => NonDeleted; export declare const newLinearElement: (opts: { type: ExcalidrawLinearElement["type"]; points?: ExcalidrawLinearElement["points"]; polygon?: ExcalidrawLineElement["polygon"]; } & ElementConstructorOpts) => NonDeleted; export declare const newArrowElement: (opts: { type: ExcalidrawArrowElement["type"]; startArrowhead?: Arrowhead | null; endArrowhead?: Arrowhead | null; points?: ExcalidrawArrowElement["points"]; elbowed?: T; fixedSegments?: ExcalidrawElbowArrowElement["fixedSegments"] | null; } & ElementConstructorOpts) => T extends true ? NonDeleted : NonDeleted; export declare const newImageElement: (opts: { type: ExcalidrawImageElement["type"]; status?: ExcalidrawImageElement["status"]; fileId?: ExcalidrawImageElement["fileId"]; scale?: ExcalidrawImageElement["scale"]; crop?: ExcalidrawImageElement["crop"]; } & ElementConstructorOpts) => NonDeleted;