import { Maybe } from './types'; import { Color, Font } from '../hooks/useFetch'; import { MetaWord } from './typesetting'; export declare type NoteState = { imageSrc: Maybe; color?: Maybe; font: Font; alignment: 'left' | 'center' | 'right'; }; /** * Extract note data from the SVG that we store. */ export declare const stateFromSvgString: (svg: string) => NoteState; export declare type Alignment = 'left' | 'center' | 'right'; interface BuildSvgParams { width: number; height: number; fontSize: number; color?: Color; lines: MetaWord[][]; /** * @deafult Arial */ fontFamily?: string; /** * in em * @default DEFAULT_LINE_HEIGHT_EM */ lineHeight?: number; lineWidth: number; /** * alignment presentation attribute * @default left */ textAnchor?: Alignment; /** * @default 400 */ fontWeight?: number | string; /** * Allows you to break lines at one width and then update the measures for * another. */ scale?: number; imageUrl?: Maybe; svgPadding?: number; } export declare const buildSVG: ({ width, height, fontSize, lines, color, fontFamily, lineHeight, lineWidth, textAnchor, fontWeight, imageUrl, svgPadding }: BuildSvgParams) => string; export interface TextToSvgParams extends Omit { text: string; /** * @default 1.2 */ lineHeight?: number; } export declare const textToSvgString: ({ text, width, height, fontSize, color, fontFamily, lineHeight, textAnchor, fontWeight, lineWidth }: TextToSvgParams) => string; export {};