import { Coordinate, SVGSection } from '../../../../types/RealRendererTypes'; import { INodeData, Node } from '../_node'; import { addCursor, destroyCursor, moveCursorDown, moveCursorLeft, moveCursorRight, moveCursorUp } from './_cursor'; import { appendText, getText, _getBeforeCursorText, _getAfterCursorText, deleteLastCharacter, _updateBeforeCursorText, deleteNextCharacter, _updateAfterCursorText, setBold, setItalic, setUnderline } from './_editing'; import { newLine, removeLine } from './_newlines'; export interface ITspanData { textContent: string; /** dy attribute */ dy: string | null; /** x attribute */ x: string | null; } export interface ITextNodeData extends INodeData { tspans: ITspanData[]; position: Coordinate; type: 'text'; } export declare class Text extends Node { tspans: SVGTSpanElement[]; cursorSpan: SVGTSpanElement; /** The text tspan after which the cursor is placed */ cursorIndex: number; /** span indexes at which a newLine starts */ lineIndexes: number[]; position: Coordinate; newLine: typeof newLine; protected removeLine: typeof removeLine; addCursor: typeof addCursor; destroyCursor: typeof destroyCursor; moveCursorLeft: typeof moveCursorLeft; moveCursorRight: typeof moveCursorRight; moveCursorDown: typeof moveCursorDown; moveCursorUp: typeof moveCursorUp; protected _getBeforeCursorText: typeof _getBeforeCursorText; protected _updateBeforeCursorText: typeof _updateBeforeCursorText; protected _getAfterCursorText: typeof _getAfterCursorText; protected _updateAfterCursorText: typeof _updateAfterCursorText; getText: typeof getText; appendText: typeof appendText; deleteLastCharacter: typeof deleteLastCharacter; deleteNextCharacter: typeof deleteNextCharacter; setBold: typeof setBold; setItalic: typeof setItalic; setUnderline: typeof setUnderline; constructor(position: Coordinate, initialText: string, section: SVGSection); protected _addTspan(text: string, index?: number, relativeTo?: 'spanAfter' | 'spanBefore'): void; protected _setTspanPositioning(tspan: SVGTSpanElement, positioningType: 'lineBreak' | 'inline'): void; updateTextBaseline(position: Coordinate): void; setStyle(property: string, value: string): void; setFontSize(size: number): void; /** @deprecated */ importV1(data: string): void; import(data: ITextNodeData): void; export(): ITextNodeData; }