/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { LitElement } from 'lit'; type Constructor = new (...args: any[]) => T; /** * Interface for components that support text selection operations */ export interface SelectionCapable { /** * Select all text in the input */ selectAll(): void; /** * Select a range of text in the input * @param start - Start position * @param end - End position */ selectRange(start: number, end: number): void; /** * Get the current cursor position * @returns The cursor position or null if not available */ getCursorPosition(): number | null; /** * Set the cursor position * @param position - The position to set */ setCursorPosition(position: number): void; /** * Get the currently selected text * @returns The selected text or empty string */ getSelectedText(): string; } /** * Mixin that provides text selection capabilities to input components * * @param superClass - The base class to extend * @returns Enhanced class with selection capabilities * * @example * ```typescript * export class MyInput extends SelectionMixin(LitElement) { * @query('input') input!: HTMLInputElement; * * handleDoubleClick() { * this.selectAll(); * } * } * ``` */ export declare const SelectionMixin: >(superClass: T) => Constructor & T; export {}; //# sourceMappingURL=selection-mixin.d.ts.map