solid-command-palette
Version:
Add a command palette to your Solid.js App
16 lines (15 loc) • 908 B
TypeScript
import { KeyBindingMap } from 'tinykeys';
import { ActionId, ActionsContext, StoreMethods, WrappedAction, WrappedActionList } from '../types';
declare type RunStoreMethods = {
selectParentAction: StoreMethods['selectParentAction'];
closePalette: StoreMethods['closePalette'];
};
export declare function checkActionAllowed(action: WrappedAction, actionsContext: ActionsContext): boolean;
export declare function runAction(action: WrappedAction, actionsContext: ActionsContext, storeMethods: RunStoreMethods): void;
export declare function getShortcutHandlersMap(actionsList: WrappedActionList, actionsContext: ActionsContext, storeMethods: StoreMethods): KeyBindingMap;
declare type ActiveParentActionIdListArg = Readonly<Array<ActionId>>;
export declare function getActiveParentAction(activeParentActionIdList: ActiveParentActionIdListArg): {
activeId: string;
isRoot: boolean;
};
export {};