(editor: Editor)
| 9 | const EDITOR_TO_MENTION_STORE = new WeakMap<Editor, UseBoundStore<StoreApi<MentionStore>>>() |
| 10 | |
| 11 | export const getMentionStore = (editor: Editor) => { |
| 12 | let store = EDITOR_TO_MENTION_STORE.get(editor) |
| 13 | if (!store) { |
| 14 | store = create<MentionStore>(() => ({ |
| 15 | open: false, |
| 16 | searchValue: '', |
| 17 | })) |
| 18 | EDITOR_TO_MENTION_STORE.set(editor, store) |
| 19 | } |
| 20 | return store |
| 21 | } |
| 22 | |
| 23 | export const MentionStore = { |
| 24 | setSearchValue(editor: Editor, searchValue: string) { |
no test coverage detected
searching dependent graphs…