type BoundingBox = {
    x: number;
    y: number;
    width: number;
    height: number;
};
export interface SvgNode<Attrs = Record<string, unknown>> {
    tag: string;
    attrs: Attrs & {
        transform?: string;
    };
}
export interface SvgElement<Attrs = Record<string, unknown>> extends SvgNode<Attrs> {
    children: (SvgNode | string)[];
}
export interface SvgGraphic extends SvgNode<{
    x?: number;
    y?: number;
    width?: number;
    height?: number;
    x1?: number;
    y1?: number;
    x2?: number;
    y2?: number;
    points?: string;
    cx?: number;
    cy?: number;
    r?: number;
    rx?: number;
    ry?: number;
}> {
}
export interface SvgPath extends SvgNode<{
    d: string;
    fill?: string;
    stroke?: string;
    'stroke-width'?: string | number;
    'is-glyph'?: boolean;
}> {
    tag: 'path';
}
export interface SvgImage extends SvgNode<{
    href: string;
    width: number;
    height: number;
}> {
    tag: 'image';
}
export interface SvgMarkedContent extends SvgNode<{
    href: string;
    type: string;
    x: number;
    y: number;
    width: number;
    height: number;
}> {
    tag: 'use';
}
export interface SvgRoot extends SvgElement<{
    id?: string;
    width: number;
    height: number;
}> {
    tag: 'svg';
}
export declare function isSvgElement(node: SvgNode): node is SvgElement;
export declare function isSvgPath(node: SvgNode): node is SvgPath;
export declare function isSvgImage(node: SvgNode): node is SvgImage;
export declare function isSvgMarkedContent(node: SvgNode): node is SvgMarkedContent;
export declare function isSvgRoot(node: SvgNode): node is SvgRoot;
export declare enum PrefixType {
    Root = "svg",
    Clip = "clip",
    Pattern = "pattern",
    MarkedContent = "marked_content"
}
export declare function id(type: PrefixType, id?: string | null, scope?: string): string;
/**
 * Traverse the SVG tree to find a node matching the given criteria.
 * @param root The root element to start the search from.
 * @param matcher A function that returns true for the desired node.
 * @returns The first matching node, or null if none is found.
 */
export declare function findSvgNode(root: SvgElement, matcher: (node: SvgNode) => boolean): SvgNode | null;
/**
 * Parse a transform string into a transformation matrix.
 * @param input The transform string.
 * @returns A transformation matrix.
 */
export declare function parseTransform(input: string): DOMMatrix;
export declare function matrixToTransform(matrix: DOMMatrix): string;
/**
 * Parse a font string into its components.
 * @param fontString The font string.
 * @returns An object containing the font components.
 */
export declare function parseFontStyle(fontString: string): {
    fontStyle: string;
    fontVariant: string;
    fontWeight: string;
    fontSize: string;
    lineHeight: string;
    fontFamilies: string[];
};
/**
 * Convert textAlign to text-anchor.
 * @param textAlign The textAlign value.
 * @returns The corresponding text-anchor value.
 */
export declare function getTextAnchor(textAlign: string): 'start' | 'end' | 'middle';
/**
 * Convert textBaseline to dominant-baseline.
 * @param textBaseline The textBaseline value.
 * @returns The corresponding dominant-baseline value.
 */
export declare function getDominantBaseline(textBaseline: string): 'alphabetic' | 'hanging' | 'text-before-edge' | 'text-after-edge' | 'central';
/**
 * Normalize a vector.
 * @param vector The input vector.
 * @returns The normalized vector.
 */
export declare function normalizeVector(vector: [number, number]): [number, number];
/**
 * Get the angle of a vector in radians.
 * @param vector The input vector.
 * @returns The angle in radians.
 */
export declare function getAngle(vector: [number, number]): number;
/**
 * Get the bounding box of a SVG node.
 * @param node The SVG node.
 * @param defs The SVG definitions (for resolving references).
 * @param inheritedMatrix The inherited transformation matrix.
 * @returns The bounding box of the SVG node.
 */
export declare function getBBox(node: SvgNode, defs?: SvgNode[], inheritedMatrix?: DOMMatrix): BoundingBox | null;
/**
 * Make a HTML string from a Svg node.
 * @param node The node to render.
 * @param attrs The attributes to add to the node.
 * @returns A HTML string representation of the node.
 */
export declare function renderSvgNode(node: SvgNode | string): string;
export {};
