import type { Readable } from '@vielzeug/ripple'; /** * Keyboard shortcut that triggers a send: * - `'enter'` (default) — Enter sends, Shift+Enter inserts a newline. * - `'mod+enter'` — Enter always inserts a newline; Ctrl/Cmd+Enter sends. */ export type SendShortcut = 'enter' | 'mod+enter'; export type ComposerControlOptions = { disabled?: Readable; /** Blocks further sends (e.g. a send is already in flight) without disabling editing. */ loading?: Readable; /** Called for a send attempt that passed the `canSend` guard. */ onSend: (event: KeyboardEvent | MouseEvent) => void; sendShortcut?: Readable; value: Readable; }; export type ComposerControl = { /** Whether the current value is non-blank and the control isn't disabled/loading. */ canSend: Readable; /** Wire onto the raw `