import * as fontkit from 'fontkit';
import SVGPathCommander from 'svg-path-commander';
export declare function ensureNumber(value: string | undefined): number | undefined;
export declare function ensureCSSValue(value: string | undefined): number | undefined;
export declare function getSVGValue(element: Element, propertyName: string): string | undefined;
export type GlyphSegment = PathGlyphSegment | InlineSVGGlyphSegment;
export type PathGlyphSegment = {
    type: 'path';
    path: SVGPathCommander;
    bbox: fontkit.Glyph['bbox'];
    cbox: fontkit.Glyph['cbox'];
    xAdvance: number;
    advanceWidth: number;
    letterSpacing: number;
    isLigature: boolean;
    isMark: boolean;
};
export type InlineSVGGlyphSegment = {
    type: 'inline-svg';
    svg: string;
    width: number;
    height: number;
    baselineOffset: number;
    xAdvance: number;
    yOffset: number;
    letterSpacing: number;
};
export type TextFragment = {
    glyphs: GlyphSegment[];
    bbox: fontkit.Glyph['bbox'];
    descent: number;
    ascent: number;
    unitsPerEm: number;
};
export type TextFormat = {
    fontFamily: string;
    fontWeight: number;
    fontStyle: string;
    fontSize: number;
    letterSpacing: number;
};
export declare function getTextFormat(text: SVGTextElement | SVGTSpanElement, inherit?: TextFormat): TextFormat;
export declare function getFont(fontData: Uint8Array, concreteWeight?: number | string): fontkit.Font;
export declare function textToPath(text: string, fontData: Uint8Array, fontSize: number, letterSpacing: number, alignmentBaseline: 'hanging' | 'middle' | 'baseline', concreteWeight: number | string | undefined, format: TextFormat, stylesheet: string, spanStyle?: string, isDebug?: boolean, assetProxyTemplate?: string): Promise<{
    glyphs: GlyphSegment[];
    ascent: number;
    descent: number;
    unitsPerEm: number;
    fontBBox: fontkit.BBOX;
}>;
export declare function combineBBoxes(bboxes: {
    x: number;
    y: number;
    width: number;
    height: number;
}[]): {
    x: number;
    y: number;
    width: number;
    height: number;
};
export type SpanDescriptor = {
    format: TextFormat;
    text: string;
    dx?: number;
    dy?: number;
    x?: number;
    y?: number;
    style?: string;
    tspan?: SVGTSpanElement;
};
export declare function textToSpans(text: SVGTextElement, isDebug?: boolean): {
    spans: SpanDescriptor[];
    x: number;
    y: number;
};
export type RenderedSegment = RenderedPathSegment | RenderedInlineSVGSegment;
export type RenderedPathSegment = {
    type: 'path';
    path: SVGPathCommander;
    bbox: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
};
export type RenderedInlineSVGSegment = {
    type: 'inline-svg';
    svg: string;
    x: number;
    y: number;
    width: number;
    height: number;
};
export declare function renderTextSpans(stylesheet: string, spans: SpanDescriptor[], baseX: number, baseY: number, isDebug?: boolean, assetProxyTemplate?: string): Promise<{
    glyphBBoxes: {
        x: number;
        y: number;
        width: number;
        height: number;
    }[];
    bbox: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    segments: RenderedSegment[];
    style?: string;
    text: string;
    ascent: number;
    descent: number;
    unitsPerEm: number;
    fontBBox: fontkit.Glyph["bbox"];
}[]>;
export declare function textElementToPath(text: SVGTextElement, rootSVG: SVGSVGElement, assetProxyTemplate?: string): Promise<{
    paths: {
        segments: RenderedSegment[];
        style: string | undefined;
    }[];
    text: string;
}>;
export declare function getElementClipPath(element: Element): string | undefined;
export declare function getElementMask(element: Element): string | undefined;
export declare function createInlineStyle(values: {
    [k: string]: string | undefined;
}): string;
export declare function getStyleObjectFromInlineStyle(styleAttr: string | null): {
    [k: string]: string;
};
