UNPKG

@kinvolk/headlamp-plugin

Version:

The needed infrastructure for building Headlamp plugins.

42 lines (41 loc) 2.09 kB
import type { PayloadAction } from '@reduxjs/toolkit'; /** * Represents a keyboard shortcut configuration */ export interface ShortcutConfig { /** The unique identifier for the shortcut */ id: string; /** The human-readable name of the shortcut */ name: string; /** A description of what the shortcut does */ description: string; /** The current key combination assigned to the shortcut */ key: string; /** The default key combination for the shortcut */ defaultKey: string; /** The category the shortcut belongs to */ category: 'navigation' | 'search' | 'general'; } /** * All available shortcuts with their default configurations */ export declare const DEFAULT_SHORTCUTS: Record<string, ShortcutConfig>; export interface ShortcutsState { shortcuts: Record<string, ShortcutConfig>; isShortcutsDialogOpen: boolean; } export declare const shortcutsSlice: import("@reduxjs/toolkit").Slice<ShortcutsState, { setShortcut(state: import("immer").WritableDraft<ShortcutsState>, action: PayloadAction<{ id: string; key: string; }>): void; resetShortcut(state: import("immer").WritableDraft<ShortcutsState>, action: PayloadAction<string>): void; resetAllShortcuts(state: import("immer").WritableDraft<ShortcutsState>): void; setShortcutsDialogOpen(state: import("immer").WritableDraft<ShortcutsState>, action: PayloadAction<boolean>): void; }, "shortcuts", "shortcuts", import("@reduxjs/toolkit").SliceSelectors<ShortcutsState>>; export declare const setShortcut: import("@reduxjs/toolkit").ActionCreatorWithPayload<{ id: string; key: string; }, "shortcuts/setShortcut">, resetShortcut: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "shortcuts/resetShortcut">, resetAllShortcuts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"shortcuts/resetAllShortcuts">, setShortcutsDialogOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "shortcuts/setShortcutsDialogOpen">; declare const _default: import("redux").Reducer<ShortcutsState>; export default _default;