Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

fix(copy-flare): resolve visual intersection and pixelation artifacts

Deepender25a4cdb3bee847
diff --git a/electron/clipboard/formats.ts b/electron/clipboard/formats.ts
index 9590f9a..d4791b5 100644
--- a/electron/clipboard/formats.ts
+++ b/electron/clipboard/formats.ts
@@ -9,7 +9,29 @@
import { clipboard } from 'electron'
import { execFile } from 'node:child_process'
import { promisify } from 'node:util'
+import koffi from 'koffi'
import type { ItemData } from '../../shared/types'
+
+let getSeqNum: (() => number) | null = null
+if (process.platform === 'win32') {
+ try {
+ const user32 = koffi.load('user32.dll')
+ getSeqNum = user32.func('uint32 GetClipboardSequenceNumber()')
+ } catch (err) {
+ console.error('[formats] Failed to load GetClipboardSequenceNumber from user32.dll:', err)
+ }
+}
+
+export function getClipboardSequenceNumber(): number {
+ if (getSeqNum) {
+ try {
+ return getSeqNum()
+ } catch {
+ return 0
+ }
+ }
+ return 0
+}
import { getSystemPowerShellPath } from '../main/powershell'
import { filterValidPaths } from '../main/pathValidation'
@@ -296,21 +318,24 @@ export async function readClipboard(): Promise<ItemData | null> {
* second to be silently ignored as "no change".
*/
export function clipboardSignature(): string {
+ const seq = getClipboardSequenceNumber()
+ const seqPrefix = seq > 0 ? `seq:${seq}:` : ''
+
if (isClipboardExcluded()) {
- return 'excluded'
+ return `${seqPrefix}excluded`
}
// If files are on the clipboard, their paths are the most stable fingerprint.
// Use fast, non-blocking read to avoid spawning a child process during polling.
const files = readFileListFast()
if (files && files.length) {
- return `files:${files.join('\n')}`
+ return `${seqPrefix}files:${files.join('\n')}`
}
// Text — the content itself is the fingerprint.
const text = clipboard.readText().trim()
if (text) {
- return `text:${text}`
+ return `${seqPrefix}text:${text}`
}
// Images: sample raw pixel bytes through FNV-1a for a fast, stable fingerprint.
@@ -328,10 +353,10 @@ export function clipboardSignature(): string {
hash = Math.imul(hash, 0x01000193) >>> 0 // FNV prime, keep as uint32
}
- return `image:${size.width}x${size.height}:${hash.toString(36)}`
+ return `${seqPrefix}image:${size.width}x${size.height}:${hash.toString(36)}`
}
- return 'empty'
+ return `${seqPrefix}empty`
}
/** True if the text payload looks like a single URL. */
diff --git a/package-lock.json b/package-lock.json
index d803279..8f9c3c3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,6 +13,8 @@
"@radix-ui/react-separator": "^1.1.11",
"@resvg/resvg-js": "^2.6.2",
"framer-motion": "^11.0.24",
+ "gsap": "^3.15.0",
+ "koffi": "^3.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"svg-path-bbox": "^2.1.0",
@@ -1180,6 +1182,246 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@koromix/koffi-darwin-arm64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-darwin-arm64/-/koffi-darwin-arm64-3.1.2.tgz",
+ "integrity": "sha512-32pU4pNZABIz+l9DNJl51Y+jur4vv+SF4Ip2CSF4OUg1xUyefoLpX0NttDmzGITIrneUEVSEN+dT22524ESKBw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-darwin-x64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-darwin-x64/-/koffi-darwin-x64-3.1.2.tgz",
+ "integrity": "sha512-S+H6LQgUoMj77BqDegwlRaxwLXDfwvSJGuceOqtH0I5V8rzKLmu/hC7NBlxOoAlvKlcV63FtdNiE2E9YSltffg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-freebsd-arm64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-freebsd-arm64/-/koffi-freebsd-arm64-3.1.2.tgz",
+ "integrity": "sha512-fD0ow2PBE60nw7K6xcbala6qwXxfcYeU62tduNeIPvx0KoWhU2rMKZiDNe+iI5TQb3rxYYjjP+aF2Sdm9y6EXQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-freebsd-ia32": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-freebsd-ia32/-/koffi-freebsd-ia32-3.1.2.tgz",
+ "integrity": "sha512-t8OmL+hoJGDLZDnuLjgLemSYrXX99M7Md+zJX8bMHOtiNbFtkGXn/mV21Pb1ik9JhBXjwK1r4hvBPNlqTMGrHg==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-freebsd-x64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-freebsd-x64/-/koffi-freebsd-x64-3.1.2.tgz",
+ "integrity": "sha512-axbLgiM4Y2vyDOTqlXCI8vkg9wqjwSRsmoWXSKreA5YFJwnYA6Sc4aHMz+qZgUSfFei52Qrv1RGhDyo4kHvqhA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-linux-arm64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-arm64/-/koffi-linux-arm64-3.1.2.tgz",
+ "integrity": "sha512-f0hqAIlFcL9wlRGJ/uCfyfspqnGaASk2gLx1UAP3RBgMQl68D1e+fiHNdXa7g9d76ttmpA8/PGNAqc1X4Byy1Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-linux-ia32": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-ia32/-/koffi-linux-ia32-3.1.2.tgz",
+ "integrity": "sha512-UGLPuqeOV/UArsK6oeB5yI/XjSWkFqFlBTC9rUbezBuHJhSibk1EMv7QC0cvtDMu18bo+ucqXWPzh42oT5yYlw==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-linux-loong64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-loong64/-/koffi-linux-loong64-3.1.2.tgz",
+ "integrity": "sha512-jI0+gM2oDsJ7reOt3XPyO7lyQtZ1CT6NR2uqGQcQVM43cyXBAVYYCUxEH3LHCbgumFaZ+LueIUgbMSwb9pHBxQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-linux-riscv64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-riscv64/-/koffi-linux-riscv64-3.1.2.tgz",
+ "integrity": "sha512-yB99adXBRd5T+xXG+f6nnUkC3jCI0iXvPU6RqD9Kx7aZP4Y4NNUWJ5Q4FaP9jb1XmZLY4pGBUiHt8u03Yl7NyA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-linux-x64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-x64/-/koffi-linux-x64-3.1.2.tgz",
+ "integrity": "sha512-Oxvo6F3Edzy/Jm2EtbHWkJ2xRB0mXDAe63k5+USL5uiGE5xZjwEUDOBKIhv2BpCZSOAJrfoojFFogj6+ICKQhw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-openbsd-ia32": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-openbsd-ia32/-/koffi-openbsd-ia32-3.1.2.tgz",
+ "integrity": "sha512-SSWzUhL8Ex84JTsO67+MdWZrdwgOzoOrQ0+ZbB+UsivHoAxmWLHKWZaSafNqyBZtxGY1EgtR8AIPouWE9U+Zfw==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-openbsd-x64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-openbsd-x64/-/koffi-openbsd-x64-3.1.2.tgz",
+ "integrity": "sha512-0ZuI4St7chq3M0d3VivvKIqacZ7RhgohdR476V3HpJkaNdfIywsJIw+GBvqkQahu+4A2Rpu6yQJpWSrfk/Z+Jw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-win32-arm64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-win32-arm64/-/koffi-win32-arm64-3.1.2.tgz",
+ "integrity": "sha512-8Wn6phw7y53uI52+aBPAqEfZ5pj/HCjg/YtdthqSWYHy+d0MhyASKlcmuP0B5raxQnnA1Bm9LC8UO3M3RojeBw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-win32-ia32": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-win32-ia32/-/koffi-win32-ia32-3.1.2.tgz",
+ "integrity": "sha512-FkKaPBMawgHMNnp1FwLldXMNvEa139GXkxPi9JD9xU71Kh/ZmuEYHGSD6JwZDmDr4jekVrBrr+eGZ+j6C2mkXg==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
+ "node_modules/@koromix/koffi-win32-x64": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-win32-x64/-/koffi-win32-x64-3.1.2.tgz",
+ "integrity": "sha512-FeFC59UU1XX4J3ZaqKrsrEzczzB5qksMJo7/R45vIg8mGNVSLMVE85JRiZpjcp9i5Lbav5Vw47QvwFzBgIfvlw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ }
+ },
"node_modules/@malept/cross-spawn-promise": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz",
@@ -4663,6 +4905,12 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/gsap": {
+ "version": "3.15.0",
+ "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.15.0.tgz",
+ "integrity": "sha512-dMW4CWBTUK1AEEDeZc1g4xpPGIrSf9fJF960qbTZmN/QwZIWY5wgliS6JWl9/25fpTGJrMRtSjGtOmPnfjZB+A==",
+ "license": "Standard 'no charge' license: https://gsap.com/standard-license."
+ },
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -4995,6 +5243,33 @@
"json-buffer": "3.0.1"
}
},
+ "node_modules/koffi": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/koffi/-/koffi-3.1.2.tgz",
+ "integrity": "sha512-wVwuE21TBl8/si6E0hPorKR2PJ2q33mEWVETANrtSp3kFM8fi2FcD/J5wmxu0T4TBcqmMQ4xKuF1X1ayFmphzw==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://liberapay.com/Koromix"
+ },
+ "optionalDependencies": {
+ "@koromix/koffi-darwin-arm64": "3.1.2",
+ "@koromix/koffi-darwin-x64": "3.1.2",
+ "@koromix/koffi-freebsd-arm64": "3.1.2",
+ "@koromix/koffi-freebsd-ia32": "3.1.2",
+ "@koromix/koffi-freebsd-x64": "3.1.2",
+ "@koromix/koffi-linux-arm64": "3.1.2",
+ "@koromix/koffi-linux-ia32": "3.1.2",
+ "@koromix/koffi-linux-loong64": "3.1.2",
+ "@koromix/koffi-linux-riscv64": "3.1.2",
+ "@koromix/koffi-linux-x64": "3.1.2",
+ "@koromix/koffi-openbsd-ia32": "3.1.2",
+ "@koromix/koffi-openbsd-x64": "3.1.2",
+ "@koromix/koffi-win32-arm64": "3.1.2",
+ "@koromix/koffi-win32-ia32": "3.1.2",
+ "@koromix/koffi-win32-x64": "3.1.2"
+ }
+ },
"node_modules/lazy-val": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.5.tgz",
diff --git a/package.json b/package.json
index 284c465..5b890f3 100644
--- a/package.json
+++ b/package.json
@@ -81,6 +81,8 @@
"@radix-ui/react-separator": "^1.1.11",
"@resvg/resvg-js": "^2.6.2",
"framer-motion": "^11.0.24",
+ "gsap": "^3.15.0",
+ "koffi": "^3.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"svg-path-bbox": "^2.1.0",
diff --git a/src/components/CopyIndicatorCurve.tsx b/src/components/CopyIndicatorCurve.tsx
new file mode 100644
index 0000000..696acbd
--- /dev/null
+++ b/src/components/CopyIndicatorCurve.tsx
@@ -0,0 +1,132 @@
+/**
+ * CopyIndicatorCurve — Fluid Sine-Curve SVG Morph with Liquid Octopus Loader.
+ *
+ * Morphing SVG sine-wave arc (`sin(θ)`) that extends smoothly out from the screen
+ * edge whenever content is copied to the clipboard, displaying the animated GSAP
+ * liquid octopus logo inside the curve peak.
+ */
+import { motion, AnimatePresence } from 'framer-motion'
+import { useStore } from '../store/appStore'
+import { LiquidOctopusLoader } from './LiquidOctopusLoader'
+
+export function CopyIndicatorCurve() {
+ const copyFlareActive = useStore((s) => s.copyFlareActive)
+ const flareKey = useStore((s) => s.flareKey)
+ const open = useStore((s) => s.open)
+ const settings = useStore((s) => s.settings)
+ const isRight = settings.stickPosition === 'right'
+
+ // Spans the full height of the hover bar trigger zone
+ const triggerHeightPx = window.innerHeight * (settings.hotZoneHeight || 0.25)
+ const H = triggerHeightPx
+ const bulge = 48
+ const boxW = 75
+
+ const hw = settings.hotZoneWidth || 3
+
+ // Structurally matched Cubic Bezier paths for 100% smooth frame-by-frame interpolation
+ // We use L to draw the base width matching the 3px hover bar so the curve emerges seamlessly from its edge.
+ 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 activePath = isRight ? curvePathRight : curvePathLeft
+ const flatPath = isRight ? flatPathRight : flatPathLeft
+
+ const showCurve = copyFlareActive && !open
+
+ let topOffset = '50%'
+ let yOffset = '-50%'
+
+ if (settings.bladePosition === 'top') {
+ topOffset = '0%'
+ yOffset = '0%'
+ } else if (settings.bladePosition === 'bottom') {
+ topOffset = '100%'
+ yOffset = '-100%'
+ }
+
+ return (
+ <AnimatePresence mode="popLayout">
+ {showCurve && (
+ <motion.div
+ key={`copy-sine-curve-${flareKey}`}
+ className={`copy-curve-container ${isRight ? 'right' : 'left'}`}
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.38, ease: [0.16, 1, 0.3, 1] }}
+ style={{
+ position: 'absolute',
+ top: topOffset,
+ y: yOffset,
+ [isRight ? 'right' : 'left']: 0,
+ width: boxW,
+ height: H,
+ pointerEvents: 'none',
+ zIndex: 9999
+ }}
+ >
+ {/* SVG Sine-Curve Morph with Subpixel Geometric Precision Antialiasing */}
+ <svg
+ width={boxW}
+ height={H}
+ viewBox={`0 0 ${boxW} ${H}`}
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ shapeRendering="geometricPrecision"
+ style={{
+ overflow: 'visible',
+ shapeRendering: 'geometricPrecision',
+ textRendering: 'geometricPrecision'
+ }}
+ >
+ <motion.path
+ d={activePath}
+ fill="#000000"
+ stroke="none"
+ strokeWidth="0"
+ shapeRendering="geometricPrecision"
+ initial={{ d: flatPath }}
+ animate={{ d: activePath }}
+ exit={{ d: flatPath }}
+ transition={{
+ duration: 0.38,
+ ease: [0.16, 1, 0.3, 1]
+ }}
+ />
+ </svg>
+
+ {/* Liquid Octopus Animated Logo centered inside the Curve Bulge */}
+ <motion.div
+ initial={{ scale: 0.3, opacity: 0, x: isRight ? 10 : -10 }}
+ animate={{ scale: 1, opacity: 1, x: 0 }}
+ exit={{ scale: 0.3, opacity: 0, x: isRight ? 10 : -10 }}
+ transition={{
+ type: 'spring',
+ stiffness: 420,
+ damping: 24,
+ delay: 0.05
+ }}
+ 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'
+ }}
+ >
+ <LiquidOctopusLoader fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" speed={1.2} />
+ </motion.div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ )
+}
diff --git a/src/components/LiquidOctopusLoader.tsx b/src/components/LiquidOctopusLoader.tsx
new file mode 100644
index 0000000..77b5c11
--- /dev/null
+++ b/src/components/LiquidOctopusLoader.tsx
@@ -0,0 +1,111 @@
+import React, { useEffect, useRef, useMemo } from 'react'
+import gsap from 'gsap'
+
+// Raw SVG Path for the Central Octopus Logo
+const OCTO_PATH =
+ 'M296.43 39.05 C292.67 39.52 288.39 40.34 284.8 41.25 C282.07 41.97 276.5 43.7 275.14 44.3 C274.87 44.42 274.02 44.77 273.28 45.07 C272.04 45.56 265.28 48.86 263.95 49.62 C258.35 52.79 251.29 58.24 247.01 62.67 C243.74 66.04 240.13 70.57 238.47 73.37 C238.07 74.04 237.55 74.88 237.33 75.23 C234.18 80.23 231.53 87.46 230.34 94.24 C229.9 96.82 229.82 103.26 230.22 104.99 C230.37 105.61 230.57 106.6 230.69 107.22 C230.91 108.46 231.58 110.31 232.42 112 C233.54 114.2 235.72 116.06 238.1 116.78 C240.18 117.4 243.86 117.1 246.17 116.13 C247.48 115.56 250.35 114.15 251.05 113.71 C251.62 113.36 255.16 111.16 256.82 110.12 C257.09 109.97 257.76 109.55 258.3 109.2 C258.85 108.85 259.46 108.48 259.66 108.38 C259.86 108.28 260.6 107.86 261.27 107.44 C261.97 107.05 262.86 106.53 263.25 106.33 C263.67 106.13 264.71 105.56 265.61 105.09 C269.15 103.13 273.9 100.88 275.76 100.29 C276.1 100.16 277 99.84 277.74 99.54 C279.35 98.95 281.53 98.21 283.43 97.66 C284.18 97.44 285.29 97.12 285.91 96.92 C286.53 96.72 287.27 96.57 287.59 96.57 C287.89 96.57 288.78 96.42 289.58 96.22 C293.51 95.23 300.67 94.81 304.85 95.33 C312.48 96.27 315.62 97.17 320.95 99.82 C325.73 102.19 329.62 105.36 332.44 109.18 C333.97 111.26 336.18 115.46 336.18 116.33 C336.18 116.6 336.38 117.25 336.6 117.77 C336.92 118.54 337.02 119.58 337.02 122.82 C337.04 126.98 336.87 128.17 335.76 131.11 C332.04 140.97 322.14 148.18 309.68 150.06 C308.79 150.18 307.35 150.4 306.46 150.55 C300.74 151.42 287.94 150.3 279.42 148.18 C275.63 147.23 274.82 147.04 273.78 146.69 C273.16 146.49 272.46 146.34 272.24 146.34 C271.99 146.34 271.45 146.19 271 146 C270.56 145.8 269.02 145.28 267.59 144.83 C264.05 143.74 262.51 143.25 260.9 142.63 C260.16 142.33 259.22 141.98 258.8 141.86 C258.4 141.74 257.83 141.54 257.56 141.42 C257.29 141.29 256.52 141.02 255.82 140.77 C255.16 140.55 253.74 140.03 252.73 139.61 C251.71 139.21 250.45 138.72 249.96 138.52 C249.44 138.32 248.54 138 247.98 137.78 C247.38 137.55 246.51 137.23 246.04 137.06 C245.57 136.88 244.34 136.41 243.32 135.99 C239.53 134.48 234.5 132.65 233.04 132.23 C232.35 132.03 231.73 131.83 229.7 131.11 C228.91 130.82 227.65 130.45 224.75 129.6 C223.11 129.13 220.91 128.59 218.93 128.17 C217.99 127.97 216.4 127.62 215.44 127.4 C214.45 127.2 213.31 127.03 212.89 127.03 C212.49 127.03 211.01 126.86 209.59 126.63 C207.61 126.31 206 126.26 201.99 126.36 C199.19 126.43 196.35 126.61 195.65 126.76 C194.98 126.9 193.57 127.2 192.56 127.42 C191.54 127.65 190.43 127.94 190.08 128.07 C189.74 128.22 189.14 128.42 188.72 128.54 C186.66 129.08 183.27 130.72 180.77 132.38 C176.46 135.22 172.3 140.05 170.3 144.49 C170 145.15 169.65 145.92 169.53 146.14 C168.76 147.56 167.65 151.91 167.33 154.66 C166.88 158.48 167.1 162.07 168.07 165.9 C170.15 174.35 175.82 181.03 183.27 183.81 C186.24 184.92 187.43 185.1 191.57 185.1 C195.75 185.1 195.93 185.07 200.23 183.78 C200.98 183.56 201.82 183.24 202.09 183.06 C202.36 182.89 202.71 182.74 202.91 182.74 C203.08 182.74 205.16 181.8 207.49 180.66 C214.89 177.07 217.37 175.98 220.79 174.94 C221.53 174.7 222.59 174.35 223.14 174.18 C223.71 173.98 224.35 173.83 224.6 173.83 C224.87 173.83 225.64 173.68 226.33 173.48 C228.98 172.71 234.83 171.77 239.61 171.33 C244.88 170.81 256.57 170.76 263.5 171.2 C266.92 171.43 271.87 171.75 274.52 171.9 C285.64 172.62 297.55 172.07 303.32 170.58 C303.86 170.44 304.85 170.21 305.55 170.09 C306.26 169.97 307.4 169.72 308.07 169.52 C308.77 169.32 309.93 169 310.67 168.78 C311.79 168.48 314.91 167.39 317.23 166.52 C318.87 165.9 325.48 162.69 326.64 161.94 C327.06 161.67 327.61 161.35 327.88 161.2 C329.42 160.43 334.27 157.11 336.05 155.63 C339.99 152.36 341.53 150.97 343.8 148.62 C347.79 144.51 351.63 139.68 354.13 135.67 C357.82 129.7 360.67 124.08 362.55 119.1 C362.77 118.49 363.12 117.62 363.32 117.17 C363.51 116.73 363.66 116.21 363.66 116.01 C363.66 115.81 363.81 115.29 364.01 114.85 C364.5 113.61 365.59 109.7 366.21 106.72 C367.35 101.42 367.48 100.04 367.48 93.72 C367.48 88.45 367.38 87.09 366.93 84.56 C366.14 80.3 365.2 76.56 364.68 75.55 C364.53 75.28 364.41 74.88 364.41 74.66 C364.41 74.34 363.29 71.74 362.67 70.57 C362.55 70.37 362 69.31 361.43 68.22 C357.97 61.43 352.1 54.82 345.39 50.14 C342.02 47.79 336.45 44.79 332.96 43.46 C332.34 43.23 331.47 42.89 331.03 42.69 C330.58 42.49 330.06 42.34 329.86 42.34 C329.66 42.34 329.14 42.19 328.7 42 C326.47 41.06 320.28 39.69 315.13 39 C311.44 38.53 300.37 38.53 296.43 39.05 Z M395.73 99.44 C394.79 99.79 393.7 100.16 393.35 100.26 C392.44 100.56 391.74 100.98 389.66 102.56 C386.2 105.14 383.92 108.28 381.39 114 C381.05 114.8 380.75 115.61 380.75 115.79 C380.75 115.96 380.6 116.48 380.4 116.93 C379.46 119.1 378.35 124.63 377.43 131.73 C377.23 133.29 376.89 135.79 376.66 137.3 C376.46 138.79 376.29 140.35 376.29 140.77 C376.29 142.21 374.46 151.52 373.57 154.64 C372.55 158.1 370.87 162.98 370.57 163.28 C370.45 163.43 370.35 163.73 370.35 163.95 C370.35 164.2 370.2 164.69 370 165.09 C369.83 165.46 369.11 166.9 368.47 168.26 C366.14 173.01 363.71 176.75 360.64 180.27 C353.44 188.56 345.41 193.29 334.44 195.72 C328.55 197.01 317.04 196.68 308.94 195 C308.05 194.83 306.39 194.48 305.22 194.26 C304.06 194.03 302.4 193.66 301.51 193.46 C300.62 193.27 299.18 192.94 298.29 192.72 C297.4 192.52 296.06 192.23 295.32 192.03 C294.58 191.86 293.07 191.51 291.98 191.29 C290.89 191.06 289.38 190.72 288.63 190.54 C287.89 190.37 286.38 190.02 285.29 189.8 C270.41 186.68 267.56 186.33 255.7 186.33 C246.14 186.33 243.67 186.53 239.18 187.57 C238.34 187.77 237.43 187.94 237.1 187.94 C236.58 187.94 236.06 188.07 232.42 189.11 C229.85 189.85 223.51 192.2 222.89 192.65 C222.77 192.77 221.8 193.27 220.79 193.81 C219.77 194.33 219.07 195.07 217.82 195.47 C216.06 196.58 212.99 198.66 212.86 198.84 C212.79 198.91 212.07 199.51 211.25 200.13 C208.93 201.91 204.99 205.92 202.91 208.67 C201.84 210.06 200.98 211.24 200.98 211.29 C200.98 211.37 200.58 212.01 200.11 212.75 C199.17 214.14 195.78 220.9 195.78 221.35 C195.78 221.5 195.63 221.97 195.43 222.41 C194.61 224.34 193.7 227.91 193.15 231.28 C192.83 233.18 192.73 235.31 192.73 239.32 C192.76 246.06 193.15 248.88 195.03 255.42 C195.65 257.6 196.74 260.35 198.33 263.71 C199.39 265.99 204.15 273.5 204.91 274.11 C204.99 274.19 205.73 275.01 206.52 275.97 C208.95 278.82 213.23 282.88 216.33 285.26 C217.94 286.47 217.49 287.49 219.42 287.49 C219.52 287.49 220.02 287.81 220.54 288.23 C221.06 288.62 221.53 288.97 221.6 288.97 C221.68 288.97 222.54 289.44 223.56 290.04 C225.39 291.1 225.99 291.4 229.58 293.08 C231.68 294.07 234.98 295.31 236.34 295.66 C236.81 295.78 237.48 295.98 237.82 296.1 C240.45 297.07 246.29 298.23 252.36 299 C260.78 300.06 275.73 298.95 282.91 296.75 C283.53 296.55 284.23 296.4 284.45 296.4 C284.7 296.4 285.27 296.25 285.71 296.05 C286.16 295.88 287.15 295.53 287.89 295.31 C289.23 294.89 292.1 293.78 292.1 293.78 C295.91 292.29 302.28 289.12 304.9 287.41 C305.5 287.04 306.02 286.74 306.07 286.74 C306.14 286.74 307.38 285.93 308.86 284.96 C310.33 283.97 311.74 283.05 311.96 282.9 C312.18 282.78 313.2 282.09 314.19 281.39 C319.09 277.98 321.74 276.19 325.03 274.06 C335.38 267.35 343.36 264.46 351.38 264.46 C355.99 264.46 361.61 265.7 368.12 268.17 C368.86 268.47 369.93 268.86 370.47 269.06 C371.02 269.29 371.81 269.53 372.21 269.63 C372.63 269.76 373.22 269.95 373.57 270.1 C374.56 270.5 378.92 271.69 381 272.13 C381.74 272.28 384.24 272.58 386.54 272.78 C390.16 273.07 391.27 273.07 394.47 272.78 C396.52 272.58 398.78 272.28 399.44 272.13 C403.23 271.24 403.78 271.07 406.5 270.03 C409.05 269.06 409.72 268.74 412.07 267.35 C417.17 264.36 422.32 259.46 424.87 255.15 C425.32 254.38 425.91 253.41 426.16 252.97 C426.88 251.78 428.89 247.17 429.33 245.64 C430.3 242.34 430.52 241.38 430.89 238.58 C431.36 234.87 431.36 232.71 430.89 229.34 C430.2 224.54 429.58 222.26 427.99 218.65 C425 211.86 419.97 206.39 413.88 203.3 C409.87 201.26 406.77 200.57 401.87 200.57 C397.61 200.57 393.87 201.22 390.65 202.5 C390.31 202.63 389.54 202.95 388.92 203.17 C383.79 205.18 377.78 209.06 372.43 213.82 C372.28 213.94 371.29 214.83 370.2 215.8 C368 217.73 362.23 223.48 359.45 226.47 C358.44 227.56 357.03 229.07 356.33 229.82 C355.66 230.56 354.45 231.87 353.63 232.76 C352.22 234.35 348.16 238.68 343.73 243.41 C339.5 247.92 332.76 254.45 330.11 256.66 C329.44 257.2 328.5 257.99 328.03 258.42 C326.5 259.73 323.28 262.1 320.43 263.99 C316.86 266.36 316.81 266.41 316.37 266.61 C316.17 266.71 315.55 267.06 315.01 267.4 C313.77 268.17 308.3 270.9 307.45 271.17 C307.11 271.27 306.22 271.59 305.47 271.89 C304.73 272.18 303.79 272.53 303.37 272.63 C302.97 272.75 301.86 273.07 300.89 273.37 C295.15 275.06 287.79 275.5 282.82 274.44 C280.96 274.06 277.76 272.93 276.13 272.08 C275.04 271.51 272.04 269.34 271.05 268.39 C268.8 266.22 267.19 263.71 266.08 260.5 C265.26 258.22 265.23 253.41 266.03 251.16 C267.34 247.47 270.09 243.9 273.78 241.06 C274.57 240.44 275.29 239.94 275.36 239.94 C275.44 239.94 275.91 239.65 276.43 239.3 C278.95 237.59 284.05 235.58 288.88 234.42 C292.32 233.6 300.87 232.51 303.86 232.51 C306.91 232.51 316.52 231.38 319.83 230.63 C322.46 230.01 324.37 229.52 325.16 229.27 C325.58 229.12 326.25 228.92 326.64 228.8 C329.52 228.01 335.56 225.36 338.41 223.62 C338.88 223.35 339.45 223.03 339.64 222.93 C340.21 222.66 344.62 219.64 345.49 218.92 C348.56 216.32 351.73 213.52 352.64 212.58 C353.88 211.29 357.57 207.36 359.58 205.15 C362.1 202.35 367.7 196.71 369.51 195.1 C371.74 193.12 374.58 190.94 377.28 189.16 C379.98 187.37 386.42 183.98 388.03 183.51 C388.45 183.39 389.42 183.04 390.16 182.74 C391.74 182.12 393.55 181.58 395.06 181.26 C395.63 181.13 396.32 180.91 396.57 180.76 C396.84 180.64 397.31 180.51 397.61 180.51 C397.91 180.51 398.73 180.37 399.42 180.17 C400.11 179.97 401.57 179.62 402.66 179.4 C413.46 177.07 419.97 173.28 425.22 166.28 C429.06 161.18 431.04 156.54 432.4 149.56 C432.72 147.85 432.77 146.39 432.67 141.89 C432.58 135.94 432.3 134.11 430.89 129.13 C429.46 124.13 427.3 119.35 424.87 115.66 C424.3 114.82 423.83 114.05 423.83 113.98 C423.83 113.61 417.5 106.23 417.17 106.23 C417.1 106.23 416.7 105.91 416.28 105.54 C413.9 103.33 409.92 100.86 407.24 99.94 C404.42 99 403.28 98.8 400.38 98.82 C397.96 98.82 397.17 98.95 395.73 99.44 Z'
+
+interface LiquidLoaderProps {
+ fillColor?: string
+ glowColor?: string
+ speed?: number
+}
+
+export function LiquidOctopusLoader({
+ fillColor = '#ffffff',
+ glowColor = 'rgba(255, 255, 255, 0.9)',
+ speed = 1.0
+}: LiquidLoaderProps) {
+ const octoRef = useRef<SVGPathElement | null>(null)
+
+ // Octopus path dimensions & center coordinates
+ const bounds = useMemo(() => {
+ const coords = OCTO_PATH.match(/-?\d*\.?\d+/g) || []
+ let minX = Infinity,
+ minY = Infinity,
+ maxX = -Infinity,
+ maxY = -Infinity
+ for (let i = 0; i < coords.length; i += 2) {
+ const x = parseFloat(coords[i])
+ const y = parseFloat(coords[i + 1])
+ if (!isNaN(x)) {
+ minX = Math.min(minX, x)
+ maxX = Math.max(maxX, x)
+ }
+ if (!isNaN(y)) {
+ minY = Math.min(minY, y)
+ maxY = Math.max(maxY, y)
+ }
+ }
+ return {
+ cx: (minX + maxX) / 2 || 300,
+ cy: (minY + maxY) / 2 || 168.75
+ }
+ }, [])
+
+ useEffect(() => {
+ // 1. Gentle logo pulse & breathing
+ const mainTl = gsap.timeline({ repeat: -1 })
+ mainTl.to(
+ octoRef.current,
+ {
+ scale: 1.08,
+ transformOrigin: `${bounds.cx}px ${bounds.cy}px`,
+ duration: 1.6 / speed,
+ ease: 'sine.inOut',
+ yoyo: true,
+ repeat: -1
+ },
+ 0
+ )
+
+ // 2. Smooth Left-to-Right Pendulum Rotation (-14° to +14°)
+ const rotTween = gsap.fromTo(
+ octoRef.current,
+ {
+ rotation: -14,
+ transformOrigin: `${bounds.cx}px ${bounds.cy}px`
+ },
+ {
+ rotation: 14,
+ transformOrigin: `${bounds.cx}px ${bounds.cy}px`,
+ duration: 2.2 / speed,
+ ease: 'sine.inOut',
+ yoyo: true,
+ repeat: -1
+ }
+ )
+
+ return () => {
+ mainTl.kill()
+ rotTween.kill()
+ }
+ }, [speed, bounds])
+
+ return (
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', width: '100%', height: '100%' }}>
+ <svg
+ viewBox="140 10 320 310"
+ shapeRendering="geometricPrecision"
+ style={{
+ width: 41.1,
+ height: 41.1,
+ overflow: 'visible',
+ filter: `drop-shadow(0 0 10px ${glowColor})`,
+ shapeRendering: 'geometricPrecision',
+ textRendering: 'geometricPrecision',
+ imageRendering: 'crisp-edges'
+ }}
+ >
+ {/* Central Octopus Logo Path — 100% Crisp Native Vector Path (Smooth Left/Right Pendulum Rotation) */}
+ <path
+ ref={octoRef}
+ d={OCTO_PATH}
+ fill={fillColor}
+ fillRule="evenodd"
+ shapeRendering="geometricPrecision"
+ />
+ </svg>
+ </div>
+ )
+}
diff --git a/src/components/Panel.tsx b/src/components/Panel.tsx
index cfc64d2..f177de6 100644
--- a/src/components/Panel.tsx
+++ b/src/components/Panel.tsx
@@ -17,6 +17,7 @@ import { Settings } from './Settings'
import { ToastStack } from './Toast'
import { TrashIcon } from './icons'
import { PreviewFlyout } from './PreviewFlyout'
+import { CopyIndicatorCurve } from './CopyIndicatorCurve'
export function Panel() {
const open = useStore((s) => s.open)
@@ -26,6 +27,7 @@ export function Panel() {
const settingsOpen = useStore((s) => s.settingsOpen)
const setSettingsOpen = useStore((s) => s.setSettingsOpen)
const setQuery = useStore((s) => s.setQuery)
+ const copyFlareActive = useStore((s) => s.copyFlareActive)
const bounceAnimation = settings.bounceAnimation
const blurAnimation = settings.blurAnimation
@@ -183,7 +185,8 @@ export function Panel() {
const containerStyle: Record<string, unknown> = {
position: 'absolute',
zIndex: 10,
- pointerEvents: open ? 'auto' : 'none'
+ pointerEvents: open ? 'auto' : 'none',
+ transition: 'clip-path 0.38s cubic-bezier(0.16, 1, 0.3, 1)'
}
let originX = 0
@@ -206,19 +209,21 @@ export function Panel() {
// Set clipPath via style (not animate) to avoid Framer Motion's broken
// calc() interpolation — CSS transitions handle it correctly.
let clipPath: string
+ const hotWidth = settings.hotZoneWidth || 3
if (isRight) {
clipPath = open
? 'inset(calc(0% - 100px) 0px calc(0% - 100px) calc(0% - 800px) round 24px 0px 0px 24px)'
- : `inset(calc(50% - ${halfTrigger}px) 0px calc(50% - ${halfTrigger}px) calc(100% - ${settings.hotZoneWidth || 3}px) round 24px 0px 0px 24px)`
+ : `inset(calc(50% - ${halfTrigger}px) 0px calc(50% - ${halfTrigger}px) calc(100% - ${hotWidth}px) round 24px 0px 0px 24px)`
} else {
clipPath = open
? 'inset(calc(0% - 100px) calc(0% - 800px) calc(0% - 100px) 0px round 0px 24px 24px 0px)'
- : `inset(calc(50% - ${halfTrigger}px) calc(100% - ${settings.hotZoneWidth || 3}px) calc(50% - ${halfTrigger}px) 0px round 0px 24px 24px 0px)`
+ : `inset(calc(50% - ${halfTrigger}px) calc(100% - ${hotWidth}px) calc(50% - ${halfTrigger}px) 0px round 0px 24px 24px 0px)`
}
containerStyle.clipPath = clipPath
return (
<div className="root">
+ <CopyIndicatorCurve />
<motion.div
className={containerClass}
initial={false}
diff --git a/src/store/appStore.ts b/src/store/appStore.ts
index 548a12b..b14f180 100644
--- a/src/store/appStore.ts
+++ b/src/store/appStore.ts
@@ -29,6 +29,8 @@ function isVersionLower(current: string, latest: string): boolean {
return false
}
+let flareTimer: ReturnType<typeof setTimeout> | null = null
+
/** A transient user-facing notice shown as a toast. */
export interface ToastMsg {
id: string
@@ -75,6 +77,9 @@ interface AppState {
setPreviewItemId: (id: string | null, rect?: { y: number; height: number }) => void
previewFlyoutRect: { top: number; bottom: number } | null
setPreviewFlyoutRect: (rect: { top: number; bottom: number } | null) => void
+ copyFlareActive: boolean
+ flareKey: number
+ triggerCopyFlare: () => void
/* toasts */
pushToast: (toast: ToastMsg) => void
@@ -106,6 +111,8 @@ export const useStore = create<AppState>((set, get) => ({
updateInfo: null,
previewItemId: null,
previewItemRect: null,
+ copyFlareActive: false,
+ flareKey: 0,
async hydrate() {
const { items, settings, version } = await edge.loadState()
@@ -138,7 +145,23 @@ export const useStore = create<AppState>((set, get) => ({
}
},
- setItems: (items) => set({ items }),
+ setItems: (items) => {
+ const prevItems = get().items
+ const prevTop = prevItems.length > 0 ? prevItems[0] : null
+ const newTop = items.length > 0 ? items[0] : null
+
+ if (get().hydrated && prevTop && newTop) {
+ if (
+ newTop.id !== prevTop.id ||
+ newTop.capturedAt !== prevTop.capturedAt ||
+ newTop.hitCount !== prevTop.hitCount
+ ) {
+ console.log('[appStore] Top item copied or re-copied! Triggering sine-curve copy flare for:', newTop.id)
+ get().triggerCopyFlare()
+ }
+ }
+ set({ items })
+ },
setSettings: (next) => set({ settings: next }),
setQuery: (query) => set({ query }),
@@ -167,6 +190,14 @@ export const useStore = create<AppState>((set, get) => ({
edge.setPreviewMode(true)
}
},
+ triggerCopyFlare: () => {
+ if (flareTimer) clearTimeout(flareTimer)
+ set({ copyFlareActive: true, flareKey: Date.now() })
+ flareTimer = setTimeout(() => {
+ set({ copyFlareActive: false })
+ flareTimer = null
+ }, 1400)
+ },
pushToast: (toast) => {
set({ toasts: [...get().toasts, toast] })
diff --git a/src/styles/panel.css b/src/styles/panel.css
index 8489676..cccaa27 100644
--- a/src/styles/panel.css
+++ b/src/styles/panel.css
@@ -408,3 +408,17 @@
.toast:hover {
filter: brightness(1.1);
}
+
+/* Copy Indicator Sine Curve Morph Styles */
+.copy-curve-container {
+ pointer-events: none;
+ z-index: 100;
+}
+
+.copy-indicator-badge {
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.25);
+ user-select: none;
+ font-family: inherit;
+ font-feature-settings: "cv02", "cv03", "cv04", "cv11";
+}
+