import * as i0 from "@angular/core"; export declare class TextSelectionService { readonly window: Window & typeof globalThis; readonly listeners: import("@angular/core").WritableSignal; readonly selection: import("@angular/core").WritableSignal; readonly text: import("@angular/core").Signal; readonly ranges: import("@angular/core").Signal; readonly rects: import("@angular/core").Signal; private isListening; constructor(); /** * Clears the selection. This is a convenience method for `window.getSelection().empty()`. */ resetSelection(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Creates reactive signals for text selection. * * Example: * ```ts * const selection = injectTextSelection(); * * selection.text() // returns the selected text * selection.rects() // returns an array of bounding rects for each selection range * selection.ranges() // returns an array of Range objects for each selection range * selection.selection() // returns the Selection object * selection.clearSelection() // clears the selection * ``` * * @returns An object with signals for the selected text, selection ranges, rects, and the raw selection. */ export declare function injectTextSelection(): { text: import("@angular/core").Signal; rects: import("@angular/core").Signal; ranges: import("@angular/core").Signal; selection: import("@angular/core").Signal; clearSelection: () => void; };