2
0
mirror of https://github.com/frappe/books.git synced 2025-02-14 01:40:26 +00:00
books/src/utils/injectionKeys.ts
18alantom e1b502b138 refactor: remove global shortcuts, move Shortcuts
- update injections in a few components
- use Shift+Backspace for back (prevent clashes with the \b)
- use string context for single instance components
2023-03-27 00:27:00 -07:00

19 lines
534 B
TypeScript

import type { InjectionKey, Ref } from 'vue';
import type { Search } from './search';
import type { Shortcuts } from './shortcuts';
import type { useKeys } from './vueUtils';
export const languageDirectionKey = Symbol('languageDirection') as InjectionKey<
Ref<'ltr' | 'rtl'>
>;
export const keysKey = Symbol('keys') as InjectionKey<
ReturnType<typeof useKeys>
>;
export const searcherKey = Symbol('searcher') as InjectionKey<
Ref<null | Search>
>;
export const shortcutsKey = Symbol('shortcuts') as InjectionKey<Shortcuts>;