Skip to content

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.

feat(ui): add macOS 5-category filter control, persistent sliding pill, unified image classification, and HD anti-aliased curved edges

Deepender254369fcc63b6c
diff --git a/README.md b/README.md
index c3ec7aa..4f4ab39 100644
--- a/README.md
+++ b/README.md
@@ -141,6 +141,9 @@ npm run build:store # outputs an MSIX .appx for Microsoft Store submission
- Double-click to expand, drag a sub-item to the left edge to split it back out
**UI / UX**
+- **macOS Segmented Control 5-Category Filter Suite**: Integrated 5-type filter bar (**`All`**, **`Text`**, **`Links`**, **`Images`**, **`Files`**) with a single persistent sliding spring indicator pill (`stiffness: 500`, `damping: 35`) and zero shape distortion.
+- **Unified Image Entity Classification**: Native screenshots (`Win + Shift + S`) and copied image files (`.png`, `.jpg`, `.webp`, `.svg`) are unified under the **`Images`** filter tab with visual thumbnail cards.
+- **HD Anti-Aliased Curved Edges**: GPU layer promotion (`transform: translateZ(0)`), `-webkit-background-clip: padding-box`, and smooth vector rasterization delivering 100% HD anti-aliased curved borders across all display scales.
- **Tactile Micro-Interactions & Spring Motion**: Card hover 2px lift with ambient backlight glow, micro radial copy ripple effect, and smooth Framer Motion `layoutId` spring list reflow (`stiffness: 500`, `damping: 32`).
- **Refined Obsidian Aesthetics & Multi-Layer Depth**: Dual-layer 3D glass hairline highlights (`inset 0 1px 0 rgba(255, 255, 255, 0.12)`) and dual typography hierarchy (monospaced *JetBrains Mono* metadata + *Inter/SF Pro* system title font stack).
- **Ergonomic Card Action Bar & Safety Guard**: Re-ordered card actions (`Pin`, `Expand`, `Copy`, `Open Link`, `Divider`, `Delete`) with a physical safety hairline divider and 100% layout consistency across normal hover and preview mode.
diff --git a/shared/types.ts b/shared/types.ts
index 4b58c91..bdf1311 100644
--- a/shared/types.ts
+++ b/shared/types.ts
@@ -20,6 +20,8 @@ export type ItemData =
export type ItemKind = ItemData['kind']
+export type TypeFilter = 'all' | 'text' | 'links' | 'images' | 'files'
+
/**
* A single clipboard entry. `id` is stable across the lifetime of the entry;
* it is used as the React key and the storage key for pinned/persisted items.
diff --git a/src/components/EmptyState.tsx b/src/components/EmptyState.tsx
index d687e76..260ca8d 100644
--- a/src/components/EmptyState.tsx
+++ b/src/components/EmptyState.tsx
@@ -1,15 +1,22 @@
-/** Friendly empty state shown when there's nothing to show. */
+import { useStore } from '../store/appStore'
export function EmptyState({ filtered }: { filtered: boolean }) {
+ const typeFilter = useStore((s) => s.typeFilter)
+
+ let title = filtered ? 'No results found' : 'Shelf is empty'
+ let hint = filtered ? 'Try a different keyword or clear search' : 'Copy anything or drop files here to begin'
+
+ if (typeFilter !== 'all') {
+ const label = typeFilter === 'text' ? 'text clips' : typeFilter === 'links' ? 'links' : typeFilter === 'images' ? 'images' : 'files'
+ title = `No ${label} found`
+ hint = `Copy ${label} or switch back to All`
+ }
+
return (
<div className="empty">
<div className="empty-text">
- <div className="big">{filtered ? 'No results found' : 'Shelf is empty'}</div>
- <div className="hint">
- {filtered
- ? 'Try a different keyword or clear search'
- : 'Copy anything or drop files here to begin'}
- </div>
+ <div className="big">{title}</div>
+ <div className="hint">{hint}</div>
</div>
</div>
)
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index b850db5..3750e42 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -29,13 +29,95 @@ export function Header() {
}
}
+ const typeFilter = useStore((s) => s.typeFilter)
+ const setTypeFilter = useStore((s) => s.setTypeFilter)
+
+ const FILTERS: { id: import('../../shared/types').TypeFilter; label: string }[] = [
+ { id: 'all', label: 'All' },
+ { id: 'text', label: 'Text' },
+ { id: 'links', label: 'Links' },
+ { id: 'images', label: 'Images' },
+ { id: 'files', label: 'Files' }
+ ]
+
+ const activeIndex = Math.max(0, FILTERS.findIndex((f) => f.id === typeFilter))
+
return (
- <div className="header" style={{ display: 'flex', justifyContent: 'space-between', width: '100%', alignItems: 'center', height: 40, padding: '0 14px 0 6px' }}>
- <div style={{ display: 'flex', alignItems: 'center', gap: 6, paddingLeft: 8 }}>
- {settingsOpen && (
- <span style={{ fontSize: 13, fontWeight: 600, color: '#8e8e93', letterSpacing: '0.01em' }}>
+ <div className="header" style={{ display: 'flex', justifyContent: 'space-between', width: '100%', alignItems: 'center', height: 40, padding: '0 14px 0 4px' }}>
+ <div style={{ display: 'flex', alignItems: 'center', gap: 4, paddingLeft: 2 }}>
+ {settingsOpen ? (
+ <span style={{ fontSize: 13, fontWeight: 600, color: '#8e8e93', letterSpacing: '0.01em', paddingLeft: 6 }}>
{settingsSubView === 'changelog' ? "What's New" : 'Settings'}
</span>
+ ) : (
+ <div
+ className="filter-segmented-track"
+ style={{
+ position: 'relative',
+ display: 'flex',
+ alignItems: 'center',
+ background: 'rgba(255, 255, 255, 0.05)',
+ border: '1px solid rgba(255, 255, 255, 0.09)',
+ borderRadius: 999,
+ padding: '2px 3px',
+ gap: 2,
+ marginLeft: 2,
+ boxShadow: 'inset 0 1px 0 rgba(255, 255, 255, 0.05)'
+ }}
+ >
+ {/* Single Persistent Sliding Pill Indicator */}
+ <motion.div
+ initial={false}
+ animate={{ x: activeIndex * 41 }}
+ transition={{ type: 'spring', stiffness: 500, damping: 35 }}
+ style={{
+ position: 'absolute',
+ left: 3,
+ top: 2,
+ width: 39,
+ height: 22,
+ borderRadius: 999,
+ background: 'rgba(255, 255, 255, 0.16)',
+ border: '1px solid rgba(255, 255, 255, 0.22)',
+ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25)',
+ pointerEvents: 'none',
+ zIndex: 0
+ }}
+ />
+
+ {FILTERS.map((f) => {
+ const active = typeFilter === f.id
+ return (
+ <button
+ key={f.id}
+ type="button"
+ className={`filter-chip${active ? ' active' : ''}`}
+ onClick={() => setTypeFilter(f.id)}
+ style={{
+ position: 'relative',
+ display: 'inline-flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ width: 39,
+ height: 22,
+ padding: 0,
+ fontSize: 10.5,
+ fontWeight: active ? 600 : 500,
+ color: active ? '#ffffff' : 'rgba(255, 255, 255, 0.65)',
+ background: 'transparent',
+ border: 'none',
+ borderRadius: 999,
+ cursor: 'pointer',
+ userSelect: 'none',
+ transition: 'color 0.18s ease',
+ zIndex: 1
+ }}
+ >
+ <span>{f.label}</span>
+ </button>
+ )
+ })}
+ </div>
)}
</div>
diff --git a/src/hooks/useFilteredItems.ts b/src/hooks/useFilteredItems.ts
index bb0b371..c93385a 100644
--- a/src/hooks/useFilteredItems.ts
+++ b/src/hooks/useFilteredItems.ts
@@ -6,7 +6,7 @@
*/
import { useMemo } from 'react'
import { useStore } from '../store/appStore'
-import type { ClipboardItemDto } from '../../shared/types'
+import type { ClipboardItemDto, TypeFilter } from '../../shared/types'
import { basename } from '../lib/format'
function matches(it: ClipboardItemDto, q: string): boolean {
@@ -26,6 +26,30 @@ function matches(it: ClipboardItemDto, q: string): boolean {
}
}
+import { isImagePath } from '../lib/format'
+
+function isImageItem(it: ClipboardItemDto): boolean {
+ if (it.data.kind === 'image' || it.data.kind === 'image-collection') return true
+ if (it.data.kind === 'files' && it.data.paths.length > 0) {
+ return it.data.paths.every((p) => isImagePath(p))
+ }
+ return false
+}
+
+function matchesType(it: ClipboardItemDto, filter: TypeFilter): boolean {
+ if (filter === 'all') return true
+ switch (filter) {
+ case 'text':
+ return it.data.kind === 'text' && !it.data.isUrl
+ case 'links':
+ return it.data.kind === 'text' && !!it.data.isUrl
+ case 'images':
+ return isImageItem(it)
+ case 'files':
+ return it.data.kind === 'files' && !isImageItem(it)
+ }
+}
+
export interface GroupedItems {
pinned: ClipboardItemDto[]
recent: ClipboardItemDto[]
@@ -34,6 +58,7 @@ export interface GroupedItems {
export function useFilteredItems(): GroupedItems {
const items = useStore((s) => s.items)
const query = useStore((s) => s.query)
+ const typeFilter = useStore((s) => s.typeFilter)
const tutorialStep = useStore((s) => s.tutorialStep)
return useMemo(() => {
@@ -60,8 +85,9 @@ export function useFilteredItems(): GroupedItems {
for (const it of filteredByTutorial) {
if (!matches(it, query.trim())) continue
+ if (!matchesType(it, typeFilter)) continue
;(it.pinned ? pinned : recent).push(it)
}
return { pinned, recent }
- }, [items, query, tutorialStep])
+ }, [items, query, typeFilter, tutorialStep])
}
diff --git a/src/store/appStore.ts b/src/store/appStore.ts
index 5ede048..7c293cb 100644
--- a/src/store/appStore.ts
+++ b/src/store/appStore.ts
@@ -27,6 +27,8 @@ interface AppState {
hydrated: boolean
/** Free-text search filter (UI-only state). */
query: string
+ typeFilter: import('../../shared/types').TypeFilter
+ setTypeFilter: (filter: import('../../shared/types').TypeFilter) => void
/** Whether the panel blade is expanded. */
open: boolean
/** Settings sheet visibility. */
@@ -90,6 +92,8 @@ export const useStore = create<AppState>((set, get) => ({
settings: { ...DEFAULT_SETTINGS },
hydrated: false,
query: '',
+ typeFilter: 'all',
+ setTypeFilter: (typeFilter) => set({ typeFilter }),
open: false,
settingsOpen: false,
settingsSubView: 'main',
diff --git a/src/styles/global.css b/src/styles/global.css
index ce949ad..da4ba18 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -48,12 +48,12 @@ body {
dragstart on every element, which breaks our draggable item tiles and
file sub-rows. Scope it to img/a only, and let .item-main / .file-row
re-enable dragging explicitly. */
+/* High-Definition Vector & Image Anti-Aliasing */
img,
svg,
canvas,
video {
- image-rendering: -webkit-optimize-contrast;
- image-rendering: crisp-edges;
+ image-rendering: smooth;
shape-rendering: geometricPrecision;
text-rendering: optimizeLegibility;
}
@@ -72,6 +72,32 @@ svg polygon {
vector-effect: non-scaling-stroke;
}
+/* HD Anti-Aliased Curved Edges & Micro Surfaces */
+.blade,
+.item,
+.item-main,
+.filter-segmented-track,
+.filter-chip,
+.act,
+.icon-btn,
+.preview-flyout,
+.indicator-flyout,
+.settings-sheet,
+.pinned-count-badge,
+.thumb-wrap,
+.thumb,
+.kind-badge,
+.changelog-pill,
+.copy-curve-container,
+.bundle-stack-card,
+.style-card {
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
+ transform: translateZ(0);
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+}
+
img,
a {
-webkit-user-drag: none;
diff --git a/src/styles/panel.css b/src/styles/panel.css
index 9bda38f..f80c0da 100644
--- a/src/styles/panel.css
+++ b/src/styles/panel.css
@@ -31,6 +31,10 @@
box-shadow: none;
overflow: hidden;
border: none;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ transform: translateZ(0);
+ backface-visibility: hidden;
}
.blade-container.blade-right .blade {
border-top-right-radius: 0;
@@ -419,6 +423,18 @@
filter: brightness(1.1);
}
+/* Quick Type Segmented Control */
+.filter-segmented-track {
+ backdrop-filter: blur(12px);
+ -webkit-backdrop-filter: blur(12px);
+}
+.filter-chip {
+ outline: none;
+}
+.filter-chip:not(.active):hover {
+ color: rgba(255, 255, 255, 0.95) !important;
+}
+
/* Copy Indicator Sine Curve Morph Styles */
.copy-curve-container {
pointer-events: none;