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
chore: bump version to v0.3.1 and refine UI aesthetics
Deepender25d6a2a1d1eefa
diff --git a/package-lock.json b/package-lock.jsonindex d5dfedd..8a9f9da 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "edge-drop",- "version": "0.3.0",+ "version": "0.3.1","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "edge-drop",- "version": "0.3.0",+ "version": "0.3.1","license": "Apache-2.0","dependencies": {"@fontsource/jetbrains-mono": "^5.3.0",diff --git a/package.json b/package.jsonindex e76adaa..61fc471 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "edge-drop",- "version": "0.3.0",+ "version": "0.3.1","description": "Edge-Drop — a clipboard manager that lives on the left edge of your screen and expands on hover.","author": "Edge-Drop","license": "Apache-2.0",diff --git a/src/components/ClipboardItem.tsx b/src/components/ClipboardItem.tsxindex 2037376..5d5cdf3 100644--- a/src/components/ClipboardItem.tsx+++ b/src/components/ClipboardItem.tsx@@ -262,30 +262,36 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item }, ref) => {onClick={handleCardClick}><div className="body">- {isBundle ? (- <BundleFluidPreview- item={item}- expanded={expanded}- onDragStart={handleDragStart}- onCopy={onCopy}- onRemove={() => remove(item.id)}- onCollapse={onCollapse}- />- ) : (- <Preview item={item} />- )}- <div className="meta">- <KindBadge item={item} />- <span>{relativeTime(item.capturedAt)}</span>- {item.hitCount > 1 && <span>· ×{item.hitCount}</span>}- {item.data.kind === 'image' && (- <span>- · {item.data.width}×{item.data.height}- </span>+ <div className="item-content">+ {isBundle ? (+ <BundleFluidPreview+ item={item}+ expanded={expanded}+ onDragStart={handleDragStart}+ onCopy={onCopy}+ onRemove={() => remove(item.id)}+ onCollapse={onCollapse}+ />+ ) : (+ <Preview item={item} />)}- {item.data.kind === 'image' && <span>· {formatBytes(item.data.bytes)}</span>}- {copied && <span style={{ color: '#fff' }}>· copied</span>}</div>+ {(!isBundle || !expanded) && (+ <div className="item-footer">+ <div className="meta">+ <KindBadge item={item} />+ <span>{relativeTime(item.capturedAt)}</span>+ {item.hitCount > 1 && <span>· ×{item.hitCount}</span>}+ {item.data.kind === 'image' && (+ <span>+ · {item.data.width}×{item.data.height}+ </span>+ )}+ {item.data.kind === 'image' && <span>· {formatBytes(item.data.bytes)}</span>}+ {copied && <span style={{ color: '#fff' }}>· copied</span>}+ </div>+ </div>+ )}</div><divdiff --git a/src/components/Header.tsx b/src/components/Header.tsxindex 3ddd968..68f6158 100644--- a/src/components/Header.tsx+++ b/src/components/Header.tsx@@ -53,6 +53,7 @@ export function Header() {const activeId: (typeof FILTERS)[number]['id'] = emojiOpen ? 'emoji' : typeFilterconst activeIndex = Math.max(0, FILTERS.findIndex((f) => f.id === activeId))+ const ActiveIcon = FILTERS[activeIndex]?.Icon || FILTERS[0].Iconconst filterChipWidth = 28return (@@ -76,14 +77,19 @@ export function Header() {gap: 4,marginLeft: 0,maxWidth: '100%',- overflow: 'hidden'+ overflow: 'visible'}}>- {/* Single Persistent Sliding Pill Indicator */}+ {/* Single Persistent Sliding Pill Indicator (ABOVE the buttons) */}<motion.divinitial={false}animate={{ x: activeIndex * (filterChipWidth + 4) }}- transition={{ duration: 0.14, ease: [0.22, 1, 0.36, 1] }}+ transition={{+ type: 'spring',+ stiffness: 440,+ damping: 34,+ mass: 0.7+ }}style={{position: 'absolute',left: 0,@@ -93,11 +99,18 @@ export function Header() {borderRadius: 999,background: '#ffffff',border: 'none',- boxShadow: 'none',+ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.35)',pointerEvents: 'none',- zIndex: 0+ zIndex: 2,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ color: '#000000',+ willChange: 'transform'}}- />+ >+ <ActiveIcon width={14} height={14} />+ </motion.div>{FILTERS.map((f) => {const active = activeId === f.id@@ -123,13 +136,13 @@ export function Header() {width: filterChipWidth,height: 28,padding: 0,- color: active ? '#000000' : 'rgba(255, 255, 255, 0.82)',- background: active ? 'transparent' : '#141414',+ color: 'rgba(255, 255, 255, 0.75)',+ background: '#141414',border: 'none',borderRadius: 999,cursor: 'pointer',userSelect: 'none',- transition: 'color 0.18s ease',+ transition: 'color 0.18s ease, background-color 0.15s ease',zIndex: 1,flexShrink: 0}}diff --git a/src/components/LinkPreviewCard.tsx b/src/components/LinkPreviewCard.tsxindex 324437f..4665b00 100644--- a/src/components/LinkPreviewCard.tsx+++ b/src/components/LinkPreviewCard.tsx@@ -1,6 +1,6 @@import React, { useMemo } from 'react'import { parseUrlPreview, type UrlPreviewInfo } from '../lib/urlPreview'-import { GlobeIcon } from './icons'+import { LinkIcon } from './icons'interface LinkPreviewCardProps {url: string@@ -15,29 +15,25 @@ export const LinkPreviewCard: React.FC<LinkPreviewCardProps> = ({}) => {const info: UrlPreviewInfo = useMemo(() => parseUrlPreview(url), [url])+ // Clean, professional display:+ // Top: Link SVG + Domain (e.g. 🔗 github.com)+ const domain = info.domain || 'link'++ // Main: Clean, human-readable link target or title+ const displayTitle = info.title || info.cleanUrl.replace(/^https?:\/\//, '')+return (<div- className={`link-preview-apple${compact ? ' compact' : ''}`}+ className={`link-card${compact ? ' compact' : ''}`}onClick={onClick}>- <div className="link-apple-icon-box" aria-hidden>- <GlobeIcon width={18} height={18} className="link-apple-icon" />+ <div className="link-card-top">+ <LinkIcon width={12} height={12} className="link-card-icon" />+ <span className="link-card-domain">{domain}</span></div>- <div className="link-apple-content">- <div className="link-apple-header">- <span className="link-apple-service">{info.serviceName}</span>- <span className="link-apple-dot">·</span>- <span className="link-apple-domain">{info.domain}</span>- </div>-- <div className="link-apple-title" title={info.title || info.cleanUrl}>- {info.title || info.cleanUrl}- </div>-- <div className="link-apple-path" title={info.cleanUrl}>- {info.cleanUrl.replace(/^https?:\/\//, '')}- </div>+ <div className="link-card-body" title={info.cleanUrl}>+ {displayTitle}</div></div>)diff --git a/src/components/PreviewFlyout.tsx b/src/components/PreviewFlyout.tsxindex e9013d3..65510f4 100644--- a/src/components/PreviewFlyout.tsx+++ b/src/components/PreviewFlyout.tsx@@ -582,8 +582,8 @@ function looksLikeCode(text: string): boolean {)}-const SYS_FONT = "'Segoe UI', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif"-const CODE_FONT = "'Cascadia Code', 'Cascadia Mono', Consolas, 'Fira Code', 'Courier New', monospace"+const SYS_FONT = 'var(--font-ui)'+const CODE_FONT = 'var(--font-ui)'function SelectionBadge({isSelected,@@ -754,7 +754,7 @@ function PreviewContent({borderRadius: 10,fontSize: 12,color: 'rgba(255, 255, 255, 0.80)',- fontFamily: 'monospace',+ fontFamily: 'var(--font-ui)',wordBreak: 'break-all',lineHeight: 1.45,cursor: 'pointer',@@ -797,11 +797,11 @@ function PreviewContent({color: 'rgba(255,255,255,0.88)',whiteSpace: 'pre-wrap',wordBreak: 'break-word',- fontSize: isCode ? 12 : 13.5,- lineHeight: isCode ? 1.65 : 1.7,- fontFamily: isCode ? CODE_FONT : SYS_FONT,+ fontSize: 13.5,+ lineHeight: 1.65,+ fontFamily: 'var(--font-ui)',fontWeight: 400,- letterSpacing: isCode ? 0 : '0.01em'+ letterSpacing: '0.01em'}}>{text}</div>diff --git a/src/components/icons.tsx b/src/components/icons.tsxindex 720aa38..20f1107 100644--- a/src/components/icons.tsx+++ b/src/components/icons.tsx@@ -112,12 +112,28 @@ export const ContractIcon = uiIcon(Minimize2)export const FolderOpenIcon = uiIcon(FolderOpen)export const CheckIcon = uiIcon(Check)export const ClipboardIcon = uiIcon(Clipboard)-export const ClockIcon = uiIcon(Clock)+export const ClockIcon = (p: P) => {+ const size = Number(p.width ?? p.height ?? 16)+ return (+ <svg+ viewBox="15.3 18 64 64"+ width={size}+ height={size}+ fill="currentColor"+ {...(p as any)}+ >+ <path d="M28.1,48C28,48.7,28,49.3,28,50h-6c0-0.7,0-1.3,0.1-2H28.1z" />+ <path d="M51.5,36h-3c-0.8,0-1.5,0.7-1.5,1.5v13.1c0,0.4,0.2,0.8,0.4,1.1l8.4,8.4c0.6,0.6,1.5,0.6,2.1,0l2.1-2.1c0.6-0.6,0.6-1.5,0-2.1L53,48.8V37.5C53,36.7,52.3,36,51.5,36z" />+ <path d="M50,22c-14.8,0-26.9,11.5-27.9,26c0,0.3-0.1,0.7-0.1,1h-4.5c-1.3,0-2,1.5-1.2,2.4l7.5,9.1c0.6,0.7,1.7,0.7,2.3,0l7.5-9.1c0.8-1,0.1-2.4-1.2-2.4H28c0-0.3,0-0.7,0-1c1-11.2,10.5-20,21.9-20c13,0,23.3,11.3,21.9,24.5C70.8,62,61.8,71,52.2,71.9c-7.1,0.7-13.8-1.9-18.5-7c-0.6-0.7-1.4-1.1-2.2-0.1l-2.4,2.9c-0.5,0.6-0.1,1,0.4,1.5c5.4,5.7,12.8,8.9,20.8,8.8c14.4-0.2,26.5-11.6,27.5-26C79.1,35.7,66.1,22,50,22z" />+ </svg>+ )+}+export const RecentIcon = ClockIconexport const TypeIcon = uiIcon(Type)export const FilesIcon = uiIcon(Files)export const EmojiSmileIcon = uiIcon(Smile, 18)-export const EmojiClockIcon = uiIcon(Clock, 18)+export const EmojiClockIcon = (p: P) => <ClockIcon width={p.width ?? 18} height={p.height ?? 18} {...(p as any)} />export const EmojiUserIcon = uiIcon(Users, 18)export const EmojiPawIcon = uiIcon(PawPrint, 18)export const EmojiFoodIcon = uiIcon(Utensils, 18)diff --git a/src/lib/format.ts b/src/lib/format.tsindex 936944b..fdeab1d 100644--- a/src/lib/format.ts+++ b/src/lib/format.ts@@ -28,14 +28,24 @@ export function relativeTime(ts: number): string {const lang = getResolvedLanguage()try {- const rtf = new Intl.RelativeTimeFormat(lang, { numeric: 'always', style: 'long' })- if (s < 60) return rtf.format(-s, 'second')- const m = Math.round(s / 60)- if (m < 60) return rtf.format(-m, 'minute')- const h = Math.round(m / 60)- if (h < 24) return rtf.format(-h, 'hour')- const d = Math.round(h / 24)- if (d < 7) return rtf.format(-d, 'day')+ const rtf = new Intl.RelativeTimeFormat(lang, { numeric: 'always', style: 'narrow' })+ let res: string+ if (s < 60) res = rtf.format(-s, 'second')+ else if (s < 3600) res = rtf.format(-Math.round(s / 60), 'minute')+ else if (s < 86400) res = rtf.format(-Math.round(s / 3600), 'hour')+ else if (s < 604800) res = rtf.format(-Math.round(s / 86400), 'day')+ else return new Date(ts).toLocaleDateString(lang)++ // In locales where narrow style outputs leading '-' without past indicator (e.g. French "-30 s", Russian "-30 с"),+ // fallback to short style which provides abbreviated units with proper past tense ("il y a 30 s", "30 сек. назад").+ if (res.startsWith('-')) {+ const rtfShort = new Intl.RelativeTimeFormat(lang, { numeric: 'always', style: 'short' })+ if (s < 60) return rtfShort.format(-s, 'second')+ if (s < 3600) return rtfShort.format(-Math.round(s / 60), 'minute')+ if (s < 86400) return rtfShort.format(-Math.round(s / 3600), 'hour')+ return rtfShort.format(-Math.round(s / 86400), 'day')+ }+ return res} catch {const agoStr = t('item.ago')if (s < 60) return `${s}s ${agoStr}`.trim()diff --git a/src/styles/item.css b/src/styles/item.cssindex 49146fc..3b327a7 100644--- a/src/styles/item.css+++ b/src/styles/item.css@@ -48,27 +48,25 @@/* Compact UI Density Mode */.list.compact .item {margin-bottom: 6px;- border-radius: 16px;+ border-radius: 14px;}-.list.compact .item-main {- padding: 8px 12px;- gap: 10px;+.list.compact .item-content {+ padding: 9px 12px 3px 12px;+}+.list.compact .item-footer {+ padding: 3px 12px 6px 12px;}.list.compact .preview {font-size: calc(12px * var(--font-scale, 1));line-height: 1.35;}--/* The main row within an item card. Carries the flex layout, padding,and cursor. Separate from the outer .item motion.div so that thecollapsed + expanded sections can animate independently. */.item-main {display: flex;- align-items: flex-start;- gap: 12px;- padding: 14px 16px;+ flex-direction: column;width: 100%;position: relative;cursor: pointer;@@ -76,16 +74,34 @@}.item-main:active {- transform: scale(0.98);+ transform: scale(0.985);transition: transform 0.08s ease;}.body {- flex: 1 1 auto;+ width: 100%;min-width: 0;display: flex;flex-direction: column;- gap: 8px;+}++.item-content {+ width: 100%;+ min-width: 0;+ box-sizing: border-box;+ padding: 13px 16px 5px 16px;+}++.item-footer {+ width: 100%;+ box-sizing: border-box;+ padding: 3px 16px 8px 16px;+ background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.28) 100%);+ border: none;+ display: flex;+ align-items: center;+ justify-content: space-between;+ margin-top: auto;}.preview {@@ -113,12 +129,12 @@display: flex;align-items: center;flex-wrap: wrap;- gap: 8px;- font-family: var(--font-mono);+ gap: 7px;+ font-family: var(--font-ui);font-size: calc(11px * var(--font-scale, 1));- color: rgba(255, 255, 255, 0.42);- font-weight: 400;- letter-spacing: 0;+ color: rgba(255, 255, 255, 0.48);+ font-weight: 500;+ letter-spacing: 0.01em;}/* Scroll to top button */@@ -199,53 +215,24 @@color: rgba(255, 255, 255, 0.9);}-/* Apple Design Language Link Preview Card */-.link-preview-apple {+/* Clean Professional Link Card */+.link-card {display: flex;- align-items: flex-start;- gap: 12px;+ flex-direction: column;+ gap: 5px;width: 100%;min-width: 0;+ user-select: none;}-.link-apple-icon-box {- width: 36px;- height: 36px;- border-radius: 10px;- background: #141414;- border: none;- display: grid;- place-items: center;- flex-shrink: 0;- color: rgba(255, 255, 255, 0.9);- transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1),- background 0.15s ease;-}--.item-card:hover .link-apple-icon-box {- background: #1c1c1c;- transform: scale(1.05);-}--.link-apple-icon {- display: block;-}--.link-apple-content {- flex: 1 1 auto;- min-width: 0;- display: flex;- flex-direction: column;- gap: 2.5px;-}--.link-apple-header {+.link-card-top {display: flex;align-items: center;- gap: 5px;- font-size: calc(11px * var(--font-scale, 1));+ gap: 6px;+ font-family: var(--font-ui);+ font-size: calc(11.5px * var(--font-scale, 1));font-weight: 500;- color: rgba(255, 255, 255, 0.5);+ color: rgba(255, 255, 255, 0.48);letter-spacing: 0.01em;white-space: nowrap;overflow: hidden;@@ -253,48 +240,38 @@min-width: 0;}-.link-apple-service {- color: rgba(255, 255, 255, 0.75);- font-weight: 600;- flex-shrink: 0;-}--.link-apple-dot {- font-size: 9px;- color: rgba(255, 255, 255, 0.3);+.link-card-icon {+ color: rgba(255, 255, 255, 0.55);flex-shrink: 0;}-.link-apple-domain {- color: rgba(255, 255, 255, 0.5);+.link-card-domain {+ color: rgba(255, 255, 255, 0.52);+ font-weight: 500;overflow: hidden;text-overflow: ellipsis;- min-width: 0;- flex-shrink: 1;+ white-space: nowrap;}-.link-apple-title {- font-size: calc(13px * var(--font-scale, 1));- font-weight: 600;+.link-card-body {+ font-family: var(--font-ui);+ font-size: calc(13.5px * var(--font-scale, 1));+ font-weight: 500;color: #ffffff;- line-height: 1.35;- overflow: hidden;- text-overflow: ellipsis;+ line-height: 1.4;+ word-break: break-word;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;- word-break: break-word;+ overflow: hidden;letter-spacing: 0;}-.link-apple-path {- font-size: calc(11.5px * var(--font-scale, 1));- color: rgba(255, 255, 255, 0.45);- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;- min-width: 0;- line-height: 1.3;+.item-main:hover .link-card-icon {+ color: rgba(255, 255, 255, 0.8);+}+.item-main:hover .link-card-domain {+ color: rgba(255, 255, 255, 0.72);}/* Image thumbnails */