/** * Tiny autosize helper for textareas. Usage: * * const taRef = ref(null) * useAutosize(taRef, { minRows: 4, maxRows: 12 }) * * The composable listens to the textarea's `input` event, sets * its height to its scrollHeight (clamped to the row range), and * also re-runs when the bound value changes from outside so a * parent that resets `.value` (e.g. on node switch) still sizes * correctly. */ import { type Ref } from 'vue'; export interface AutosizeOptions { /** Minimum visible rows when the textarea is empty. Default 3. */ minRows?: number; /** Maximum visible rows before the textarea starts scrolling. * Default 12. Set to 0 for "no cap". */ maxRows?: number; } export declare function useAutosize(refEl: Ref, options?: AutosizeOptions): void;