(e: React.DragEvent)
| 64 | } |
| 65 | |
| 66 | export function readDragPayload(e: React.DragEvent): DragPayload | null { |
| 67 | const raw = |
| 68 | e.dataTransfer.getData(ZEN_DND_MIME) || |
| 69 | e.dataTransfer.getData(ZEN_DND_ASSET_MIME) || |
| 70 | e.dataTransfer.getData(ZEN_DND_TEXT_MIME) |
| 71 | if (!raw) return null |
| 72 | try { |
| 73 | return JSON.parse(raw) as DragPayload |
| 74 | } catch { |
| 75 | return null |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | export function hasZenItem(e: React.DragEvent): boolean { |
| 80 | return ( |
no outgoing calls
no test coverage detected