import type { ExcalidrawTextElement } from "@excalidraw/excalidraw/element/types"; import type { Arrowhead } from "@excalidraw/excalidraw/element/types"; import type { ValidContainer } from "@excalidraw/excalidraw/element/transform"; import type { LocalPoint } from "@excalidraw/excalidraw/math/types"; import { ContainerStyle, LabelStyle, SubGraph, Vertex, Edge } from "../interfaces.js"; import { ExcalidrawVertexElement } from "../types.js"; import type { Mutable } from "@excalidraw/excalidraw/common/utility-types"; /** * The width of a line of Excalifont text (estimated when there's no canvas to * measure it on) */ export declare const measureLabelLineWidthAtFontSize: (line: string, fontSize: number) => number; /** * Compute groupIds for each element */ export interface ArrowType { startArrowhead?: Arrowhead | null; endArrowhead?: Arrowhead | null; } export declare const computeExcalidrawArrowType: (mermaidArrowType: string) => ArrowType; export declare const getText: (element: Vertex | Edge | SubGraph) => string; /** * Compute style for vertex */ export declare const computeExcalidrawVertexStyle: (style: ContainerStyle) => Partial>; /** * Compute style for label */ export declare const computeExcalidrawVertexLabelStyle: (style: LabelStyle) => Partial>; /** * A box's (subgraph's, namespace's) title, on its top (centered on `centerX`, * or on the box), on an opaque band (in the box's fill) above the arrows, * which would otherwise cross it: the box is behind them. Only as wide as the * title, so arrows entering the box elsewhere stay whole. */ export declare const createTitleBandElement: ({ id, box, centerX, text, fontSize, containerStyle, labelStyle, }: { id: string; box: { x: number; y: number; width: number; }; centerX?: number | undefined; text: string; fontSize: number; containerStyle: Partial>; labelStyle?: Partial> | undefined; }) => ValidContainer; /** * An elbow arrow along an orthogonal route: it stays orthogonal when what it * connects is moved. Excalidraw routes elbow arrows itself, so the route's * middle segments are fixed where they are (the first and last can't be). */ export declare const getElbowArrowProps: (points: LocalPoint[]) => { elbowed: boolean; roundness: null; fixedSegments: { start: LocalPoint; end: LocalPoint; index: number; }[]; };