/** * SVG Helpers */ export interface StringToStringOrNumberMap { [key: string]: string | number; } export declare type DomAttributeMap = StringToStringOrNumberMap; export declare type CssStyleMap = StringToStringOrNumberMap; export declare function newSvg(className: string, attributes: DomAttributeMap, css?: CssStyleMap): SVGSVGElement; export declare function newG(className: string, attributes?: DomAttributeMap, css?: CssStyleMap): SVGGElement; export declare function newClipPath(id: string): SVGClipPathElement; export declare function newForeignObject(attributes: DomAttributeMap, className?: string, css?: CssStyleMap): SVGForeignObjectElement; export declare function newA(className: string): SVGAElement; export declare function newRect(attributes: DomAttributeMap, className?: string, css?: CssStyleMap): SVGRectElement; export declare function newLine(attributes: DomAttributeMap, className?: string): SVGLineElement; export declare function newTitle(text: string): SVGTitleElement; export declare function newTextEl(text: string, attributes?: DomAttributeMap, css?: CssStyleMap): SVGTextElement; export declare function newPath(d: string): SVGPathElement; /** * Measure the width of a SVGTextElement in px * @param {SVGTextElement} textNode * @param {boolean=false} skipClone - do not clone `textNode` and use original * @returns number */ export declare function getNodeTextWidth(textNode: SVGTextElement, skipClone?: boolean): number;