1 | import { ModuleFn } from '../index';
|
2 | export declare const isMacLike: () => boolean;
|
3 | export declare const controlOrMetaKey: () => "meta" | "control";
|
4 | export declare function keys<O>(o: O): (keyof O)[];
|
5 | export interface SubState {
|
6 | shortcuts: Shortcuts;
|
7 | }
|
8 | export interface SubAPI {
|
9 | getShortcutKeys(): Shortcuts;
|
10 | setShortcuts(shortcuts: Shortcuts): Promise<Shortcuts>;
|
11 | setShortcut(action: Action, value: KeyCollection): Promise<KeyCollection>;
|
12 | restoreAllDefaultShortcuts(): Promise<Shortcuts>;
|
13 | restoreDefaultShortcut(action: Action): Promise<KeyCollection>;
|
14 | handleKeydownEvent(event: Event): void;
|
15 | handleShortcutFeature(feature: Action): void;
|
16 | }
|
17 | export declare type KeyCollection = string[];
|
18 | export interface Shortcuts {
|
19 | fullScreen: KeyCollection;
|
20 | togglePanel: KeyCollection;
|
21 | panelPosition: KeyCollection;
|
22 | toggleNav: KeyCollection;
|
23 | toolbar: KeyCollection;
|
24 | search: KeyCollection;
|
25 | focusNav: KeyCollection;
|
26 | focusIframe: KeyCollection;
|
27 | focusPanel: KeyCollection;
|
28 | prevComponent: KeyCollection;
|
29 | nextComponent: KeyCollection;
|
30 | prevStory: KeyCollection;
|
31 | nextStory: KeyCollection;
|
32 | shortcutsPage: KeyCollection;
|
33 | aboutPage: KeyCollection;
|
34 | escape: KeyCollection;
|
35 | collapseAll: KeyCollection;
|
36 | expandAll: KeyCollection;
|
37 | }
|
38 | export declare type Action = keyof Shortcuts;
|
39 | export declare const defaultShortcuts: Shortcuts;
|
40 | export interface Event extends KeyboardEvent {
|
41 | target: {
|
42 | tagName: string;
|
43 | addEventListener(): void;
|
44 | removeEventListener(): boolean;
|
45 | dispatchEvent(event: Event): boolean;
|
46 | getAttribute(attr: string): string | null;
|
47 | };
|
48 | }
|
49 | export declare const init: ModuleFn;
|