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
feat(dock): implement top and bottom dock positions with horizontal shelf, flush Bezier flares, and card-anchored preview flyouts
Deepender2594da9a7a4d31
diff --git a/electron/main/geometry.ts b/electron/main/geometry.tsindex d7aa70d..1e74711 100644--- a/electron/main/geometry.ts+++ b/electron/main/geometry.ts@@ -1,4 +1,4 @@-export type StickPosition = 'left' | 'right'+export type StickPosition = 'left' | 'right' | 'top' | 'bottom'export interface DisplayInfo {id: number@@ -20,7 +20,10 @@ export interface StickBoundsParams {/** Persisted scale factor — secondary discriminator for identical-geometry monitors. */savedScaleFactor?: numberwindowWidth: number+ windowHeight?: number+ horizontalOffset?: numbercurrentBounds?: { x: number; y: number }+ previewActive?: boolean}export interface StickBoundsResult {@@ -106,19 +109,54 @@ export function computeStickBounds(params: StickBoundsParams): StickBoundsResultlet x: numberlet y: number- const width = windowWidth- // Use the resolved display's own height — NOT always the primary's.- const height = wa.height+ let width: number+ let height: numberswitch (position) {case 'left':x = wa.xy = wa.y+ width = windowWidth+ height = wa.heightbreakcase 'right':x = wa.x + wa.width - windowWidthy = wa.y+ width = windowWidth+ height = wa.heightbreak+ case 'top': {+ const dockWidth = Math.min(wa.width - 60, 1080)+ const previewHeight = Math.min(wa.height - 20, 720)+ const dockHeight = params.previewActive ? previewHeight : (params.windowHeight ?? 480)+ const hOffset = Math.min(1, Math.max(0, params.horizontalOffset ?? 0.5))+ const pad = wa.width >= dockWidth + 60 ? 30 : 0+ const minX = wa.x + pad+ const maxX = wa.x + wa.width - dockWidth - pad+ const dockX = minX + Math.round(Math.max(0, maxX - minX) * hOffset)+ // Allocate 30px transparent gutters on left and right for curved connector arcs (flares)+ x = dockX - 30+ y = wa.y+ width = dockWidth + 60+ height = dockHeight+ break+ }+ case 'bottom': {+ const dockWidth = Math.min(wa.width - 60, 1080)+ const previewHeight = Math.min(wa.height - 20, 720)+ const dockHeight = params.previewActive ? previewHeight : (params.windowHeight ?? 480)+ const hOffset = Math.min(1, Math.max(0, params.horizontalOffset ?? 0.5))+ const pad = wa.width >= dockWidth + 60 ? 30 : 0+ const minX = wa.x + pad+ const maxX = wa.x + wa.width - dockWidth - pad+ const dockX = minX + Math.round(Math.max(0, maxX - minX) * hOffset)+ // Allocate 30px transparent gutters on left and right for curved connector arcs (flares)+ x = dockX - 30+ y = wa.y + wa.height - dockHeight+ width = dockWidth + 60+ height = dockHeight+ break+ }}return { x, y, width, height, displayId: display.id, resolvedDisplay: display }diff --git a/electron/main/ipc.ts b/electron/main/ipc.tsindex c7d4774..593e65f 100644--- a/electron/main/ipc.ts+++ b/electron/main/ipc.ts@@ -667,7 +667,7 @@ export function registerIpc(): void {if (patch.hotZoneWidth !== undefined) {setHotZoneWidth(patch.hotZoneWidth)}- if (patch.stickPosition !== undefined || patch.stickDisplayId !== undefined || patch.verticalOffset !== undefined) {+ if (patch.stickPosition !== undefined || patch.stickDisplayId !== undefined || patch.verticalOffset !== undefined || patch.horizontalOffset !== undefined) {repositionWindow()if (patch.stickPosition !== undefined || patch.stickDisplayId !== undefined) {popUpAndRetract(1500)diff --git a/electron/main/stickProbe.ts b/electron/main/stickProbe.tsindex ccebc69..eecc0f6 100644--- a/electron/main/stickProbe.ts+++ b/electron/main/stickProbe.ts@@ -19,7 +19,7 @@ export interface StickProbeInput {cursor: { x: number; y: number }/** Work area of the display the shelf is stuck to. */workArea: WorkAreaRect- stickPosition: 'left' | 'right'+ stickPosition: 'left' | 'right' | 'top' | 'bottom'/** Physical thickness of the hover trigger band. */hotZoneWidth: number}@@ -47,9 +47,21 @@ export function probeStickEdge(input: StickProbeInput): StickProbeResult {const garbage =clientX < -5000 || clientX > 15000 || clientY < -5000 || clientY > 15000- const distFromEdge = stickPosition === 'right'- ? workArea.width - clientX- : clientX+ let distFromEdge: number+ switch (stickPosition) {+ case 'right':+ distFromEdge = workArea.width - clientX+ break+ case 'left':+ distFromEdge = clientX+ break+ case 'top':+ distFromEdge = clientY+ break+ case 'bottom':+ distFromEdge = workArea.height - clientY+ break+ }const inEdge = !garbage && distFromEdge >= -30 && distFromEdge <= hotZoneWidth@@ -120,7 +132,7 @@ export function probeSeamAware(input: {cursor: { x: number; y: number }workArea: WorkAreaRect- stickPosition: 'left' | 'right'+ stickPosition: 'left' | 'right' | 'top' | 'bottom'hotZoneWidth: number/** Monotonic-ish wall time for THIS sample (Date.now() in production). */now: numberdiff --git a/electron/main/tray.ts b/electron/main/tray.tsindex b9b7960..2decbbc 100644--- a/electron/main/tray.ts+++ b/electron/main/tray.ts@@ -149,9 +149,11 @@ export function createTray(): Tray {const settings = loadSettings()return ([{ pos: 'left' as const, labelKey: 'left' as const },- { pos: 'right' as const, labelKey: 'right' as const }+ { pos: 'right' as const, labelKey: 'right' as const },+ { pos: 'top' as const, labelKey: 'top' as const },+ { pos: 'bottom' as const, labelKey: 'bottom' as const }]).map(({ pos, labelKey }) => ({- label: getTrayText(settings.language, labelKey),+ label: getTrayText(settings.language, labelKey as any) || (pos === 'top' ? 'Top' : pos === 'bottom' ? 'Bottom' : pos),type: 'radio' as const,checked: current === pos,click: () => {diff --git a/electron/main/window.ts b/electron/main/window.tsindex b7f45ab..58539ad 100644--- a/electron/main/window.ts+++ b/electron/main/window.ts@@ -428,7 +428,9 @@ function getStickGeometry(): { x: number; y: number; width: number; height: numbsavedWorkArea: settings.stickDisplayWorkArea,savedScaleFactor: settings.stickDisplayScaleFactor,windowWidth: currentWindowWidth,- currentBounds: getMainWindow()?.getBounds()+ horizontalOffset: settings.horizontalOffset,+ currentBounds: getMainWindow()?.getBounds(),+ previewActive})const resolved = result.resolvedDisplay@@ -519,20 +521,20 @@ function getStickGeometry(): { x: number; y: number; width: number; height: numb}export function createWindow(): BrowserWindow {- const { x, y, height } = getStickGeometry()+ const { x, y, width, height } = getStickGeometry()mainWindow = new BrowserWindow({icon: PATHS.icon(),x,y,- width: PANEL_WIDTH,+ width,height,show: false,frame: false,fullscreenable: false,maximizable: false,- minWidth: PANEL_WIDTH,- minHeight: 320,+ minWidth: 320,+ minHeight: 240,movable: false,resizable: false,transparent: true,diff --git a/shared/types.ts b/shared/types.tsindex bc63a75..eff54af 100644--- a/shared/types.ts+++ b/shared/types.ts@@ -77,7 +77,7 @@ export interface ClipboardItemDto extends Omit<ClipboardItem, 'data'> {/** Section the renderer groups items into. */export type ItemSection = 'pinned' | 'shelf'-export type StickPosition = 'left' | 'right'+export type StickPosition = 'left' | 'right' | 'top' | 'bottom'export interface DisplayInfo {id: number@@ -166,6 +166,8 @@ export interface Settings {copyIndicatorStyle: 'logo' | 'check' | 'copy' | 'sparkle'/** Vertical offset fraction along screen edge (0 = top, 0.5 = center, 1 = bottom). Default: 0.5. */verticalOffset: number+ /** Horizontal offset fraction along screen edge when positioned at top/bottom (0 = left, 0.5 = center, 1 = right). Default: 0.5. */+ horizontalOffset?: number/** Vertical alignment of the hover trigger strip relative to shelf ('top' | 'center' | 'bottom'). Default: 'center'. */triggerAlignment?: 'top' | 'center' | 'bottom'/** When true, subtly illuminates a beacon hint on the screen edge when touching the edge at a different position. Default: true. */@@ -212,6 +214,7 @@ export const DEFAULT_SETTINGS: Settings = {showCopyIndicator: true,copyIndicatorStyle: 'logo',verticalOffset: 0.5,+ horizontalOffset: 0.5,triggerAlignment: 'center',showEdgeLocationHint: false,soundEffects: true,diff --git a/src/components/ClearMenu.tsx b/src/components/ClearMenu.tsxindex 36676bb..f7d679d 100644--- a/src/components/ClearMenu.tsx+++ b/src/components/ClearMenu.tsx@@ -15,6 +15,8 @@ interface ClearMenuProps {onClear: (ids: string[]) => void/** Clear all unpinned history. */onClearAll: () => void+ /** Direction menu flies out. Defaults to 'up' for bottom footer, 'down' for header. */+ menuDirection?: 'up' | 'down'}const WINDOWS: { key: '1h' | '6h' | '24h'; hours: number }[] = [@@ -39,7 +41,14 @@ const menuItemStyle: CSSProperties = {transition: 'background 0.12s ease'}-export function ClearMenu({ items, disabled, panelOpen, onClear, onClearAll }: ClearMenuProps) {+export function ClearMenu({+ items,+ disabled,+ panelOpen,+ onClear,+ onClearAll,+ menuDirection = 'up'+}: ClearMenuProps) {const { t } = useTranslation()const [open, setOpen] = useState(false)const [confirmAll, setConfirmAll] = useState(false)@@ -88,6 +97,8 @@ export function ClearMenu({ items, disabled, panelOpen, onClear, onClearAll }: ConClearAll()}+ const isMenuDown = menuDirection === 'down'+return (<div ref={ref} style={{ position: 'relative' }}><button@@ -108,20 +119,21 @@ export function ClearMenu({ items, disabled, panelOpen, onClear, onClearAll }: C<AnimatePresence>{open && (<motion.div- initial={{ opacity: 0, y: 6, scale: 0.98 }}+ initial={{ opacity: 0, y: isMenuDown ? -6 : 6, scale: 0.98 }}animate={{ opacity: 1, y: 0, scale: 1 }}- exit={{ opacity: 0, y: 6, scale: 0.98 }}+ exit={{ opacity: 0, y: isMenuDown ? -6 : 6, scale: 0.98 }}transition={{ duration: 0.15, ease: 'easeOut' }}style={{position: 'absolute',- bottom: 'calc(100% + 6px)',+ top: isMenuDown ? 'calc(100% + 6px)' : undefined,+ bottom: isMenuDown ? undefined : 'calc(100% + 6px)',right: 0,minWidth: 190,background: '#141414',- border: 'none',+ border: '1px solid rgba(255, 255, 255, 0.08)',borderRadius: 16,padding: 4,- boxShadow: '0 12px 32px rgba(0, 0, 0, 0.6)',+ boxShadow: '0 12px 32px rgba(0, 0, 0, 0.75)',zIndex: 100}}>diff --git a/src/components/ClipboardItem.tsx b/src/components/ClipboardItem.tsxindex 846599f..c04c098 100644--- a/src/components/ClipboardItem.tsx+++ b/src/components/ClipboardItem.tsx@@ -347,7 +347,7 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item, timeTick =e.currentTarget.blur()playCardExpandSound(!isPreviewing)const rect = e.currentTarget.closest('.item-main')?.getBoundingClientRect()- const rectData = rect ? { y: rect.y, height: rect.height } : undefined+ const rectData = rect ? { x: rect.x, y: rect.y, width: rect.width, height: rect.height } : undefineduseStore.getState().setPreviewItemId(isPreviewing ? null : item.id, rectData)}}>diff --git a/src/components/CopyIndicatorCurve.tsx b/src/components/CopyIndicatorCurve.tsxindex 5c7902f..737e739 100644--- a/src/components/CopyIndicatorCurve.tsx+++ b/src/components/CopyIndicatorCurve.tsx@@ -172,30 +172,48 @@ export function CopyIndicatorCurve() {const open = useStore((s) => s.open)const settings = useStore((s) => s.settings)const isRight = settings.stickPosition === 'right'+ const isTop = settings.stickPosition === 'top'+ const isBottom = settings.stickPosition === 'bottom'+ const isHorizontal = isTop || isBottomconst indicatorStyle = settings.copyIndicatorStyle || 'logo'const reduceMotion = !!settings.reduceMotion- // Spans the full height of the hover bar trigger zone- const triggerHeightPx = window.innerHeight * (settings.hotZoneHeight || 0.25)- const H = triggerHeightPx+ const screenH = typeof window !== 'undefined' ? window.innerHeight : 1080const bulge = 48- const boxW = 75-const hw = settings.hotZoneWidth || 3- // Structurally matched Cubic Bezier paths for 100% smooth frame-by-frame interpolation- const curvePathLeft = `M 0,0 L ${hw},0 C ${hw},${H * 0.22} ${bulge},${H * 0.28} ${bulge},${H / 2} C ${bulge},${H * 0.72} ${hw},${H * 0.78} ${hw},${H} L 0,${H} Z`- const flatPathLeft = `M 0,0 L ${hw},0 C ${hw},${H * 0.22} ${hw},${H * 0.28} ${hw},${H / 2} C ${hw},${H * 0.72} ${hw},${H * 0.78} ${hw},${H} L 0,${H} Z`+ let boxW = 75+ let boxH = 75+ let activePath = ''+ let flatPath = ''++ if (isHorizontal) {+ const W = 297 // 220 * 1.35 (+35% increase, matches trigger bar)+ boxW = W+ boxH = 75+ if (isTop) {+ activePath = `M 0,0 L 0,${hw} C ${W * 0.22},${hw} ${W * 0.28},${bulge} ${W / 2},${bulge} C ${W * 0.72},${bulge} ${W * 0.78},${hw} ${W},${hw} L ${W},0 Z`+ flatPath = `M 0,0 L 0,${hw} C ${W * 0.22},${hw} ${W * 0.28},${hw} ${W / 2},${hw} C ${W * 0.72},${hw} ${W * 0.78},${hw} ${W},${hw} L ${W},0 Z`+ } else {+ activePath = `M 0,${boxH} L 0,${boxH - hw} C ${W * 0.22},${boxH - hw} ${W * 0.28},${boxH - bulge} ${W / 2},${boxH - bulge} C ${W * 0.72},${boxH - bulge} ${W * 0.78},${boxH - hw} ${W},${boxH - hw} L ${W},${boxH} Z`+ flatPath = `M 0,${boxH} L 0,${boxH - hw} C ${W * 0.22},${boxH - hw} ${W * 0.28},${boxH - hw} ${W / 2},${boxH - hw} C ${W * 0.72},${boxH - hw} ${W * 0.78},${boxH - hw} ${W},${boxH - hw} L ${W},${boxH} Z`+ }+ } else {+ const H = screenH * (settings.hotZoneHeight || 0.25)+ boxW = 75+ boxH = H+ const curvePathLeft = `M 0,0 L ${hw},0 C ${hw},${H * 0.22} ${bulge},${H * 0.28} ${bulge},${H / 2} C ${bulge},${H * 0.72} ${hw},${H * 0.78} ${hw},${H} L 0,${H} Z`+ const flatPathLeft = `M 0,0 L ${hw},0 C ${hw},${H * 0.22} ${hw},${H * 0.28} ${hw},${H / 2} C ${hw},${H * 0.72} ${hw},${H * 0.78} ${hw},${H} L 0,${H} Z`- const curvePathRight = `M ${boxW},0 L ${boxW - hw},0 C ${boxW - hw},${H * 0.22} ${boxW - bulge},${H * 0.28} ${boxW - bulge},${H / 2} C ${boxW - bulge},${H * 0.72} ${boxW - hw},${H * 0.78} ${boxW - hw},${H} L ${boxW},${H} Z`- const flatPathRight = `M ${boxW},0 L ${boxW - hw},0 C ${boxW - hw},${H * 0.22} ${boxW - hw},${H * 0.28} ${boxW - hw},${H / 2} C ${boxW - hw},${H * 0.72} ${boxW - hw},${H * 0.78} ${boxW - hw},${H} L ${boxW},${H} Z`+ const curvePathRight = `M ${boxW},0 L ${boxW - hw},0 C ${boxW - hw},${H * 0.22} ${boxW - bulge},${H * 0.28} ${boxW - bulge},${H / 2} C ${boxW - bulge},${H * 0.72} ${boxW - hw},${H * 0.78} ${boxW - hw},${H} L ${boxW},${H} Z`+ const flatPathRight = `M ${boxW},0 L ${boxW - hw},0 C ${boxW - hw},${H * 0.22} ${boxW - hw},${H * 0.28} ${boxW - hw},${H / 2} C ${boxW - hw},${H * 0.72} ${boxW - hw},${H * 0.78} ${boxW - hw},${H} L ${boxW},${H} Z`- const activePath = isRight ? curvePathRight : curvePathLeft- const flatPath = isRight ? flatPathRight : flatPathLeft+ activePath = isRight ? curvePathRight : curvePathLeft+ flatPath = isRight ? flatPathRight : flatPathLeft+ }const showCurve = (settings.showCopyIndicator !== false) && copyFlareActive && !open- const screenH = typeof window !== 'undefined' ? window.innerHeight : 800const pFrac = settings.panelHeight || 0.6const panelH = screenH * pFracconst minY = panelH / 2@@ -203,9 +221,6 @@ export function CopyIndicatorCurve() {const vOffset = settings.verticalOffset ?? 0.5const midY = minY + vOffset * (maxY - minY)- const topOffset = `${midY}px`- const yOffset = '-50%'-const fade = { duration: reduceMotion ? 0.12 : ENTER_MS, ease: reduceMotion ? 'linear' : EASE_OUT }return (@@ -213,26 +228,39 @@ export function CopyIndicatorCurve() {{showCurve && (<motion.divkey={`copy-sine-curve-${flareKey}`}- className={`copy-curve-container ${isRight ? 'right' : 'left'}`}+ className={`copy-curve-container ${settings.stickPosition}`}initial={{ opacity: 0 }}animate={{ opacity: 1 }}exit={{ opacity: 0 }}transition={fade}- style={{- position: 'absolute',- top: topOffset,- y: yOffset,- [isRight ? 'right' : 'left']: 0,- width: boxW,- height: H,- pointerEvents: 'none',- zIndex: 9999- }}+ style={+ isHorizontal+ ? {+ position: 'absolute',+ left: '50%',+ x: '-50%',+ [isTop ? 'top' : 'bottom']: 0,+ width: boxW,+ height: boxH,+ pointerEvents: 'none',+ zIndex: 9999+ }+ : {+ position: 'absolute',+ top: `${midY}px`,+ y: '-50%',+ [isRight ? 'right' : 'left']: 0,+ width: boxW,+ height: boxH,+ pointerEvents: 'none',+ zIndex: 9999+ }+ }><svgwidth={boxW}- height={H}- viewBox={`0 0 ${boxW} ${H}`}+ height={boxH}+ viewBox={`0 0 ${boxW} ${boxH}`}fill="none"xmlns="http://www.w3.org/2000/svg"style={{ overflow: 'visible' }}@@ -253,18 +281,33 @@ export function CopyIndicatorCurve() {animate={reduceMotion ? { opacity: 1 } : { scale: 1, opacity: 1 }}exit={reduceMotion ? { opacity: 0 } : { scale: 0.92, opacity: 0 }}transition={{ ...fade, delay: reduceMotion ? 0 : 0.04 }}- style={{- position: 'absolute',- top: '50%',- y: '-50%',- [isRight ? 'right' : 'left']: 2,- width: 43.3,- height: 43.3,- display: 'flex',- alignItems: 'center',- justifyContent: 'center',- pointerEvents: 'none'- }}+ style={+ isHorizontal+ ? {+ position: 'absolute',+ left: '50%',+ x: '-50%',+ [isTop ? 'top' : 'bottom']: 2,+ width: 43.3,+ height: 43.3,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ pointerEvents: 'none'+ }+ : {+ position: 'absolute',+ top: '50%',+ y: '-50%',+ [isRight ? 'right' : 'left']: 2,+ width: 43.3,+ height: 43.3,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ pointerEvents: 'none'+ }+ }>{indicatorStyle === 'check' ? (<TickIndicatorIcon fillColor="#ffffff" />diff --git a/src/components/Header.tsx b/src/components/Header.tsxindex 164453e..1036852 100644--- a/src/components/Header.tsx+++ b/src/components/Header.tsx@@ -6,8 +6,22 @@ import { playButtonClickSound } from '../lib/soundEffects'import { loadEmojiCatalog } from '../lib/emoji/load'import { useTranslation } from '../i18n'+import { ClearMenu } from './ClearMenu'+import type { ClipboardItemDto } from '../../shared/types'-export function Header() {+export interface HeaderProps {+ isHorizontal?: boolean+ itemCount?: number+ clearProps?: {+ items: ClipboardItemDto[]+ disabled: boolean+ panelOpen: boolean+ onClear: (ids: string[]) => void+ onClearAll: () => void+ }+}++export function Header({ isHorizontal = false, itemCount, clearProps }: HeaderProps = {}) {const { t } = useTranslation()const setSettingsOpen = useStore((s) => s.setSettingsOpen)const settingsOpen = useStore((s) => s.settingsOpen)@@ -15,6 +29,8 @@ export function Header() {const settings = useStore((s) => s.settings)const patchSettings = useStore((s) => s.patchSettings)const currentVersion = useStore((s) => s.currentVersion)+ const settingsTab = useStore((s) => s.settingsTab)+ const setSettingsTab = useStore((s) => s.setSettingsTab)const isChangelogUnread = settingsOpen && (!settings.lastSeenChangelogVersion ||@@ -54,7 +70,7 @@ export function Header() {const headerFade = `opacity ${reduceMotion ? '0.01s' : '0.16s'} ease`return (- <div className="header" style={{ display: 'flex', justifyContent: 'space-between', width: '100%', alignItems: 'center', height: 40, padding: '0 14px', boxSizing: 'border-box' }}>+ <div className={`header${isHorizontal ? ' header-horizontal' : ''}`} style={{ display: 'flex', justifyContent: 'space-between', width: '100%', alignItems: 'center', height: 40, padding: isHorizontal ? '0 16px' : '0 14px', boxSizing: 'border-box' }}><divstyle={{display: 'grid',@@ -87,88 +103,149 @@ export function Header() {transition: headerFade}}>- {/* Single Persistent Sliding Pill Indicator (ABOVE the buttons) */}- <motion.div- initial={false}- animate={{ x: activeIndex * (filterChipWidth + 4) }}- transition={{- type: 'spring',- stiffness: 440,- damping: 34,- mass: 0.7- }}+ {/* Single Persistent Sliding Pill Indicator (ABOVE the buttons) */}+ <motion.div+ initial={false}+ animate={{ x: activeIndex * (filterChipWidth + 4) }}+ transition={{+ type: 'spring',+ stiffness: 440,+ damping: 34,+ mass: 0.7+ }}+ style={{+ position: 'absolute',+ left: 0,+ top: 0,+ width: filterChipWidth,+ height: 28,+ borderRadius: 999,+ background: 'linear-gradient(180deg, #ffffff 0%, #ebebeb 100%)',+ border: 'none',+ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 #ffffff',+ pointerEvents: 'none',+ 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+ const Icon = f.Icon+ return (+ <button+ key={f.id}+ type="button"+ className={`filter-chip${active ? ' active' : ''}`}+ title={f.label}+ aria-label={f.label}+ aria-pressed={active}+ tabIndex={settingsOpen ? -1 : 0}+ onPointerEnter={() => {+ if (f.id === 'emoji') void loadEmojiCatalog()+ }}+ onClick={() => {+ playButtonClickSound()+ if (f.id === 'emoji') setEmojiOpen(true)+ else setTypeFilter(f.id)+ }}+ >+ <Icon width={14} height={14} />+ </button>+ )+ })}+ </div>+ {isHorizontal ? (+ <div+ aria-hidden={!settingsOpen}+ style={{+ gridArea: '1 / 1 / 2 / 2',+ display: 'flex',+ alignItems: 'center',+ gap: 8,+ opacity: settingsOpen ? 1 : 0,+ pointerEvents: settingsOpen ? 'auto' : 'none',+ transition: headerFade+ }}+ >+ <spanstyle={{- position: 'absolute',- left: 0,- top: 0,- width: filterChipWidth,- height: 28,- borderRadius: 999,- background: 'linear-gradient(180deg, #ffffff 0%, #ebebeb 100%)',- border: 'none',- boxShadow: '0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 #ffffff',- pointerEvents: 'none',- zIndex: 2,- display: 'flex',- alignItems: 'center',- justifyContent: 'center',- color: '#000000',- willChange: 'transform'+ fontSize: 12,+ fontWeight: 700,+ color: '#ffffff',+ letterSpacing: '0.04em',+ textTransform: 'uppercase',+ marginRight: 2}}>- <ActiveIcon width={14} height={14} />- </motion.div>-- {FILTERS.map((f) => {- const active = activeId === f.id- const Icon = f.Icon- return (- <button- key={f.id}- type="button"- className={`filter-chip${active ? ' active' : ''}`}- title={f.label}- aria-label={f.label}- aria-pressed={active}- tabIndex={settingsOpen ? -1 : 0}- onPointerEnter={() => {- if (f.id === 'emoji') void loadEmojiCatalog()- }}- onClick={() => {- playButtonClickSound()- if (f.id === 'emoji') setEmojiOpen(true)- else setTypeFilter(f.id)- }}- >- <Icon width={14} height={14} />- </button>- )- })}- </div>- <span- aria-hidden={!settingsOpen}- style={{- gridArea: '1 / 1 / 2 / 2',- fontSize: 13,- fontWeight: 600,- color: '#8e8e93',- letterSpacing: '0.01em',- paddingLeft: 0,- whiteSpace: 'nowrap',- overflow: 'hidden',- textOverflow: 'ellipsis',- maxWidth: 170,- lineHeight: '28px',- opacity: settingsOpen ? 1 : 0,- pointerEvents: 'none',- transition: headerFade- }}- >- {t('header.settings')}- </span>+ {t('header.settings')}+ </span>+ <div className="settings-header-pills" style={{ display: 'flex', alignItems: 'center', gap: 5 }}>+ {[+ { id: 'all' as const, label: t('filters.all') || 'All' },+ { id: 'behaviour' as const, label: t('tabs.behaviour') },+ { id: 'position' as const, label: t('tabs.position') },+ { id: 'appearance' as const, label: t('tabs.appearance') }+ ].map((tab) => {+ const active = settingsTab === tab.id+ return (+ <button+ key={tab.id}+ type="button"+ className={`settings-header-pill${active ? ' active' : ''}`}+ onClick={() => {+ playButtonClickSound()+ setSettingsTab(tab.id)+ }}+ >+ {tab.label}+ </button>+ )+ })}+ </div>+ </div>+ ) : (+ <span+ aria-hidden={!settingsOpen}+ style={{+ gridArea: '1 / 1 / 2 / 2',+ fontSize: 13,+ fontWeight: 600,+ color: '#8e8e93',+ letterSpacing: '0.01em',+ paddingLeft: 0,+ whiteSpace: 'nowrap',+ overflow: 'hidden',+ textOverflow: 'ellipsis',+ maxWidth: 170,+ lineHeight: '28px',+ opacity: settingsOpen ? 1 : 0,+ pointerEvents: 'none',+ transition: headerFade+ }}+ >+ {t('header.settings')}+ </span>+ )}</div>- <div style={{ display: 'flex', alignItems: 'center', gap: 4, flexShrink: 0, paddingRight: 2 }}>+ <div style={{ display: 'flex', alignItems: 'center', gap: 6, flexShrink: 0, paddingRight: 2 }}>+ {isHorizontal && !settingsOpen && itemCount != null && (+ <div className="footer-capsule" style={{ marginRight: 2 }}>+ <span className="footer-capsule-count" title={`${itemCount}`}>+ {itemCount}+ </span>+ </div>+ )}+ {isHorizontal && clearProps && !settingsOpen && (+ <ClearMenu {...clearProps} menuDirection="down" />+ )}{settingsOpen && (<buttontype="button"diff --git a/src/components/ItemList.tsx b/src/components/ItemList.tsxindex 0f2d237..12d33ee 100644--- a/src/components/ItemList.tsx+++ b/src/components/ItemList.tsx@@ -31,6 +31,8 @@ export function ItemList() {const isDraggingAny = useStore((s) => !!s.dragActive || !!s.internalDragReq)const open = useStore((s) => s.open)+ const settings = useStore((s) => s.settings)+ const isHorizontal = settings.stickPosition === 'top' || settings.stickPosition === 'bottom'const typeFilter = useStore((s) => s.typeFilter) || 'all'const [showScrollTop, setShowScrollTop] = useState(false)@@ -134,6 +136,19 @@ export function ItemList() {}}+ useEffect(() => {+ const el = listRef.current+ if (!el || !isHorizontal) return+ const onWheel = (e: WheelEvent) => {+ if (Math.abs(e.deltaY) > Math.abs(e.deltaX)) {+ e.preventDefault()+ el.scrollLeft += e.deltaY+ }+ }+ el.addEventListener('wheel', onWheel, { passive: false })+ return () => el.removeEventListener('wheel', onWheel)+ }, [isHorizontal])+const startScrolling = () => {if (scrollRaf.current !== null) return@@ -143,8 +158,11 @@ export function ItemList() {lastTime = timeif (listRef.current && scrollVelocity.current !== 0) {- // Apply velocity, scaled by delta time to keep it consistent across refresh rates- listRef.current.scrollTop += scrollVelocity.current * (dt / 16)+ if (isHorizontal) {+ listRef.current.scrollLeft += scrollVelocity.current * (dt / 16)+ } else {+ listRef.current.scrollTop += scrollVelocity.current * (dt / 16)+ }scrollRaf.current = requestAnimationFrame(loop)} else {scrollRaf.current = null@@ -164,6 +182,24 @@ export function ItemList() {const handleDragOver = (e: React.DragEvent) => {if (!listRef.current) returnconst rect = listRef.current.getBoundingClientRect()++ if (isHorizontal) {+ const x = e.clientX - rect.left+ const edgeSize = 80+ if (x < edgeSize) {+ const intensity = Math.max(0, 1 - (x / edgeSize))+ scrollVelocity.current = -(intensity * 20 + 2)+ startScrolling()+ } else if (x > rect.width - edgeSize) {+ const intensity = Math.max(0, 1 - ((rect.width - x) / edgeSize))+ scrollVelocity.current = (intensity * 20 + 2)+ startScrolling()+ } else {+ stopScrolling()+ }+ return+ }+const y = e.clientY - rect.topconst edgeSize = 80 // slightly larger comfortable trigger zone@@ -189,7 +225,7 @@ export function ItemList() {return (<div- className="list"+ className={`list${isHorizontal ? ' horizontal' : ''}`}ref={listRef}onDragOver={handleDragOver}onDragLeave={handleDragLeaveOrDrop}@@ -233,7 +269,7 @@ export function ItemList() {</button></div></div>- {!pinnedCollapsed && pinned.map((it) => (+ {(isHorizontal || !pinnedCollapsed) && pinned.map((it) => (<ClipboardItemCard key={it.id} item={it} timeTick={timeTick} />))}</section>diff --git a/src/components/Panel.tsx b/src/components/Panel.tsxindex d7b546f..1193cfa 100644--- a/src/components/Panel.tsx+++ b/src/components/Panel.tsx@@ -202,9 +202,16 @@ export function Panel() {}const isRight = settings.stickPosition === 'right'+ const isTop = settings.stickPosition === 'top'+ const isBottom = settings.stickPosition === 'bottom'+ const isHorizontal = isTop || isBottomlet containerClass = 'blade-container'if (isRight) containerClass += ' blade-right'+ else if (isTop) containerClass += ' blade-top'+ else if (isBottom) containerClass += ' blade-bottom'+ else containerClass += ' blade-left'+ if (isHorizontal) containerClass += ' horizontal-dock'const reduceMotion = !!settings.reduceMotionconst bounceOpen = !!settings.bounceAnimation@@ -228,16 +235,31 @@ export function Panel() {containerStyle.y = '-50%'containerStyle.right = 0originX = 1+ originY = 0.5+ } else if (isTop) {+ containerStyle.top = 0+ containerStyle.left = '50%'+ containerStyle.x = '-50%'+ containerStyle.y = 0+ originX = 0.5+ originY = 0+ } else if (isBottom) {+ containerStyle.bottom = 0+ containerStyle.left = '50%'+ containerStyle.x = '-50%'+ containerStyle.y = 0+ originX = 0.5+ originY = 1} else {containerStyle.top = topOffsetcontainerStyle.y = '-50%'containerStyle.left = 0+ originX = 0+ originY = 0.5}containerStyle.originX = originXcontainerStyle.originY = originY--const alignment = settings.triggerAlignment || 'center'let insetTop = `calc(50% - ${halfTrigger}px)`let insetBottom = `calc(50% - ${halfTrigger}px)`@@ -250,6 +272,11 @@ export function Panel() {insetBottom = '0px'}+ const triggerWidthPx = 297 // 220 * 1.35 (+35% increase, centered)+ const halfTriggerW = triggerWidthPx / 2+ const insetLeft = `calc(50% - ${halfTriggerW}px)`+ const insetRight = `calc(50% - ${halfTriggerW}px)`+// Set clipPath via style (not animate) to avoid Framer Motion's broken// calc() interpolation — CSS transitions handle it correctly.let clipPath: string@@ -258,6 +285,14 @@ export function Panel() {clipPath = open? 'inset(calc(0% - 100px) 0px calc(0% - 100px) calc(0% - 800px) round 24px 0px 0px 24px)': `inset(${insetTop} 0px ${insetBottom} calc(100% - ${hotWidth}px) round 24px 0px 0px 24px)`+ } else if (isTop) {+ clipPath = open+ ? 'inset(0px calc(0% - 100px) calc(0% - 600px) calc(0% - 100px) round 0px 0px 24px 24px)'+ : `inset(0px ${insetRight} calc(100% - ${hotWidth}px) ${insetLeft} round 0px 0px 999px 999px)`+ } else if (isBottom) {+ clipPath = open+ ? 'inset(calc(0% - 600px) calc(0% - 100px) 0px calc(0% - 100px) round 24px 24px 0px 0px)'+ : `inset(calc(100% - ${hotWidth}px) ${insetRight} 0px ${insetLeft} round 999px 999px 0px 0px)`} else {clipPath = open? 'inset(calc(0% - 100px) calc(0% - 800px) calc(0% - 100px) 0px round 0px 24px 24px 0px)'@@ -300,23 +335,67 @@ export function Panel() {animate={{ opacity: 0.5 }}exit={{ opacity: 0 }}transition={{ duration: 0.18, ease: 'easeOut' }}- style={{- position: 'absolute',- top: insetTop,- bottom: insetBottom,- [isRight ? 'right' : 'left']: 0,- width: 2,- boxSizing: 'border-box',- background: 'linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.65) 25%, rgba(255, 255, 255, 0.65) 75%, transparent)',- boxShadow: '0 0 6px rgba(255, 255, 255, 0.3)',- borderRadius: isRight ? '999px 0 0 999px' : '0 999px 999px 0',- pointerEvents: 'none',- zIndex: 99- }}+ style={+ isHorizontal+ ? {+ position: 'absolute',+ left: insetLeft,+ right: insetRight,+ [isTop ? 'top' : 'bottom']: 0,+ height: 2,+ boxSizing: 'border-box',+ background: 'linear-gradient(to right, transparent, rgba(255, 255, 255, 0.65) 25%, rgba(255, 255, 255, 0.65) 75%, transparent)',+ boxShadow: '0 0 6px rgba(255, 255, 255, 0.3)',+ borderRadius: '999px',+ pointerEvents: 'none',+ zIndex: 99+ }+ : {+ position: 'absolute',+ top: insetTop,+ bottom: insetBottom,+ [isRight ? 'right' : 'left']: 0,+ width: 2,+ boxSizing: 'border-box',+ background: 'linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.65) 25%, rgba(255, 255, 255, 0.65) 75%, transparent)',+ boxShadow: '0 0 6px rgba(255, 255, 255, 0.3)',+ borderRadius: isRight ? '999px 0 0 999px' : '0 999px 999px 0',+ pointerEvents: 'none',+ zIndex: 99+ }+ }/>)}</AnimatePresence>- {isRight ? (+ {isTop && (+ <>+ <div className="flare-horizontal flare-top-left">+ <svg width="32" height="30" viewBox="0 0 32 30" fill="none" xmlns="http://www.w3.org/2000/svg" shapeRendering="geometricPrecision">+ <path d="M 0 0 C 13.43 0 30 16.57 30 30 L 32 30 L 32 0 Z" fill="#000000" />+ </svg>+ </div>+ <div className="flare-horizontal flare-top-right">+ <svg width="32" height="30" viewBox="0 0 32 30" fill="none" xmlns="http://www.w3.org/2000/svg" shapeRendering="geometricPrecision">+ <path d="M 2 30 C 2 16.57 18.57 0 32 0 L 0 0 L 0 30 Z" fill="#000000" />+ </svg>+ </div>+ </>+ )}+ {isBottom && (+ <>+ <div className="flare-horizontal flare-bottom-left">+ <svg width="32" height="30" viewBox="0 0 32 30" fill="none" xmlns="http://www.w3.org/2000/svg" shapeRendering="geometricPrecision">+ <path d="M 0 30 C 13.43 30 30 13.43 30 0 L 32 0 L 32 30 Z" fill="#000000" />+ </svg>+ </div>+ <div className="flare-horizontal flare-bottom-right">+ <svg width="32" height="30" viewBox="0 0 32 30" fill="none" xmlns="http://www.w3.org/2000/svg" shapeRendering="geometricPrecision">+ <path d="M 2 0 C 2 13.43 18.57 30 32 30 L 0 30 L 0 0 Z" fill="#000000" />+ </svg>+ </div>+ </>+ )}+ {!isHorizontal && (isRight ? (<><div className="flare-top flare-right"><svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">@@ -342,13 +421,29 @@ export function Panel() {</svg></div></>- )}+ ))}<divref={bladeRef}className="blade"- style={{ height: panelHeightStr }}+ style={isHorizontal ? { width: 'min(calc(100vw - 60px), 1080px)', height: 210 } : { height: panelHeightStr }}>- <Header />+ <Header+ isHorizontal={isHorizontal}+ itemCount={filteredCount}+ clearProps={{+ items: filteredItems,+ disabled: recent.length === 0,+ panelOpen: open,+ onClear: (ids) => clear(ids),+ onClearAll: () => {+ if (typeFilter === 'all' && !query.trim()) {+ clear()+ } else {+ clear(recent.map((it) => it.id))+ }+ }+ }}+ /><ToastStack /><div style={{ flex: 1, display: 'grid', gridTemplate: '1fr / 1fr', overflow: 'hidden', position: 'relative' }}>@@ -395,31 +490,33 @@ export function Panel() {{emojiMounted ? <EmojiPicker active={emojiOpen} /> : null}</div></div>- <div className="footer" style={{ position: 'relative' }}>- {!emojiOpen && (- <>- <div className="footer-capsule">- <span className="footer-capsule-count" title={`${filteredCount}`}>- {filteredCount}- </span>- </div>- <div className="spacer" />- <ClearMenu- items={filteredItems}- disabled={recent.length === 0}- panelOpen={open}- onClear={(ids) => clear(ids)}- onClearAll={() => {- if (typeFilter === 'all' && !query.trim()) {- clear()- } else {- clear(recent.map((it) => it.id))- }- }}- />- </>- )}- </div>+ {!isHorizontal && (+ <div className="footer" style={{ position: 'relative' }}>+ {!emojiOpen && (+ <>+ <div className="footer-capsule">+ <span className="footer-capsule-count" title={`${filteredCount}`}>+ {filteredCount}+ </span>+ </div>+ <div className="spacer" />+ <ClearMenu+ items={filteredItems}+ disabled={recent.length === 0}+ panelOpen={open}+ onClear={(ids) => clear(ids)}+ onClearAll={() => {+ if (typeFilter === 'all' && !query.trim()) {+ clear()+ } else {+ clear(recent.map((it) => it.id))+ }+ }}+ />+ </>+ )}+ </div>+ )}</div>{/* Settings view */}@@ -427,13 +524,13 @@ export function Panel() {{settingsOpen && (<motion.divkey="settings"- initial={{ opacity: 0, x: isRight ? -8 : 8 }}- animate={{ opacity: 1, x: 0 }}- exit={{ opacity: 0, x: isRight ? 8 : -8 }}+ initial={{ opacity: 0, x: isHorizontal ? 0 : (isRight ? -8 : 8), y: isHorizontal ? (isTop ? -8 : 8) : 0 }}+ animate={{ opacity: 1, x: 0, y: 0 }}+ exit={{ opacity: 0, x: isHorizontal ? 0 : (isRight ? 8 : -8), y: isHorizontal ? (isTop ? -8 : 8) : 0 }}transition={settings.reduceMotion ? { duration: 0.01 } : { type: 'spring', stiffness: 500, damping: 32, mass: 0.5 }}style={{ gridArea: '1 / 1 / 2 / 2', display: 'flex', flexDirection: 'column', overflow: 'hidden', position: 'relative' }}>- <Settings />+ <Settings isHorizontal={isHorizontal} /></motion.div>)}</AnimatePresence>diff --git a/src/components/PreviewFlyout.tsx b/src/components/PreviewFlyout.tsxindex c20e6a4..cef6520 100644--- a/src/components/PreviewFlyout.tsx+++ b/src/components/PreviewFlyout.tsx@@ -18,27 +18,32 @@ const flyoutEaseOpen = [0.16, 1, 0.3, 1] as constconst flyoutEaseClose = [0.3, 0, 0.2, 1] as constconst flyoutVariants = {- hidden: (isRight: boolean) => ({+ hidden: (dir: 'left' | 'right' | 'top' | 'bottom') => ({opacity: 0,- x: isRight ? 14 : -14,+ x: dir === 'right' ? 14 : dir === 'left' ? -14 : 0,+ y: dir === 'top' ? -14 : dir === 'bottom' ? 14 : 0,scale: 0.97,}),shown: {opacity: 1,x: 0,+ y: 0,scale: 1,transition: {x: { duration: 0.26, ease: flyoutEaseOpen },+ y: { duration: 0.26, ease: flyoutEaseOpen },scale: { duration: 0.26, ease: flyoutEaseOpen },opacity: { duration: 0.18, ease: 'easeOut' as const },},},- exit: (isRight: boolean) => ({+ exit: (dir: 'left' | 'right' | 'top' | 'bottom') => ({opacity: 0,- x: isRight ? 10 : -10,+ x: dir === 'right' ? 10 : dir === 'left' ? -10 : 0,+ y: dir === 'top' ? -10 : dir === 'bottom' ? 10 : 0,scale: 0.98,transition: {x: { duration: 0.18, ease: flyoutEaseClose },+ y: { duration: 0.18, ease: flyoutEaseClose },scale: { duration: 0.18, ease: flyoutEaseClose },opacity: { duration: 0.14, ease: 'easeIn' as const },},@@ -56,7 +61,13 @@ export function PreviewFlyout({ isRight }: { isRight: boolean }) {const item = previewItemId ? items.find((i) => i.id === previewItemId) : null+ const stickPosition = (settings.stickPosition || (isRight ? 'right' : 'left')) as 'left' | 'right' | 'top' | 'bottom'+ const isTop = stickPosition === 'top'+ const isBottom = stickPosition === 'bottom'+ const isHorizontal = isTop || isBottom+const screenH = typeof window !== 'undefined' ? window.innerHeight : 800+ const screenW = typeof window !== 'undefined' ? window.innerWidth : 1140const pFrac = settings.panelHeight || 0.6const panelH = screenH * pFracconst minY = panelH / 2@@ -67,7 +78,18 @@ export function PreviewFlyout({ isRight }: { isRight: boolean }) {const reduceMotion = settings.reduceMotion || adaptiveSpring.type === 'tween'- const maxFlyoutHeight = Math.max(100, panelH - 24)+ const dockWidth = Math.min(screenW - 60, 1080)+ const flyoutWidth = 440+ const maxFlyoutHeight = isHorizontal ? Math.min(460, Math.max(200, screenH - 240)) : Math.max(100, panelH - 24)++ const dockLeft = Math.round((screenW - dockWidth) / 2)+ const previewItemRect = useStore((s) => s.previewItemRect)+ const cardCenterXInBlade = previewItemRect?.x !== undefined+ ? (previewItemRect.x + (previewItemRect.width || 210) / 2) - dockLeft+ : dockWidth / 2+ const minLeft = 12+ const maxLeft = Math.max(minLeft, dockWidth - flyoutWidth - 12)+ const flyoutLeft = Math.max(minLeft, Math.min(maxLeft, Math.round(cardCenterXInBlade - flyoutWidth / 2)))const [dragOver, setDragOver] = useState(false)const flyoutRef = useRef<HTMLDivElement | null>(null)@@ -83,8 +105,17 @@ export function PreviewFlyout({ isRight }: { isRight: boolean }) {// offsetHeight ignores the wrapper transform, so the hover// keep-alive zone stays full-size while the open/close motion plays.const h = flyoutRef.current.offsetHeight- const top = panelTop + (panelH - h) / 2- useStore.getState().setPreviewFlyoutRect({ top, bottom: top + h })+ if (isHorizontal) {+ useStore.getState().setPreviewFlyoutRect({+ top: 210,+ bottom: 222 + h,+ left: flyoutLeft,+ right: flyoutLeft + flyoutWidth+ })+ } else {+ const top = panelTop + (panelH - h) / 2+ useStore.getState().setPreviewFlyoutRect({ top, bottom: top + h })+ }}updateRect()@@ -97,7 +128,7 @@ export function PreviewFlyout({ isRight }: { isRight: boolean }) {window.removeEventListener('resize', updateRect)useStore.getState().setPreviewFlyoutRect(null)}- }, [item?.id, panelTop, panelH])+ }, [item?.id, panelTop, panelH, isHorizontal, isTop, dockLeft, flyoutLeft, flyoutWidth])// Dismiss preview flyout when user clicks inside the clipboard shelf (outside the flyout)useEffect(() => {@@ -228,29 +259,46 @@ export function PreviewFlyout({ isRight }: { isRight: boolean }) {{item && (<motion.divkey={item.id}- custom={isRight}+ custom={stickPosition}variants={flyoutVariants}initial={reduceMotion ? 'reducedHidden' : 'hidden'}animate={reduceMotion ? 'reducedShown' : 'shown'}exit={reduceMotion ? 'reducedHidden' : 'exit'}transition={reduceMotion ? { duration: 0.12, ease: 'linear' } : undefined}- style={{- position: 'absolute',- top: panelTop,- height: panelH,- [isRight ? 'right' : 'left']: 'var(--panel-width)',- marginLeft: isRight ? 0 : 12,- marginRight: isRight ? 12 : 0,- width: 440,- display: 'flex',- alignItems: 'center',- pointerEvents: 'none',- zIndex: 5,- originX: isRight ? 1 : 0,- originY: 0.5,- willChange: 'transform, opacity',- backfaceVisibility: 'hidden',- }}+ style={+ isHorizontal+ ? {+ position: 'absolute',+ left: dockLeft + flyoutLeft,+ width: flyoutWidth,+ [isTop ? 'top' : 'bottom']: 222,+ display: 'flex',+ flexDirection: 'column',+ pointerEvents: 'none',+ zIndex: 5,+ originX: 0.5,+ originY: isTop ? 0 : 1,+ willChange: 'transform, opacity',+ backfaceVisibility: 'hidden',+ }+ : {+ position: 'absolute',+ top: panelTop,+ height: panelH,+ [isRight ? 'right' : 'left']: 'var(--panel-width)',+ marginLeft: isRight ? 0 : 12,+ marginRight: isRight ? 12 : 0,+ width: 440,+ display: 'flex',+ alignItems: 'center',+ pointerEvents: 'none',+ zIndex: 5,+ originX: isRight ? 1 : 0,+ originY: 0.5,+ willChange: 'transform, opacity',+ backfaceVisibility: 'hidden',+ }+ }><divref={flyoutRef}@@ -264,11 +312,11 @@ export function PreviewFlyout({ isRight }: { isRight: boolean }) {maxHeight: maxFlyoutHeight,background: dragOver ? 'rgba(15, 30, 18, 0.95)' : '#141414',borderRadius: 20,- border: dragOver ? '2px dashed #4caf50' : 'none',+ border: dragOver ? '2px dashed #4caf50' : '1px solid rgba(255, 255, 255, 0.08)',overflow: 'hidden',display: 'flex',flexDirection: 'column',- boxShadow: dragOver ? '0 0 35px rgba(76, 175, 80, 0.3)' : '0 20px 40px rgba(0,0,0,0.5)',+ boxShadow: dragOver ? '0 0 35px rgba(76, 175, 80, 0.3)' : '0 20px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.5)',pointerEvents: 'auto',transition: 'background 0.2s ease, border 0.2s ease, box-shadow 0.2s ease',position: 'relative'diff --git a/src/components/Settings.tsx b/src/components/Settings.tsxindex f819cfc..fe1330c 100644--- a/src/components/Settings.tsx+++ b/src/components/Settings.tsx@@ -12,9 +12,16 @@ import '../styles/settings.css'type SettingsTab = 'behaviour' | 'position' | 'appearance'-export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: boolean }) {+export function Settings({+ inlineIndicatorStyle,+ isHorizontal: propIsHorizontal+}: {+ inlineIndicatorStyle?: boolean+ isHorizontal?: boolean+}) {const { t } = useTranslation()const settings = useStore((s) => s.settings)+ const isHorizontal = propIsHorizontal ?? (settings.stickPosition === 'top' || settings.stickPosition === 'bottom')const TABS: { id: SettingsTab; label: string }[] = [{ id: 'behaviour', label: t('tabs.behaviour') },@@ -31,6 +38,8 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: boolconst setSliderActive = useStore((s) => s.setSliderActive)const lastTickVal = useRef<number>(settings.verticalOffset ?? 0.5)+ const horizontalTab = useStore((s) => s.settingsTab)+ const shelfTrackRef = useRef<HTMLDivElement>(null)const handleSliderInput = (rawVal: number) => {const clamped = Math.min(1.0, Math.max(0.0, rawVal))@@ -316,6 +325,810 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool</>)+ // ── Manual update card renderer shared between vertical and horizontal views ──+ const renderManualUpdateCard = (withRef = false) => {+ if (!hasUpdatePrompt) return null+ return (+ <div className="manual-update-section" ref={withRef ? updateBannerRef : undefined} style={{ width: '100%' }}>+ <div className="manual-update-card">+ {updateDownloaded ? (+ <>+ <div className="manual-update-info">+ <div className="manual-update-title">+ <span className="manual-update-dot ready" />+ <span>{t('behaviour.updateReadyTitle', { version: updateDownloaded.version })}</span>+ </div>+ <div className="manual-update-desc">+ {t('behaviour.updateReadyDesc')}+ </div>+ </div>+ <button+ type="button"+ className="manual-update-pill primary"+ onClick={() => {+ playButtonClickSound()+ void window.edge.installUpdate()+ }}+ >+ {t('behaviour.restartToUpdate')}+ </button>+ </>+ ) : isDownloading ? (+ <>+ <div className="manual-update-info">+ <div className="manual-update-title">+ <span className="manual-update-dot ready" />+ <span>+ {updateInfo?.latestVersion+ ? `Update v${updateInfo.latestVersion} Available`+ : t('behaviour.updateAvailableTitle', { version: '' })}+ </span>+ </div>+ <div className="manual-update-desc">+ {t('behaviour.downloadingUpdate')}+ </div>+ </div>+ <button+ type="button"+ className="manual-update-pill primary"+ disabled+ >+ {downloadPercent > 0+ ? `Downloading... (${downloadPercent}%)`+ : 'Downloading update...'}+ </button>+ </>+ ) : checkState.status === 'available' ? (+ <>+ <div className="manual-update-info">+ <div className="manual-update-title">+ <span className="manual-update-dot ready" />+ <span>{t('behaviour.updateAvailableTitle', { version: checkState.version || '' })}</span>+ </div>+ <div className="manual-update-desc">+ {t('behaviour.updateAvailableDesc')}+ </div>+ </div>+ <div className="manual-update-actions">+ <button+ type="button"+ className="manual-update-pill primary"+ onClick={() => {+ playButtonClickSound()+ handleStartDownload()+ }}+ >+ {t('behaviour.downloadAndUpdate')}+ </button>+ <button+ type="button"+ className="manual-update-pill outline"+ onClick={() => {+ playButtonClickSound()+ useStore.getState().dismissUpdate()+ }}+ >+ {t('behaviour.skip')}+ </button>+ </div>+ </>+ ) : checkState.status === 'checking' ? (+ <>+ <div className="manual-update-info">+ <div className="manual-update-title">{t('behaviour.checkForUpdates')}</div>+ <div className="manual-update-desc">{t('behaviour.checkingForUpdates')}</div>+ </div>+ <button+ type="button"+ className="manual-update-pill outline"+ disabled+ >+ <span className="manual-update-dot checking" />+ <span>{t('behaviour.checkingForUpdates')}</span>+ </button>+ </>+ ) : checkState.status === 'up-to-date' ? (+ <>+ <div className="manual-update-info">+ <div className="manual-update-title">+ <span className="manual-update-dot ready" />+ <span>{t('behaviour.isUpToDate')}</span>+ </div>+ <div className="manual-update-desc">+ {t('footer.version')} {currentVersion || '0.3.1'}+ </div>+ </div>+ <button+ type="button"+ className="manual-update-pill outline"+ onClick={() => {+ playButtonClickSound()+ handleManualCheck()+ }}+ >+ {t('behaviour.checkAgain')}+ </button>+ </>+ ) : checkState.status === 'error' ? (+ <>+ <div className="manual-update-info">+ <div className="manual-update-title error">+ {t('behaviour.updateCheckFailed')}+ </div>+ <div className="manual-update-desc error">+ {checkState.error || t('behaviour.updateCheckFailed')}+ </div>+ </div>+ <button+ type="button"+ className="manual-update-pill outline"+ onClick={() => {+ playButtonClickSound()+ handleManualCheck()+ }}+ >+ {t('behaviour.tryAgain')}+ </button>+ </>+ ) : (+ <>+ <div className="manual-update-info">+ <div className="manual-update-title">{t('behaviour.checkForUpdates')}</div>+ <div className="manual-update-desc">+ {t('footer.version')} {currentVersion || '0.3.1'}+ </div>+ </div>+ <button+ type="button"+ className="manual-update-pill outline"+ onClick={() => {+ playButtonClickSound()+ handleManualCheck()+ }}+ >+ {t('behaviour.checkForUpdates')}+ </button>+ </>+ )}+ </div>+ </div>+ )+ }++ // ── Horizontal Layout (Top / Bottom Dock Position) ────────────────────────+ if (isHorizontal) {+ const handleShelfWheel = (e: React.WheelEvent<HTMLDivElement>) => {+ if (e.deltaY !== 0) {+ e.currentTarget.scrollLeft += e.deltaY+ }+ }++ const showCard = (category: 'behaviour' | 'position' | 'appearance') => {+ return horizontalTab === 'all' || horizontalTab === category+ }++ return (+ <div className="settings-horizontal-shelf">+ <div+ className="settings-shelf-track"+ ref={shelfTrackRef}+ onWheel={handleShelfWheel}+ >+ {/* ── CARD 0: Update Banner (if applicable) ── */}+ {hasUpdatePrompt && (horizontalTab === 'all' || horizontalTab === 'behaviour') && (+ <div className="settings-shelf-card update-card">+ <div className="shelf-card-header">+ <span className="shelf-card-category" style={{ color: '#ffd60a' }}>UPDATE</span>+ <span className="shelf-card-title">+ {updateDownloaded+ ? t('behaviour.updateReadyTitle', { version: updateDownloaded.version })+ : isDownloading+ ? 'Downloading Update...'+ : checkState.status === 'available'+ ? t('behaviour.updateAvailableTitle', { version: checkState.version || '' })+ : t('behaviour.checkForUpdates')}+ </span>+ </div>+ <div className="shelf-card-body">+ {updateDownloaded ? (+ <button+ type="button"+ className="pill primary-pill"+ style={{ width: '100%', justifyContent: 'center', background: '#ffd60a', color: '#000000', fontWeight: 600 }}+ onClick={() => {+ playButtonClickSound()+ void window.edge.installUpdate()+ }}+ >+ {t('behaviour.restartToUpdate')}+ </button>+ ) : isDownloading ? (+ <div className="shelf-update-progress-wrap">+ <div className="shelf-progress-bar" style={{ width: `${downloadPercent}%` }} />+ <span className="shelf-progress-text">{downloadPercent > 0 ? `${downloadPercent}%` : 'Connecting...'}</span>+ </div>+ ) : checkState.status === 'available' ? (+ <button+ type="button"+ className="pill primary-pill"+ style={{ width: '100%', justifyContent: 'center' }}+ onClick={() => {+ playButtonClickSound()+ handleStartDownload()+ }}+ >+ {t('behaviour.downloadAndUpdate')}+ </button>+ ) : (+ <button+ type="button"+ className="pill display-pill"+ style={{ width: '100%', justifyContent: 'center' }}+ onClick={() => {+ playButtonClickSound()+ handleManualCheck()+ }}+ >+ {t('behaviour.checkForUpdates')}+ </button>+ )}+ </div>+ <div className="shelf-card-footer">+ {updateDownloaded ? t('behaviour.updateReadyDesc') : `Current version: v${currentVersion || '0.3.1'}`}+ </div>+ </div>+ )}++ {/* ── CARD 1: Language & Global Hotkey (BEHAVIOUR) ── */}+ {showCard('behaviour') && (+ <div className="settings-shelf-card">+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.behaviour')}</span>+ <span className="shelf-card-title">{t('behaviour.languageTitle')} & Hotkey</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 8 }}>+ <LanguageDropdown />+ <HotkeyRecorder+ hotkey={settings.toggleHotkey || 'Alt+C'}+ onChange={(nextHotkey) => {+ patch({ toggleHotkey: nextHotkey })+ pushToast({+ id: Date.now().toString(),+ message: t('toast.shortcutUpdated', { shortcut: nextHotkey }),+ tone: 'info'+ })+ }}+ />+ </div>+ <div className="shelf-card-footer">+ {t('behaviour.toggleHotkeyDesc')}+ </div>+ </div>+ )}++ {/* ── CARD 2: Edge Activation & Protection (BEHAVIOUR) ── */}+ {showCard('behaviour') && (+ <div className="settings-shelf-card">+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.behaviour')}</span>+ <span className="shelf-card-title">{t('behaviour.hoverActivationTitle')}</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 10 }}>+ <div className="shelf-row">+ <span className="shelf-row-label">{t('behaviour.hoverActivationTitle')}</span>+ <Toggle+ checked={settings.hoverActivation ?? true}+ onChange={(v) => {+ if (!v) {+ patch({ hoverActivation: false, suppressInFullscreen: false })+ } else {+ patch({ hoverActivation: true, suppressInFullscreen: true })+ }+ }}+ />+ </div>+ <div className="shelf-row" style={{ opacity: (settings.hoverActivation ?? true) ? 1 : 0.45 }}>+ <span className="shelf-row-label">{t('behaviour.fullscreenProtectionTitle')}</span>+ <Toggle+ checked={(settings.hoverActivation ?? true) ? settings.suppressInFullscreen : false}+ onChange={(v) => (settings.hoverActivation ?? true) && patch({ suppressInFullscreen: v })}+ disabled={!(settings.hoverActivation ?? true)}+ />+ </div>+ </div>+ <div className="shelf-card-footer">+ {(settings.hoverActivation ?? true) ? t('behaviour.hoverActivationDescOn') : t('behaviour.disabledHoverOff')}+ </div>+ </div>+ )}++ {/* ── CARD 3: System & Incognito (BEHAVIOUR) ── */}+ {showCard('behaviour') && (+ <div className="settings-shelf-card">+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.behaviour')}</span>+ <span className="shelf-card-title">{t('behaviour.launchAtLoginTitle')}</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 10 }}>+ <div className="shelf-row">+ <span className="shelf-row-label">{t('behaviour.launchAtLoginTitle')}</span>+ <Toggle+ checked={settings.launchAtLogin}+ onChange={(v) => {+ useStore.setState((s) => ({+ settings: { ...s.settings, launchAtLogin: v }+ }))+ void patch({ launchAtLogin: v })+ }}+ />+ </div>+ <div className="shelf-row">+ <span className="shelf-row-label">{t('behaviour.incognitoTitle')}</span>+ <Toggle+ checked={settings.incognito}+ onChange={(v) => patch({ incognito: v })}+ />+ </div>+ </div>+ <div className="shelf-card-footer">+ {settings.incognito ? t('behaviour.incognitoDesc') : t('behaviour.launchAtLoginDesc')}+ </div>+ </div>+ )}++ {/* ── CARD 4: History Capacity & Auto-Delete (BEHAVIOUR) ── */}+ {showCard('behaviour') && (+ <div className="settings-shelf-card" style={{ minWidth: 260 }}>+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.behaviour')}</span>+ <span className="shelf-card-title">{t('behaviour.capacityTitle')} & Retention</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 8 }}>+ <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>+ <div style={{ fontSize: 10, color: 'rgba(255, 255, 255, 0.4)', textTransform: 'uppercase', letterSpacing: '0.04em' }}>+ {t('behaviour.capacityTitle')}+ </div>+ <div className="setting-pills" style={{ gap: 4 }}>+ {[+ { label: '100', val: 100 },+ { label: '250', val: 250 },+ { label: '500', val: 500 },+ { label: '1000', val: 1000 }+ ].map((opt) => (+ <button+ key={opt.val}+ type="button"+ className={`pill ${settings.historyLimit === opt.val ? 'active' : ''}`}+ onClick={() => { playButtonClickSound(); patch({ historyLimit: opt.val }) }}+ >+ {opt.label}+ </button>+ ))}+ </div>+ </div>+ <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>+ <div style={{ fontSize: 10, color: 'rgba(255, 255, 255, 0.4)', textTransform: 'uppercase', letterSpacing: '0.04em' }}>+ {t('behaviour.autoDeleteTitle')}+ </div>+ <div className="setting-pills" style={{ gap: 4 }}>+ {[+ { label: t('behaviour.never'), val: 0 },+ { label: '1h', val: 1 },+ { label: '6h', val: 6 },+ { label: '24h', val: 24 },+ { label: '7d', val: 168 }+ ].map((opt) => (+ <button+ key={opt.val}+ type="button"+ className={`pill ${settings.autoDeleteHours === opt.val ? 'active' : ''}`}+ onClick={() => { playButtonClickSound(); patch({ autoDeleteHours: opt.val }) }}+ >+ {opt.label}+ </button>+ ))}+ </div>+ </div>+ </div>+ <div className="shelf-card-footer">+ {t('behaviour.capacityDesc')}+ </div>+ </div>+ )}++ {/* ── CARD 5: Updates & Ordering (BEHAVIOUR) ── */}+ {showCard('behaviour') && (+ <div className="settings-shelf-card">+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.behaviour')}</span>+ <span className="shelf-card-title">{t('behaviour.movePastedToTopTitle')}</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 10 }}>+ <div className="shelf-row">+ <span className="shelf-row-label">{t('behaviour.movePastedToTopTitle')}</span>+ <Toggle+ checked={settings.movePastedToTop ?? true}+ onChange={(v) => patch({ movePastedToTop: v })}+ />+ </div>+ {!isStoreBuild && (+ <div className="shelf-row">+ <span className="shelf-row-label">{t('behaviour.autoUpdatesTitle')}</span>+ <Toggle+ checked={settings.autoUpdates ?? true}+ onChange={(v) => patch({ autoUpdates: v })}+ />+ </div>+ )}+ </div>+ <div className="shelf-card-footer">+ <button+ type="button"+ className="pill display-pill"+ style={{ width: '100%', justifyContent: 'center', padding: '4px 8px', fontSize: 11 }}+ onClick={() => {+ playButtonClickSound()+ handleManualCheck()+ }}+ >+ {checkState.status === 'checking'+ ? t('behaviour.checkingForUpdates')+ : checkState.status === 'up-to-date'+ ? `${t('behaviour.isUpToDate')} (v${currentVersion || '0.3.1'})`+ : t('behaviour.checkForUpdates')}+ </button>+ </div>+ </div>+ )}++ {/* ── CARD 6: Edge Placement (POSITION) ── */}+ {showCard('position') && (+ <div className="settings-shelf-card" style={{ minWidth: 260 }}>+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.position')}</span>+ <span className="shelf-card-title">{t('position.edgePlacementTitle')}</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 8 }}>+ <div className="setting-pills" style={{ gap: 4 }}>+ {[+ { label: t('position.leftEdge'), val: 'left' as const },+ { label: t('position.rightEdge'), val: 'right' as const },+ { label: t('position.topEdge') || 'Top Edge', val: 'top' as const },+ { label: t('position.bottomEdge') || 'Bottom Edge', val: 'bottom' as const }+ ].map((opt) => (+ <button+ key={opt.val}+ type="button"+ className={`pill ${settings.stickPosition === opt.val ? 'active' : ''}`}+ onClick={() => {+ playButtonClickSound()+ patch({ stickPosition: opt.val })+ useStore.getState().notifyPositionChanged()+ }}+ >+ {opt.label}+ </button>+ ))}+ </div>+ <div className="shelf-row" style={{ marginTop: 2 }}>+ <span className="shelf-row-label">{t('position.edgeLocationHintTitle')}</span>+ <Toggle+ checked={settings.showEdgeLocationHint ?? false}+ onChange={(v) => patch({ showEdgeLocationHint: v })}+ />+ </div>+ </div>+ <div className="shelf-card-footer">+ {t('position.edgePlacementDesc')}+ </div>+ </div>+ )}++ {/* ── CARD 7: Horizontal Position Offset (POSITION) ── */}+ {showCard('position') && (+ <div className="settings-shelf-card" style={{ minWidth: 270 }}>+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.position')}</span>+ <span className="shelf-card-title">{t('position.horizontalPositionTitle') || 'Horizontal Position'}</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 8 }}>+ <div className="setting-slider-wrap">+ <input+ type="range"+ min="0"+ max="1"+ step="0.002"+ className="setting-range-input"+ value={settings.horizontalOffset ?? 0.5}+ style={{+ background: `linear-gradient(to right, #ffffff 0%, #ffffff ${(settings.horizontalOffset ?? 0.5) * 100}%, rgba(255, 255, 255, 0.12) ${(settings.horizontalOffset ?? 0.5) * 100}%, rgba(255, 255, 255, 0.12) 100%)`+ }}+ onChange={(e) => patch({ horizontalOffset: parseFloat(e.target.value) })}+ />+ <div className="setting-slider-labels">+ {[+ { label: 'Left', val: 0 },+ { label: 'Center', val: 0.5 },+ { label: 'Right', val: 1.0 }+ ].map((pos) => {+ const active = Math.abs((settings.horizontalOffset ?? 0.5) - pos.val) < 0.04+ return (+ <button+ key={pos.val}+ type="button"+ className={`slider-label-btn${active ? ' active' : ''}`}+ onClick={() => patch({ horizontalOffset: pos.val })}+ >+ {pos.label}+ </button>+ )+ })}+ </div>+ </div>+ </div>+ <div className="shelf-card-footer">+ {`Offset: ${Math.round((settings.horizontalOffset ?? 0.5) * 100)}%`}+ </div>+ </div>+ )}++ {/* ── CARD 8: Trigger Zone & Thickness (POSITION) ── */}+ {showCard('position') && (+ <div className="settings-shelf-card" style={{ minWidth: 260 }}>+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.position')}</span>+ <span className="shelf-card-title">{t('position.triggerZone')}</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 8 }}>+ <div className="setting-pills" style={{ gap: 4 }}>+ {[+ { label: t('position.top'), val: 'top' as const },+ { label: t('position.center'), val: 'center' as const },+ { label: t('position.bottom'), val: 'bottom' as const }+ ].map((opt) => (+ <button+ key={opt.label}+ type="button"+ className={`pill ${(settings.triggerAlignment || 'center') === opt.val ? 'active' : ''}`}+ onClick={() => {+ playButtonClickSound()+ patch({ triggerAlignment: opt.val })+ useStore.getState().notifyPositionChanged()+ }}+ >+ {opt.label}+ </button>+ ))}+ </div>+ <div style={{ display: 'flex', alignItems: 'center', gap: 8, marginTop: 4 }}>+ <input+ type="range"+ min="1"+ max="7"+ step="1"+ className="setting-range-input"+ value={settings.hotZoneWidth ?? 3}+ style={{+ flex: 1,+ background: `linear-gradient(to right, #ffffff 0%, #ffffff ${(((settings.hotZoneWidth ?? 3) - 1) / 6) * 100}%, rgba(255, 255, 255, 0.12) ${(((settings.hotZoneWidth ?? 3) - 1) / 6) * 100}%, rgba(255, 255, 255, 0.12) 100%)`+ }}+ onChange={(e) => {+ const val = parseInt(e.target.value, 10)+ if (val !== settings.hotZoneWidth) {+ playDialTickSound()+ patch({ hotZoneWidth: val })+ }+ }}+ />+ <span style={{ fontSize: 11, fontWeight: 600, color: '#ffffff', minWidth: 28, textAlign: 'right' }}>+ {`${settings.hotZoneWidth ?? 3}px`}+ </span>+ </div>+ </div>+ <div className="shelf-card-footer">+ {t('position.edgeTriggerThicknessDesc')}+ </div>+ </div>+ )}++ {/* ── CARD 9: Target Monitor (POSITION) ── */}+ {showCard('position') && (+ <div className="settings-shelf-card" style={{ minWidth: 250 }}>+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.position')}</span>+ <span className="shelf-card-title">{t('position.displayTitle')}</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 6 }}>+ <div className="setting-pills" style={{ gap: 4 }}>+ {displays.length === 0 && <div className="pill disabled">{t('position.loadingDisplays')}</div>}+ {displays.map((d) => {+ const currentDisplay = displays.find((disp) => disp.isCurrent)+ const activeDisplayId = currentDisplay+ ? currentDisplay.id+ : (settings.stickDisplayId ?? displays.find((disp) => disp.isPrimary)?.id ?? displays[0]?.id)+ const isActive = activeDisplayId === d.id+ const displayName = d.isPrimary ? t('position.primaryDisplay') : d.name+ return (+ <button+ key={d.id}+ type="button"+ className={`pill display-pill ${isActive ? 'active' : ''}`}+ onClick={() => {+ playButtonClickSound()+ patch({ stickDisplayId: d.id })+ useStore.getState().notifyPositionChanged()+ }}+ >+ <div className="pill-name">{displayName}</div>+ <div className="pill-res">{d.resolution}</div>+ </button>+ )+ })}+ </div>+ </div>+ <div className="shelf-card-footer">+ {t('position.displayDesc')}+ </div>+ </div>+ )}++ {/* ── CARD 10: Copy Indicator Style (APPEARANCE) ── */}+ {showCard('appearance') && (+ <div className="settings-shelf-card" style={{ minWidth: 280 }}>+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.appearance')}</span>+ <span className="shelf-card-title">{t('appearance.copyIndicatorTitle')}</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 6 }}>+ <div className="shelf-row">+ <span className="shelf-row-label">{t('appearance.copyIndicatorTitle')}</span>+ <Toggle+ checked={settings.showCopyIndicator ?? true}+ onChange={(v) => patch({ showCopyIndicator: v })}+ />+ </div>+ {(settings.showCopyIndicator ?? true) && (+ <div className="shelf-indicator-grid">+ {[+ {+ id: 'logo' as const,+ label: t('appearance.logoStyle'),+ Icon: () => <LiquidOctopusLoader fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" speed={1.2} active={true} />+ },+ {+ id: 'check' as const,+ label: t('appearance.tickStyle'),+ Icon: () => <TickIndicatorIcon fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" size={20} />+ },+ {+ id: 'copy' as const,+ label: t('appearance.copyStyle'),+ Icon: () => <CopyIndicatorIcon fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" size={20} />+ },+ {+ id: 'sparkle' as const,+ label: t('appearance.sparkleStyle'),+ Icon: () => <SparkleIndicatorIcon fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" size={20} />+ }+ ].map((item) => {+ const active = (settings.copyIndicatorStyle || 'logo') === item.id+ return (+ <div+ key={item.id}+ className={`shelf-indicator-item${active ? ' active' : ''}`}+ onClick={() => {+ playButtonClickSound()+ patch({ copyIndicatorStyle: item.id })+ }}+ >+ <div className="shelf-indicator-icon"><item.Icon /></div>+ <span className="shelf-indicator-name">{item.label}</span>+ </div>+ )+ })}+ </div>+ )}+ </div>+ <div className="shelf-card-footer">+ {t('appearance.copyIndicatorDesc')}+ </div>+ </div>+ )}++ {/* ── CARD 11: Typography & Audio (APPEARANCE) ── */}+ {showCard('appearance') && (+ <div className="settings-shelf-card">+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.appearance')}</span>+ <span className="shelf-card-title">{t('appearance.textSizeTitle')} & Sound</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 8 }}>+ <div className="setting-pills" style={{ gap: 4 }}>+ {[+ { label: t('appearance.small'), val: 0.85 },+ { label: t('appearance.normal'), val: 1.0 },+ { label: t('appearance.large'), val: 1.15 }+ ].map((opt) => (+ <button+ key={opt.label}+ type="button"+ className={`pill ${Math.abs((settings.fontSizeScale ?? 1.0) - opt.val) < 0.05 ? 'active' : ''}`}+ onClick={() => {+ playButtonClickSound()+ patch({ fontSizeScale: opt.val })+ }}+ >+ {opt.label}+ </button>+ ))}+ </div>+ <div className="shelf-row">+ <span className="shelf-row-label">{t('behaviour.soundEffectsTitle')}</span>+ <Toggle+ checked={settings.soundEffects ?? true}+ onChange={(v) => {+ if (v) playToggleSound(true)+ patch({ soundEffects: v })+ }}+ />+ </div>+ </div>+ <div className="shelf-card-footer">+ {(settings.soundEffects ?? true) ? 'Sound feedback active' : 'Audio muted'}+ </div>+ </div>+ )}++ {/* ── CARD 12: About & Quit (APPEARANCE) ── */}+ {showCard('appearance') && (+ <div className="settings-shelf-card">+ <div className="shelf-card-header">+ <span className="shelf-card-category">{t('tabs.appearance')}</span>+ <span className="shelf-card-title">About Edge-Drop</span>+ </div>+ <div className="shelf-card-body" style={{ gap: 6 }}>+ <button+ type="button"+ className="pill display-pill"+ style={{ width: '100%', justifyContent: 'center', padding: '5px 10px', fontSize: 11 }}+ onClick={() => {+ playButtonClickSound()+ window.open('https://www.edgedrop.app/supportedgedrop', '_blank')+ }}+ >+ ☕ {t('footer.supportDev')}+ </button>+ <button+ type="button"+ className="pill display-pill"+ style={{ width: '100%', justifyContent: 'center', padding: '5px 10px', fontSize: 11 }}+ onClick={() => {+ playButtonClickSound()+ window.open('https://github.com/Deepender25/Edge-Drop/issues/new/choose', '_blank')+ }}+ >+ 💬 {t('footer.submitFeedback')}+ </button>+ </div>+ <div className="shelf-card-footer">+ <button+ type="button"+ className="shelf-quit-btn"+ onClick={() => {+ playButtonClickSound()+ void window.edge.quitApp()+ }}+ >+ <span>Quit Edge-Drop (v{currentVersion || '0.3.1'})</span>+ </button>+ </div>+ </div>+ )}+ </div>+ </div>+ )+ }+const maxTabLen = Math.max(...TABS.map((tab) => tab.label.length))const tabFontSize = maxTabLen > 15 ? '9px' : maxTabLen > 13 ? '9.5px' : maxTabLen > 11 ? '10px' : maxTabLen > 9 ? '10.8px' : '11.5px'const tabLetterSpacing = maxTabLen > 13 ? '-0.03em' : maxTabLen > 10 ? '-0.015em' : '0'@@ -579,169 +1392,7 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool{hasUpdatePrompt && (<><div className="setting-divider" style={{ marginTop: 20 }} />- <div className="manual-update-section" ref={updateBannerRef}>- <div className="manual-update-card">- {updateDownloaded ? (- <>- <div className="manual-update-info">- <div className="manual-update-title">- <span className="manual-update-dot ready" />- <span>{t('behaviour.updateReadyTitle', { version: updateDownloaded.version })}</span>- </div>- <div className="manual-update-desc">- {t('behaviour.updateReadyDesc')}- </div>- </div>- <button- type="button"- className="manual-update-pill primary"- onClick={() => {- playButtonClickSound()- void window.edge.installUpdate()- }}- >- {t('behaviour.restartToUpdate')}- </button>- </>- ) : isDownloading ? (- <>- <div className="manual-update-info">- <div className="manual-update-title">- <span className="manual-update-dot ready" />- <span>- {updateInfo?.latestVersion- ? `Update v${updateInfo.latestVersion} Available`- : t('behaviour.updateAvailableTitle', { version: '' })}- </span>- </div>- <div className="manual-update-desc">- {t('behaviour.downloadingUpdate')}- </div>- </div>- <button- type="button"- className="manual-update-pill primary"- disabled- >- {downloadPercent > 0- ? `Downloading... (${downloadPercent}%)`- : 'Downloading update...'}- </button>- </>- ) : checkState.status === 'available' ? (- <>- <div className="manual-update-info">- <div className="manual-update-title">- <span className="manual-update-dot ready" />- <span>{t('behaviour.updateAvailableTitle', { version: checkState.version || '' })}</span>- </div>- <div className="manual-update-desc">- {t('behaviour.updateAvailableDesc')}- </div>- </div>- <div className="manual-update-actions">- <button- type="button"- className="manual-update-pill primary"- onClick={() => {- playButtonClickSound()- handleStartDownload()- }}- >- {t('behaviour.downloadAndUpdate')}- </button>- <button- type="button"- className="manual-update-pill outline"- onClick={() => {- playButtonClickSound()- useStore.getState().dismissUpdate()- }}- >- {t('behaviour.skip')}- </button>- </div>- </>- ) : checkState.status === 'checking' ? (- <>- <div className="manual-update-info">- <div className="manual-update-title">{t('behaviour.checkForUpdates')}</div>- <div className="manual-update-desc">{t('behaviour.checkingForUpdates')}</div>- </div>- <button- type="button"- className="manual-update-pill outline"- disabled- >- <span className="manual-update-dot checking" />- <span>{t('behaviour.checkingForUpdates')}</span>- </button>- </>- ) : checkState.status === 'up-to-date' ? (- <>- <div className="manual-update-info">- <div className="manual-update-title">- <span className="manual-update-dot ready" />- <span>{t('behaviour.isUpToDate')}</span>- </div>- <div className="manual-update-desc">- {t('footer.version')} {currentVersion || '0.3.1'}- </div>- </div>- <button- type="button"- className="manual-update-pill outline"- onClick={() => {- playButtonClickSound()- handleManualCheck()- }}- >- {t('behaviour.checkAgain')}- </button>- </>- ) : checkState.status === 'error' ? (- <>- <div className="manual-update-info">- <div className="manual-update-title error">- {t('behaviour.updateCheckFailed')}- </div>- <div className="manual-update-desc error">- {checkState.error || t('behaviour.updateCheckFailed')}- </div>- </div>- <button- type="button"- className="manual-update-pill outline"- onClick={() => {- playButtonClickSound()- handleManualCheck()- }}- >- {t('behaviour.tryAgain')}- </button>- </>- ) : (- <>- <div className="manual-update-info">- <div className="manual-update-title">{t('behaviour.checkForUpdates')}</div>- <div className="manual-update-desc">- {t('footer.version')} {currentVersion || '0.3.1'}- </div>- </div>- <button- type="button"- className="manual-update-pill outline"- onClick={() => {- playButtonClickSound()- handleManualCheck()- }}- >- {t('behaviour.checkForUpdates')}- </button>- </>- )}- </div>- </div>+ {renderManualUpdateCard(true)}</>)}@@ -769,7 +1420,9 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool<div className="setting-pills">{[{ label: t('position.leftEdge'), val: 'left' as const },- { label: t('position.rightEdge'), val: 'right' as const }+ { label: t('position.rightEdge'), val: 'right' as const },+ { label: t('position.topEdge') || 'Top Edge', val: 'top' as const },+ { label: t('position.bottomEdge') || 'Bottom Edge', val: 'bottom' as const }].map((opt) => (<buttonkey={opt.val}@@ -788,91 +1441,120 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool<div className="setting-divider" />- {/* Vertical Position Range Slider */}- <div className="setting-row vertical" style={{ gap: 10 }}>- <div className="setting-slider-header">- <div className="setting-info">- <div className="setting-title">{t('position.verticalPositionTitle')}</div>- <div className="setting-desc">{t('position.verticalPositionDesc')}</div>- </div>- <div className="setting-slider-val">- {`${Math.round((settings.verticalOffset ?? 0.5) * 100)}%`}- </div>- </div>+ {/* Position Range Slider (Vertical for left/right, Horizontal for top/bottom) */}+ {(() => {+ const isHorizontal = settings.stickPosition === 'top' || settings.stickPosition === 'bottom'+ const offsetVal = isHorizontal ? (settings.horizontalOffset ?? 0.5) : (settings.verticalOffset ?? 0.5)+ const sliderTitle = isHorizontal ? (t('position.horizontalPositionTitle') || 'Horizontal Position') : t('position.verticalPositionTitle')+ const sliderDesc = isHorizontal ? (t('position.horizontalPositionDesc') || 'Adjust horizontal alignment along screen edge') : t('position.verticalPositionDesc')++ return (+ <div className="setting-row vertical" style={{ gap: 10 }}>+ <div className="setting-slider-header">+ <div className="setting-info">+ <div className="setting-title">{sliderTitle}</div>+ <div className="setting-desc">{sliderDesc}</div>+ </div>+ <div className="setting-slider-val">+ {`${Math.round(offsetVal * 100)}%`}+ </div>+ </div>- <div className="setting-slider-wrap">- <input- type="range"- min="0"- max="1"- step="0.002"- className="setting-range-input"- value={settings.verticalOffset ?? 0.5}- style={{- background: `linear-gradient(to right, #ffffff 0%, #ffffff ${(settings.verticalOffset ?? 0.5) * 100}%, rgba(255, 255, 255, 0.12) ${(settings.verticalOffset ?? 0.5) * 100}%, rgba(255, 255, 255, 0.12) 100%)`- }}- onPointerDown={() => {- void window.edge.setInteractive(true)- setSliderActive(true)- }}- onPointerUp={(e) => {- setSliderActive(false)- const val = parseFloat((e.target as HTMLInputElement).value)- handleSliderRelease(val)- }}- onPointerCancel={(e) => {- setSliderActive(false)- const val = parseFloat((e.target as HTMLInputElement).value)- handleSliderRelease(val)- }}- onLostPointerCapture={(e) => {- setSliderActive(false)- const val = parseFloat((e.target as HTMLInputElement).value)- handleSliderRelease(val)- }}- onChange={(e) => {- const raw = parseFloat(e.target.value)- handleSliderInput(raw)- }}- />+ <div className="setting-slider-wrap">+ <input+ type="range"+ min="0"+ max="1"+ step="0.002"+ className="setting-range-input"+ value={offsetVal}+ style={{+ background: `linear-gradient(to right, #ffffff 0%, #ffffff ${offsetVal * 100}%, rgba(255, 255, 255, 0.12) ${offsetVal * 100}%, rgba(255, 255, 255, 0.12) 100%)`+ }}+ onPointerDown={() => {+ void window.edge.setInteractive(true)+ setSliderActive(true)+ }}+ onPointerUp={(e) => {+ setSliderActive(false)+ const val = parseFloat((e.target as HTMLInputElement).value)+ if (isHorizontal) {+ patch({ horizontalOffset: val })+ } else {+ handleSliderRelease(val)+ }+ }}+ onPointerCancel={(e) => {+ setSliderActive(false)+ const val = parseFloat((e.target as HTMLInputElement).value)+ if (isHorizontal) {+ patch({ horizontalOffset: val })+ } else {+ handleSliderRelease(val)+ }+ }}+ onLostPointerCapture={(e) => {+ setSliderActive(false)+ const val = parseFloat((e.target as HTMLInputElement).value)+ if (isHorizontal) {+ patch({ horizontalOffset: val })+ } else {+ handleSliderRelease(val)+ }+ }}+ onChange={(e) => {+ const raw = parseFloat(e.target.value)+ if (isHorizontal) {+ patch({ horizontalOffset: raw })+ } else {+ handleSliderInput(raw)+ }+ }}+ />- <div className="setting-slider-ticks">- {Array.from({ length: 21 }, (_, i) => {- const tickVal = i * 0.05- const currentVal = settings.verticalOffset ?? 0.5- const isMajor = i === 0 || i === 10 || i === 20- const isActive = Math.abs(currentVal - tickVal) < 0.025- return (- <span- key={i}- className={`slider-tick${isMajor ? ' major' : ''}${isActive ? ' active' : ''}`}- />- )- })}- </div>+ <div className="setting-slider-ticks">+ {Array.from({ length: 21 }, (_, i) => {+ const tickVal = i / 20+ const isMajor = i % 5 === 0+ const isActive = tickVal <= offsetVal+ return (+ <span+ key={i}+ className={`slider-tick${isMajor ? ' major' : ''}${isActive ? ' active' : ''}`}+ />+ )+ })}+ </div>- <div className="setting-slider-labels">- {[- { label: '0%', val: 0 },- { label: '50%', val: 0.5 },- { label: '100%', val: 1.0 }- ].map((pos) => {- const currentVal = settings.verticalOffset ?? 0.5- const active = Math.abs(currentVal - pos.val) < 0.04- return (- <button- key={pos.val}- type="button"- className={`slider-label-btn${active ? ' active' : ''}`}- onClick={() => handleSliderRelease(pos.val)}- >- {pos.label}- </button>- )- })}+ <div className="setting-slider-labels">+ {[+ { label: isHorizontal ? 'Left' : '0%', val: 0 },+ { label: 'Center', val: 0.5 },+ { label: isHorizontal ? 'Right' : '100%', val: 1.0 }+ ].map((pos) => {+ const active = Math.abs(offsetVal - pos.val) < 0.04+ return (+ <button+ key={pos.val}+ type="button"+ className={`slider-label-btn${active ? ' active' : ''}`}+ onClick={() => {+ if (isHorizontal) {+ patch({ horizontalOffset: pos.val })+ } else {+ handleSliderRelease(pos.val)+ }+ }}+ >+ {pos.label}+ </button>+ )+ })}+ </div>+ </div></div>- </div>- </div>+ )+ })()}<div className="setting-divider" />diff --git a/src/hooks/useEdgeHover.ts b/src/hooks/useEdgeHover.tsindex d77a8c5..7c5b26c 100644--- a/src/hooks/useEdgeHover.ts+++ b/src/hooks/useEdgeHover.ts@@ -66,14 +66,52 @@ export function notifyPreviewClosedByUser(): void {}, PREVIEW_CLOSE_STAY_MS)}+export function getHorizontalDockMetrics(displayWidth: number, horizontalOffset = 0.5) {+ const dockWidth = Math.min(displayWidth - 60, 1080)+ const pad = displayWidth >= dockWidth + 60 ? 30 : 0+ const minX = pad+ const maxX = displayWidth - dockWidth - pad+ const hOffset = Math.min(1, Math.max(0, horizontalOffset))+ const dockX = minX + Math.round(Math.max(0, maxX - minX) * hOffset)+ const dockCenterX = dockX + dockWidth / 2+ const triggerWidth = 297 // 220 * 1.35 (+35% increase, centered)+ const triggerLeft = dockCenterX - triggerWidth / 2+ const triggerRight = dockCenterX + triggerWidth / 2++ return {+ dockWidth,+ dockX,+ dockCenterX,+ triggerWidth,+ triggerLeft,+ triggerRight+ }+}+export function useEdgeHover(): void {// 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.const lastSetInteractiveRef = useRef(0)+ // Track active display dimensions (received from main process cursor poll)+ const displaySize = useRef({+ width: typeof window !== 'undefined' && window.screen ? window.screen.width : 1920,+ height: typeof window !== 'undefined' && window.screen ? window.screen.height : 1080+ })+// Hot zone and panel bounds, recomputed on resize to avoid reading DOM at 1000Hz- const zone = useRef({ top: 0, bottom: 0, midY: 0, panelHalfH: 0 })+ const zone = useRef<{+ top: number+ bottom: number+ midY: number+ panelHalfH: number+ left?: number+ right?: number+ midX?: number+ panelHalfW?: number+ dockW?: number+ }>({ top: 0, bottom: 0, midY: 0, panelHalfH: 0 })// Last known pointer position (updated on every pointermove). Used to vet// `panel:leave` events — Framer Motion layout reflows can fire spurious@@ -84,6 +122,8 @@ export function useEdgeHover(): void {const recompute = () => {const h = window.innerHeightconst s = useStore.getState().settings+ const isHorizontal = s.stickPosition === 'top' || s.stickPosition === 'bottom'+const pFrac = s.panelHeight || 0.6const panelH = h * pFracconst minY = panelH / 2@@ -107,12 +147,26 @@ export function useEdgeHover(): void {bottom = panelBottom}- const panelHalfH = panelH / 2 + 24+ // Horizontal dock bounds (for top/bottom) — calculated in DISPLAY coordinates+ const dispW = displaySize.current.width+ const dockMetrics = getHorizontalDockMetrics(dispW, s.horizontalOffset ?? 0.5)+ const left = dockMetrics.triggerLeft+ const right = dockMetrics.triggerRight+ const midX = dockMetrics.dockCenterX+ const dockW = dockMetrics.dockWidth+ const panelHalfW = dockW / 2 + 24++ const panelHalfH = isHorizontal ? 120 : panelH / 2 + 24zone.current = {top,bottom,midY,- panelHalfH+ panelHalfH,+ left,+ right,+ midX,+ panelHalfW,+ dockW}}recompute()@@ -122,6 +176,8 @@ export function useEdgeHover(): void {state.settings.panelHeight !== prevState.settings.panelHeight ||state.settings.hotZoneHeight !== prevState.settings.hotZoneHeight ||state.settings.verticalOffset !== prevState.settings.verticalOffset ||+ state.settings.horizontalOffset !== prevState.settings.horizontalOffset ||+ state.settings.stickPosition !== prevState.settings.stickPosition ||state.settings.triggerAlignment !== prevState.settings.triggerAlignment) {recompute()@@ -258,6 +314,42 @@ export function useEdgeHover(): void {const hasFlyout = !!(state.previewItemId || state.styleFlyoutOpen)const currentPanelWide = hasFlyout ? PREVIEW_WIDE : PANEL_WIDE+ if (s.stickPosition === 'top') {+ const dispW = displaySize.current.width+ const { dockWidth, dockX } = getHorizontalDockMetrics(dispW, s.horizontalOffset ?? 0.5)+ const inBlade = y >= -BUFFER_PX && y <= 218 && x >= dockX - BUFFER_PX && x <= dockX + dockWidth + BUFFER_PX+ if (inBlade) return true+ if (state.settingsOpen && y <= 480 + BUFFER_PX && x >= dockX - BUFFER_PX && x <= dockX + dockWidth + BUFFER_PX) return true+ if (hasFlyout && state.previewFlyoutRect && state.previewFlyoutRect.left !== undefined && state.previewFlyoutRect.right !== undefined) {+ const FLYOUT_BUFFER = 24+ const flyoutScreenLeft = dockX + state.previewFlyoutRect.left+ const flyoutScreenRight = dockX + state.previewFlyoutRect.right+ const inFlyout = y >= (state.previewFlyoutRect.top - FLYOUT_BUFFER) &&+ y <= (state.previewFlyoutRect.bottom + FLYOUT_BUFFER) &&+ x >= flyoutScreenLeft - FLYOUT_BUFFER && x <= flyoutScreenRight + FLYOUT_BUFFER+ if (inFlyout) return true+ }+ return false+ } else if (s.stickPosition === 'bottom') {+ const dispW = displaySize.current.width+ const dispH = displaySize.current.height+ const { dockWidth, dockX } = getHorizontalDockMetrics(dispW, s.horizontalOffset ?? 0.5)+ const distFromBottom = dispH - y+ const inBlade = distFromBottom >= -BUFFER_PX && distFromBottom <= 218 && x >= dockX - BUFFER_PX && x <= dockX + dockWidth + BUFFER_PX+ if (inBlade) return true+ if (state.settingsOpen && distFromBottom <= 480 + BUFFER_PX && x >= dockX - BUFFER_PX && x <= dockX + dockWidth + BUFFER_PX) return true+ if (hasFlyout && state.previewFlyoutRect && state.previewFlyoutRect.left !== undefined && state.previewFlyoutRect.right !== undefined) {+ const FLYOUT_BUFFER = 24+ const flyoutScreenLeft = dockX + state.previewFlyoutRect.left+ const flyoutScreenRight = dockX + state.previewFlyoutRect.right+ const inFlyout = distFromBottom >= (state.previewFlyoutRect.top - FLYOUT_BUFFER) &&+ distFromBottom <= (state.previewFlyoutRect.bottom + FLYOUT_BUFFER) &&+ x >= flyoutScreenLeft - FLYOUT_BUFFER && x <= flyoutScreenRight + FLYOUT_BUFFER+ if (inFlyout) return true+ }+ return false+ }+let insideX = falseif (s.stickPosition === 'right') {insideX = x >= window.innerWidth - currentPanelWide - BUFFER_PX && x <= window.innerWidth + BUFFER_PX@@ -312,14 +404,147 @@ export function useEdgeHover(): void {// here with the renderer's own settings so everything stays in sync.const unsubCursorEdge = window.edge.onCursorEdge((data) => {lastClient.current = { x: data.x, y: data.y }+ if (data.displayWidth) displaySize.current.width = data.displayWidth+ if (data.displayHeight) displaySize.current.height = data.displayHeightconst state = useStore.getState()- const { stickPosition, displayWidth } = data+ const { stickPosition, displayWidth, displayHeight } = dataconst { top, bottom, midY, panelHalfH } = zone.currentconst hasFlyout = !!(state.previewItemId || state.styleFlyoutOpen)const currentKeepOpenPx = hasFlyout ? PREVIEW_WIDE - 15 : KEEP_OPEN_PXconst currentStartClosePx = hasFlyout ? PREVIEW_WIDE + 20 : START_CLOSE_PXswitch (stickPosition) {+ case 'top': {+ const distFromTop = data.y+ const inEdgeNear = distFromTop >= -BUFFER_PX && distFromTop <= (TRIGGER_PX + 25)+ const dispW = displayWidth || displaySize.current.width+ const { dockWidth, dockX, triggerLeft, triggerRight } = getHorizontalDockMetrics(dispW, state.settings.horizontalOffset ?? 0.5)+ const inZone = data.x >= triggerLeft && data.x <= triggerRight++ if (!inEdgeNear) {+ edgeHintFired = false+ }++ const isHoverEnabled = state.settings.hoverActivation ?? true++ if (inEdgeNear && !inZone && !state.open && isHoverEnabled && (state.settings.showEdgeLocationHint ?? false)) {+ triggerEdgeHint()+ }++ if (distFromTop >= -BUFFER_PX && distFromTop <= TRIGGER_PX && inZone && !state.open && isHoverEnabled) {+ if (state.edgeHintActive) state.setEdgeHintActive(false)+ cancelClose()+ if (dwellTimer === undefined) {+ dwellTimer = window.setTimeout(() => {+ dwellTimer = undefined+ openPanel()+ }, DWELL_MS)+ }+ return+ }++ if (dwellTimer !== undefined) {+ window.clearTimeout(dwellTimer)+ dwellTimer = undefined+ }++ if (!state.open) return+ if (state.edgeHintActive) state.setEdgeHintActive(false)++ const now = Date.now()+ if (now - lastSetInteractiveRef.current > 2000) {+ lastSetInteractiveRef.current = now+ edge.setInteractive(true)+ }++ const inBlade = distFromTop >= -BUFFER_PX && distFromTop <= 218 && data.x >= dockX - BUFFER_PX && data.x <= dockX + dockWidth + BUFFER_PX+ const inSettings = state.settingsOpen && distFromTop >= -BUFFER_PX && distFromTop <= 480 + BUFFER_PX && data.x >= dockX - BUFFER_PX && data.x <= dockX + dockWidth + BUFFER_PX++ let inFlyout = false+ if (hasFlyout && state.previewFlyoutRect && state.previewFlyoutRect.left !== undefined && state.previewFlyoutRect.right !== undefined) {+ const FLYOUT_BUFFER = 24+ const flyoutScreenLeft = dockX + state.previewFlyoutRect.left+ const flyoutScreenRight = dockX + state.previewFlyoutRect.right+ inFlyout = distFromTop >= (state.previewFlyoutRect.top - FLYOUT_BUFFER) &&+ distFromTop <= (state.previewFlyoutRect.bottom + FLYOUT_BUFFER) &&+ data.x >= flyoutScreenLeft - FLYOUT_BUFFER && data.x <= flyoutScreenRight + FLYOUT_BUFFER+ }++ if (inBlade || inSettings || inFlyout) {+ cancelClose()+ return+ }++ scheduleClose()+ break+ }++ case 'bottom': {+ const dispH = displayHeight || displaySize.current.height+ const distFromBottom = dispH - data.y+ const inEdgeNear = distFromBottom >= -BUFFER_PX && distFromBottom <= (TRIGGER_PX + 25)+ const dispW = displayWidth || displaySize.current.width+ const { dockWidth, dockX, triggerLeft, triggerRight } = getHorizontalDockMetrics(dispW, state.settings.horizontalOffset ?? 0.5)+ const inZone = data.x >= triggerLeft && data.x <= triggerRight++ if (!inEdgeNear) {+ edgeHintFired = false+ }++ const isHoverEnabled = state.settings.hoverActivation ?? true++ if (inEdgeNear && !inZone && !state.open && isHoverEnabled && (state.settings.showEdgeLocationHint ?? false)) {+ triggerEdgeHint()+ }++ if (distFromBottom >= -BUFFER_PX && distFromBottom <= TRIGGER_PX && inZone && !state.open && isHoverEnabled) {+ if (state.edgeHintActive) state.setEdgeHintActive(false)+ cancelClose()+ if (dwellTimer === undefined) {+ dwellTimer = window.setTimeout(() => {+ dwellTimer = undefined+ openPanel()+ }, DWELL_MS)+ }+ return+ }++ if (dwellTimer !== undefined) {+ window.clearTimeout(dwellTimer)+ dwellTimer = undefined+ }++ if (!state.open) return+ if (state.edgeHintActive) state.setEdgeHintActive(false)++ const now = Date.now()+ if (now - lastSetInteractiveRef.current > 2000) {+ lastSetInteractiveRef.current = now+ edge.setInteractive(true)+ }++ const inBlade = distFromBottom >= -BUFFER_PX && distFromBottom <= 218 && data.x >= dockX - BUFFER_PX && data.x <= dockX + dockWidth + BUFFER_PX+ const inSettings = state.settingsOpen && distFromBottom >= -BUFFER_PX && distFromBottom <= 480 + BUFFER_PX && data.x >= dockX - BUFFER_PX && data.x <= dockX + dockWidth + BUFFER_PX++ let inFlyout = false+ if (hasFlyout && state.previewFlyoutRect && state.previewFlyoutRect.left !== undefined && state.previewFlyoutRect.right !== undefined) {+ const FLYOUT_BUFFER = 24+ const flyoutScreenLeft = dockX + state.previewFlyoutRect.left+ const flyoutScreenRight = dockX + state.previewFlyoutRect.right+ inFlyout = distFromBottom >= (state.previewFlyoutRect.top - FLYOUT_BUFFER) &&+ distFromBottom <= (state.previewFlyoutRect.bottom + FLYOUT_BUFFER) &&+ data.x >= flyoutScreenLeft - FLYOUT_BUFFER && data.x <= flyoutScreenRight + FLYOUT_BUFFER+ }++ if (inBlade || inSettings || inFlyout) {+ cancelClose()+ return+ }++ scheduleClose()+ break+ }+case 'right': {const distFromRight = displayWidth - data.xconst inEdgeNear = distFromRight >= -BUFFER_PX && distFromRight <= (TRIGGER_PX + 25)diff --git a/src/i18n/translations.ts b/src/i18n/translations.tsindex 5a08dc6..84d2eb5 100644--- a/src/i18n/translations.ts+++ b/src/i18n/translations.ts@@ -74,6 +74,10 @@ export interface TranslationKeys {edgePlacementDesc: stringleftEdge: stringrightEdge: string+ topEdge?: string+ bottomEdge?: string+ horizontalPositionTitle?: string+ horizontalPositionDesc?: stringdisplayTitle: stringdisplayDesc: stringprimaryDisplay: string@@ -238,6 +242,8 @@ export interface TranslationKeys {stickTo: stringleft: stringright: string+ top?: string+ bottom?: stringdisplay: stringquit: stringwelcomeTitle: string@@ -544,6 +550,10 @@ export const en: TranslationKeys = {"edgePlacementDesc": "Choose which screen edge Edge-Drop anchors to","leftEdge": "Left Edge","rightEdge": "Right Edge",+ "topEdge": "Top Edge",+ "bottomEdge": "Bottom Edge",+ "horizontalPositionTitle": "Horizontal Position",+ "horizontalPositionDesc": "Adjust horizontal alignment along screen edge","displayTitle": "Display Screen","displayDesc": "Choose which monitor Edge-Drop attaches to","primaryDisplay": "Primary Display",@@ -707,6 +717,8 @@ export const en: TranslationKeys = {"stickTo": "Stick to","left": "Left","right": "Right",+ "top": "Top",+ "bottom": "Bottom","display": "Display","quit": "Quit Edge-Drop","welcomeTitle": "Edge-Drop Clipboard Shelf",diff --git a/src/store/appStore.ts b/src/store/appStore.tsindex ef9495d..5b862b7 100644--- a/src/store/appStore.ts+++ b/src/store/appStore.ts@@ -69,7 +69,7 @@ interface AppState {} | null/** Item ID currently being previewed in the flyout. */previewItemId: string | null- previewItemRect: { y: number; height: number } | null+ previewItemRect: { x?: number; y?: number; width?: number; height?: number } | nullsliderActive: booleansliderReleasedTime: number@@ -101,13 +101,15 @@ interface AppState {setQuery: (q: string) => voidsetOpen: (open: boolean) => voidsetSettingsOpen: (open: boolean) => void+ settingsTab: 'all' | 'behaviour' | 'position' | 'appearance'+ setSettingsTab: (tab: 'all' | 'behaviour' | 'position' | 'appearance') => voidsetDragActive: (active: boolean) => voidsetInternalDragReq: (req: import('../../shared/types').DragRequest | null) => void- setPreviewItemId: (id: string | null, rect?: { y: number; height: number }) => void+ setPreviewItemId: (id: string | null, rect?: { x?: number; y?: number; width?: number; height?: number }) => voidstyleFlyoutOpen: booleansetStyleFlyoutOpen: (open: boolean) => void- previewFlyoutRect: { top: number; bottom: number } | null- setPreviewFlyoutRect: (rect: { top: number; bottom: number } | null) => void+ previewFlyoutRect: { top: number; bottom: number; left?: number; right?: number } | null+ setPreviewFlyoutRect: (rect: { top: number; bottom: number; left?: number; right?: number } | null) => voidisInternalCopying: booleancopyFlareActive: booleanflareKey: number@@ -146,6 +148,8 @@ export const useStore = create<AppState>((set, get) => ({},open: false,settingsOpen: false,+ settingsTab: 'all',+ setSettingsTab: (settingsTab) => set({ settingsTab }),emojiOpen: false,emojiCategory: 'smileys',setEmojiCategory: (emojiCategory) => set({ emojiCategory }),diff --git a/src/styles/item.css b/src/styles/item.cssindex f89cac2..0bffd73 100644--- a/src/styles/item.css+++ b/src/styles/item.css@@ -953,3 +953,180 @@background: linear-gradient(to bottom, transparent, #f97316, transparent);box-shadow: 0 0 24px rgba(249, 115, 22, 0.9), 0 0 40px rgba(249, 115, 22, 0.5);}++/* ------------------------------------------------------------------ */+/* Horizontal Dock Mode Card Styles */+/* ------------------------------------------------------------------ */++.list.horizontal .list-stack .item {+ contain-intrinsic-size: 210px 146px;+}++.list.horizontal .item {+ width: 210px;+ min-width: 210px;+ max-width: 210px;+ height: 146px;+ margin-bottom: 0;+ flex-shrink: 0;+ border-radius: var(--radius-card);+}++.list.horizontal .item-main {+ height: 100%;+ display: flex;+ flex-direction: column;+}++.list.horizontal .body {+ flex: 1;+ min-height: 0;+ display: flex;+ flex-direction: column;+}++.list.horizontal .item-content {+ flex: 1;+ min-height: 0;+ padding: 10px 14px 2px 14px;+ overflow: hidden;+}++.list.horizontal .preview {+ font-family: var(--font-ui);+ font-size: calc(12px * var(--font-scale, 1));+ line-height: 1.34;+ color: rgba(255, 255, 255, 0.92);+ -webkit-line-clamp: 5;+ display: -webkit-box;+ -webkit-box-orient: vertical;+ overflow: hidden;+ word-break: break-word;+}++.list.horizontal .item-footer {+ padding: 2px 14px 8px 14px;+ flex-shrink: 0;+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 8px;+ margin-top: auto;+ background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.28) 100%);+}++.list.horizontal .meta {+ display: flex;+ align-items: center;+ gap: 5px;+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.list.horizontal .meta-time {+ margin-left: auto;+ white-space: nowrap;+ flex-shrink: 0;+ font-family: var(--font-ui);+ font-size: calc(10.5px * var(--font-scale, 1));+ color: rgba(255, 255, 255, 0.4);+ font-weight: 500;+ letter-spacing: 0.01em;+ text-align: right;+ padding-left: 6px;+}++/* Horizontal Mode Compact Floating Actions Micro-Pill */+.list.horizontal .actions {+ top: 6px;+ right: 6px;+ padding: 2px 4px;+ gap: 2px;+ background: rgba(18, 18, 22, 0.88);+ backdrop-filter: blur(12px);+ -webkit-backdrop-filter: blur(12px);+ border: 1px solid rgba(255, 255, 255, 0.12);+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.4);+ border-radius: 999px;+ transform: scale(0.92) translateY(-2px);+ transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1), transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);+}++.list.horizontal .item-main:hover .actions,+.list.horizontal .item-main:focus-within .actions,+.list.horizontal .item-main.force-actions .actions {+ opacity: 1;+ pointer-events: auto;+ transform: scale(1) translateY(0);+}++.list.horizontal .act {+ width: 24px;+ height: 24px;+ border-radius: 5px;+}++.list.horizontal .act > svg {+ width: 13px;+ height: 13px;+}++.list.horizontal .act-divider {+ height: 12px;+ margin: 0 1px;+}++.list.horizontal .link-card-top {+ gap: 6px;+ font-size: calc(11px * var(--font-scale, 1));+}++.list.horizontal .link-card-body {+ font-size: calc(12px * var(--font-scale, 1));+ line-height: 1.34;+ -webkit-line-clamp: 3;+}++.list.horizontal .link-card-url {+ font-size: calc(10.5px * var(--font-scale, 1));+}++.list.horizontal .single-file-preview {+ gap: 6px;+ padding: 2px 0 0;+}++.list.horizontal .single-file-hero {+ padding: 0;+}++.list.horizontal .single-file-hero svg {+ width: 44px;+ height: 44px;+}++.list.horizontal .single-file-name {+ font-size: calc(12px * var(--font-scale, 1));+ line-height: 1.35;+}++.list.horizontal .single-file-sub {+ font-size: calc(10px * var(--font-scale, 1));+}++.list.horizontal .bundle-stack-large {+ height: 75px;+}++.list.horizontal .bundle-stack-icon-item {+ width: 80px;+ height: 80px;+ margin-top: -40px;+ margin-left: -40px;+}++.list.horizontal .thumb {+ max-height: 85px;+}diff --git a/src/styles/panel.css b/src/styles/panel.cssindex 6574fb5..d9dc4d0 100644--- a/src/styles/panel.css+++ b/src/styles/panel.css@@ -43,17 +43,28 @@/* Top-position blade: centered at top, bottom-rounded corners */.blade-container.blade-top {- top: 0 !important;- left: 0 !important;- right: 0 !important;- bottom: auto !important;- y: 0 !important;+ top: 0;+ left: 50%;+ right: auto;+ bottom: auto;}.blade-container.blade-top .blade {margin: 0 auto;border-radius: 0 0 24px 24px;}+/* Bottom-position blade: centered at bottom, top-rounded corners */+.blade-container.blade-bottom {+ top: auto;+ left: 50%;+ right: auto;+ bottom: 0;+}+.blade-container.blade-bottom .blade {+ margin: 0 auto;+ border-radius: 24px 24px 0 0;+}+/* Reverse curves (flares) connecting blade to screen edge */.flare-top, .flare-bottom {position: absolute;@@ -84,6 +95,36 @@display: block;}+/* Horizontal reverse curves (flares) connecting horizontal blade to screen edge */+.flare-horizontal {+ position: absolute;+ width: 32px;+ height: 30px;+ pointer-events: none;+ z-index: -1;+}+.flare-horizontal svg {+ width: 32px;+ height: 30px;+ display: block;+}+.flare-top-left {+ left: -30px;+ top: 0;+}+.flare-top-right {+ right: -30px;+ top: 0;+}+.flare-bottom-left {+ left: -30px;+ bottom: 0;+}+.flare-bottom-right {+ right: -30px;+ bottom: 0;+}+/* CSS transition for clip-path (Framer Motion can't interpolate calc() properly).cubic-bezier(0.22, 1, 0.36, 1) is an exponential ease-out — fast initialvelocity that decelerates to zero, giving the panel a crisp "snapping open"@@ -109,7 +150,32 @@right: -30px;}.blade-container.blade-top::before {- display: none;+ content: '';+ position: absolute;+ top: -30px;+ bottom: auto;+ left: 0;+ right: 0;+ width: auto;+ height: 30px;+ background: #000000;+ pointer-events: none;+ z-index: -2;+ display: block;+}+.blade-container.blade-bottom::before {+ content: '';+ position: absolute;+ bottom: -30px;+ top: auto;+ left: 0;+ right: 0;+ width: auto;+ height: 30px;+ background: #000000;+ pointer-events: none;+ z-index: -2;+ display: block;}@@ -205,6 +271,32 @@display: none; /* Chrome/Safari */}+/* Horizontal dock list styles */+.list.horizontal {+ flex-direction: row;+ overflow-y: hidden;+ overflow-x: auto;+ padding: 6px 14px 8px;+ -webkit-mask-image: linear-gradient(to right, transparent 0px, #000 12px, #000 calc(100% - 12px), transparent 100%);+ mask-image: linear-gradient(to right, transparent 0px, #000 12px, #000 calc(100% - 12px), transparent 100%);+}+.list.horizontal .list-stack {+ flex-direction: row;+ align-items: stretch;+ gap: 10px;+ height: 100%;+}+.list.horizontal .pinned-section,+.list.horizontal .recent-section {+ flex-direction: row;+ align-items: stretch;+ gap: 10px;+ margin: 0;+}+.list.horizontal .section-label {+ display: none;+}+.section-label {font-size: calc(12px * var(--font-scale, 1));font-weight: 600;@@ -432,7 +524,7 @@}/* Clear button */-.footer .text-btn {+.text-btn {height: 28px;display: inline-flex;align-items: center;@@ -450,40 +542,40 @@box-shadow: none;transition: background 0.18s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease;}-.footer .text-btn .clear-btn-icon {+.text-btn .clear-btn-icon {color: rgba(255, 255, 255, 0.75);transition: color 0.18s ease;}-.footer .text-btn:hover:not(:disabled) {+.text-btn:hover:not(:disabled) {background: #1c1c1c;color: #ffffff;}-.footer .text-btn:hover:not(:disabled) .clear-btn-icon {+.text-btn:hover:not(:disabled) .clear-btn-icon {color: #ff6b6b;}-.footer .text-btn.active:not(:disabled) {+.text-btn.active:not(:disabled) {background: #1c1c1c;color: #ffffff;}-.footer .text-btn.active:not(:disabled) .clear-btn-icon {+.text-btn.active:not(:disabled) .clear-btn-icon {color: #ff6b6b;}-.footer .text-btn:active:not(:disabled) {+.text-btn:active:not(:disabled) {transform: scale(0.96);}-.footer .text-btn:disabled {+.text-btn:disabled {opacity: 0.35;cursor: not-allowed;background: #141414;}-.footer .text-btn.danger {+.text-btn.danger {color: rgba(255, 255, 255, 0.75);}-.footer .text-btn.danger:hover:not(:disabled) {+.text-btn.danger:hover:not(:disabled) {background: #1c1c1c;color: #ffffff;}-.footer .text-btn.danger:hover:not(:disabled) .clear-btn-icon {+.text-btn.danger:hover:not(:disabled) .clear-btn-icon {color: #ff6b6b;}diff --git a/src/styles/settings.css b/src/styles/settings.cssindex 95bb00a..b11e990 100644--- a/src/styles/settings.css+++ b/src/styles/settings.css@@ -1281,4 +1281,280 @@.floating-update-pill:hover .floating-update-arrow {transform: translateY(1px);-}\ No newline at end of file+}++/* ==========================================================================+ Horizontal Settings Layout (Top / Bottom Dock Position)+ Fixed 210px Height Shelf with Horizontal Scrolling Cards+ ========================================================================== */++/* Header category pills for horizontal mode */+.settings-header-pills {+ display: flex;+ align-items: center;+ gap: 5px;+}++.settings-header-pill {+ height: 24px;+ padding: 0 10px;+ border-radius: 999px;+ border: 1px solid rgba(255, 255, 255, 0.08);+ background: rgba(255, 255, 255, 0.04);+ color: rgba(255, 255, 255, 0.65);+ font-size: 11px;+ font-weight: 500;+ cursor: pointer;+ display: inline-flex;+ align-items: center;+ justify-content: center;+ white-space: nowrap;+ transition: all 0.15s ease;+ user-select: none;+ outline: none;+}++.settings-header-pill:hover {+ background: rgba(255, 255, 255, 0.1);+ color: #ffffff;+ border-color: rgba(255, 255, 255, 0.15);+}++.settings-header-pill.active {+ background: #ffffff;+ color: #000000;+ font-weight: 600;+ border-color: #ffffff;+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);+}++/* Horizontal Shelf Container */+.settings-horizontal-shelf {+ width: 100%;+ height: 100%;+ display: flex;+ flex-direction: column;+ overflow: hidden;+ position: relative;+ background: transparent;+ box-sizing: border-box;+}++/* Single Horizontal Scrolling Row of Cards */+.settings-shelf-track {+ display: flex;+ flex-direction: row;+ align-items: stretch;+ gap: 12px;+ width: 100%;+ height: 100%;+ padding: 8px 16px 14px 16px;+ box-sizing: border-box;+ overflow-x: auto;+ overflow-y: hidden;+ scrollbar-width: none;+ -ms-overflow-style: none;+}++.settings-shelf-track::-webkit-scrollbar {+ display: none;+}++/* Individual Shelf Card (~146px height) */+.settings-shelf-card {+ height: 146px;+ min-width: 240px;+ max-width: 280px;+ flex-shrink: 0;+ background: #141416;+ border: 1px solid rgba(255, 255, 255, 0.08);+ border-radius: 16px;+ padding: 10px 14px;+ box-sizing: border-box;+ display: flex;+ flex-direction: column;+ justify-content: space-between;+ transition: border-color 0.15s ease, background 0.15s ease;+ position: relative;+}++.settings-shelf-card:hover {+ background: #18181c;+ border-color: rgba(255, 255, 255, 0.16);+}++.settings-shelf-card.update-card {+ border-color: rgba(255, 214, 10, 0.25);+ background: linear-gradient(180deg, rgba(255, 214, 10, 0.05) 0%, #141416 100%);+}++/* Card Header */+.shelf-card-header {+ display: flex;+ flex-direction: column;+ gap: 2px;+ flex-shrink: 0;+}++.shelf-card-category {+ font-size: 9px;+ font-weight: 700;+ letter-spacing: 0.08em;+ color: rgba(255, 255, 255, 0.4);+ text-transform: uppercase;+}++.shelf-card-title {+ font-size: calc(12.5px * var(--font-scale, 1));+ font-weight: 600;+ color: #ffffff;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ line-height: 1.25;+}++/* Card Body */+.shelf-card-body {+ display: flex;+ flex-direction: column;+ justify-content: center;+ flex: 1;+ min-height: 0;+ gap: 8px;+}++/* Shelf Row for Toggle items */+.shelf-row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 8px;+ width: 100%;+}++.shelf-row-label {+ font-size: calc(11.5px * var(--font-scale, 1));+ font-weight: 500;+ color: rgba(255, 255, 255, 0.85);+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ flex: 1;+}++/* Card Footer */+.shelf-card-footer {+ font-size: calc(10.5px * var(--font-scale, 1));+ color: rgba(255, 255, 255, 0.42);+ line-height: 1.35;+ flex-shrink: 0;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+}++/* Miniature 4-tile Indicator Style Grid */+.shelf-indicator-grid {+ display: grid;+ grid-template-columns: repeat(4, 1fr);+ gap: 6px;+ width: 100%;+}++.shelf-indicator-item {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 3px;+ padding: 5px 3px;+ border-radius: 8px;+ background: rgba(255, 255, 255, 0.04);+ border: 1px solid rgba(255, 255, 255, 0.07);+ cursor: pointer;+ transition: all 0.15s ease;+ user-select: none;+}++.shelf-indicator-item:hover {+ background: rgba(255, 255, 255, 0.08);+ border-color: rgba(255, 255, 255, 0.15);+}++.shelf-indicator-item.active {+ background: rgba(255, 255, 255, 0.12);+ border-color: rgba(255, 255, 255, 0.35);+ box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);+}++.shelf-indicator-icon {+ height: 22px;+ display: flex;+ align-items: center;+ justify-content: center;+}++.shelf-indicator-name {+ font-size: 9.5px;+ font-weight: 500;+ color: rgba(255, 255, 255, 0.85);+ white-space: nowrap;+}++/* Danger Quit Button */+.shelf-quit-btn {+ width: 100%;+ height: 26px;+ border-radius: 8px;+ border: 1px solid rgba(255, 69, 58, 0.25);+ background: rgba(255, 69, 58, 0.08);+ color: #ff453a;+ font-size: 11px;+ font-weight: 600;+ cursor: pointer;+ display: flex;+ align-items: center;+ justify-content: center;+ transition: all 0.15s ease;+ outline: none;+}++.shelf-quit-btn:hover {+ background: rgba(255, 69, 58, 0.18);+ border-color: rgba(255, 69, 58, 0.45);+}++.shelf-quit-btn:active {+ transform: scale(0.98);+}++/* Update Progress inside Shelf */+.shelf-update-progress-wrap {+ width: 100%;+ height: 24px;+ background: rgba(255, 255, 255, 0.06);+ border-radius: 6px;+ position: relative;+ overflow: hidden;+ display: flex;+ align-items: center;+ justify-content: center;+}++.shelf-progress-bar {+ position: absolute;+ left: 0;+ top: 0;+ bottom: 0;+ background: rgba(255, 214, 10, 0.4);+ transition: width 0.2s ease;+}++.shelf-progress-text {+ position: relative;+ z-index: 1;+ font-size: 11px;+ font-weight: 600;+ color: #ffffff;+}diff --git a/tests/geometry.test.ts b/tests/geometry.test.tsindex ed5e306..e893228 100644--- a/tests/geometry.test.ts+++ b/tests/geometry.test.ts@@ -123,3 +123,45 @@ describe('TV mirror regression � combined scenario', () => {})})+describe('computeStickBounds — top and bottom positions', () => {+ it('sticks to top edge of primary display and computes centered dock bounds with flare gutters', () => {+ const r = computeStickBounds({ position: 'top', displays: [PRIMARY] })+ expect(r.displayId).toBe(1)+ expect(r.y).toBe(0)+ // Dock blade is 1080px + 60px gutter for left and right curved connector arcs (flares)+ expect(r.width).toBe(1140)+ expect(r.height).toBe(480)+ // Centered blade is at x=420, window starts 30px earlier at x=390+ expect(r.x).toBe(390)+ })++ it('sticks to bottom edge of primary display above taskbar with flare gutters', () => {+ const r = computeStickBounds({ position: 'bottom', displays: [PRIMARY] })+ expect(r.displayId).toBe(1)+ expect(r.y).toBe(560)+ expect(r.x).toBe(390)+ expect(r.width).toBe(1140)+ expect(r.height).toBe(480)+ })++ it('respects horizontalOffset in top dock bounds computation', () => {+ const r = computeStickBounds({ position: 'top', displays: [PRIMARY], horizontalOffset: 0 })+ // At hOffset=0, dock blade sits at pad=30, so window starts at x=0+ expect(r.x).toBe(0)+ })++ it('expands window height to accommodate preview flyout when previewActive is true on top and bottom', () => {+ const topPreview = computeStickBounds({ position: 'top', displays: [PRIMARY], previewActive: true })+ expect(topPreview.y).toBe(0)+ expect(topPreview.height).toBe(720)+ expect(topPreview.width).toBe(1140)++ const bottomPreview = computeStickBounds({ position: 'bottom', displays: [PRIMARY], previewActive: true })+ // 1040 (wa.height) - 720 = 320+ expect(bottomPreview.y).toBe(320)+ expect(bottomPreview.height).toBe(720)+ expect(bottomPreview.width).toBe(1140)+ })+})++diff --git a/tests/horizontalSettings.test.ts b/tests/horizontalSettings.test.tsnew file mode 100644index 0000000..3bb6607--- /dev/null+++ b/tests/horizontalSettings.test.ts@@ -0,0 +1,92 @@+import { describe, it, expect } from 'vitest'+import { readFileSync } from 'node:fs'+import { resolve } from 'node:path'++function read(relPath: string): string {+ return readFileSync(resolve(__dirname, '..', relPath), 'utf8')+}++describe('Horizontal Card Shelf Settings Layout', () => {+ it('Panel.tsx retains fixed 210px dock height in horizontal mode without expanding and with 60px gutter', () => {+ const panelSrc = read('src/components/Panel.tsx')+ expect(panelSrc).toContain("style={isHorizontal ? { width: 'min(calc(100vw - 60px), 1080px)', height: 210 } : { height: panelHeightStr }}")+ expect(panelSrc).not.toContain('height: settingsOpen ? 460 : 210')+ })++ it('Panel.tsx renders horizontal curved connector arcs (flares) for top and bottom positions', () => {+ const panelSrc = read('src/components/Panel.tsx')+ expect(panelSrc).toContain('flare-horizontal flare-top-left')+ expect(panelSrc).toContain('flare-horizontal flare-top-right')+ expect(panelSrc).toContain('flare-horizontal flare-bottom-left')+ expect(panelSrc).toContain('flare-horizontal flare-bottom-right')+ })++ it('item.css contains 210px card width, 5-line text clamp, and compact actions toolbar', () => {+ const itemCss = read('src/styles/item.css')+ expect(itemCss).toContain('width: 210px')+ expect(itemCss).toContain('-webkit-line-clamp: 5')+ expect(itemCss).toContain('.list.horizontal .actions')+ expect(itemCss).toContain('.list.horizontal .act')+ })++ it('Settings accepts isHorizontal prop and detects horizontal dock positions', () => {+ const src = read('src/components/Settings.tsx')+ expect(src).toContain('isHorizontal: propIsHorizontal')+ expect(src).toContain("settings.stickPosition === 'top' || settings.stickPosition === 'bottom'")+ })++ it('Settings renders horizontal card shelf with smooth scrolling track and shelf cards', () => {+ const src = read('src/components/Settings.tsx')+ expect(src).toContain('if (isHorizontal)')+ expect(src).toContain('settings-horizontal-shelf')+ expect(src).toContain('settings-shelf-track')+ expect(src).toContain('settings-shelf-card')+ expect(src).toContain('handleShelfWheel')+ })++ it('Header renders category segmented pills for horizontal settings mode', () => {+ const headerSrc = read('src/components/Header.tsx')+ expect(headerSrc).toContain('settings-header-pills')+ expect(headerSrc).toContain('settings-header-pill')+ expect(headerSrc).toContain("id: 'all'")+ expect(headerSrc).toContain("id: 'behaviour'")+ expect(headerSrc).toContain("id: 'position'")+ expect(headerSrc).toContain("id: 'appearance'")+ })++ it('Horizontal Position card renders horizontal alignment slider and presets', () => {+ const src = read('src/components/Settings.tsx')+ expect(src).toContain('horizontalPositionTitle')+ expect(src).toContain('settings.horizontalOffset')+ expect(src).toContain("{ label: 'Left', val: 0 }")+ expect(src).toContain("{ label: 'Center', val: 0.5 }")+ expect(src).toContain("{ label: 'Right', val: 1.0 }")+ })++ it('Appearance card renders 4 interactive indicator style preview tiles', () => {+ const src = read('src/components/Settings.tsx')+ expect(src).toContain('shelf-indicator-grid')+ expect(src).toContain('shelf-indicator-item')+ expect(src).toContain("patch({ copyIndicatorStyle: 'logo' })")+ expect(src).toContain("patch({ copyIndicatorStyle: 'check' })")+ expect(src).toContain("patch({ copyIndicatorStyle: 'copy' })")+ expect(src).toContain("patch({ copyIndicatorStyle: 'sparkle' })")+ })++ it('Panel.tsx passes isHorizontal to Settings component', () => {+ const src = read('src/components/Panel.tsx')+ expect(src).toContain('<Settings isHorizontal={isHorizontal} />')+ })++ it('settings.css contains styles for horizontal shelf, track, and cards', () => {+ const css = read('src/styles/settings.css')+ expect(css).toContain('.settings-horizontal-shelf')+ expect(css).toContain('.settings-shelf-track')+ expect(css).toContain('.settings-shelf-card')+ expect(css).toContain('.settings-header-pills')+ expect(css).toContain('.settings-header-pill')+ expect(css).toContain('.shelf-indicator-grid')+ expect(css).toContain('.shelf-indicator-item')+ expect(css).toContain('.shelf-quit-btn')+ })+})diff --git a/tests/power.test.ts b/tests/power.test.tsindex 2f41fb4..9153b76 100644--- a/tests/power.test.ts+++ b/tests/power.test.ts@@ -11,7 +11,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'// ──────────────────────────────────────────────────────────────────────────────/** Build a minimal cursor tick input object. */-function makeTick(clientX: number, clientY: number, displayWidth = 1920, stickPosition: 'left' | 'right' = 'left') {+function makeTick(clientX: number, clientY: number, displayWidth = 1920, stickPosition: 'left' | 'right' | 'top' | 'bottom' = 'left') {return { clientX, clientY, displayWidth, stickPosition }}@@ -68,6 +68,19 @@ describe('Fix 1 — adaptive poll rate constants', () => {expect(distFromEdge).toBeGreaterThan(FAST_POLL_PROXIMITY_PX)})+ it('cursor within PROXIMITY triggers fast mode (top panel)', () => {+ const { clientY } = makeTick(500, 50, 1920, 'top')+ const distFromEdge = clientY+ expect(distFromEdge).toBeLessThanOrEqual(FAST_POLL_PROXIMITY_PX)+ })++ it('cursor within PROXIMITY triggers fast mode (bottom panel)', () => {+ const displayHeight = 1080+ const { clientY } = makeTick(500, 1020, 1920, 'bottom')+ const distFromEdge = displayHeight - clientY+ expect(distFromEdge).toBeLessThanOrEqual(FAST_POLL_PROXIMITY_PX)+ })+it('SLOW_COOLDOWN_MS is long enough to avoid mode thrashing (>= 500ms)', () => {expect(SLOW_COOLDOWN_MS).toBeGreaterThanOrEqual(500)})diff --git a/tests/stickProbeScenarios.test.ts b/tests/stickProbeScenarios.test.tsindex f5ad3ac..24bf127 100644--- a/tests/stickProbeScenarios.test.ts+++ b/tests/stickProbeScenarios.test.ts@@ -71,7 +71,7 @@ class StickController {currentStickDisplayId: number | undefinedwindowBounds: { x: number; y: number } | null = nulllastProbe: ReturnType<typeof probeStickEdge> | null = null- stickPosition: 'left' | 'right' = 'left'+ stickPosition: 'left' | 'right' | 'top' | 'bottom' = 'left'hotZoneWidth = 3windowWidth = 384@@ -221,6 +221,40 @@ describe('SIMULATION — right-stick on the secondary', () => {})})+describe('SIMULATION — top-stick dock', () => {+ it('triggers only at the top edge with correct vertical distance math', () => {+ const ctl = new StickController(sideBySideDesktop())+ ctl.stickPosition = 'top'+ ctl.applyStickDisplay(1)++ // Top edge of primary (y=0..2)+ const inside = ctl.tick({ x: 500, y: 1 })!+ expect(inside.inEdge).toBe(true)+ expect(inside.distFromEdge).toBe(1)+ expect(inside.clientY).toBe(1)++ // 10px down: outside trigger band+ const outside = ctl.tick({ x: 500, y: 10 })!+ expect(outside.inEdge).toBe(false)+ })+})++describe('SIMULATION — bottom-stick dock', () => {+ it('triggers at the bottom workArea edge with correct distance math', () => {+ const ctl = new StickController(sideBySideDesktop())+ ctl.stickPosition = 'bottom'+ ctl.applyStickDisplay(1)++ // Primary display has workArea height 1040 (1080 - 40px taskbar)+ const inside = ctl.tick({ x: 500, y: 1038 })!+ expect(inside.inEdge).toBe(true)+ expect(inside.distFromEdge).toBe(2) // 1040 - 1038++ const outside = ctl.tick({ x: 500, y: 1000 })!+ expect(outside.inEdge).toBe(false)+ })+})+describe('SIMULATION — vertically stacked secondary', () => {it('detects its own edge with correct Y translation', () => {const desktop = new VirtualDesktop([@@ -333,7 +367,7 @@ describe('SIMULATION — adaptive proximity thresholds (unchanged feel)', () =>/* ------------------------------------------------------------------ */const SEC_X = 1920-function seamController(stickPosition: 'left' | 'right' = 'left') {+function seamController(stickPosition: 'left' | 'right' | 'top' | 'bottom' = 'left') {const ctl = new StickController(sideBySideDesktop())ctl.stickPosition = stickPositionctl.applyStickDisplay(2)@@ -480,3 +514,42 @@ describe('SEAM POLICY - primary interior regression guard while stuck to secondaexpect(r.armedInEdge).toBe(true)})})++describe('SEAM POLICY - vertically stacked displays with top stick', () => {+ it('vertical crossing from upper display suppresses until cursor rests on own top pixels', () => {+ const desktop = new VirtualDesktop([+ display(1, 0, 0, 1920, 1080, true),+ display(2, 0, 1080, 1920, 1440)+ ])+ const ctl = new StickController(desktop)+ ctl.stickPosition = 'top'+ ctl.applyStickDisplay(2)+ const wa = ctl.cache.get(2)!++ let state: SeamTickState = {}+ let t = 1000+ const tick = (y: number) => {+ t += 16+ const r = probeSeamAware({ cursor: { x: 500, y }, workArea: wa, stickPosition: 'top', hotZoneWidth: 3, now: t }, state)+ state = r.nextState+ return r+ }++ // Upper display hover (y = 1075) does not arm+ let r = tick(1075)+ for (let i = 0; i < 5; i++) r = tick(1075)+ expect(r.armedInEdge).toBe(false)++ // Arrive on own pixels (y = 1081): crossing suppressed+ r = tick(1081)+ expect(r.crossedNow).toBe(true)+ expect(r.armedInEdge).toBe(false)++ // Rest for 3 frames -> arms!+ r = tick(1081)+ r = tick(1081)+ r = tick(1081)+ expect(r.lockedOut).toBe(false)+ expect(r.armedInEdge).toBe(true)+ })+})