| 3 | import { Editable } from './editable' |
| 4 | |
| 5 | export interface DragStore { |
| 6 | drag: { |
| 7 | type: 'block' | 'text' |
| 8 | /** |
| 9 | * 拖拽的开始位置 |
| 10 | */ |
| 11 | from: Range | Path |
| 12 | /** |
| 13 | * 拖拽到目标位置 |
| 14 | */ |
| 15 | to: Selection | Path |
| 16 | /** |
| 17 | * 拖拽的数据 |
| 18 | */ |
| 19 | data: DataTransfer |
| 20 | /** |
| 21 | * 当前鼠标位置 |
| 22 | */ |
| 23 | position: Record<'x' | 'y', number> |
| 24 | } | null |
| 25 | } |
| 26 | |
| 27 | const EDITOR_TO_DRAG_STORE = new WeakMap<Editor, UseBoundStore<StoreApi<DragStore>>>() |
| 28 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…