/** * --- * category: utilities/DOM * --- * * transformSelection - Calculate the resulting text selection * of a changing text-containing HTML element * @module transformSelection * @param {HTMLElement} element - HTML element with selection capabilities * @param {string} cleanedValue - new value that will be given to the HTML element * @return {Object} resulting selection values */ declare function transformSelection(element: HTMLElement & { selectionStart: number; selectionEnd: number; selectionDirection: 'forward' | 'backward' | 'none'; value: string; }, cleanedValue: string): { selectionStart: number; selectionEnd: number; selectionDirection: "none" | "forward" | "backward"; }; /** * Calculate the resulting cursor position * within a string when some characters are removed * * @param {number} cursorIndex - original cursor index * @param {string} dirtyValue - original string * @param {string} cleanedValue - original string with some characters removed * @returns {number} resulting cursor index */ declare function transformCursor(cursorIndex: number, dirtyValue: string, cleanedValue: string): number; export default transformSelection; export { transformCursor, transformSelection }; //# sourceMappingURL=transformSelection.d.ts.map