import type { RenderedShape } from "./types.js"; import type { ViewportController } from "./viewport.js"; /** * Handles keyboard navigation for the BPMN canvas. * * ## Key bindings * | Key | Action | * |-----|--------| * | `←` `→` `↑` `↓` | Pan viewport | * | `+` / `=` | Zoom in | * | `-` | Zoom out | * | `0` / `Home` | Fit diagram to view | * | `Tab` | Focus next element | * | `Shift+Tab` | Focus previous element | * | `Enter` / `Space` | Activate focused element (fires `element:click`) | * | `Escape` | Return focus to canvas container | * * The canvas container uses `role="application"` so screen readers pass * all key presses to the application rather than handling them natively. */ export declare class KeyboardHandler { private readonly _container; private readonly _viewport; private readonly _onFit; private readonly _onActivate; private readonly _onFocus; private readonly _onBlur; private _shapes; private _focusIndex; constructor(_container: HTMLElement, _viewport: ViewportController, _onFit: () => void, _onActivate: (id: string) => void, _onFocus: (id: string) => void, _onBlur: () => void); /** Updates the navigable shape list after a diagram (re)load. */ setShapes(shapes: RenderedShape[]): void; /** * Swaps in the re-rendered graphics of one shape after an incremental * update, keeping focus position and avoiding a DOM read per shape. */ updateShape(shape: RenderedShape): void; /** Removes all keyboard event listeners. */ destroy(): void; private _focusShape; private _clearFocus; private readonly _onKeyDown; private readonly _onFocusOut; } //# sourceMappingURL=keyboard.d.ts.map