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
Mac-OS style flyout animation
Deepender2536401657955e
diff --git a/drag_debug.txt b/drag_debug.txtindex f49d4a2..d0a6d8f 100644--- a/drag_debug.txt+++ b/drag_debug.txt@@ -3735,3 +3735,137 @@[2026-07-17T18:58:27.616Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}[2026-07-17T18:58:27.617Z] createFileStackDragIcon calling Resvg for count=1[2026-07-17T18:58:27.757Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:06:50.388Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:06:51.759Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:06:51.760Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:06:51.911Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:06:51.912Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:06:52.045Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:10:17.784Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:10:17.976Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:10:17.977Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:10:18.122Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:10:18.122Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:10:18.263Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:13:37.258Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:13:37.424Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:13:37.424Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:13:37.567Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:13:37.567Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:13:37.702Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:14:11.422Z] startDragOut called for kind=image+[2026-07-19T18:14:11.424Z] staged: file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrrq1bvq-qlotrwax.png, files=undefined+[2026-07-19T18:14:11.425Z] dragIcon called for kind=image+[2026-07-19T18:14:11.425Z] image drag requested: count=1. Returning custom image card stack icon!+[2026-07-19T18:14:11.426Z] createFileStackDragIcon returning cached for stack|solid-black|image|1+[2026-07-19T18:14:11.427Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:14:11.427Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrrq1bvq-qlotrwax.png, item.files=undefined+[2026-07-19T18:17:49.392Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:17:49.548Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:17:49.548Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:17:49.686Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:17:49.687Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:17:49.852Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:17:53.433Z] startDragOut called for kind=image+[2026-07-19T18:17:53.435Z] staged: file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrs43mk9-4g4axumx.png, files=undefined+[2026-07-19T18:17:53.436Z] dragIcon called for kind=image+[2026-07-19T18:17:53.437Z] image drag requested: count=1. Returning custom image card stack icon!+[2026-07-19T18:17:53.437Z] createFileStackDragIcon returning cached for stack|solid-black|image|1+[2026-07-19T18:17:53.437Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:17:53.437Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrs43mk9-4g4axumx.png, item.files=undefined+[2026-07-19T18:21:42.159Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:21:42.310Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:21:42.311Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:21:42.446Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:21:42.446Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:21:42.595Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:35:07.229Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:35:07.374Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:35:07.375Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:35:07.517Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:35:07.518Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:35:07.663Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:37:12.038Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:37:12.195Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:37:12.196Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:37:12.350Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:37:12.350Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:37:12.515Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:38:51.542Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:38:51.709Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:38:51.710Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:38:51.843Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T18:38:51.843Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T18:38:51.983Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T20:20:27.831Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T20:20:29.225Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T20:20:29.226Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T20:20:29.376Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T20:20:29.377Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T20:20:29.526Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T20:21:32.906Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T20:21:33.072Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T20:21:33.073Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T20:21:33.225Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-19T20:21:33.226Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-19T20:21:33.360Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:01:50.419Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:01:51.785Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:01:51.786Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:01:52.037Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:01:52.037Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:01:52.313Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:02:59.911Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:03:00.062Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:03:00.062Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:03:00.194Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:03:00.195Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:03:00.331Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:05:22.530Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:05:22.700Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:05:22.700Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:05:22.836Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:05:22.836Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:05:22.978Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:08:51.225Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:08:51.380Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:08:51.381Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:08:51.527Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:08:51.528Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:08:51.681Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:12:11.150Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:12:11.302Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:12:11.302Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:12:11.437Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:12:11.437Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:12:11.573Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:14:36.200Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:14:36.358Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:14:36.358Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:14:36.496Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:14:36.497Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:14:36.655Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:16:57.443Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:16:57.617Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:16:57.618Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:16:57.769Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:16:57.770Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:16:57.923Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:24:07.330Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:24:07.498Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:24:07.498Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:24:07.650Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:24:07.650Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:24:07.803Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:29:01.223Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:29:01.388Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:29:01.389Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:29:01.531Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:29:01.531Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:29:01.679Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:31:40.027Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:31:40.190Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:31:40.190Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:31:40.330Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-20T18:31:40.331Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-20T18:31:40.481Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}diff --git a/electron.vite.config.1784492490627.mjs b/electron.vite.config.1784492490627.mjsnew file mode 100644index 0000000..8f884ee--- /dev/null+++ b/electron.vite.config.1784492490627.mjs@@ -0,0 +1,46 @@+// electron.vite.config.ts+import { resolve } from "node:path";+import { defineConfig, externalizeDepsPlugin } from "electron-vite";+import react from "@vitejs/plugin-react";+var __electron_vite_injected_dirname = "C:\\Users\\yadav\\OneDrive\\Desktop\\projects\\Edge-Drop";+var electron_vite_config_default = defineConfig({+ main: {+ plugins: [externalizeDepsPlugin()],+ build: {+ rollupOptions: {+ input: { index: resolve(__electron_vite_injected_dirname, "electron/main/index.ts") }+ }+ }+ },+ preload: {+ plugins: [externalizeDepsPlugin()],+ build: {+ rollupOptions: {+ input: { index: resolve(__electron_vite_injected_dirname, "electron/preload/index.ts") },+ output: {+ format: "cjs",+ entryFileNames: "[name].cjs"+ }+ }+ }+ },+ renderer: {+ // Root must be project root because index.html lives there.+ root: ".",+ resolve: {+ alias: {+ "@renderer": resolve(__electron_vite_injected_dirname, "src"),+ "@shared": resolve(__electron_vite_injected_dirname, "shared")+ }+ },+ build: {+ rollupOptions: {+ input: { index: resolve(__electron_vite_injected_dirname, "index.html") }+ }+ },+ plugins: [react()]+ }+});+export {+ electron_vite_config_default as default+};diff --git a/electron/main/ipc.ts b/electron/main/ipc.tsindex 8f2c627..d9e50bc 100644--- a/electron/main/ipc.ts+++ b/electron/main/ipc.ts@@ -473,6 +473,10 @@ export function registerIpc(): void {setInteractive(value)})+ handle('window:set-preview-mode', (active) => {+ import('./window').then(m => m.setPreviewMode(active))+ })+handle('window:minimize', () => {const win = getOnboardingWindow()if (win && !win.isDestroyed()) {diff --git a/electron/main/window.ts b/electron/main/window.tsindex e35e228..9f77df8 100644--- a/electron/main/window.ts+++ b/electron/main/window.ts@@ -39,6 +39,7 @@ let mainWindow: BrowserWindow | null = null// detector window is deliberately no longer created at runtime.let detectorWindow: BrowserWindow | null = nulllet interactive = false+export let previewActive = falseexport let currentHotZoneWidth = 3export let currentStickDisplayId: number | undefined@@ -86,6 +87,12 @@ export function setInteractive(value: boolean): void {}}+export function setPreviewMode(active: boolean): void {+ if (previewActive === active) return+ previewActive = active+ repositionWindow()+}+/*** Poll the OS cursor position every ~16ms and send `window:cursor-edge` to* the renderer. This is the reliable alternative to `forward:true` on Windows@@ -197,12 +204,13 @@ function getStickGeometry(): { x: number; y: number; width: number; height: numbconst primaryHeight = screen.getPrimaryDisplay().workArea.heightconst windowHeight = primaryHeight+ const currentWindowWidth = previewActive ? 820 : PANEL_WIDTHconst result = computeStickBounds({position: settings.stickPosition,displays: allDisplays,displayId: settings.stickDisplayId,- windowWidth: PANEL_WIDTH,+ windowWidth: currentWindowWidth,windowHeight,currentBounds: getMainWindow()?.getBounds()})diff --git a/electron/preload/index.ts b/electron/preload/index.tsindex f354024..37e3d4d 100644--- a/electron/preload/index.ts+++ b/electron/preload/index.ts@@ -109,6 +109,7 @@ const api = {updateSettings: (patch: Partial<InvokeResult<'settings:update'>>) =>invoke('settings:update', patch),setInteractive: (value: boolean) => invoke('window:set-interactive', value),+ setPreviewMode: (active: boolean) => invoke('window:set-preview-mode', active),minimizeWindow: () => invoke('window:minimize'),setInternalDrag: (active: boolean) => { internalDrag = active },broadcastTutorialStep: (step: number) => send('tutorial:set-step', step),diff --git a/shared/ipc.ts b/shared/ipc.tsindex c6de104..8264fd2 100644--- a/shared/ipc.ts+++ b/shared/ipc.ts@@ -59,6 +59,9 @@ export interface InvokeMap {/** Toggle whether the window is interactive (mouse-ignore). */'window:set-interactive': { args: [interactive: boolean]; result: void }+ /** Toggle whether the flyout preview is active (widens the window). */+ 'window:set-preview-mode': { args: [active: boolean]; result: void }+/** Minimize the window (used by Onboarding). */'window:minimize': { args: []; result: void }diff --git a/src/components/ClipboardItem.tsx b/src/components/ClipboardItem.tsxindex 6628636..f167252 100644--- a/src/components/ClipboardItem.tsx+++ b/src/components/ClipboardItem.tsx@@ -23,7 +23,7 @@ import { useStore } from '../store/appStore'import { useDragOut } from '../hooks/useDragOut'import { basename, formatBytes, previewText, relativeTime } from '../lib/format'import { getFileKind } from '../lib/fileType'-import { CopyIcon, FileKindIcon, ImageIcon, LinkIcon, PinIcon, PinFillIcon, TrashIcon, MinusIcon, ChevronUpIcon } from './icons'+import { CopyIcon, FileKindIcon, ImageIcon, LinkIcon, PinIcon, PinFillIcon, TrashIcon, MinusIcon, ChevronUpIcon, EyeIcon, EyeOffIcon } from './icons'import '../styles/item.css'/**@@ -71,6 +71,7 @@ function ClipboardItemBase({ item }: Props) {if (!open) setExpanded(false)}, [open])+ const isPreviewing = useStore((s) => s.previewItemId) === item.idconst isBundle = (item.data.kind === 'files' && item.data.paths.length > 1) || item.data.kind === 'image-collection'const onCopy = useCallback((e: React.MouseEvent) => {@@ -128,7 +129,7 @@ function ClipboardItemBase({ item }: Props) {className={`item${item.pinned ? ' pinned' : ''}${isBundle ? ' bundle' : ''}`}><div- className="item-main"+ className={`item-main${isPreviewing ? ' force-actions' : ''}`}data-id={item.id}draggable={item.data.kind !== 'text' && (!isBundle || !expanded)}onDragStart={(e) => handleDragStart(e, { id: item.id })}@@ -195,17 +196,39 @@ function ClipboardItemBase({ item }: Props) {<buttonclassName={`act${item.pinned ? ' active' : ''}`}title={item.pinned ? 'Unpin' : 'Pin'}- onClick={() => togglePin(item.id, !item.pinned)}+ onClick={(e) => {+ e.currentTarget.blur()+ togglePin(item.id, !item.pinned)+ }}>{item.pinned ? <PinFillIcon /> : <PinIcon />}</button>- <button className="act" title="Copy" onClick={onCopy}>+ <button className="act" title="Copy" onClick={(e) => {+ e.currentTarget.blur()+ onCopy(e)+ }}><CopyIcon /></button>+ <button+ className="act"+ title={isPreviewing ? "Close Preview" : "Preview"}+ onClick={(e) => {+ e.stopPropagation()+ e.currentTarget.blur()+ const rect = e.currentTarget.closest('.item-main')?.getBoundingClientRect()+ const rectData = rect ? { y: rect.y, height: rect.height } : undefined+ useStore.getState().setPreviewItemId(isPreviewing ? null : item.id, rectData)+ }}+ >+ {isPreviewing ? <EyeIcon /> : <EyeOffIcon />}+ </button><buttonclassName="act danger"title="Delete"- onClick={() => remove(item.id)}+ onClick={(e) => {+ e.currentTarget.blur()+ remove(item.id)+ }}><TrashIcon /></button>diff --git a/src/components/Panel.tsx b/src/components/Panel.tsxindex 5be582c..cbf4873 100644--- a/src/components/Panel.tsx+++ b/src/components/Panel.tsx@@ -16,6 +16,7 @@ import { ItemList } from './ItemList'import { Settings } from './Settings'import { ToastStack } from './Toast'import { TrashIcon } from './icons'+import { PreviewFlyout } from './PreviewFlyout'export function Panel() {const open = useStore((s) => s.open)@@ -191,11 +192,11 @@ export function Panel() {let clipPath: stringif (isRight) {clipPath = open- ? 'inset(calc(0% - 100px) 0px calc(0% - 100px) calc(0% - 100px) round 24px 0px 0px 24px)'+ ? 'inset(calc(0% - 100px) 0px calc(0% - 100px) calc(0% - 800px) round 24px 0px 0px 24px)': `inset(calc(50% - ${halfTrigger}px) 0px calc(50% - ${halfTrigger}px) calc(100% - ${settings.hotZoneWidth || 3}px) round 24px 0px 0px 24px)`} else {clipPath = open- ? 'inset(calc(0% - 100px) calc(0% - 100px) calc(0% - 100px) 0px round 0px 24px 24px 0px)'+ ? 'inset(calc(0% - 100px) calc(0% - 800px) calc(0% - 100px) 0px round 0px 24px 24px 0px)': `inset(calc(50% - ${halfTrigger}px) calc(100% - ${settings.hotZoneWidth || 3}px) calc(50% - ${halfTrigger}px) 0px round 0px 24px 24px 0px)`}containerStyle.clipPath = clipPath@@ -309,6 +310,7 @@ export function Panel() {<DropOverlay /><SplitDropZone isRight={isRight} /></div>+ <PreviewFlyout isRight={isRight} /></motion.div></div>)diff --git a/src/components/PreviewFlyout.tsx b/src/components/PreviewFlyout.tsxnew file mode 100644index 0000000..c1981be--- /dev/null+++ b/src/components/PreviewFlyout.tsx@@ -0,0 +1,170 @@+import { motion, AnimatePresence } from 'framer-motion'+import { useStore } from '../store/appStore'+import { formatBytes } from '../lib/format'+import { getFileKind } from '../lib/fileType'+import { FileKindIcon, CloseIcon } from './icons'+import { createPortal } from 'react-dom'++export function PreviewFlyout({ isRight }: { isRight: boolean }) {+ const previewItemId = useStore((s) => s.previewItemId)+ const items = useStore((s) => s.items)+ const previewItemRect = useStore((s) => s.previewItemRect)+ const setPreviewItemId = useStore((s) => s.setPreviewItemId)+ const settings = useStore((s) => s.settings)++ const item = previewItemId ? items.find((i) => i.id === previewItemId) : null++ // The vertical center of the clicked item card, expressed as a % of the flyout height.+ // This anchors the transformOrigin so the flyout physically grows FROM and collapses+ // TO the exact item card — identical to macOS window minimize-to-dock.+ const originY = (() => {+ if (!previewItemRect) return '50%'+ const panelHeightPx = (settings.panelHeight || 0.6) * window.innerHeight+ const panelTop = (window.innerHeight - panelHeightPx) / 2+ const itemCenterY = previewItemRect.y + previewItemRect.height / 2+ const relY = itemCenterY - panelTop+ const pct = Math.max(0, Math.min(100, (relY / panelHeightPx) * 100))+ return `${pct}%`+ })()++ const maxFlyoutHeight = `calc(${(settings.panelHeight || 0.6) * 100}vh - 24px)`++ return createPortal(+ <AnimatePresence mode="wait" onExitComplete={() => {+ if (!useStore.getState().previewItemId) {+ window.edge.setPreviewMode(false)+ }+ }}>+ {item && (+ <div style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ [isRight ? 'right' : 'left']: 'var(--panel-width)',+ marginLeft: isRight ? 0 : 12,+ marginRight: isRight ? 12 : 0,+ width: 420,+ display: 'flex',+ alignItems: 'center',+ pointerEvents: 'none',+ zIndex: 5,+ }}>+ <motion.div+ key={item.id}+ initial={{ opacity: 0, scaleX: 0.3, scaleY: 0.15 }}+ animate={{ opacity: 1, scaleX: 1, scaleY: 1 }}+ exit={{ opacity: 0, scaleX: 0.3, scaleY: 0.15 }}+ transition={{+ type: 'spring', stiffness: 380, damping: 30, mass: 0.8,+ opacity: { type: 'tween', duration: 0.18, ease: 'easeOut' }+ }}+ style={{+ width: '100%',+ maxHeight: maxFlyoutHeight,+ background: '#000000',+ borderRadius: 16,+ border: '1px solid rgba(255,255,255,0.06)',+ overflow: 'hidden',+ display: 'flex',+ flexDirection: 'column',+ boxShadow: '0 20px 40px rgba(0,0,0,0.5)',+ pointerEvents: 'auto',+ transformOrigin: `${isRight ? '100%' : '0%'} ${originY}`,+ }}+ >+ {/* Header */}+ <div style={{ padding: '16px', borderBottom: '1px solid rgba(255,255,255,0.05)', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>+ <h3 style={{ margin: 0, fontSize: 14, fontWeight: 500, color: 'rgba(255,255,255,0.9)' }}>Preview</h3>+ <button+ className="act"+ title="Close Preview"+ onClick={() => setPreviewItemId(null)}+ style={{ background: 'rgba(255, 255, 255, 0.08)', border: 'none', color: '#fff', cursor: 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '6px', borderRadius: '50%' }}+ >+ <CloseIcon width={16} height={16} />+ </button>+ </div>++ {/* Content */}+ <div style={{ padding: '16px', overflowY: 'auto', flex: 1, minHeight: 0 }}>+ <PreviewContent item={item} />+ </div>+ </motion.div>+ </div>+ )}+ </AnimatePresence>,+ document.body+ )+}++function PreviewContent({ item }: { item: any }) {+ if (item.data.kind === 'text') {+ return (+ <div style={{ color: 'rgba(255,255,255,0.9)', whiteSpace: 'pre-wrap', wordBreak: 'break-word', fontSize: 13, lineHeight: 1.5, fontFamily: 'monospace' }}>+ {item.data.text.length > 20000+ ? item.data.text.slice(0, 20000) + '\n\n... (Content truncated for preview)'+ : item.data.text}+ </div>+ )+ }++ if (item.data.kind === 'image') {+ return (+ <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>+ {item.data.imageId && (+ <img src={`edgelocal://${item.data.imageId}`} alt="preview" style={{ width: '100%', maxHeight: '65vh', objectFit: 'contain', borderRadius: 8 }} draggable={false} />+ )}+ <div style={{ fontSize: 12, color: 'rgba(255,255,255,0.5)' }}>+ {item.data.width} × {item.data.height} · {formatBytes(item.data.bytes)}+ </div>+ </div>+ )+ }++ if (item.data.kind === 'image-collection') {+ return (+ <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>+ {item.data.images.map((img: any, idx: number) => (+ <div key={img.imageId} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>+ <img src={`edgelocal://${img.imageId}`} alt="" style={{ width: '100%', borderRadius: 8 }} draggable={false} />+ <div style={{ fontSize: 11, color: 'rgba(255,255,255,0.4)', textAlign: 'center' }}>+ {idx + 1} of {item.data.images.length} · {img.width} × {img.height} · {formatBytes(img.bytes)}+ </div>+ </div>+ ))}+ </div>+ )+ }++ if (item.data.kind === 'files') {+ return (+ <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>+ {item.data.paths.map((p: string, i: number) => {+ const entry = item.data.entries?.[i]+ const info = getFileKind(p)+ return (+ <div key={i} style={{ display: 'flex', alignItems: 'center', gap: 12, padding: 8, background: 'rgba(255,255,255,0.03)', borderRadius: 8 }}>+ {entry?.isImage && entry.preview ? (+ <img src={entry.preview} alt="" style={{ width: 32, height: 32, borderRadius: 4, objectFit: 'cover' }} />+ ) : (+ <div style={{ color: info.color }}>+ <FileKindIcon path={p} width={24} height={24} />+ </div>+ )}+ <div style={{ display: 'flex', flexDirection: 'column', overflow: 'hidden' }}>+ <span style={{ fontSize: 13, color: 'rgba(255,255,255,0.9)', whiteSpace: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden' }}>+ {entry?.name || p.split(/[\\/]/).pop()}+ </span>+ <span style={{ fontSize: 11, color: 'rgba(255,255,255,0.4)' }}>+ {entry?.size ? formatBytes(entry.size) : info.label}+ </span>+ </div>+ </div>+ )+ })}+ </div>+ )+ }++ return null+}diff --git a/src/components/icons.tsx b/src/components/icons.tsxindex d1c1296..468a440 100644--- a/src/components/icons.tsx+++ b/src/components/icons.tsx@@ -111,6 +111,18 @@ export const ChevronDownIcon = (p: P) => (</svg>)+export const EyeIcon = (p: P) => (+ <svg {...base(p)}>+ <path fill="currentColor" fillRule="evenodd" d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" clipRule="evenodd" />+ </svg>+)++export const EyeOffIcon = (p: P) => (+ <svg {...base(p)}>+ <path fill="currentColor" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z" />+ </svg>+)+export const FileIconGlyph = (p: P) => (<svg {...base(p)}><g> <g fill="currentColor" fillRule="evenodd" clipRule="evenodd"> <path d="M15.143 22H8.286A4.286 4.286 0 0 1 4 17.714V6.286A4.286 4.286 0 0 1 8.286 2h4.008a3.5 3.5 0 0 1 2.304.866l3.635 3.18a3.5 3.5 0 0 1 1.196 2.635v9.033A4.286 4.286 0 0 1 15.143 22m0-2H8.286A2.286 2.286 0 0 1 6 17.714V6.286A2.286 2.286 0 0 1 8.286 4h4.008a1.5 1.5 0 0 1 .987.371l3.635 3.18a1.5 1.5 0 0 1 .513 1.13v9.033A2.286 2.286 0 0 1 15.143 20" /> <path d="M13 3a1 1 0 0 1 1 1v3a1 1 0 0 0 1 1h2.5a1 1 0 1 1 0 2H15a3 3 0 0 1-3-3V4a1 1 0 0 1 1-1" /> </g> </g>diff --git a/src/hooks/useEdgeHover.ts b/src/hooks/useEdgeHover.tsindex 50cdf73..a9b7925 100644--- a/src/hooks/useEdgeHover.ts+++ b/src/hooks/useEdgeHover.ts@@ -37,6 +37,7 @@ const PANEL_WIDE = 270 // blade is 270px (var(--panel-width))const KEEP_OPEN_PX = PANEL_WIDE - 15 // 255 — clearly inside bladeconst START_CLOSE_PX = PANEL_WIDE + 20 // 290 — 20px buffer outside the visual boundaryconst BUFFER_PX = 30 // 30px overshoot buffer across adjacent monitors+const PREVIEW_WIDE = 740 // Extended width when preview flyout is activeexport const PANEL_LEAVE_EVENT = 'panel:leave'export const PANEL_ENTER_EVENT = 'panel:enter'@@ -48,6 +49,7 @@ export function useEdgeHover(): void {const dragActive = useStore((s) => s.dragActive)const setDragActive = useStore((s) => s.setDragActive)const internalDragReq = useStore((s) => s.internalDragReq)+ const previewItemId = useStore((s) => s.previewItemId)// All reactive values accessed inside events kept in refs so the// event-listener effect never needs to restart (restarting cancels timers).@@ -63,6 +65,12 @@ export function useEdgeHover(): void {const settingsRef = useRef(settings)settingsRef.current = settings+ const previewRef = useRef(previewItemId)+ previewRef.current = previewItemId++ // Access setPreviewItemId without subscribing (avoids restarting the stable effect).+ const setPreviewItemId = useStore.getState().setPreviewItemId+// Throttle the self-healing setInteractive(true) call.// Without this, it fires at 60Hz (every 16ms) via the cursor-edge poll,// flooding the IPC queue and starving the messages that open the panel.@@ -103,6 +111,23 @@ export function useEdgeHover(): void {const closePanel = () => {if (!openRef.current) returnif (dragActiveRef.current && !internalDragRef.current) return++ // If preview is open, dismiss it first and wait for its exit+ // animation to finish (~350ms) before collapsing the panel.+ // This prevents both animations from fighting each other.+ if (previewRef.current) {+ setPreviewItemId(null)+ window.setTimeout(() => {+ setOpen(false)+ if (interactiveTimer !== undefined) window.clearTimeout(interactiveTimer)+ interactiveTimer = window.setTimeout(() => {+ interactiveTimer = undefined+ if (!openRef.current) edge.setInteractive(false)+ }, 180)+ }, 350)+ return+ }+setOpen(false)if (interactiveTimer !== undefined) window.clearTimeout(interactiveTimer)interactiveTimer = window.setTimeout(() => {@@ -154,12 +179,13 @@ export function useEdgeHover(): void {const { x, y } = lastClient.currentif (x < -BUFFER_PX || y < 0) return true // unknown — be conservative, don't closeconst s = settingsRef.current+ const currentPanelWide = previewRef.current ? PREVIEW_WIDE : PANEL_WIDEif (s.stickPosition === 'right') {- return x >= window.innerWidth - PANEL_WIDE - BUFFER_PX && x <= window.innerWidth + BUFFER_PX+ return x >= window.innerWidth - currentPanelWide - BUFFER_PX && x <= window.innerWidth + BUFFER_PX}// left- return x >= -BUFFER_PX && x <= PANEL_WIDE + BUFFER_PX+ return x >= -BUFFER_PX && x <= currentPanelWide + BUFFER_PX}const onPanelLeave = () => {@@ -183,6 +209,8 @@ export function useEdgeHover(): void {const { stickPosition, displayWidth } = dataconst { top, bottom, midY, panelHalfH } = zone.current+ const currentKeepOpenPx = previewRef.current ? PREVIEW_WIDE - 15 : KEEP_OPEN_PX+ const currentStartClosePx = previewRef.current ? PREVIEW_WIDE + 20 : START_CLOSE_PXswitch (stickPosition) {case 'right': {@@ -216,12 +244,12 @@ export function useEdgeHover(): void {const insideY = data.y >= midY - panelHalfH && data.y <= midY + panelHalfH- if (distFromRight >= -BUFFER_PX && distFromRight <= KEEP_OPEN_PX && insideY) {+ if (distFromRight >= -BUFFER_PX && distFromRight <= currentKeepOpenPx && insideY) {cancelClose()return}- if (distFromRight > START_CLOSE_PX || distFromRight < -BUFFER_PX || !insideY) {+ if (distFromRight > currentStartClosePx || distFromRight < -BUFFER_PX || !insideY) {scheduleClose()}break@@ -260,12 +288,12 @@ export function useEdgeHover(): void {const insideY = data.y >= midY - panelHalfH && data.y <= midY + panelHalfH- if (data.x >= -BUFFER_PX && data.x <= KEEP_OPEN_PX && insideY) {+ if (data.x >= -BUFFER_PX && data.x <= currentKeepOpenPx && insideY) {cancelClose()return}- if (data.x > START_CLOSE_PX || data.x < -BUFFER_PX || !insideY) {+ if (data.x > currentStartClosePx || data.x < -BUFFER_PX || !insideY) {scheduleClose()}breakdiff --git a/src/store/appStore.ts b/src/store/appStore.tsindex d76b7a0..aec31c4 100644--- a/src/store/appStore.ts+++ b/src/store/appStore.ts@@ -56,6 +56,9 @@ interface AppState {tutorialStep: numbercurrentVersion: stringupdateInfo: { hasUpdate: boolean; latestVersion: string; downloadUrl: string } | null+ /** Item ID currently being previewed in the flyout. */+ previewItemId: string | null+ previewItemRect: { y: number; height: number } | null/* hydration + sync */hydrate: () => Promise<void>@@ -68,7 +71,9 @@ interface AppState {setOpen: (open: boolean) => voidsetSettingsOpen: (open: boolean) => voidsetDragActive: (active: boolean) => void+ setDragActive: (active: boolean) => voidsetInternalDragReq: (req: import('../../shared/types').DragRequest | null) => void+ setPreviewItemId: (id: string | null, rect?: { y: number; height: number }) => void/* toasts */pushToast: (toast: ToastMsg) => void@@ -98,6 +103,8 @@ export const useStore = create<AppState>((set, get) => ({tutorialStep: 0,currentVersion: '',updateInfo: null,+ previewItemId: null,+ previewItemRect: null,async hydrate() {const { items, settings, version } = await edge.loadState()@@ -134,7 +141,13 @@ export const useStore = create<AppState>((set, get) => ({setSettings: (next) => set({ settings: next }),setQuery: (query) => set({ query }),- setOpen: (open) => set({ open }),+ setOpen: (open) => {+ set({ open })+ if (!open) {+ set({ previewItemId: null, previewItemRect: null })+ edge.setPreviewMode(false)+ }+ },setSettingsOpen: (settingsOpen) => set({ settingsOpen }),setDragActive: (dragActive) => set({ dragActive }),setInternalDragReq: (internalDragReq) => {@@ -145,6 +158,12 @@ export const useStore = create<AppState>((set, get) => ({}edge.setInternalDrag(!!internalDragReq)},+ setPreviewItemId: (id, rect) => {+ set({ previewItemId: id, previewItemRect: rect || null })+ if (id) {+ edge.setPreviewMode(true)+ }+ },pushToast: (toast) => {set({ toasts: [...get().toasts, toast] })diff --git a/src/styles/item.css b/src/styles/item.cssindex b4ef739..80ffe02 100644--- a/src/styles/item.css+++ b/src/styles/item.css@@ -214,7 +214,8 @@}.item-main:hover .actions,-.item-main:focus-within .actions {+.item-main:focus-within .actions,+.item-main.force-actions .actions {opacity: 1;pointer-events: auto;transform: translateY(-50%) translateX(0) scale(1);