import { W as WhichKeyEngine } from '../controller-UD1Fmtsm.cjs'; /** * Fully-resolved popup renderer options. `mountWhichKey` fills in whatever its * caller left out of `MountOptions.popup`, so — unlike the React props — every * field here is required by the time the renderer sees it. */ type PopupOptions = { layout: 'vertical' | 'horizontal'; maxRows: number; backgroundOpacity: number; }; /** Options for `mountWhichKey`. */ type MountOptions = { /** * Popup renderer options, merged over the defaults * (`{ layout: 'vertical', maxRows: 5, backgroundOpacity: 0.95 }`). Pass * `false` to suppress the popup entirely. */ popup?: Partial | false; /** Whether to render the cheatsheet. Defaults to `true`. */ cheatsheet?: boolean; /** Node the rendered elements are appended to. Defaults to `document.body`. */ container?: HTMLElement; /** * Replaces the `wk-` class prefix. Defaults to `'wk'`; a value that is not a * valid CSS identifier stem warns and falls back to it. Setting it opts out of * `which-key/styles.css`, which hardcodes `.wk-*` selectors, so you must * supply a stylesheet covering the whole class contract yourself. */ classPrefix?: string; }; /** Teardown handle returned by `mountWhichKey`. */ type WhichKeyMountHandle = { unmount(): void; }; /** * Subscribes a vanilla-DOM renderer to the engine and renders once immediately. * Returns a handle whose `unmount()` removes every node and listener the * renderer created; it is idempotent. * * It does not call `engine.start()` — attach the keydown listener yourself. * Only one renderer may be live per container: a second call for a container * that already has one warns and returns a no-op handle. */ declare const mountWhichKey: (engine: WhichKeyEngine, opts?: MountOptions) => WhichKeyMountHandle; export { type MountOptions, type PopupOptions, type WhichKeyMountHandle, mountWhichKey };