Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.
TypeScript clipboardclipboard-managerdesktop-appdrag-and-dropelectronopen-sourceproductivityproductivity-toolwindows
Remove Mermaid architecture diagrams from README.md for cleaner user documentation
Deepender253c30e1a86551
diff --git a/README.md b/README.mdindex 7df9055..579ecd5 100644--- a/README.md+++ b/README.md@@ -148,110 +148,10 @@ When you re-copy existing content, Edge-Drop doesn't add a duplicate — it bump## Architecture-```mermaid-graph TD- subgraph OS ["Operating System"]- WinClip["Win32 System Clipboard"]- WinFS["Local Filesystem / AppData"]- OLE["OS OLE Drag & Drop Pipeline"]- end-- subgraph Main ["Electron Main Process (Node.js)"]- ClipWatch["ClipboardWatcher — 600ms poll, FNV-1a signatures"]- Store["ItemStore — atomic JSON + per-image PNG files"]- Tray["System Tray & Native Menu"]- WinMgr["BrowserWindow + 16ms Cursor Edge Poller"]- end-- subgraph Bridge ["Typed Preload Bridge (contextIsolation)"]- API["contextBridge → window.edge"]- end-- subgraph Renderer ["React Renderer"]- Zustand["Zustand store"]- Hooks["useEdgeHover · useDragOut"]- UI["Panel · ItemList · Fluid Bundles"]- end-- WinClip <-->|"polls every 600ms"| ClipWatch- ClipWatch -->|"state:items IPC"| API- Store <-->|"atomic JSON read/write"| WinFS- WinMgr <-->|"window:cursor-edge · window:set-interactive"| API- UI -->|"item:start-drag IPC"| API- API -->|"OLE native handle"| OLE- API <-->|"typed handlers & events"| Zustand- Zustand <--> UI-```--### Edge-trigger state machine--```mermaid-stateDiagram-v2- [*] --> Closed: startup, x=0, click-through- state Closed {- [*] --> PollingEdge- PollingEdge --> TriggerZone: cursor x ≤ 3px in hot zone- TriggerZone --> DwellTimer: linger ≥ 120ms- }- state Open {- [*] --> Interactive: setInteractive(true)- Interactive --> HysteresisCheck: 16ms main poll- HysteresisCheck --> Interactive: x ≤ 255px (inside blade)- HysteresisCheck --> GraceTimer: x > 290px OR left y-bounds- GraceTimer --> Interactive: cursor returns within 250ms- }- Closed --> Open: dwell timer expires- Open --> Closed: grace timer expires-```--### Clipboard capture & dedup pipeline--```mermaid-sequenceDiagram- participant OS as System Clipboard- participant CW as ClipboardWatcher- participant IS as ItemStore (disk)- participant R as React UI- loop Every 600ms- CW->>OS: read available formats- alt Files (Win32 HDROP / FileNameW)- CW->>OS: PowerShell GetFileDropList (bypasses single-file limit)- else Image- CW->>OS: clipboard.readImage → raw BGRA- CW->>CW: FNV-1a hash over ~400 sampled bytes- else Text / URL / HTML- CW->>OS: clipboard.readText / readHTML- end- CW->>IS: lookup signature- alt Duplicate- IS->>IS: bump hitCount, move to front, update timestamp- else New- IS->>IS: prepend, enforce historyLimit, evict oldest unpinned- end- IS-->>R: broadcast state:items- end-```--### Native drag-out flow--```mermaid-sequenceDiagram- participant U as User- participant R as React Card- participant M as Electron Main- participant OS as OS / External App- Note over U,OS: Drag OUT — native OLE- U->>R: dragstart on item tile- R->>R: preventDefault (kill HTML5 ghost)- R->>M: send item:start-drag (fire & forget)- M->>M: stage content → temp file (.png / .txt / real paths)- M->>OS: webContents.startDrag({ file, icon })- OS->>U: native drag ghost → drop anywhere- Note over U,OS: Drag IN — file drop- U->>R: drag files onto panel edge- R->>M: webUtils.getPathForFile- M->>M: validate paths, create bundle, broadcast-```+Edge-Drop is engineered with a strict process-isolated Electron architecture:+- **Electron Main Process (Node.js)**: Runs high-frequency cursor polling, Windows DPAPI safeStorage clipboard history persistence, PowerShell Win32 HDROP multi-file parsing, and System Tray synchronization.+- **Typed Preload Bridge (`contextBridge`)**: Exposes statically typed IPC channels (`window.edge`) with `contextIsolation: true` and zero `nodeIntegration`.+- **React Renderer**: Powers the glassmorphic blade UI using Zustand state management, Framer Motion spring physics, and high-performance list virtualization.---