(editor: Editable)
| 9 | const EDITOR_TO_LINK_STORE = new WeakMap<Editable, UseBoundStore<StoreApi<LinkStore>>>() |
| 10 | |
| 11 | const getStore = (editor: Editable) => { |
| 12 | let store = EDITOR_TO_LINK_STORE.get(editor) |
| 13 | if (!store) { |
| 14 | store = create<LinkStore>(() => ({ |
| 15 | open: false, |
| 16 | })) |
| 17 | EDITOR_TO_LINK_STORE.set(editor, store) |
| 18 | } |
| 19 | return store |
| 20 | } |
| 21 | |
| 22 | export const LinkStore = { |
| 23 | open: (editor: Editable) => { |
no test coverage detected
searching dependent graphs…