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(icons): vintage PNG file icons across shelf and drag ghosts
Deepender251d420458b0d9
diff --git a/.gitignore b/.gitignoreindex a465b03..29a3004 100644--- a/.gitignore+++ b/.gitignore@@ -21,4 +21,7 @@ icons-showcase.svgscripts/generate_showcase.mjselectron-clipboard-search-implementation/scratch/verify-*.cjs+# Design source material (processed output lives in resources/file-icons)+new icons/+Blue_gradient (1).pngdiff --git a/electron/main/drag.ts b/electron/main/drag.tsindex 6529a36..73c5883 100644--- a/electron/main/drag.ts+++ b/electron/main/drag.ts@@ -392,7 +392,7 @@ function createFileStackDragIcon(paths: string[], entries?: Array<{ isDirectory?}return getFileKind(p, isDir).kind})- const cacheKey = `stack|pastel-svg|${kinds.join('-')}|${count}`+ const cacheKey = `stack|png|${kinds.join('-')}|${count}`const cached = iconCache.get(cacheKey)if (cached && !cached.isEmpty()) {return cacheddiff --git a/electron/main/fileSvg.ts b/electron/main/fileSvg.tsindex fbd0091..e0ed96f 100644--- a/electron/main/fileSvg.ts+++ b/electron/main/fileSvg.ts@@ -1,368 +1,84 @@+import { readFileSync } from 'node:fs'+import { join } from 'node:path'+import { app } from 'electron'import type { FileKind } from '../../src/lib/fileType'/**- * Generates the 1:1 exact vector SVG markup for the 3D pastel category folder icons- * matching CustomFileIcon.tsx without any glass container or background box.+ * Drag-ghost artwork from the vintage textured PNG set+ * (resources/file-icons, one static file per kind).+ *+ * PNGs are read once per session into a bounded data-URI cache, then+ * embedded into the existing stack/badge SVG layout which Resvg rasterizes+ * exactly as before. UI file icons come from the same files over+ * edgelocal://icon/, so there is a single copy of the art.*/-export function getFileKindSvgContent(kind: FileKind, uid = 'drag'): string {- const folderShadowId = `fsh-${uid}`- const sheetShadowId = `ssh-${uid}`- const glyphShadowId = `gsh-${uid}`- switch (kind) {- case 'folder':- return `- <defs>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#D97706" floodOpacity="0.12" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FDE68A" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFFDF5" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FBBF24" />- </g>- `-- case 'executable':- return `- <defs>- <filter id="${glyphShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#3730A3" floodOpacity="0.22" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#4338CA" floodOpacity="0.12" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#C7D2FE" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F5F7FF" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#93A4FC" />- <g filter="url(#${glyphShadowId})">- <g stroke="#FFFFFF" stroke-width="8" stroke-linecap="round">- <line x1="226" y1="235" x2="226" y2="218" />- <line x1="256" y1="235" x2="256" y2="218" />- <line x1="286" y1="235" x2="286" y2="218" />- <line x1="226" y1="343" x2="226" y2="360" />- <line x1="256" y1="343" x2="256" y2="360" />- <line x1="286" y1="343" x2="286" y2="360" />- <line x1="202" y1="259" x2="185" y2="259" />- <line x1="202" y1="289" x2="185" y2="289" />- <line x1="202" y1="319" x2="185" y2="319" />- <line x1="310" y1="259" x2="327" y2="259" />- <line x1="310" y1="289" x2="327" y2="289" />- <line x1="310" y1="319" x2="327" y2="319" />- </g>- <rect x="202" y="235" width="108" height="108" rx="20" fill="#FFFFFF" />- <rect x="226" y="259" width="60" height="60" rx="12" fill="#93A4FC" />- </g>- </g>- `+const PNG_WIDTH = 512+const PNG_HEIGHT = 341- case 'audio':- return `- <defs>- <filter id="${glyphShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#6B21A8" floodOpacity="0.22" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#7E22CE" floodOpacity="0.12" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#E2D0FE" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FAF5FF" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#C495FD" />- <g transform="translate(167.8, 190.6) scale(12)" filter="url(#${glyphShadowId})" fill="#FFFFFF">- <path d="M 10.888 2.518 L 6.132 3.477 C 5.98 3.508 5.86 3.565 5.76 3.65 C 5.66 3.735 5.6 3.86 5.6 4.02 C 5.596 4.047 5.59 4.1 5.59 4.18 L 5.59 10.132 C 5.59 10.272 5.578 10.407 5.484 10.522 C 5.389 10.637 5.274 10.672 5.137 10.699 L 4.827 10.762 C 4.434 10.842 4.177 10.895 3.946 10.985 C 3.738 11.066 3.555 11.186 3.427 11.318 C 3.25 11.5 3.12 11.75 3.095 12.313 C 3.126 12.61 3.261 12.895 3.49 13.105 C 3.646 13.247 3.84 13.355 4.068 13.401 C 4.304 13.448 4.558 13.432 4.926 13.358 C 5.122 13.318 5.306 13.256 5.481 13.153 C 5.656 13.05 5.81 12.89 5.919 12.748 C 6.028 12.606 6.12 12.36 6.152 12.198 C 6.194 11.996 6.204 11.812 6.204 11.61 L 6.204 6.347 C 6.204 6.071 6.284 5.997 6.506 5.943 C 6.53 5.938 10.46 5.146 10.644 5.11 C 10.901 5.061 11.022 5.135 11.022 5.404 L 11.022 8.928 C 11.022 9.068 11.021 9.208 10.926 9.324 C 10.832 9.439 10.715 9.474 10.578 9.502 L 10.268 9.564 C 9.875 9.644 9.619 9.697 9.388 9.787 C 9.18 9.868 8.997 9.988 8.868 10.121 C 8.69 10.3 8.56 10.55 8.528 11.115 C 8.558 11.412 8.702 11.697 8.932 11.907 C 9.088 12.049 9.282 12.157 9.51 12.203 C 9.745 12.25 10 12.234 10.367 12.16 C 10.564 12.12 10.747 12.058 10.923 11.955 C 11.098 11.852 11.251 11.692 11.361 11.55 C 11.467 11.393 11.546 11.206 11.594 11 C 11.636 10.798 11.646 10.614 11.646 10.412 L 11.646 2.812 C 11.646 2.666 11.593 2.562 11.486 2.502 C 11.38 2.44 11.19 2.456 10.888 2.518 Z" />- </g>- </g>- `-- case 'code':- return `- <defs>- <filter id="${glyphShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#0369A1" floodOpacity="0.18" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#0284C7" floodOpacity="0.12" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#86DDFB" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F0FBFF" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#53CAF7" />- <g filter="url(#${glyphShadowId})" fill="none" stroke="#FFFFFF" stroke-width="16" stroke-linecap="round" stroke-linejoin="round">- <path d="M 200 240 L 156 289 L 200 338" />- <line x1="282" y1="222" x2="230" y2="356" />- <path d="M 312 240 L 356 289 L 312 338" />- </g>- </g>- `+let iconDirOverride: string | null = null- case 'word':- return `- <defs>- <filter id="${sheetShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#000000" floodOpacity="0.08" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#9DC5FA" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F2F7FE" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#7BAFF8" />- <g filter="url(#${sheetShadowId})">- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#F2F7FE" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#7BAFF8" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" />- <path d="M214 252 L226 282 L238 260 L250 282 L262 252" fill="none" stroke="#7BAFF8" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" />- <line x1="210" y1="306" x2="302" y2="306" stroke="#7BAFF8" stroke-width="7" stroke-linecap="round" />- <line x1="210" y1="328" x2="302" y2="328" stroke="#7BAFF8" stroke-width="7" stroke-linecap="round" />- <line x1="210" y1="350" x2="258" y2="350" stroke="#7BAFF8" stroke-width="7" stroke-linecap="round" />- </g>- </g>- `-- case 'image':- return `- <defs>- <filter id="${glyphShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#6B4F3B" floodOpacity="0.22" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#8C6A4F" floodOpacity="0.14" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#DFCEBC" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFFDF9" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#BA9B7B" />- <g filter="url(#${glyphShadowId})">- <circle cx="272" cy="260" r="14" fill="#FFFFFF" />- <path d="M 178 346 L 178 326 L 230 274 L 266 308 L 298 282 L 334 324 L 334 346 Z" fill="#FFFFFF" />- <rect x="176" y="228" width="160" height="122" rx="18" fill="none" stroke="#FFFFFF" stroke-width="12" />- </g>- </g>- `-- case 'pdf':- return `- <defs>- <filter id="${sheetShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#000000" floodOpacity="0.08" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FF92A0" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFF0F2" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FF7C8E" />- <g filter="url(#${sheetShadowId})">- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#FFF0F2" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#FF7C8E" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" />- <g fill="none" stroke="#FF7C8E" stroke-width="6" stroke-linecap="round" stroke-linejoin="round">- <path d="M216 288 V258 H230 C238 258 242 262 242 268 S238 278 230 278 H216" />- <path d="M252 258 V288 H264 C274 288 280 280 280 273 V273 C280 266 274 258 264 258 H252" />- <path d="M292 288 V258 H308 M292 273 H304" />- </g>- <line x1="208" y1="330" x2="304" y2="330" stroke="#FF7C8E" stroke-width="7" stroke-linecap="round" />- <line x1="208" y1="352" x2="304" y2="352" stroke="#FF7C8E" stroke-width="7" stroke-linecap="round" />- </g>- </g>- `-- case 'powerpoint':- return `- <defs>- <filter id="${sheetShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#000000" floodOpacity="0.08" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FFC492" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFF8F2" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FFA25B" />- <g filter="url(#${sheetShadowId})">- <line x1="256" y1="306" x2="256" y2="368" stroke="#FFF8F2" stroke-width="8" stroke-linecap="round" />- <line x1="256" y1="312" x2="222" y2="368" stroke="#FFF8F2" stroke-width="8" stroke-linecap="round" />- <line x1="256" y1="312" x2="290" y2="368" stroke="#FFF8F2" stroke-width="8" stroke-linecap="round" />- <rect x="182" y="196" width="148" height="14" rx="7" fill="#FFF8F2" />- <rect x="188" y="210" width="136" height="96" rx="8" fill="#FFF8F2" />- <path d="M 252 230 A 28 28 0 1 0 273 277 L 252 258 Z" fill="#FFA25B" />- <path d="M 260 228 A 28 28 0 0 1 288 255 L 260 255 Z" fill="#FFA25B" />- <path d="M 288 261 A 28 28 0 0 1 279 280 L 260 261 Z" fill="#FFA25B" />- </g>- </g>- `-- case 'excel':- return `- <defs>- <filter id="${sheetShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#000000" floodOpacity="0.08" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#7EE6BC" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F0FDF8" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#52D7A4" />- <g filter="url(#${sheetShadowId})">- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#F0FDF8" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#52D7A4" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" />- <rect x="210" y="262" width="92" height="86" rx="8" fill="none" stroke="#52D7A4" stroke-width="5" />- <line x1="210" y1="290" x2="302" y2="290" stroke="#52D7A4" stroke-width="5" />- <line x1="210" y1="319" x2="302" y2="319" stroke="#52D7A4" stroke-width="5" />- <line x1="241" y1="262" x2="241" y2="348" stroke="#52D7A4" stroke-width="5" />- <line x1="271" y1="262" x2="271" y2="348" stroke="#52D7A4" stroke-width="5" />- </g>- </g>- `-- case 'text':- return `- <defs>- <filter id="${sheetShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#4A5F3B" floodOpacity="0.14" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#CEDDC3" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F8FAF6" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#8CA77B" />- <g filter="url(#${sheetShadowId})">- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#F8FAF6" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#8CA77B" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" />- <line x1="210" y1="268" x2="256" y2="268" stroke="#8CA77B" stroke-width="7" stroke-linecap="round" />- <line x1="210" y1="294" x2="300" y2="294" stroke="#8CA77B" stroke-width="7" stroke-linecap="round" />- <line x1="210" y1="320" x2="300" y2="320" stroke="#8CA77B" stroke-width="7" stroke-linecap="round" />- <line x1="210" y1="346" x2="276" y2="346" stroke="#8CA77B" stroke-width="7" stroke-linecap="round" />- </g>- </g>- `-- case 'video':- return `- <defs>- <filter id="${sheetShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#1E293B" floodOpacity="0.14" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#94A3B8" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F8FAFC" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#64748B" />- <g filter="url(#${sheetShadowId})">- <rect x="176" y="224" width="160" height="128" rx="20" fill="#F8FAFC" />- <rect x="192" y="240" width="16" height="16" rx="4" fill="#64748B" />- <rect x="192" y="266.67" width="16" height="16" rx="4" fill="#64748B" />- <rect x="192" y="293.33" width="16" height="16" rx="4" fill="#64748B" />- <rect x="192" y="320" width="16" height="16" rx="4" fill="#64748B" />- <rect x="216" y="240" width="80" height="96" rx="8" fill="#64748B" />- <rect x="304" y="240" width="16" height="16" rx="4" fill="#64748B" />- <rect x="304" y="266.67" width="16" height="16" rx="4" fill="#64748B" />- <rect x="304" y="293.33" width="16" height="16" rx="4" fill="#64748B" />- <rect x="304" y="320" width="16" height="16" rx="4" fill="#64748B" />- <path d="M 243 274 C 243 271 246.5 269 249.5 270.8 L 269.5 284.8 C 272.5 286.5 272.5 289.5 269.5 291.2 L 249.5 305.2 C 246.5 307 243 305 243 302 Z" fill="#FFFFFF" />- </g>- </g>- `+/** Test hook: point the builder at a fixture directory instead of resources. */+export function setFileIconAssetDir(dir: string): void {+ iconDirOverride = dir+ pngCache.clear()+}- case 'archive':- return `- <defs>- <filter id="${glyphShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#B45309" floodOpacity="0.22" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#D97706" floodOpacity="0.12" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FDE68A" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFFDF5" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FBBF24" />- <g filter="url(#${glyphShadowId})">- <line x1="256" y1="178" x2="256" y2="284" stroke="#FFFDF5" stroke-width="6" stroke-linecap="round" />- <rect x="236" y="184" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="236" y="204" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="236" y="224" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="236" y="244" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="236" y="264" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="194" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="214" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="234" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="254" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="274" width="20" height="6" rx="3" fill="#FFFDF5" />- <path d="M 242 282 L 270 282 C 274 282 277 285 277 289 L 275 304 C 275 310 277 314 273 320 L 260 327 C 257.5 328.5 254.5 328.5 252 327 L 239 320 C 235 314 237 310 237 304 L 235 289 C 235 285 238 282 242 282 Z" fill="#FFFDF5" />- <path d="M 249 314 C 249 311 251 309 254 309 L 258 309 C 261 309 263 311 263 314 L 264 346 C 266 354 275 362 275 374 C 275 384.5 266.5 393 256 393 C 245.5 393 237 384.5 237 374 C 237 362 246 354 248 346 Z" fill="#FFFDF5" />- <rect x="252" y="294" width="8" height="22" rx="4" fill="#FBBF24" />- <circle cx="256" cy="374" r="9" fill="#FBBF24" />- </g>- </g>- `+function fileIconDir(): string | null {+ if (iconDirOverride) return iconDirOverride+ try {+ const getAppPath = (app as unknown as { getAppPath?: () => string })?.getAppPath+ if (typeof getAppPath !== 'function') return null+ return join(getAppPath.call(app), 'resources', 'file-icons')+ } catch {+ return null+ }+}- case 'file':- default:- return `- <defs>- <filter id="${sheetShadowId}" x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id="${folderShadowId}" x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#475569" floodOpacity="0.12" />- </filter>- </defs>- <g filter="url(#${folderShadowId})">- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#D4DFE9" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F8FAFC" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#B0C0D0" />- <g filter="url(#${sheetShadowId})">- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#F8FAFC" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#B0C0D0" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" />- </g>- </g>- `+const pngCache = new Map<string, string | null>()+const PNG_CACHE_MAX = 16++/** Data-URI for a kind's PNG, or null when the file is unavailable. */+function kindPngDataUri(kind: FileKind): string | null {+ const cached = pngCache.get(kind)+ if (cached !== undefined) return cached+ let uri: string | null = null+ try {+ const dir = fileIconDir()+ if (dir) {+ const buf = readFileSync(join(dir, `${kind}.png`))+ if (buf.length > 0) uri = `data:image/png;base64,${buf.toString('base64')}`+ }+ } catch {+ uri = null}+ if (pngCache.size >= PNG_CACHE_MAX) {+ const first = pngCache.keys().next().value+ if (first) pngCache.delete(first)+ }+ pngCache.set(kind, uri)+ return uri+}++/** One folder PNG centered in the 512 viewBox (512x341 art). */+function kindImage(kind: FileKind): string {+ const uri = kindPngDataUri(kind)+ if (!uri) return ''+ const y = Math.round((512 - PNG_HEIGHT) / 2)+ return `<image href="${uri}" x="0" y="${y}" width="${PNG_WIDTH}" height="${PNG_HEIGHT}"/>`}/*** Builds the standalone SVG string for drag previews.- * Zero glass effect, zero black bounding container — just the clean SVG icon artwork.+ * Vintage PNG artwork with the multi-file stack offsets and count badge.+ * Kinds without a readable PNG render as empty slots (the caller falls back+ * to the generic icon when rasterization yields nothing usable).*/export function buildFileDragSvg(kinds: FileKind[], count: number): string {if (count <= 1 || kinds.length === 1) {const kind = kinds[0] || 'file'return `<svg xmlns="http://www.w3.org/2000/svg" width="122" height="122" viewBox="0 0 512 512" fill="none">- ${getFileKindSvgContent(kind, 'single')}+ ${kindImage(kind)}</svg>`}@@ -379,7 +95,7 @@ export function buildFileDragSvg(kinds: FileKind[], count: number): string {const scale = 1 - index * 0.04return `<g transform="translate(${tx}, ${ty}) rotate(${rot} 256 256) scale(${scale})">- ${getFileKindSvgContent(kind, `stack-${index}`)}+ ${kindImage(kind)}</g>`})diff --git a/electron/main/imageProtocol.ts b/electron/main/imageProtocol.tsindex a1a3ea5..3dbca9c 100644--- a/electron/main/imageProtocol.ts+++ b/electron/main/imageProtocol.ts@@ -75,6 +75,24 @@ export function resolveEmojiAsset(assetDir: string, fileName: string): string |return filePath}+/**+ * File-kind folder icons (PNG, resources/file-icons). Fixed 13-name+ * allowlist so the protocol cannot escape the icon directory — same+ * validation shape as the emoji assets above.+ */+const ICON_FILE_RE = /^(pdf|word|excel|powerpoint|archive|text|code|audio|video|image|executable|folder|file)\.png$/++/** Resolve a file-kind icon name to its on-disk PNG. */+export function resolveIconAsset(assetDir: string, fileName: string): string | null {+ const name = fileName.toLowerCase()+ if (!ICON_FILE_RE.test(name)) return null+ const baseDir = resolve(assetDir)+ const filePath = resolve(join(baseDir, name))+ if (dirname(filePath) !== baseDir) return null+ if (!existsSync(filePath)) return null+ return filePath+}+/*** Resolve an edgelocal image id to the staged file without allowing the id to* select paths or arbitrary file types. Clipboard captures are PNG, whilediff --git a/electron/main/index.ts b/electron/main/index.tsindex 7c845fb..d00d845 100644--- a/electron/main/index.ts+++ b/electron/main/index.ts@@ -22,10 +22,10 @@ import { initAutoUpdater } from './updater'import { createOnboardingWindow } from './onboardingWindow'import { startFullscreenMonitor, stopFullscreenMonitor, triggerFullscreenCheck } from './fullscreen'import { flushStagedTempRegistry } from './stagedTemp'-import { extname, normalize } from 'node:path'+import { extname, join, normalize } from 'node:path'import { existsSync, createReadStream } from 'node:fs'import { createHash } from 'node:crypto'-import { resolveStoredImage, resolveEmojiAsset, emojiAssetDir } from './imageProtocol'+import { resolveStoredImage, resolveEmojiAsset, resolveIconAsset, emojiAssetDir } from './imageProtocol'import { getThumbnailPayload, thumbnailCacheControl } from './thumbnailCache'// Edge-Drop renders a small, mostly static transparent panel. Chromium's GPU@@ -186,6 +186,25 @@ function registerImageProtocol(): void {})}+ // File-kind folder icons (static PNG set, same immutable-cache shape+ // as emoji). Must sit before the generic imageId fallback below.+ if (request.url.startsWith(`${APP_CONFIG.imageProtocol}://icon/`)) {+ const fileName = decodeURIComponent(request.url.slice(`${APP_CONFIG.imageProtocol}://icon/`.length).split('?')[0] ?? '')+ // Same location pattern as PATHS.icon: works in dev (project root)+ // and packaged (inside asar, readable via fs).+ const filePath = resolveIconAsset(join(app.getAppPath(), 'resources', 'file-icons'), fileName)+ if (!filePath) return new Response('Not found', { status: 404 })+ const stream = createReadStream(filePath)+ const body = new Response(stream as unknown as ReadableStream<Uint8Array>).body+ return new Response(body, {+ status: 200,+ headers: new Headers({+ 'Content-Type': 'image/png',+ 'Cache-Control': 'public, max-age=31536000, immutable'+ })+ })+ }+// List cards request bounded raster thumbnails. Do not hand an original// multi-megapixel file to Chromium merely to paint a 50–240px card.if (request.url.startsWith(`${APP_CONFIG.imageProtocol}://thumb/`)) {diff --git a/package.json b/package.jsonindex ced9b09..97f8645 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "edge-drop",- "version": "0.3.2",+ "version": "0.3.3","description": "Edge-Drop — a clipboard manager that lives on the left edge of your screen and expands on hover.","author": "Edge-Drop","license": "Apache-2.0",@@ -142,4 +142,4 @@"react": "^18.2.0","zustand": "^4.5.2"}-}+}\ No newline at end of filediff --git a/resources/file-icons/archive.png b/resources/file-icons/archive.pngnew file mode 100644index 0000000..61a335fBinary files /dev/null and b/resources/file-icons/archive.png differdiff --git a/resources/file-icons/audio.png b/resources/file-icons/audio.pngnew file mode 100644index 0000000..b6f41b4Binary files /dev/null and b/resources/file-icons/audio.png differdiff --git a/resources/file-icons/code.png b/resources/file-icons/code.pngnew file mode 100644index 0000000..4580936Binary files /dev/null and b/resources/file-icons/code.png differdiff --git a/resources/file-icons/excel.png b/resources/file-icons/excel.pngnew file mode 100644index 0000000..3b0ededBinary files /dev/null and b/resources/file-icons/excel.png differdiff --git a/resources/file-icons/executable.png b/resources/file-icons/executable.pngnew file mode 100644index 0000000..0afbc57Binary files /dev/null and b/resources/file-icons/executable.png differdiff --git a/resources/file-icons/file.png b/resources/file-icons/file.pngnew file mode 100644index 0000000..d0b260fBinary files /dev/null and b/resources/file-icons/file.png differdiff --git a/resources/file-icons/folder.png b/resources/file-icons/folder.pngnew file mode 100644index 0000000..681f6dcBinary files /dev/null and b/resources/file-icons/folder.png differdiff --git a/resources/file-icons/image.png b/resources/file-icons/image.pngnew file mode 100644index 0000000..dd3412eBinary files /dev/null and b/resources/file-icons/image.png differdiff --git a/resources/file-icons/pdf.png b/resources/file-icons/pdf.pngnew file mode 100644index 0000000..5a2780fBinary files /dev/null and b/resources/file-icons/pdf.png differdiff --git a/resources/file-icons/powerpoint.png b/resources/file-icons/powerpoint.pngnew file mode 100644index 0000000..aa2adecBinary files /dev/null and b/resources/file-icons/powerpoint.png differdiff --git a/resources/file-icons/text.png b/resources/file-icons/text.pngnew file mode 100644index 0000000..609dad9Binary files /dev/null and b/resources/file-icons/text.png differdiff --git a/resources/file-icons/video.png b/resources/file-icons/video.pngnew file mode 100644index 0000000..5831fb6Binary files /dev/null and b/resources/file-icons/video.png differdiff --git a/resources/file-icons/word.png b/resources/file-icons/word.pngnew file mode 100644index 0000000..b11cf22Binary files /dev/null and b/resources/file-icons/word.png differdiff --git a/src/components/ClipboardItem.tsx b/src/components/ClipboardItem.tsxindex fe06644..63af939 100644--- a/src/components/ClipboardItem.tsx+++ b/src/components/ClipboardItem.tsx@@ -95,6 +95,7 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item }, ref) => {item.data.paths.every((p, i) => !(item.data as any).entries?.[i]?.isDirectory && ((item.data as any).entries?.[i]?.isImage || getFileKind(p).kind === 'image')))const isImageFolderCard = isSingleImage || isImageStack+ const isFileCard = item.data.kind === 'files' && !isImageFolderCardconst bundleCount = item.data.kind === 'image-collection'? item.data.images.length@@ -102,11 +103,10 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item }, ref) => {? item.data.paths.length: 0- const screenW = typeof window !== 'undefined' ? window.innerWidth : 1140const expandedWidth = expanded && isHorizontal- ? (isImageFolderCard- ? Math.min(screenW - 80, Math.max(210, 14 + bundleCount * 121))- : Math.min(screenW - 80, Math.max(300, 48 + bundleCount * 124)))+ ? (isImageFolderCard || isFileCard+ ? Math.max(210, 16 + bundleCount * 132)+ : Math.max(300, 48 + bundleCount * 124)): undefinedconst cardRef = useRef<HTMLDivElement | null>(null)@@ -137,7 +137,7 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item }, ref) => {}}, [expanded, setExpandedFlag])- // Smooth scroll stabilization when a stack expands+ // Smooth scroll stabilization when a stack expands: ensure the start/header of the card stays visible without scrolling to the enduseLayoutEffect(() => {if (!expanded) returnconst el = cardRef.current@@ -151,21 +151,13 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item }, ref) => {if (isHorizontal) {const leftDiff = elRect.left - containerRect.left- const rightDiff = elRect.right - containerRect.right-if (leftDiff < 0) {container.scrollBy({ left: leftDiff - 16, behavior: 'smooth' })- } else if (rightDiff > 0) {- container.scrollBy({ left: rightDiff + 16, behavior: 'smooth' })}} else {const topDiff = elRect.top - containerRect.top- const bottomDiff = elRect.bottom - containerRect.bottom-if (topDiff < 0) {container.scrollBy({ top: topDiff - 16, behavior: 'smooth' })- } else if (bottomDiff > 0) {- container.scrollBy({ top: bottomDiff + 16, behavior: 'smooth' })}}})@@ -299,7 +291,7 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item }, ref) => {}}initial={false}animate={{ opacity: 1 }}- className={`item${item.pinned ? ' pinned' : ''}${isBundle ? ' bundle' : ''}${expanded ? ' is-expanded' : ''}${colorInfo ? ` is-color-card ${colorInfo.isLight ? 'is-light-color' : 'is-dark-color'}` : ''}${isImageFolderCard ? ' is-image-folder-card' : ''}`}+ className={`item${item.pinned ? ' pinned' : ''}${isBundle ? ' bundle' : ''}${expanded ? ' is-expanded' : ''}${colorInfo ? ` is-color-card ${colorInfo.isLight ? 'is-light-color' : 'is-dark-color'}` : ''}${isImageFolderCard || isFileCard ? ' is-image-folder-card' : ''}`}data-expanded-stack={expanded ? 'true' : undefined}style={{...(expandedWidth ? { width: expandedWidth, minWidth: expandedWidth, maxWidth: expandedWidth } : {}),@@ -376,6 +368,17 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item }, ref) => {onRemove={() => remove(item.id)}onCollapse={onCollapse}/>+ ) : isFileCard ? (+ <FileFolderCard+ item={item}+ copied={copied}+ expanded={expanded}+ isHorizontal={isHorizontal}+ onDragStart={handleDragStart}+ onCopy={onCopy}+ onRemove={() => remove(item.id)}+ onCollapse={onCollapse}+ />) : (<div className="body"><div className="item-content">@@ -605,6 +608,7 @@ function BundleToolbar({<divclassName="bundle-actions"title={t('item.collapsePinned')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()onCollapse(e)@@ -614,6 +618,7 @@ function BundleToolbar({type="button"className="bundle-collapse-hit"title={t('item.collapsePinned')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.currentTarget.blur()@@ -627,11 +632,12 @@ function BundleToolbar({{count} / {MAX_STACK}</div>)}- <div className="actions-pill">+ <div className="actions-pill" onPointerDown={(e) => e.stopPropagation()}>{showPin && onTogglePin && (<buttonclassName={`act${pinned ? ' active' : ''}`}title={pinned ? t('item.unpin') : t('item.pin')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.currentTarget.blur()@@ -647,6 +653,7 @@ function BundleToolbar({<buttonclassName="act"title={t('item.copy')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => { e.stopPropagation(); e.currentTarget.blur(); onCopy(e) }}><CopyIcon />@@ -654,6 +661,7 @@ function BundleToolbar({<buttonclassName="act danger"title={t('item.delete')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => { e.stopPropagation(); e.currentTarget.blur(); onRemove() }}><TrashIcon />@@ -690,6 +698,7 @@ function HorizontalBundleExpanded({<divclassName="horizontal-bundle-header"title={t('item.collapsePinned')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()onCollapse(e)@@ -699,6 +708,7 @@ function HorizontalBundleExpanded({type="button"className="bundle-collapse-hit"title={t('item.collapsePinned')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.currentTarget.blur()@@ -707,10 +717,11 @@ function HorizontalBundleExpanded({><ChevronLeftIcon /></button>- <div className="actions-pill" onClick={(e) => e.stopPropagation()}>+ <div className="actions-pill" onPointerDown={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}><buttonclassName={`act${item.pinned ? ' active' : ''}`}title={item.pinned ? t('item.unpin') : t('item.pin')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.currentTarget.blur()@@ -723,6 +734,7 @@ function HorizontalBundleExpanded({<buttonclassName={`act${isPreviewing ? ' preview-contract active' : ' preview-expand'}`}title={isPreviewing ? t('header.close') : t('item.expand')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.preventDefault()@@ -738,6 +750,7 @@ function HorizontalBundleExpanded({<buttonclassName="act"title={t('item.copy')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => { e.stopPropagation(); e.currentTarget.blur(); onCopy(e) }}><CopyIcon width={12} height={12} />@@ -745,6 +758,7 @@ function HorizontalBundleExpanded({<buttonclassName="act danger"title={t('item.delete')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => { e.stopPropagation(); e.currentTarget.blur(); onRemove() }}><TrashIcon width={12} height={12} />@@ -1000,12 +1014,12 @@ function BundleFluidPreview({const entries = item.data.entriesconst paths = item.data.pathsconst count = paths.length- const photoSize = isHorizontal ? 88 : 132+ const photoSize = isHorizontal ? 80 : 100return (<BundleExpandShellexpanded={expanded}stack={- <>+ <div className="file-card-viewport bundle-viewport"><div className="bundle-stack-large" style={isHorizontal ? { height: 90 } : undefined}>{paths.slice(0, 4).map((filePath, i) => ({ filePath, pathIndex: i })).reverse().map(({ filePath, pathIndex }, idx, arr) => {const realIndex = arr.length - 1 - idx@@ -1054,7 +1068,7 @@ function BundleFluidPreview({) : (<div className="bundle-more-label">{t('item.singleFile')}</div>)}- </>+ </div>}list={<>@@ -1285,21 +1299,24 @@ function MiniImageFolderCard({preserveAspectRatio="none"><path- d="M 0,74 L 0,6 Q 0,0 6,0 L 46,0 C 56,0 63,6 68,12 C 73,18 80,24 90,24 L 234,24 Q 240,24 240,30 L 240,74 Z"+ d="M 0,74 L 0,6 Q 0,0 6,0 L 64,0 C 74,0 80,6 85,12 C 90,18 96,24 106,24 L 234,24 Q 240,24 240,30 L 240,74 Z"/></svg><div className="mini-image-folder-flap-content">- <div className="mini-image-folder-flap-header" />+ <div className="mini-image-folder-flap-header">+ <span className="kind-badge file-elevated-badge" style={{ color: '#06B6D4' }}>+ {t('filters.images').toLowerCase().slice(0, -1) || t('filters.images').toLowerCase()}+ </span>+ </div><div className="mini-image-folder-flap-footer"><div className="mini-image-folder-meta">- <span className="kind-badge">{t('filters.images').toLowerCase().slice(0, -1) || t('filters.images').toLowerCase()}</span>{displayName && (<span className="mini-image-folder-source-name" title={displayName}>- · {displayName}+ {displayName}</span>)}- {copied && <span className="meta-copied">· {t('item.copied')}</span>}+ {copied && <span className="meta-copied">{(displayName ? ' · ' : '') + t('item.copied')}</span>}</div>{size && <span className="mini-image-folder-size">{size}</span>}</div>@@ -1307,10 +1324,11 @@ function MiniImageFolderCard({</div>{/* Hover Action Buttons (Copy, Ungroup) */}- <div className="mini-image-folder-actions" onClick={(e) => e.stopPropagation()}>+ <div className="mini-image-folder-actions" onPointerDown={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}><buttonclassName="act"title={isImgCol ? t('item.copy') : t('item.copyFilePath')}+ onPointerDown={(e) => e.stopPropagation()}onClick={handleCopy}><CopyIcon width={11} height={11} />@@ -1318,6 +1336,7 @@ function MiniImageFolderCard({<buttonclassName="act danger"title={t('item.ungroup')}+ onPointerDown={(e) => e.stopPropagation()}onClick={handleUngroup}><MinusIcon width={11} height={11} />@@ -1358,7 +1377,7 @@ function ImageFolderCard({const displayCount = Math.min(count, 4)const displayImages = isStack ? images.slice(0, 4) : images- // Meta details for footer+ // Meta details for elevated tab header and footer namelet badgeText = ''let metaDetail = ''@@ -1370,9 +1389,9 @@ function ImageFolderCard({}} else {badgeText = `${count} ${t('filters.images').toLowerCase()}`- const totalBytes = images.reduce((sum, img) => sum + (img.bytes || 0), 0)- if (totalBytes > 0) {- metaDetail = formatBytes(totalBytes)+ const firstNonGeneric = images.find((img) => img.name && img.name !== 'clipboard' && !img.name.startsWith('image-'))?.name+ if (firstNonGeneric) {+ metaDetail = firstNonGeneric}}@@ -1397,7 +1416,12 @@ function ImageFolderCard({) : (<div className="preview">[{t('item.imageItem')}]</div>)- ) : !expanded ? (+ ) : (+ <StackExpandSwap+ expanded={expanded}+ deckKey="img-stack-deck"+ panelKey="img-stack-panel"+ deck={<div className="image-folder-stack-deck" data-count={displayCount}>{displayImages.map((img, idx) => (<div@@ -1419,12 +1443,14 @@ function ImageFolderCard({</div>))}</div>- ) : (+ }+ panel={<div className="image-folder-expanded-content">{/* Top Header inside Expanded Blue Viewport */}<divclassName="image-folder-expanded-top-bar"title={t('item.collapsePinned')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()onCollapse?.(e)@@ -1434,6 +1460,7 @@ function ImageFolderCard({type="button"className="image-folder-collapse-btn"title={t('item.collapsePinned')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.currentTarget.blur()@@ -1445,10 +1472,11 @@ function ImageFolderCard({<span className="image-folder-expanded-title">{count} {t('filters.images').toLowerCase()}</span>- <div className="actions-pill" onClick={(e) => e.stopPropagation()}>+ <div className="actions-pill" onPointerDown={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}><buttonclassName={`act${item.pinned ? ' active' : ''}`}title={item.pinned ? t('item.unpin') : t('item.pin')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.currentTarget.blur()@@ -1461,6 +1489,7 @@ function ImageFolderCard({<buttonclassName={`act${isPreviewing ? ' preview-contract active' : ' preview-expand'}`}title={isPreviewing ? t('header.close') : t('item.expand')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.preventDefault()@@ -1476,6 +1505,7 @@ function ImageFolderCard({<buttonclassName="act"title={t('item.copy')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.currentTarget.blur()@@ -1487,6 +1517,7 @@ function ImageFolderCard({<buttonclassName="act danger"title={t('item.delete')}+ onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation()e.currentTarget.blur()@@ -1525,44 +1556,531 @@ function ImageFolderCard({))}</div>)}- </div>+ </div>+ }+ />)}</div>{/* Solid Black Folder Flap (NO stroke/borders, smooth curved silhouette) */}- <div className="image-folder-flap-wrap">- <svg- className="image-folder-flap-svg"- viewBox="0 0 240 74"- preserveAspectRatio="none"- >- <path- d="M 0,74 L 0,6 Q 0,0 6,0 L 46,0 C 56,0 63,6 68,12 C 73,18 80,24 90,24 L 234,24 Q 240,24 240,30 L 240,74 Z"+ {(!expanded || !isStack) && (+ <div className="image-folder-flap-wrap">+ <svg+ className="image-folder-flap-svg"+ viewBox="0 0 240 74"+ preserveAspectRatio="none"+ >+ <path+ d="M 0,74 L 0,6 Q 0,0 6,0 L 64,0 C 74,0 80,6 85,12 C 90,18 96,24 106,24 L 234,24 Q 240,24 240,30 L 240,74 Z"+ />+ </svg>++ <div className="image-folder-flap-content">+ {/* Elevated Tab Area: shows type badge (image, 3 images, etc.) */}+ <div className="image-folder-flap-header">+ <span className="kind-badge file-elevated-badge" style={{ color: '#06B6D4' }}>+ {badgeText}+ </span>+ </div>++ {/* Flap Footer: Left side shows image source/file name, Right side shows relative time */}+ <div className="image-folder-flap-footer">+ <div className="image-folder-meta">+ {metaDetail && (+ <span className="image-folder-source-name file-name-meta" title={metaDetail}>+ {metaDetail}+ </span>+ )}+ {item.hitCount > 1 && (+ <span className="meta-hit-count" title={t('item.copiedTimes', { count: item.hitCount })}>+ {metaDetail ? ' · ×' : '×'}{item.hitCount}+ </span>+ )}+ {copied && <span className="meta-copied">{(metaDetail || item.hitCount > 1) ? ' · ' : ''}{t('item.copied')}</span>}+ </div>+ <RelativeTime capturedAt={item.capturedAt} />+ </div>+ </div>+ </div>+ )}+ </div>+ )+}++/* ------------------------------------------------------------------ */+/* Mini File Folder Card (For Expanded File Stacks) */+/* ------------------------------------------------------------------ */++/* ------------------------------------------------------------------ */+/* Stack expand/collapse swap */+/* ------------------------------------------------------------------ */++/**+ * Animated swap between a stack's collapsed deck and its expanded rows.+ *+ * Deliberately GPU-only (opacity + translate): animating height on these+ * cards janks because every frame re-layouts up to 10 rows of large+ * gradient SVGs and disk-loaded images. The height snaps instantly under+ * a short fade/slide so the eye tracks the content motion, not the jump.+ * Honors the reduced-motion setting.+ */+function StackExpandSwap({+ expanded,+ deckKey,+ panelKey,+ deck,+ panel+}: {+ expanded: boolean+ deckKey: string+ panelKey: string+ deck: React.ReactNode+ panel: React.ReactNode+}) {+ const reduceMotion = useStore((s) => !!s.settings.reduceMotion)+ if (reduceMotion) return <>{expanded ? panel : deck}</>+ // Enter-only animation: the outgoing side unmounts instantly and the+ // incoming side fades/slides in. No exit overlap — keeping an exiting+ // panel in flow balloons the card (panel height + deck height) then snaps,+ // which is exactly what made closing feel broken.+ return (+ <motion.div+ key={expanded ? panelKey : deckKey}+ className={expanded ? 'stack-expand-panel' : 'stack-collapse-deck'}+ initial={{ opacity: 0, y: expanded ? -10 : 0 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ duration: expanded ? 0.22 : 0.15, ease: 'easeOut' }}+ >+ {expanded ? panel : deck}+ </motion.div>+ )+}++function MiniFileFolderCard({+ item,+ filePath,+ subEntry,+ isHorizontal,+ onDragStart+}: {+ item: ClipboardItemDto+ filePath: string+ subEntry?: any+ isHorizontal?: boolean+ onDragStart?: (e: React.DragEvent, req: DragRequest) => void+}) {+ const { t } = useTranslation()+ const [copied, setCopied] = useState(false)+ const subReq = { id: item.id, paths: [filePath] }+ const name = formatImageDisplayName(subEntry?.name ?? filePath, item.capturedAt) || basename(filePath)+ const subInfo = getFileKind(filePath, subEntry?.isDirectory)+ const isImage = !subEntry?.isDirectory && (subEntry?.isImage || subInfo.kind === 'image')+ const imgSrc = subEntry?.preview || `edgelocal://file/${encodeURIComponent(filePath.replace(/\\/g, '/'))}`+ const dims = subEntry?.width && subEntry?.height ? `${subEntry.width}×${subEntry.height}` : ''+ const size = !subEntry?.isDirectory && subEntry?.size ? formatBytes(subEntry.size) : ''+ const displayFooterName = isImage ? (name && name !== 'clipboard' && !name.startsWith('image-') ? name : dims || 'image') : name++ const handleCopy = (e: React.MouseEvent<HTMLButtonElement>) => {+ e.stopPropagation()+ e.currentTarget.blur()+ playButtonClickSound()+ useStore.getState().copySubitem(subReq)+ setCopied(true)+ setTimeout(() => setCopied(false), 900)+ }++ const handleUngroup = (e: React.MouseEvent<HTMLButtonElement>) => {+ e.stopPropagation()+ e.currentTarget.blur()+ playDeleteSound()+ window.edge.splitItem({ id: item.id, paths: [filePath], splitPlacement: 'after' })+ }++ const handlePaste = (e: React.MouseEvent) => {+ e.stopPropagation()+ tryPaste(() => {+ window.edge.pasteSubitem(subReq)+ })+ }++ return (+ <motion.div+ className="mini-image-folder-card"+ variants={rowVariants}+ draggable+ onMouseEnter={() => window.edge.prestageDrag(subReq)}+ onPointerDown={() => window.edge.prestageDrag(subReq)}+ onDragStartCapture={(e: any) => {+ e.stopPropagation()+ onDragStart?.(e, subReq)+ }}+ onClick={handlePaste}+ >+ {copied && (+ <motion.div+ key="copy-ripple"+ initial={{ opacity: 0.75, scale: 0.2 }}+ animate={{ opacity: 0, scale: 1.6 }}+ transition={{ duration: 0.45, ease: [0.16, 1, 0.3, 1] }}+ style={{+ position: 'absolute',+ inset: 0,+ borderRadius: 12,+ background: 'radial-gradient(circle at center, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 45%, transparent 75%)',+ pointerEvents: 'none',+ zIndex: 15+ }}+ />+ )}+ <div className="mini-image-folder-card-inner">+ {/* Blue Gradient Viewport */}+ <div className="mini-image-folder-viewport">+ {isImage ? (+ <img+ className="mini-image-folder-thumb"+ src={imgSrc}+ onError={(e) => {+ const fallback = `edgelocal://file/${encodeURIComponent(filePath.replace(/\\/g, '/'))}`+ if (e.currentTarget.src !== fallback) {+ e.currentTarget.src = fallback+ }+ }}+ alt=""+ loading="lazy"+ decoding="async"+ draggable={false}+ />+ ) : (+ <div className="single-file-hero" style={{ color: subInfo.color, width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>+ <FileKindIcon+ path={filePath}+ isDirectory={subEntry?.isDirectory}+ width={isHorizontal ? 58 : 154}+ height={isHorizontal ? 58 : 154}+ />+ </div>+ )}+ </div>++ {/* Solid Black Curved Flap */}+ <div className="mini-image-folder-flap-wrap">+ <svg+ className="mini-image-folder-flap-svg"+ viewBox="0 0 240 74"+ preserveAspectRatio="none"+ >+ <path+ d="M 0,74 L 0,6 Q 0,0 6,0 L 64,0 C 74,0 80,6 85,12 C 90,18 96,24 106,24 L 234,24 Q 240,24 240,30 L 240,74 Z"+ />+ </svg>++ <div className="mini-image-folder-flap-content">+ <div className="mini-image-folder-flap-header">+ <span className="kind-badge file-elevated-badge" style={{ color: isImage ? '#06B6D4' : subInfo.color }}>+ {isImage ? (t('filters.images').toLowerCase().slice(0, -1) || 'image') : subInfo.label.toLowerCase()}+ </span>+ </div>+ <div className="mini-image-folder-flap-footer">+ <div className="mini-image-folder-meta">+ {displayFooterName && (+ <span className="mini-image-folder-source-name" title={displayFooterName}>+ {displayFooterName}+ </span>+ )}+ {copied && <span className="meta-copied">{(displayFooterName ? ' · ' : '') + t('item.copied')}</span>}+ </div>+ {size && <span className="mini-image-folder-size">{size}</span>}+ </div>+ </div>+ </div>++ {/* Hover Action Buttons (Copy, Ungroup) */}+ <div className="mini-image-folder-actions" onPointerDown={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}>+ <button+ className="act"+ title={t('item.copyFilePath')}+ onPointerDown={(e) => e.stopPropagation()}+ onClick={handleCopy}+ >+ <CopyIcon width={11} height={11} />+ </button>+ <button+ className="act danger"+ title={t('item.ungroup')}+ onPointerDown={(e) => e.stopPropagation()}+ onClick={handleUngroup}+ >+ <MinusIcon width={11} height={11} />+ </button>+ </div>+ </div>+ </motion.div>+ )+}++/* ------------------------------------------------------------------ */+/* File Folder Card (Framed File / Folder / Stack in Blue Folder Card) */+/* ------------------------------------------------------------------ */++function FileFolderCard({+ item,+ copied = false,+ expanded = false,+ isHorizontal = false,+ onDragStart,+ onCopy,+ onRemove,+ onCollapse+}: {+ item: ClipboardItemDto+ copied?: boolean+ expanded?: boolean+ isHorizontal?: boolean+ onDragStart?: (e: React.DragEvent, req: DragRequest) => void+ onCopy?: (e: React.MouseEvent) => void+ onRemove?: () => void+ onCollapse?: (e?: React.MouseEvent) => void+}) {+ const { t } = useTranslation()+ const isPreviewing = useStore((s) => s.previewItemId) === item.id+ if (item.data.kind !== 'files') return null++ const paths = item.data.paths+ const entries = item.data.entries+ const count = paths.length+ const isStack = count > 1+ const first = paths[0]+ const entry = entries?.[0]+ const rawName = formatImageDisplayName(entry?.name ?? first, item.capturedAt) || basename(first)+ const info = getFileKind(first, entry?.isDirectory)++ const label = isStack ? `${count} ${t('filters.files').toLowerCase()}` : info.label.toLowerCase()+ const badgeColor = isStack ? undefined : info.color++ return (+ <div className={`image-folder-card-inner${expanded && isStack ? ' is-expanded-folder' : ''}`}>+ <div className={`image-folder-viewport${expanded && isStack ? ' is-expanded-viewport' : ''}`}>+ {!isStack ? (+ (!entry?.isDirectory && (entry?.isImage || info.kind === 'image')) ? (+ <img+ className="image-folder-thumb"+ src={entry?.preview || `edgelocal://file/${encodeURIComponent(first.replace(/\\/g, '/'))}`}+ onError={(e) => {+ const fallback = `edgelocal://file/${encodeURIComponent(first.replace(/\\/g, '/'))}`+ if (e.currentTarget.src !== fallback) {+ e.currentTarget.src = fallback+ }+ }}+ alt=""+ loading="lazy"+ decoding="async"+ draggable={false}+ />+ ) : (+ <div className="single-file-hero" style={{ color: info.color }}>+ <FileKindIcon path={first} isDirectory={entry?.isDirectory} width={isHorizontal ? 116 : 140} height={isHorizontal ? 116 : 140} />+ </div>+ )+ ) : (+ <StackExpandSwap+ expanded={expanded}+ deckKey="file-stack-deck"+ panelKey="file-stack-panel"+ deck={+ <div className="image-folder-stack-deck" data-count={Math.min(count, 4)}>+ {paths.slice(0, 4).map((filePath, idx) => {+ const fileEntry = entries?.[idx]+ const fileInfo = getFileKind(filePath, fileEntry?.isDirectory)+ const isImg = !fileEntry?.isDirectory && (fileEntry?.isImage || fileInfo.kind === 'image')+ const iconSize = isHorizontal ? 142 : 160+ const imgSrc = fileEntry?.preview || `edgelocal://file/${encodeURIComponent(filePath.replace(/\\/g, '/'))}`+ return (+ <div+ key={`${item.id}-${filePath}-${idx}`}+ className={`image-folder-stack-item ${isImg ? '' : 'file-stack-item '}pos-${idx}`}+ style={{ color: fileInfo.color }}+ >+ {isImg ? (+ <img+ src={imgSrc}+ onError={(e) => {+ const fallback = `edgelocal://file/${encodeURIComponent(filePath.replace(/\\/g, '/'))}`+ if (e.currentTarget.src !== fallback) {+ e.currentTarget.src = fallback+ }+ }}+ alt=""+ loading="lazy"+ decoding="async"+ draggable={false}+ />+ ) : (+ <FileKindIcon path={filePath} isDirectory={fileEntry?.isDirectory} width={iconSize} height={iconSize} />+ )}+ </div>+ )+ })}+ </div>+ }+ panel={+ <div className="image-folder-expanded-content">+ {/* Top Header inside Expanded Blue Viewport */}+ <div+ className="image-folder-expanded-top-bar"+ title={t('item.collapsePinned')}+ onPointerDown={(e) => e.stopPropagation()}+ onClick={(e) => {+ e.stopPropagation()+ onCollapse?.(e)+ }}+ >+ <button+ type="button"+ className="image-folder-collapse-btn"+ title={t('item.collapsePinned')}+ onPointerDown={(e) => e.stopPropagation()}+ onClick={(e) => {+ e.stopPropagation()+ e.currentTarget.blur()+ onCollapse?.(e)+ }}+ >+ {isHorizontal ? <ChevronLeftIcon width={13} height={13} /> : <ChevronUpIcon width={13} height={13} />}+ </button>+ <span className="image-folder-expanded-title">+ {count} {t('filters.files').toLowerCase()}+ </span>+ <div className="actions-pill" onPointerDown={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}>+ <button+ className={`act${item.pinned ? ' active' : ''}`}+ title={item.pinned ? t('item.unpin') : t('item.pin')}+ onPointerDown={(e) => e.stopPropagation()}+ onClick={(e) => {+ e.stopPropagation()+ e.currentTarget.blur()+ playToggleSound(!item.pinned)+ useStore.getState().togglePin(item.id, !item.pinned)+ }}+ >+ {item.pinned ? <PinFillIcon width={12} height={12} /> : <PinIcon width={12} height={12} />}+ </button>+ <button+ className={`act${isPreviewing ? ' preview-contract active' : ' preview-expand'}`}+ title={isPreviewing ? t('header.close') : t('item.expand')}+ onPointerDown={(e) => e.stopPropagation()}+ onClick={(e) => {+ e.stopPropagation()+ e.preventDefault()+ e.currentTarget.blur()+ playCardExpandSound(!isPreviewing)+ const rect = e.currentTarget.closest('.item-main, .item')?.getBoundingClientRect()+ const rectData = rect ? { x: rect.x, y: rect.y, width: rect.width, height: rect.height } : undefined+ useStore.getState().setPreviewItemId(isPreviewing ? null : item.id, rectData)+ }}+ >+ {isPreviewing ? <ContractIcon width={12} height={12} /> : <ExpandIcon width={12} height={12} />}+ </button>+ <button+ className="act"+ title={t('item.copy')}+ onPointerDown={(e) => e.stopPropagation()}+ onClick={(e) => {+ e.stopPropagation()+ e.currentTarget.blur()+ onCopy?.(e)+ }}+ >+ <CopyIcon width={12} height={12} />+ </button>+ <button+ className="act danger"+ title={t('item.delete')}+ onPointerDown={(e) => e.stopPropagation()}+ onClick={(e) => {+ e.stopPropagation()+ e.currentTarget.blur()+ playDeleteSound()+ onRemove?.()+ }}+ >+ <TrashIcon width={12} height={12} />+ </button>+ </div>+ </div>++ {/* List / Track of Subitems */}+ {isHorizontal ? (+ <div className="image-stack-expanded-track" onClick={(e) => e.stopPropagation()}>+ {paths.map((filePath, index) => (+ <MiniFileFolderCard+ key={`${item.id}-${filePath}-${index}`}+ item={item}+ filePath={filePath}+ subEntry={entries?.[index]}+ isHorizontal={isHorizontal}+ onDragStart={onDragStart}+ />+ ))}+ </div>+ ) : (+ <div className="image-stack-expanded-list" onClick={(e) => e.stopPropagation()}>+ {paths.map((filePath, index) => (+ <MiniFileFolderCard+ key={`${item.id}-${filePath}-${index}`}+ item={item}+ filePath={filePath}+ subEntry={entries?.[index]}+ isHorizontal={isHorizontal}+ onDragStart={onDragStart}+ />+ ))}+ </div>+ )}+ </div>+ }/>- </svg>+ )}+ </div>- <div className="image-folder-flap-content">- <div className="image-folder-flap-header" />+ {/* Solid Black Folder Flap */}+ {(!expanded || !isStack) && (+ <div className="image-folder-flap-wrap">+ <svg+ className="image-folder-flap-svg"+ viewBox="0 0 240 74"+ preserveAspectRatio="none"+ >+ <path+ d="M 0,74 L 0,6 Q 0,0 6,0 L 64,0 C 74,0 80,6 85,12 C 90,18 96,24 106,24 L 234,24 Q 240,24 240,30 L 240,74 Z"+ />+ </svg>- <div className="image-folder-flap-footer">- <div className="image-folder-meta">- <span className="kind-badge">{badgeText}</span>- {metaDetail && (- <span className="image-folder-source-name" title={metaDetail}>- · {metaDetail}- </span>- )}- {item.hitCount > 1 && (- <span className="meta-hit-count" title={t('item.copiedTimes', { count: item.hitCount })}>- · ×{item.hitCount}+ <div className="image-folder-flap-content">+ {/* Elevated Tab Area: shows type badge (pdf, folder, doc, 3 files, etc.) */}+ <div className="image-folder-flap-header">+ <span className="kind-badge file-elevated-badge" style={{ color: badgeColor }}>+ {label}+ </span>+ </div>++ {/* Flap Footer: Left side shows file name, Right side shows relative time */}+ <div className="image-folder-flap-footer">+ <div className="image-folder-meta">+ <span className="image-folder-source-name file-name-meta" title={rawName}>+ {rawName}</span>- )}- {copied && <span className="meta-copied">· {t('item.copied')}</span>}+ {item.hitCount > 1 && (+ <span className="meta-hit-count" title={t('item.copiedTimes', { count: item.hitCount })}>+ · ×{item.hitCount}+ </span>+ )}+ {copied && <span className="meta-copied">· {t('item.copied')}</span>}+ </div>+ <RelativeTime capturedAt={item.capturedAt} /></div>- <RelativeTime capturedAt={item.capturedAt} /></div></div>- </div>+ )}</div>)}@@ -1663,16 +2181,13 @@ function Preview({ item }: { item: ClipboardItemDto }) {</>)}- // Non-image single file — show hero icon on top, and name on the bottom!+ // Non-image single file — show hero icon on top in viewportconst info = getFileKind(first, entry?.isDirectory)return (<div className="single-file-preview">- <div className="single-file-hero" style={{ color: info.color }}>- <FileKindIcon path={first} isDirectory={entry?.isDirectory} />- </div>- <div className="single-file-meta">- <div className="preview single single-file-name" title={displayName}>- {displayName}+ <div className="file-card-viewport">+ <div className="single-file-hero" style={{ color: info.color }}>+ <FileKindIcon path={first} isDirectory={entry?.isDirectory} width={154} height={154} /></div></div></div>@@ -1766,6 +2281,19 @@ function ItemDetails({ item }: { item: ClipboardItemDto }) {case 'files': {const entries = item.data.entries+ const paths = item.data.paths+ const count = paths.length+ if (count === 1) {+ const first = paths[0]+ const rawName = entries?.[0]?.name ?? basename(first)+ const size = entries?.[0]?.size+ return (+ <>+ <span className="meta-detail file-name-meta" title={rawName}>· {rawName}</span>+ {size && size > 0 && <span className="meta-detail">· {formatBytes(size)}</span>}+ </>+ )+ }const totalBytes = entries?.reduce((acc, e) => acc + (e.size || 0), 0) || 0return totalBytes > 0 ? <span className="meta-detail">· {formatBytes(totalBytes)}</span> : null}diff --git a/src/components/CustomFileIcon.tsx b/src/components/CustomFileIcon.tsxindex 777363c..2c20f71 100644--- a/src/components/CustomFileIcon.tsx+++ b/src/components/CustomFileIcon.tsx@@ -1,7 +1,7 @@-import { useId, useEffect, useState, type SVGProps, type JSX } from 'react'-import { getFileKind, getFileKindByExt, extOf, type FileKind } from '../lib/fileType'+import { useState, type ImgHTMLAttributes, type SVGProps, type JSX } from 'react'+import { getFileKind, getFileKindByExt, extOf, fileIconUrl, type FileKind } from '../lib/fileType'-export interface CustomFileIconProps extends SVGProps<SVGSVGElement> {+export interface CustomFileIconProps extends ImgHTMLAttributes<HTMLImageElement> {ext?: stringpath?: stringkind?: FileKind@@ -95,8 +95,10 @@ function renderMicroIcon(kind: FileKind, color: string): JSX.Element {}/**- * 3D Layered Category-Based Pastel Folder Icon Suite- * 1:1 Implementation of the exact SVG designs in "new icons" directory.+ * Vintage textured folder icons (PNG, resources/file-icons, served over+ * edgelocal://icon/). One static file per kind — no per-mount SVG+ * construction, gradients, or unique gradient IDs. The <=16px micro vector+ * path stays for tiny badges where a raster would soften.*/export function CustomFileIcon({ext,@@ -108,9 +110,9 @@ export function CustomFileIcon({height,style,className,+ alt = '',...rest}: CustomFileIconProps): JSX.Element {- const uid = useId().replace(/:/g, '')const numericWidth = typeof width === 'number' ? width : parseInt(String(width), 10) || 32const resolvedHeight = height ?? width@@ -125,7 +127,7 @@ export function CustomFileIcon({? getFileKindByExt(resolvedExt): path? getFileKind(path, isDir)- : { kind: 'file' as FileKind, color: '#B0C0D0', label: 'FILE' }+ : { kind: 'file' as FileKind, color: '#E2E8F0', label: 'FILE' }const kind: FileKind = explicitKind ?? info.kind@@ -145,494 +147,103 @@ export function CustomFileIcon({flexShrink: 0,...style}}- {...rest}+ {...(rest as SVGProps<SVGSVGElement>)}>{renderMicroIcon(kind, info.color)}</svg>)}- const folderShadowId = `folderShadow-${uid}`- const sheetShadowId = `sheetShadow-${uid}`- const glyphShadowId = `glyphShadow-${uid}`-- // Common SVG wrapper props- const svgProps = {- xmlns: 'http://www.w3.org/2000/svg',- viewBox: '0 0 512 512',- width,- height: resolvedHeight,- fill: 'none',- className,- style: {- display: 'inline-block',- verticalAlign: 'middle',- flexShrink: 0,- ...style- },- ...rest- }-- // 1. Folders (folder svg icon.svg)- if (kind === 'folder') {- return (- <svg {...svgProps}>- <defs>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#D97706" floodOpacity="0.12" />- </filter>- </defs>- <g>- {/* 1. Folder Back Plate & Tab */}- <path- d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z"- fill="#FDE68A"- />- {/* 2. Paper Sheet Peeking Inside */}- <path- d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z"- fill="#FFFDF5"- />- {/* 3. Clean Yellow Front Flap */}- <path- d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z"- fill="#FBBF24"- />- </g>- </svg>- )- }-- // 2. Executable / Installer Files (.exe, .msi, .apk, etc. - exe svg icon.svg)- if (kind === 'executable') {- return (- <svg {...svgProps}>- <defs>- <filter id={glyphShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#3730A3" floodOpacity="0.22" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#4338CA" floodOpacity="0.12" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#C7D2FE" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F5F7FF" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#93A4FC" />- <g>- <g stroke="#FFFFFF" strokeWidth="8" strokeLinecap="round">- <line x1="226" y1="235" x2="226" y2="218" />- <line x1="256" y1="235" x2="256" y2="218" />- <line x1="286" y1="235" x2="286" y2="218" />- <line x1="226" y1="343" x2="226" y2="360" />- <line x1="256" y1="343" x2="256" y2="360" />- <line x1="286" y1="343" x2="286" y2="360" />- <line x1="202" y1="259" x2="185" y2="259" />- <line x1="202" y1="289" x2="185" y2="289" />- <line x1="202" y1="319" x2="185" y2="319" />- <line x1="310" y1="259" x2="327" y2="259" />- <line x1="310" y1="289" x2="327" y2="289" />- <line x1="310" y1="319" x2="327" y2="319" />- </g>- <rect x="202" y="235" width="108" height="108" rx="20" fill="#FFFFFF" />- <rect x="226" y="259" width="60" height="60" rx="12" fill="#93A4FC" />- </g>- </g>- </svg>- )- }-- // 3. Audio Files (.mp3, .wav, .flac, etc. - audio svg icon.svg)- if (kind === 'audio') {- return (- <svg {...svgProps}>- <defs>- <filter id={glyphShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#6B21A8" floodOpacity="0.22" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#7E22CE" floodOpacity="0.12" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#E2D0FE" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FAF5FF" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#C495FD" />- <g transform="translate(167.8, 190.6) scale(12)" fill="#FFFFFF">- <path d="M 10.888 2.518 L 6.132 3.477 C 5.98 3.508 5.86 3.565 5.76 3.65 C 5.66 3.735 5.6 3.86 5.6 4.02 C 5.596 4.047 5.59 4.1 5.59 4.18 L 5.59 10.132 C 5.59 10.272 5.578 10.407 5.484 10.522 C 5.389 10.637 5.274 10.672 5.137 10.699 L 4.827 10.762 C 4.434 10.842 4.177 10.895 3.946 10.985 C 3.738 11.066 3.555 11.186 3.427 11.318 C 3.25 11.5 3.12 11.75 3.095 12.313 C 3.126 12.61 3.261 12.895 3.49 13.105 C 3.646 13.247 3.84 13.355 4.068 13.401 C 4.304 13.448 4.558 13.432 4.926 13.358 C 5.122 13.318 5.306 13.256 5.481 13.153 C 5.656 13.05 5.81 12.89 5.919 12.748 C 6.028 12.606 6.12 12.36 6.152 12.198 C 6.194 11.996 6.204 11.812 6.204 11.61 L 6.204 6.347 C 6.204 6.071 6.284 5.997 6.506 5.943 C 6.53 5.938 10.46 5.146 10.644 5.11 C 10.901 5.061 11.022 5.135 11.022 5.404 L 11.022 8.928 C 11.022 9.068 11.021 9.208 10.926 9.324 C 10.832 9.439 10.715 9.474 10.578 9.502 L 10.268 9.564 C 9.875 9.644 9.619 9.697 9.388 9.787 C 9.18 9.868 8.997 9.988 8.868 10.121 C 8.69 10.3 8.56 10.55 8.528 11.115 C 8.558 11.412 8.702 11.697 8.932 11.907 C 9.088 12.049 9.282 12.157 9.51 12.203 C 9.745 12.25 10 12.234 10.367 12.16 C 10.564 12.12 10.747 12.058 10.923 11.955 C 11.098 11.852 11.251 11.692 11.361 11.55 C 11.467 11.393 11.546 11.206 11.594 11 C 11.636 10.798 11.646 10.614 11.646 10.412 L 11.646 2.812 C 11.646 2.666 11.593 2.562 11.486 2.502 C 11.38 2.44 11.19 2.456 10.888 2.518 Z" />- </g>- </g>- </svg>- )- }-- // 4. Code & Developer Files (.js, .ts, .py, .html, .css, etc. - code svg icon.svg)- if (kind === 'code') {- return (- <svg {...svgProps}>- <defs>- <filter id={glyphShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#0369A1" floodOpacity="0.18" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#0284C7" floodOpacity="0.12" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#86DDFB" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F0FBFF" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#53CAF7" />- <g fill="none" stroke="#FFFFFF" strokeWidth="16" strokeLinecap="round" strokeLinejoin="round">- <path d="M 200 240 L 156 289 L 200 338" />- <line x1="282" y1="222" x2="230" y2="356" />- <path d="M 312 240 L 356 289 L 312 338" />- </g>- </g>- </svg>- )- }-- // 5. Word Documents (.doc, .docx, .odt, etc. - doc svg icon.svg)- if (kind === 'word') {- return (- <svg {...svgProps}>- <defs>- <filter id={sheetShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#000000" floodOpacity="0.08" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#9DC5FA" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F2F7FE" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#7BAFF8" />- <g>- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#F2F7FE" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#7BAFF8" strokeWidth="7" strokeLinecap="round" strokeLinejoin="round" />- <path d="M214 252 L226 282 L238 260 L250 282 L262 252" fill="none" stroke="#7BAFF8" strokeWidth="7" strokeLinecap="round" strokeLinejoin="round" />- <line x1="210" y1="306" x2="302" y2="306" stroke="#7BAFF8" strokeWidth="7" strokeLinecap="round" />- <line x1="210" y1="328" x2="302" y2="328" stroke="#7BAFF8" strokeWidth="7" strokeLinecap="round" />- <line x1="210" y1="350" x2="258" y2="350" stroke="#7BAFF8" strokeWidth="7" strokeLinecap="round" />- </g>- </g>- </svg>- )- }-- // 6. Image Files (.png, .jpg, .webp, .svg, etc. - imge svg icon.svg)- if (kind === 'image') {- return (- <svg {...svgProps}>- <defs>- <filter id={glyphShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#6B4F3B" floodOpacity="0.22" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#8C6A4F" floodOpacity="0.14" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#DFCEBC" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFFDF9" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#BA9B7B" />- <g>- <circle cx="272" cy="260" r="14" fill="#FFFFFF" />- <path d="M 178 346 L 178 326 L 230 274 L 266 308 L 298 282 L 334 324 L 334 346 Z" fill="#FFFFFF" />- <rect x="176" y="228" width="160" height="122" rx="18" fill="none" stroke="#FFFFFF" strokeWidth="12" />- </g>- </g>- </svg>- )- }-- // 7. PDF Documents (.pdf - pdf svg icon.svg)- if (kind === 'pdf') {- return (- <svg {...svgProps}>- <defs>- <filter id={sheetShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#000000" floodOpacity="0.08" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FF92A0" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFF0F2" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FF7C8E" />- <g>- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#FFF0F2" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#FF7C8E" strokeWidth="7" strokeLinecap="round" strokeLinejoin="round" />- <g fill="none" stroke="#FF7C8E" strokeWidth="6" strokeLinecap="round" strokeLinejoin="round">- <path d="M216 288 V258 H230 C238 258 242 262 242 268 S238 278 230 278 H216" />- <path d="M252 258 V288 H264 C274 288 280 280 280 273 V273 C280 266 274 258 264 258 H252" />- <path d="M292 288 V258 H308 M292 273 H304" />- </g>- <line x1="208" y1="330" x2="304" y2="330" stroke="#FF7C8E" strokeWidth="7" strokeLinecap="round" />- <line x1="208" y1="352" x2="304" y2="352" stroke="#FF7C8E" strokeWidth="7" strokeLinecap="round" />- </g>- </g>- </svg>- )- }-- // 8. Presentation Slides (.ppt, .pptx, .key, etc. - ppt svg icon.svg)- if (kind === 'powerpoint') {- return (- <svg {...svgProps}>- <defs>- <filter id={sheetShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#000000" floodOpacity="0.08" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FFC492" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFF8F2" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FFA25B" />- <g>- <line x1="256" y1="306" x2="256" y2="368" stroke="#FFF8F2" strokeWidth="8" strokeLinecap="round" />- <line x1="256" y1="312" x2="222" y2="368" stroke="#FFF8F2" strokeWidth="8" strokeLinecap="round" />- <line x1="256" y1="312" x2="290" y2="368" stroke="#FFF8F2" strokeWidth="8" strokeLinecap="round" />- <rect x="182" y="196" width="148" height="14" rx="7" fill="#FFF8F2" />- <rect x="188" y="210" width="136" height="96" rx="8" fill="#FFF8F2" />- <path d="M 252 230 A 28 28 0 1 0 273 277 L 252 258 Z" fill="#FFA25B" />- <path d="M 260 228 A 28 28 0 0 1 288 255 L 260 255 Z" fill="#FFA25B" />- <path d="M 288 261 A 28 28 0 0 1 279 280 L 260 261 Z" fill="#FFA25B" />- </g>- </g>- </svg>- )- }-- // 9. Spreadsheet & Data Files (.xlsx, .xls, .csv, etc. - sheet svg icon.svg)- if (kind === 'excel') {- return (- <svg {...svgProps}>- <defs>- <filter id={sheetShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#000000" floodOpacity="0.08" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#7EE6BC" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F0FDF8" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#52D7A4" />- <g>- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#F0FDF8" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#52D7A4" strokeWidth="7" strokeLinecap="round" strokeLinejoin="round" />- <rect x="210" y="262" width="92" height="86" rx="8" fill="none" stroke="#52D7A4" strokeWidth="5" />- <line x1="210" y1="290" x2="302" y2="290" stroke="#52D7A4" strokeWidth="5" />- <line x1="210" y1="319" x2="302" y2="319" stroke="#52D7A4" strokeWidth="5" />- <line x1="241" y1="262" x2="241" y2="348" stroke="#52D7A4" strokeWidth="5" />- <line x1="271" y1="262" x2="271" y2="348" stroke="#52D7A4" strokeWidth="5" />- </g>- </g>- </svg>- )- }-- // 10. Plain Text & Notes (.txt, .md, .log, etc. - text svg icon.svg)- if (kind === 'text') {- return (- <svg {...svgProps}>- <defs>- <filter id={sheetShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#4A5F3B" floodOpacity="0.14" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#CEDDC3" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F8FAF6" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#8CA77B" />- <g>- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#F8FAF6" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#8CA77B" strokeWidth="7" strokeLinecap="round" strokeLinejoin="round" />- <line x1="210" y1="268" x2="256" y2="268" stroke="#8CA77B" strokeWidth="7" strokeLinecap="round" />- <line x1="210" y1="294" x2="300" y2="294" stroke="#8CA77B" strokeWidth="7" strokeLinecap="round" />- <line x1="210" y1="320" x2="300" y2="320" stroke="#8CA77B" strokeWidth="7" strokeLinecap="round" />- <line x1="210" y1="346" x2="276" y2="346" stroke="#8CA77B" strokeWidth="7" strokeLinecap="round" />- </g>- </g>- </svg>- )- }-- // 11. Video & Cinema Files (.mp4, .mkv, .mov, etc. - vidoe svg icon.svg)- if (kind === 'video') {- return (- <svg {...svgProps}>- <defs>- <filter id={sheetShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#1E293B" floodOpacity="0.14" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#94A3B8" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F8FAFC" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#64748B" />- <g>- <rect x="176" y="224" width="160" height="128" rx="20" fill="#F8FAFC" />- <rect x="192" y="240" width="16" height="16" rx="4" fill="#64748B" />- <rect x="192" y="266.67" width="16" height="16" rx="4" fill="#64748B" />- <rect x="192" y="293.33" width="16" height="16" rx="4" fill="#64748B" />- <rect x="192" y="320" width="16" height="16" rx="4" fill="#64748B" />- <rect x="216" y="240" width="80" height="96" rx="8" fill="#64748B" />- <rect x="304" y="240" width="16" height="16" rx="4" fill="#64748B" />- <rect x="304" y="266.67" width="16" height="16" rx="4" fill="#64748B" />- <rect x="304" y="293.33" width="16" height="16" rx="4" fill="#64748B" />- <rect x="304" y="320" width="16" height="16" rx="4" fill="#64748B" />- <path d="M 243 274 C 243 271 246.5 269 249.5 270.8 L 269.5 284.8 C 272.5 286.5 272.5 289.5 269.5 291.2 L 249.5 305.2 C 246.5 307 243 305 243 302 Z" fill="#FFFFFF" />- </g>- </g>- </svg>- )- }-- // 12. Compressed Archives (.zip, .rar, .7z, etc. - zip svg icon.svg)- if (kind === 'archive') {- return (- <svg {...svgProps}>- <defs>- <filter id={glyphShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#B45309" floodOpacity="0.22" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.05" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#D97706" floodOpacity="0.12" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FDE68A" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#FFFDF5" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#FBBF24" />- <g>- <line x1="256" y1="178" x2="256" y2="284" stroke="#FFFDF5" strokeWidth="6" strokeLinecap="round" />- <rect x="236" y="184" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="236" y="204" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="236" y="224" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="236" y="244" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="236" y="264" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="194" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="214" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="234" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="254" width="20" height="6" rx="3" fill="#FFFDF5" />- <rect x="256" y="274" width="20" height="6" rx="3" fill="#FFFDF5" />- <path d="M 242 282 L 270 282 C 274 282 277 285 277 289 L 275 304 C 275 310 277 314 273 320 L 260 327 C 257.5 328.5 254.5 328.5 252 327 L 239 320 C 235 314 237 310 237 304 L 235 289 C 235 285 238 282 242 282 Z" fill="#FFFDF5" />- <path d="M 249 314 C 249 311 251 309 254 309 L 258 309 C 261 309 263 311 263 314 L 264 346 C 266 354 275 362 275 374 C 275 384.5 266.5 393 256 393 C 245.5 393 237 384.5 237 374 C 237 362 246 354 248 346 Z" fill="#FFFDF5" />- <rect x="252" y="294" width="8" height="22" rx="4" fill="#FBBF24" />- <circle cx="256" cy="374" r="9" fill="#FBBF24" />- </g>- </g>- </svg>- )- }-- // 13. Generic / Uncategorized File Fallback (geniric svg icon.svg)return (- <svg {...svgProps}>- <defs>- <filter id={sheetShadowId} x="-20%" y="-20%" width="140%" height="140%">- <feDropShadow dx="0" dy="4" stdDeviation="5" floodColor="#000000" floodOpacity="0.06" />- <feDropShadow dx="0" dy="1" stdDeviation="2" floodColor="#000000" floodOpacity="0.04" />- </filter>- <filter id={folderShadowId} x="-10%" y="-10%" width="120%" height="120%">- <feDropShadow dx="0" dy="10" stdDeviation="16" floodColor="#475569" floodOpacity="0.12" />- </filter>- </defs>- <g>- <path d="M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#D4DFE9" />- <path d="M 74 162 L 74 152 C 74 147 78 143 83 143 L 429 143 C 434 143 438 147 438 152 L 438 162 Z" fill="#F8FAFC" />- <path d="M 56 168 C 56 156 65 148 76 148 L 436 148 C 447 148 456 156 456 168 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z" fill="#B0C0D0" />- <g>- <path d="M 204 200 C 195 200 188 207 188 216 L 188 364 C 188 373 195 380 204 380 L 308 380 C 317 380 324 373 324 364 L 324 244 C 324 240 322 236 319 233 L 291 205 C 288 202 284 200 280 200 Z" fill="#F8FAFC" />- <path d="M 281 201 L 281 232 C 281 238 286 243 292 243 L 323 243" fill="none" stroke="#B0C0D0" strokeWidth="7" strokeLinecap="round" strokeLinejoin="round" />- </g>- </g>- </svg>+ <img+ src={fileIconUrl(kind)}+ width={width}+ height={resolvedHeight}+ alt={alt}+ draggable={false}+ className={['file-kind-img', className].filter(Boolean).join(' ') || undefined}+ style={{+ display: 'inline-block',+ verticalAlign: 'middle',+ flexShrink: 0,+ // 3:2 art in the square boxes the vector icons used — letterbox,+ // never stretch. Transparent margins blend into the dark cards.+ objectFit: 'contain',+ ...style+ }}+ {...rest}+ />)}-/** Same 512 viewBox and body silhouette as FileKindIcon. */-const FILE_ICON_BODY =- 'M 56 378 L 56 128 C 56 112 68 100 84 100 L 162 100 C 178 100 190 108 200 120 C 208 130 218 136 232 136 L 428 136 C 444 136 456 148 456 164 L 456 378 C 456 396 442 410 424 410 L 88 410 C 70 410 56 396 56 378 Z'+const FOLDER_MASK_PATH =+ 'M 116 136 L 176 136 C 202 136 210 160 238 160 L 398 160 C 411 160 422 171 422 184 L 422 348 C 422 364 410 376 394 376 L 118 376 C 102 376 90 364 90 348 L 90 162 C 90 148 102 136 116 136 Z'-const FILE_ICON_MASK = `url("data:image/svg+xml,${encodeURIComponent(- `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="white" d="${FILE_ICON_BODY}"/></svg>`-)}")`+export const FILE_ICON_MASK = `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='black' d='${FOLDER_MASK_PATH}'/></svg>")`+export interface FileStackPhotoProps {+ src?: string+ fallbackSrc?: string+ width?: number | string+ height?: number | string+ className?: string+ style?: React.CSSProperties+ alt?: string+}++/** Render a photo preview masked into the 3D folder silhouette for multi-file bundles */export function FileStackPhoto({src,- width = 112,- height,fallbackSrc,-}: {- src: string- width?: number | string- height?: number | string- /**- * Streamed full-res substitute used when the bounded thumbnail cannot be- * produced. Electron's nativeImage decodes only PNG/JPEG — formats like- * GIF make the thumb endpoint answer 415, and without this fallback the- * masked tile renders as an empty broken image (animated GIFs lose their- * stack tile). Swapping to edgelocal://file/ lets Chromium play them.- */- fallbackSrc?: string-}) {+ width = 56,+ height,+ className,+ style,+ alt = ''+}: FileStackPhotoProps): JSX.Element {const resolvedHeight = height ?? width- // One-shot swap on load failure; keyed back to src whenever a different- // image reuses this element.- const [activeSrc, setActiveSrc] = useState(src)- useEffect(() => { setActiveSrc(src) }, [src])+ const [imgSrc, setImgSrc] = useState(src)+return (- <img- src={activeSrc}- alt=""- draggable={false}- width={typeof width === 'number' ? width : undefined}- height={typeof resolvedHeight === 'number' ? resolvedHeight : undefined}- onError={() => {- if (fallbackSrc && activeSrc !== fallbackSrc) setActiveSrc(fallbackSrc)- }}+ <div+ className={className}style={{width,height: resolvedHeight,- objectFit: 'cover',- flexShrink: 0,- display: 'block',- WebkitMaskImage: FILE_ICON_MASK,+ display: 'inline-flex',+ alignItems: 'center',+ justifyContent: 'center',+ position: 'relative',maskImage: FILE_ICON_MASK,- WebkitMaskSize: '100% 100%',+ WebkitMaskImage: FILE_ICON_MASK,maskSize: '100% 100%',- WebkitMaskRepeat: 'no-repeat',+ WebkitMaskSize: '100% 100%',maskRepeat: 'no-repeat',+ WebkitMaskRepeat: 'no-repeat',+ maskPosition: 'center',WebkitMaskPosition: 'center',- maskPosition: 'center'+ overflow: 'hidden',+ background: 'rgba(255,255,255,0.06)',+ ...style}}- />+ >+ {imgSrc ? (+ <img+ src={imgSrc}+ alt={alt}+ onError={() => {+ if (fallbackSrc && imgSrc !== fallbackSrc) {+ setImgSrc(fallbackSrc)+ }+ }}+ style={{+ width: '100%',+ height: '100%',+ objectFit: 'cover'+ }}+ />+ ) : null}+ </div>)}+diff --git a/src/components/Header.tsx b/src/components/Header.tsxindex fa27288..2054151 100644--- a/src/components/Header.tsx+++ b/src/components/Header.tsx@@ -80,8 +80,8 @@ export function Header({ isHorizontal = false, itemCount, clearProps }: HeaderPrjustifyContent: 'space-between',width: '100%',alignItems: 'center',- height: 40,- padding: isHorizontal ? '0 16px' : '0 14px',+ height: isHorizontal ? 40 : 48,+ padding: isHorizontal ? '0 16px' : '12px 14px 4px 14px',boxSizing: 'border-box',position: 'relative',zIndex: isHorizontal ? 250 : 100diff --git a/src/components/ItemList.tsx b/src/components/ItemList.tsxindex 68e243c..5352f4e 100644--- a/src/components/ItemList.tsx+++ b/src/components/ItemList.tsx@@ -19,13 +19,6 @@ import { playExpandSound, playButtonClickSound } from '../lib/soundEffects'import { useTranslation } from '../i18n'-const getVerticalPinnedLabelStyle = (text: string): React.CSSProperties => {- const len = text.length- if (len <= 6) return { fontSize: 'calc(9.5px * var(--font-scale, 1))', letterSpacing: '0.14em' }- if (len <= 8) return { fontSize: 'calc(8.5px * var(--font-scale, 1))', letterSpacing: '0.07em' }- if (len <= 10) return { fontSize: 'calc(7.5px * var(--font-scale, 1))', letterSpacing: '0.02em' }- return { fontSize: 'calc(7.0px * var(--font-scale, 1))', letterSpacing: '0em' }-}export function ItemList() {const { t } = useTranslation()@@ -72,6 +65,26 @@ export function ItemList() {const scrollRaf = useRef<number | null>(null)const scrollVelocity = useRef<number>(0)+ // Eased auto-scroll target (signed px/frame). The rAF loop chases this+ // instead of jumping straight to each dragover event's intensity.+ const scrollTarget = useRef<number>(0)++ // Cache the list box across dragover events: getBoundingClientRect()+ // forces a synchronous reflow, and dragover fires dozens of times per+ // second while stacking — reading it every event janks the whole gesture.+ // The box only moves on window/panel resize (scrolling content doesn't+ // move the container), so a 200ms refresh is plenty fresh.+ const listRectRef = useRef<{ rect: DOMRect; at: number } | null>(null)+ const getListRect = () => {+ const el = listRef.current+ if (!el) return null+ const now = performance.now()+ const cached = listRectRef.current+ if (cached && now - cached.at < 200) return cached.rect+ const rect = el.getBoundingClientRect()+ listRectRef.current = { rect, at: now }+ return rect+ }useEffect(() => {return () => {@@ -233,14 +246,28 @@ export function ItemList() {let lastTime = performance.now()const loop = (time: number) => {- const dt = time - lastTime+ // Clamp dt so a single hitched frame can't cause a huge jump —+ // big steps after hitches are what make the scroll feel juddery.+ const dt = Math.min(64, time - lastTime)lastTime = time- if (listRef.current && scrollVelocity.current !== 0) {+ // Ease actual velocity toward the target so intensity changes between+ // dragover events (or zone exits) ramp smoothly instead of stepping.+ const target = scrollTarget.current+ const cur = scrollVelocity.current + (target - scrollVelocity.current) * Math.min(1, dt / 120)+ if (Math.abs(cur) < 0.05 && target === 0) {+ scrollVelocity.current = 0+ scrollRaf.current = null+ return+ }+ scrollVelocity.current = cur++ if (listRef.current) {+ const step = cur * (dt / 16)if (isHorizontal) {- listRef.current.scrollLeft += scrollVelocity.current * (dt / 16)+ listRef.current.scrollLeft += step} else {- listRef.current.scrollTop += scrollVelocity.current * (dt / 16)+ listRef.current.scrollTop += step}scrollRaf.current = requestAnimationFrame(loop)} else {@@ -251,6 +278,7 @@ export function ItemList() {}const stopScrolling = () => {+ scrollTarget.current = 0scrollVelocity.current = 0if (scrollRaf.current !== null) {cancelAnimationFrame(scrollRaf.current)@@ -258,42 +286,51 @@ export function ItemList() {}}+ // Edge auto-scroll tuning: separate enter/exit thresholds (hysteresis) so+ // cursor jitter at the boundary can't start/stop the loop every event —+ // that start/stop flicker is what made edge scrolling feel stuttery.+ const EDGE_ENTER = 80+ const EDGE_EXIT = 110+ const MAX_SCROLL_PX = 20 // px per 60fps frame at full intensity++ const setScrollTarget = (v: number) => {+ scrollTarget.current = v+ if (v !== 0) startScrolling()+ }+const handleDragOver = (e: React.DragEvent) => {- if (!listRef.current) return- const 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 rect = getListRect()+ if (!rect) return++ const pos = isHorizontal ? e.clientX - rect.left : e.clientY - rect.top+ const len = isHorizontal ? rect.width : rect.height+ // Base 5px/frame so the scroll feels alive the moment the zone is+ // entered (the old +2 crawled at ~120px/s across most of the zone).+ const speedFor = (d: number) => Math.max(0, 1 - d / EDGE_ENTER) * MAX_SCROLL_PX + 5+ const active = scrollTarget.current++ if (active < 0) {+ // Scrolling toward the start edge: stay until clearly out, else ease+ // out — or flip if the cursor dove straight to the opposite edge.+ setScrollTarget(pos > EDGE_EXIT ? (pos > len - EDGE_ENTER ? speedFor(len - pos) : 0) : -speedFor(pos))+ } else if (active > 0) {+ setScrollTarget(len - pos > EDGE_EXIT ? (pos < EDGE_ENTER ? -speedFor(pos) : 0) : speedFor(len - pos))+ } else if (pos < EDGE_ENTER) {+ setScrollTarget(-speedFor(pos))+ } else if (pos > len - EDGE_ENTER) {+ setScrollTarget(speedFor(len - pos))}+ }- const y = e.clientY - rect.top- const edgeSize = 80 // slightly larger comfortable trigger zone-- if (y < edgeSize) {- // Speed scales up as you get closer to the absolute edge- const intensity = Math.max(0, 1 - (y / edgeSize))- scrollVelocity.current = -(intensity * 20 + 2)- startScrolling()- } else if (y > rect.height - edgeSize) {- const intensity = Math.max(0, 1 - ((rect.height - y) / edgeSize))- scrollVelocity.current = (intensity * 20 + 2)- startScrolling()- } else {- stopScrolling()- }+ const handleDragLeave = (e: React.DragEvent) => {+ // dragleave BUBBLES from every card crossed mid-gesture — without a+ // containment check, crossing any card boundary hard-stops the scroll+ // loop, and the next dragover restarts it. That stop/start cycle on+ // every card crossed is the stops-and-jitters. Only stop when actually+ // leaving the list (same pattern as the blade's onDragLeave).+ const related = e.relatedTarget as Node | null+ if (related && listRef.current?.contains(related)) return+ stopScrolling()}const handleDragLeaveOrDrop = () => {@@ -307,7 +344,7 @@ export function ItemList() {className={`list${isHorizontal ? ' horizontal' : ''}`}ref={listRef}onDragOver={handleDragOver}- onDragLeave={handleDragLeaveOrDrop}+ onDragLeave={handleDragLeave}onDrop={handleDragLeaveOrDrop}onScroll={handleScroll}>@@ -324,43 +361,43 @@ export function ItemList() {{pinned.length > 0 && (<section className="pinned-section"><div- className={`section-label pinned-header-interactive ${pinnedCollapsed ? 'is-collapsed' : ''}`}+ className={`pinned-accordion ${isHorizontal ? 'horizontal' : ''} ${!pinnedCollapsed ? 'is-expanded' : ''}`}+ style={+ isHorizontal+ ? ({ '--pinned-target-width': `${pinned.length * 210 + (pinned.length - 1) * 10}px` } as React.CSSProperties)+ : undefined+ }+ >+ <div className="pinned-accordion-inner">+ {pinned.map((it) => (+ <ClipboardItemCard key={it.id} item={it} />+ ))}+ </div>+ </div>+ <button+ type="button"+ className={`pinned-floating-pill ${isHorizontal ? 'horizontal' : ''} ${pinnedCollapsed ? 'is-collapsed' : ''}`}onClick={() => {const next = !pinnedCollapsedplayExpandSound(!next)setPinnedCollapsed(next)}}title={pinnedCollapsed ? t('item.expandPinned') : t('item.collapsePinned')}+ aria-label={pinnedCollapsed ? t('item.expandPinned') : t('item.collapsePinned')}>- <div className="pinned-header-left">- <PinFillIcon width={13} height={13} style={{ opacity: 0.9, color: '#ffffff' }} />- <div className="pinned-label-group">- <span style={isHorizontal ? getVerticalPinnedLabelStyle(t('item.pinned')) : undefined}>- {t('item.pinned')}- </span>- <span className="pinned-count-badge">{pinned.length}</span>- </div>- </div>- <div className="pinned-header-right">- <button- className="act bundle-collapse-btn"- type="button"- aria-label={pinnedCollapsed ? t('item.expandPinned') : t('item.collapsePinned')}- >- <ChevronDownIcon- style={{- transform: isHorizontal- ? (pinnedCollapsed ? 'rotate(-90deg)' : 'rotate(90deg)')- : (pinnedCollapsed ? 'rotate(0deg)' : 'rotate(180deg)'),- transition: 'transform 0.14s ease'- }}- />- </button>- </div>- </div>- {!pinnedCollapsed && pinned.map((it) => (- <ClipboardItemCard key={it.id} item={it} />- ))}+ <PinFillIcon width={11} height={11} className="pinned-pill-icon" />+ <span className="pinned-pill-count">{pinned.length}</span>+ <ChevronDownIcon+ width={11}+ height={11}+ className="pinned-pill-arrow"+ style={{+ transform: isHorizontal+ ? (pinnedCollapsed ? 'rotate(-90deg)' : 'rotate(90deg)')+ : (pinnedCollapsed ? 'rotate(0deg)' : 'rotate(180deg)')+ }}+ />+ </button></section>)}diff --git a/src/components/Panel.tsx b/src/components/Panel.tsxindex cd12a65..bf06f07 100644--- a/src/components/Panel.tsx+++ b/src/components/Panel.tsx@@ -506,31 +506,27 @@ export function Panel() {{emojiMounted ? <EmojiPicker active={emojiOpen} isHorizontal={isHorizontal} /> : null}</div></div>- {!isHorizontal && (+ {!isHorizontal && !emojiOpen && (<div className="footer" style={{ position: 'relative', zIndex: 100 }}>- {!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 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>diff --git a/src/components/PreviewFlyout.tsx b/src/components/PreviewFlyout.tsxindex 7b834dd..f742b9b 100644--- a/src/components/PreviewFlyout.tsx+++ b/src/components/PreviewFlyout.tsx@@ -1079,7 +1079,7 @@ function PreviewContent({<div className="item-content" style={{ padding: '24px 20px 12px 20px' }}><div className="single-file-preview"><div className="single-file-hero" style={{ color: info.color }}>- <FileKindIcon path={p} width={120} height={120} isDirectory={entry?.isDirectory} />+ <FileKindIcon path={p} width={154} height={154} isDirectory={entry?.isDirectory} /></div><div className="single-file-meta" style={{ marginTop: 8 }}><div className="preview single single-file-name" title={fileName} style={{ fontSize: 15, WebkitLineClamp: 3, whiteSpace: 'normal', lineHeight: 1.4 }}>@@ -1237,7 +1237,7 @@ function PreviewContent({<div className="item-content"><div className="single-file-preview"><div className="single-file-hero" style={{ color: info.color }}>- <FileKindIcon path={p} width={88} height={88} isDirectory={entry?.isDirectory} />+ <FileKindIcon path={p} width={120} height={120} isDirectory={entry?.isDirectory} /></div><div className="single-file-meta"><div className="preview single single-file-name" title={fileName}>diff --git a/src/i18n/translations.ts b/src/i18n/translations.tsindex 4718c24..e2c4b52 100644--- a/src/i18n/translations.ts+++ b/src/i18n/translations.ts@@ -213,6 +213,7 @@ export interface TranslationKeys {audio: stringvideo: stringimage: string+ executable?: stringfolder?: stringfile: string}@@ -756,6 +757,7 @@ export const en: TranslationKeys = {"audio": "Audio","video": "Video","image": "Image",+ "executable": "Installer","folder": "Folder","file": "File"},diff --git a/src/lib/fileType.ts b/src/lib/fileType.tsindex 85d91f8..356b99c 100644--- a/src/lib/fileType.ts+++ b/src/lib/fileType.ts@@ -36,7 +36,7 @@ const EXT_MAP: Record<string, FileKind> = {doc: 'word', docx: 'word', docm: 'word', odt: 'word', rtf: 'word', pages: 'word',xls: 'excel', xlsx: 'excel', xlsm: 'excel', csv: 'excel', ods: 'excel', numbers: 'excel',ppt: 'powerpoint', pptx: 'powerpoint', pptm: 'powerpoint', odp: 'powerpoint', key: 'powerpoint',- zip: 'archive', rar: 'archive', '7z': 'archive', tar: 'archive', gz: 'archive', bz2: 'archive', xz: 'archive', iso: 'archive', dmg: 'archive',+ zip: 'archive', rar: 'archive', '7z': 'archive', tar: 'archive', gz: 'archive', bz2: 'archive', xz: 'archive', iso: 'archive',txt: 'text', md: 'text', markdown: 'text', log: 'text', rtf2: 'text',js: 'code', ts: 'code', jsx: 'code', tsx: 'code', json: 'code', html: 'code', css: 'code', scss: 'code',py: 'code', java: 'code', c: 'code', cpp: 'code', cs: 'code', go: 'code', rs: 'code', rb: 'code',@@ -45,24 +45,24 @@ const EXT_MAP: Record<string, FileKind> = {mp4: 'video', mkv: 'video', avi: 'video', mov: 'video', wmv: 'video', flv: 'video', webm: 'video', m4v: 'video',png: 'image', jpg: 'image', jpeg: 'image', gif: 'image', webp: 'image', bmp: 'image', svg: 'image', avif: 'image', ico: 'image',tif: 'image', tiff: 'image', jfif: 'image', pjpeg: 'image', pjp: 'image',- exe: 'executable', msi: 'executable', bat: 'executable', cmd: 'executable', ps1: 'executable', apk: 'executable', app: 'executable', dll: 'executable',+ exe: 'executable', msi: 'executable', bat: 'executable', cmd: 'executable', ps1: 'executable', apk: 'executable', app: 'executable', dll: 'executable', dmg: 'executable', pkg: 'executable', deb: 'executable', rpm: 'executable', appx: 'executable', msix: 'executable', appinstaller: 'executable',folder: 'folder'}const KIND_INFO: Record<FileKind, FileKindInfo> = {- pdf: { kind: 'pdf', label: 'PDF', color: '#FF7C8E' },- word: { kind: 'word', label: 'Word', color: '#7BAFF8' },- excel: { kind: 'excel', label: 'Excel', color: '#52D7A4' },- powerpoint: { kind: 'powerpoint', label: 'Slides', color: '#FFA25B' },- archive: { kind: 'archive', label: 'Archive', color: '#FBBF24' },- text: { kind: 'text', label: 'Text', color: '#8CA77B' },- code: { kind: 'code', label: 'Code', color: '#53CAF7' },- audio: { kind: 'audio', label: 'Audio', color: '#C495FD' },- video: { kind: 'video', label: 'Video', color: '#64748B' },- image: { kind: 'image', label: 'Image', color: '#BA9B7B' },- executable: { kind: 'executable', label: 'App', color: '#93A4FC' },- folder: { kind: 'folder', label: 'Folder', color: '#FBBF24' },- file: { kind: 'file', label: 'File', color: '#B0C0D0' }+ pdf: { kind: 'pdf', label: 'PDF', color: '#EF4444' },+ word: { kind: 'word', label: 'Word', color: '#3B9CFF' },+ excel: { kind: 'excel', label: 'Excel', color: '#10B981' },+ powerpoint: { kind: 'powerpoint', label: 'Slides', color: '#FF6B35' },+ archive: { kind: 'archive', label: 'Archive', color: '#F59E0B' },+ text: { kind: 'text', label: 'Text', color: '#94A3B8' },+ code: { kind: 'code', label: 'Code', color: '#818CF8' },+ audio: { kind: 'audio', label: 'Audio', color: '#F43F5E' },+ video: { kind: 'video', label: 'Video', color: '#A855F7' },+ image: { kind: 'image', label: 'Image', color: '#06B6D4' },+ executable: { kind: 'executable', label: 'Installer', color: '#F59E0B' },+ folder: { kind: 'folder', label: 'Folder', color: '#FFDA44' },+ file: { kind: 'file', label: 'File', color: '#CBD5E1' }}/** Extract the lowercase extension (no dot) from a path. */@@ -86,7 +86,7 @@ const KEY_MAP: Record<FileKind, any> = {audio: 'fileKinds.audio',video: 'fileKinds.video',image: 'fileKinds.image',- executable: 'fileKinds.file',+ executable: 'fileKinds.executable',folder: 'fileKinds.folder',file: 'fileKinds.file'}@@ -131,3 +131,11 @@ export function getFileKindByExt(ext: string, isDirectory?: boolean): FileKindInlabel: translateKind(KEY_MAP[kind], base.label)}}++/**+ * edgelocal:// URL for a file-kind folder icon (PNG, see resources/file-icons).+ * Same hardcoded-scheme convention as the emoji catalog (`edgelocal://emoji/…`).+ */+export function fileIconUrl(kind: FileKind): string {+ return `edgelocal://icon/${kind}.png`+}diff --git a/src/styles/emoji.css b/src/styles/emoji.cssindex 4f3a8b6..d6f8cb4 100644--- a/src/styles/emoji.css+++ b/src/styles/emoji.css@@ -18,7 +18,7 @@border: none;border-radius: 999px;padding: 0;- margin: 2px var(--pad) 8px;+ margin: 4px var(--pad) 6px;height: 32px;box-sizing: border-box;flex-shrink: 0;diff --git a/src/styles/item.css b/src/styles/item.cssindex b9a7b6d..72e7359 100644--- a/src/styles/item.css+++ b/src/styles/item.css@@ -60,6 +60,11 @@contain-intrinsic-size: auto 96px;}+.list-stack .item.is-expanded {+ content-visibility: visible !important;+ contain-intrinsic-size: none !important;+}+.item:hover {background: var(--bg-card-hover);}@@ -104,11 +109,18 @@transition: background 0.2s ease;}-.item-main:active {+.item:not(.is-expanded) .item-main:active {transform: scale(0.985);transition: transform 0.08s ease;}+.item.is-expanded .item-main:active,+.item.is-expanded .item-main,+.item.is-expanded {+ transform: none !important;+ cursor: default;+}+.body {width: 100%;min-width: 0;@@ -468,12 +480,54 @@padding: 2px;}-.item:hover .thumb,-.item-main:hover .thumb {+.item:not(.is-expanded):hover .thumb,+.item:not(.is-expanded) .item-main:hover .thumb {transform: scale(1.01);box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);}+.file-name-meta {+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-weight: 500;+ font-size: calc(11.5px * var(--font-scale, 1));+ color: rgba(255, 255, 255, 0.85);+ min-width: 0;+ flex: 1;+}++.single-file-hero {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 100%;+ height: 100%;+ margin-top: -6px;+ transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);+}++.single-file-hero svg,+.single-file-hero img.file-kind-img {+ display: block;+ filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55));+ transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;+}++.item.is-image-folder-card:not(.is-expanded):hover .single-file-hero svg,+.item:not(.is-expanded) .item-main:hover .single-file-hero svg,+.item.is-image-folder-card:not(.is-expanded):hover .single-file-hero img.file-kind-img,+.item:not(.is-expanded) .item-main:hover .single-file-hero img.file-kind-img {+ transform: translateY(-2px) scale(1.04);+ filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.65));+}++.mini-image-folder-card:hover .single-file-hero svg,+.mini-image-folder-card:hover .single-file-hero img.file-kind-img {+ transform: translateY(-2px) scale(1.04);+ filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.65));+}+/* Single Image Folder Card (Framed image in folder card + borderless folder flap) */.item.is-image-folder-card {height: 205px;@@ -486,7 +540,7 @@}-.item.is-image-folder-card:hover {+.item.is-image-folder-card:not(.is-expanded):hover {background: var(--bg-card-hover, #1c1c1c);}@@ -515,8 +569,8 @@}-.item.is-image-folder-card:hover .image-folder-card-inner,-.item-main:hover .image-folder-card-inner {+.item.is-image-folder-card:not(.is-expanded):hover .image-folder-card-inner,+.item:not(.is-expanded) .item-main:hover .image-folder-card-inner {background: var(--bg-card-hover, #1c1c1c);}@@ -553,8 +607,8 @@pointer-events: none;}-.item.is-image-folder-card:hover .image-folder-thumb,-.item-main:hover .image-folder-thumb {+.item.is-image-folder-card:not(.is-expanded):hover .image-folder-thumb,+.item:not(.is-expanded) .item-main:hover .image-folder-thumb {transform: scale(1.03) translateY(-1px);filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.65));}@@ -690,14 +744,14 @@.item.is-image-folder-card.is-expanded {height: auto;- min-height: 205px;+ min-height: 0;max-height: none;padding: 5px;}.item.is-image-folder-card.is-expanded .image-folder-card-inner {height: auto;- min-height: 205px;+ min-height: 0;display: flex;flex-direction: column;}@@ -731,13 +785,13 @@.image-folder-viewport.is-expanded-viewport {height: auto;- min-height: 170px;+ min-height: 0;max-height: none;display: flex;flex-direction: column;justify-content: flex-start;align-items: stretch;- padding: 8px 8px 36px 8px;+ padding: 8px 8px 8px 8px;box-sizing: border-box;overflow: visible;}@@ -745,16 +799,17 @@.list.horizontal .image-folder-viewport.is-expanded-viewport {flex: 1;width: 100%;- height: auto !important;+ height: 100% !important;min-height: 0 !important;- max-height: none;- padding: 4px 6px 2px 6px;+ max-height: 100% !important;+ padding: 4px 6px 4px 6px;display: flex;flex-direction: column;justify-content: flex-start;align-items: stretch;box-sizing: border-box;overflow: hidden !important;+ border-radius: calc(var(--radius-card, 18px) - 5px);}.image-folder-expanded-content {@@ -789,8 +844,8 @@.list.horizontal .image-folder-expanded-top-bar {height: 20px;- margin-bottom: 3px;- padding: 0 2px;+ margin-bottom: 5px;+ padding: 0 4px;}.image-folder-collapse-btn {@@ -887,17 +942,16 @@.image-stack-expanded-track {display: flex;flex-direction: row;- gap: 6px;+ gap: 8px;flex: 1;min-height: 0;- height: 84px;- max-height: 84px;+ height: 104px;+ max-height: 104px;align-items: center;- overflow-x: auto;- overflow-y: hidden;+ overflow: visible;scrollbar-width: none;-ms-overflow-style: none;- padding: 2px 0;+ padding: 4px 2px 5px 2px;box-sizing: border-box;}@@ -909,12 +963,12 @@.image-stack-expanded-list {display: flex;flex-direction: column;- gap: 12px;+ gap: 8px;width: 100%;height: auto;max-height: none;overflow: visible;- padding: 2px 0 8px 0;+ padding: 2px 0 2px 0;box-sizing: border-box;}@@ -934,9 +988,9 @@border-radius: 15px;overflow: hidden;background: var(--bg-card, #141414);- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);+ box-shadow: none !important;border: none;- transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.16s ease;+ transition: background 0.16s ease;user-select: none;}@@ -946,22 +1000,28 @@.mini-image-folder-card:hover {background: var(--bg-card-hover, #1c1c1c);- transform: translateY(-2px);- box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);+ transform: none;+ box-shadow: none !important;}/* Horizontal Dock mini card sizing */.list.horizontal .mini-image-folder-card {- width: 115px;- min-width: 115px;- max-width: 115px;- height: 80px;- max-height: 80px;+ width: 124px;+ min-width: 124px;+ max-width: 124px;+ height: 94px;+ max-height: 94px;aspect-ratio: 210 / 146;flex-shrink: 0;padding: 2px;border-radius: 9px;- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);+ box-shadow: none !important;+}++.list.horizontal .mini-image-folder-card:hover {+ background: var(--bg-card-hover, #1c1c1c);+ transform: none;+ box-shadow: none !important;}.mini-image-folder-card-inner {@@ -1017,21 +1077,26 @@object-fit: contain;border-radius: 6px;z-index: 2;- filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));- transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;+ filter: none;+ transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);pointer-events: none;}.list.horizontal .mini-image-folder-thumb {max-width: calc(100% - 12px);- max-height: calc(100% - 12px);+ max-height: calc(100% - 10px);border-radius: 4px;- filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));+ filter: none;}.mini-image-folder-card:hover .mini-image-folder-thumb {- transform: scale(1.03) translateY(-1px);- filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.65));+ transform: scale(1.02);+ filter: none;+}++.list.horizontal .mini-image-folder-card:hover .mini-image-folder-thumb {+ transform: scale(1.02);+ filter: none;}/* Mini Solid Black Curved Folder Flap */@@ -1044,7 +1109,7 @@}.list.horizontal .mini-image-folder-flap-wrap {- margin-top: -16px;+ margin-top: -18px;flex-shrink: 0;}@@ -1079,23 +1144,43 @@.mini-image-folder-flap-header {height: 24px;+ display: flex;+ align-items: center;+ padding-left: 5px;+ padding-top: 1px;+ box-sizing: border-box;+ max-width: 110px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;}.list.horizontal .mini-image-folder-flap-header {- height: 14px;+ height: 16px;+ padding-left: 3px;+ max-width: 80px;+}++.list.horizontal .mini-image-folder-flap-header .file-elevated-badge {+ font-size: 8px;+ padding: 0 1px;+ font-weight: 700;+ letter-spacing: 0.01em;}.mini-image-folder-flap-footer {- padding: 2px 10px 5px 10px;+ padding: 2px 8px 5px 8px;display: flex;align-items: center;justify-content: space-between;gap: 6px;+ min-width: 0;}.list.horizontal .mini-image-folder-flap-footer {- padding: 0 6px 3px 6px;+ padding: 2px 4.5px 3px 4.5px;gap: 3px;+ box-sizing: border-box;}.mini-image-folder-meta {@@ -1103,13 +1188,14 @@align-items: center;gap: 5px;min-width: 0;+ flex: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.list.horizontal .mini-image-folder-meta {- gap: 3px;+ gap: 2px;}.mini-image-folder-meta .kind-badge {@@ -1119,7 +1205,7 @@.list.horizontal .mini-image-folder-meta .kind-badge {font-size: 8px;- padding: 0 3px;+ padding: 0 2px;}.mini-image-folder-source-name {@@ -1129,11 +1215,15 @@text-overflow: ellipsis;white-space: nowrap;font-weight: 500;+ min-width: 0;+ flex: 1;+ max-width: none;}.list.horizontal .mini-image-folder-source-name {- font-size: 8.5px;- max-width: 52px;+ font-size: 9px;+ line-height: 1.25;+ max-width: 74px;}.mini-image-folder-size {@@ -1145,7 +1235,8 @@}.list.horizontal .mini-image-folder-size {- font-size: 8px;+ font-size: 8.5px;+ line-height: 1.25;}/* Hover Action Pill for Mini Card (Expand, Copy, Ungroup) */@@ -1243,8 +1334,8 @@transition: fill 0.16s ease;}-.item.is-image-folder-card:hover .image-folder-flap-svg path,-.item-main:hover .image-folder-flap-svg path {+.item.is-image-folder-card:not(.is-expanded):hover .image-folder-flap-svg path,+.item:not(.is-expanded) .item-main:hover .image-folder-flap-svg path {fill: var(--bg-card-hover, #1c1c1c);}@@ -1258,6 +1349,149 @@.image-folder-flap-header {height: 28px;+ display: flex;+ align-items: center;+ padding-left: 9px;+ padding-top: 1px;+ box-sizing: border-box;+ max-width: 125px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.file-elevated-badge {+ font-size: calc(10.5px * var(--font-scale, 1));+ font-weight: 650;+ letter-spacing: 0.02em;+ padding: 0 4px;+ text-transform: lowercase;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+}++.list.horizontal .image-folder-flap-header {+ height: 24px;+ padding-left: 7px;+ max-width: 105px;+}++.list.horizontal .file-elevated-badge {+ font-size: 8.5px;+ padding: 0 2px;+}++/* ------------------------------------------------------------------ */+/* File Stacks — Pure 3D Folders (No container card, 100% opaque) */+/* ------------------------------------------------------------------ */++.image-folder-stack-item.file-stack-item,+.list.horizontal .image-folder-stack-item.file-stack-item {+ background: transparent !important;+ box-shadow: none !important;+ border: none !important;+ border-radius: 0 !important;+ display: flex !important;+ align-items: center !important;+ justify-content: center !important;+ overflow: visible !important;+ opacity: 1 !important;+}++.image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-0,+.image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-1,+.image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-2,+.image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-3,+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-0,+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-1,+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-2,+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-3 {+ opacity: 1 !important;+ background: transparent !important;+ box-shadow: none !important;+ border: none !important;+}++.image-folder-stack-item.file-stack-item svg,+.image-folder-stack-item.file-stack-item img.file-kind-img {+ display: block;+ filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.65));+ transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;+}++.item.is-image-folder-card:hover .image-folder-stack-item.file-stack-item svg,+.item-main:hover .image-folder-stack-item.file-stack-item svg,+.item.is-image-folder-card:hover .image-folder-stack-item.file-stack-item img.file-kind-img,+.item-main:hover .image-folder-stack-item.file-stack-item img.file-kind-img {+ filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.75));+}++.file-stack-expanded-track {+ display: flex;+ flex-direction: row;+ gap: 8px;+ flex: 1;+ min-height: 0;+ height: 84px;+ max-height: 84px;+ align-items: center;+ overflow-x: auto;+ overflow-y: hidden;+ scrollbar-width: none;+ padding: 2px 0;+ box-sizing: border-box;+}++.file-stack-expanded-track::-webkit-scrollbar {+ display: none;+}++.mini-file-card {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ width: 68px;+ min-width: 68px;+ height: 76px;+ padding: 4px;+ box-sizing: border-box;+ background: rgba(0, 0, 0, 0.4);+ border: 1px solid rgba(255, 255, 255, 0.15);+ border-radius: 8px;+ cursor: grab;+ transition: transform 0.18s ease, background 0.16s ease;+ user-select: none;+}++.mini-file-card:active {+ cursor: grabbing;+}++.mini-file-card:hover {+ background: rgba(0, 0, 0, 0.65);+ transform: translateY(-2px);+}++.mini-file-card-name {+ font-size: 8.5px;+ color: rgba(255, 255, 255, 0.85);+ max-width: 60px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ margin-top: 3px;+ text-align: center;+}++.file-stack-expanded-list {+ display: flex;+ flex-direction: column;+ gap: 8px;+ width: 100%;+ padding: 2px 0 8px 0;+ box-sizing: border-box;}.image-folder-flap-footer {@@ -1267,6 +1501,12 @@justify-content: space-between;gap: 8px;margin-top: auto;+ min-width: 0;+}++.list.horizontal .image-folder-flap-footer {+ padding: 1px 8px 4px 8px;+ gap: 4px;}.image-folder-meta {@@ -1281,6 +1521,7 @@overflow: hidden;text-overflow: ellipsis;min-width: 0;+ flex: 1;}.image-folder-source-name {@@ -1288,8 +1529,20 @@text-overflow: ellipsis;white-space: nowrap;min-width: 0;- max-width: 105px;- color: rgba(255, 255, 255, 0.45);+ flex: 1;+ max-width: none;+ color: rgba(255, 255, 255, 0.85);+ font-size: calc(11.5px * var(--font-scale, 1));+}++.file-name-meta {+ color: rgba(255, 255, 255, 0.9);+ font-weight: 500;+}++.image-folder-meta .meta-hit-count,+.image-folder-meta .meta-copied {+ flex-shrink: 0;}/* Floating Actions Pill */@@ -1665,48 +1918,14 @@white-space: nowrap;}-/* Single (non-image) file tile: hero icon on top, name on the bottom */-.item:has(.single-file-preview) .item-content {- display: flex;- flex-direction: column;- justify-content: center;- align-items: center;- padding: 10px 16px 6px 16px;-}-+/* Single File card base preview */.single-file-preview {display: flex;flex-direction: column;- align-items: center;- justify-content: center;- gap: 8px;width: 100%;- padding: 2px 0 2px;-}--.single-file-hero {- display: flex;- align-items: center;- justify-content: center;- width: 100%;- padding: 0;- background: transparent;- border: none;- box-shadow: none;- transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);-}--.single-file-hero svg {- width: 120px;- height: 120px;- display: block;- filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.42));- transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;-}--.item-main:hover .single-file-hero svg {- transform: translateY(-3px) scale(1.04);- filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.52));+ height: 100%;+ min-height: 0;+ flex: 1;}.single-file-meta {@@ -1785,7 +2004,8 @@width: 100%;}-.flyout-subitem .single-file-hero svg {+.flyout-subitem .single-file-hero svg,+.flyout-subitem .single-file-hero img.file-kind-img {width: 88px;height: 88px;display: block;@@ -1793,7 +2013,8 @@transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);}-.flyout-subitem:hover .single-file-hero svg {+.flyout-subitem:hover .single-file-hero svg,+.flyout-subitem:hover .single-file-hero img.file-kind-img {transform: translateY(-2px) scale(1.04);}@@ -1918,7 +2139,8 @@.single-hero-card {width: 100%;}-.single-hero-card .single-file-hero svg {+.single-hero-card .single-file-hero svg,+.single-hero-card .single-file-hero img.file-kind-img {width: 120px;height: 120px;}@@ -2171,36 +2393,6 @@font-size: calc(10.5px * var(--font-scale, 1));}-.list.horizontal .item:has(.single-file-preview) .item-content {- display: flex;- flex-direction: column;- justify-content: center;- align-items: center;- padding: 4px 10px 2px 10px;-}--.list.horizontal .single-file-preview {- gap: 4px;- padding: 0;- width: 100%;-}--.list.horizontal .single-file-hero {- padding: 0;-}--.list.horizontal .single-file-hero svg {- width: 88px;- height: 88px;- filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.38));- transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;-}--.list.horizontal .item-main:hover .single-file-hero svg {- transform: translateY(-2px) scale(1.03);- filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));-}-.list.horizontal .single-file-name {font-size: calc(12px * var(--font-scale, 1));font-weight: 550;@@ -2261,7 +2453,7 @@transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.16s ease;}-.list.horizontal .item:hover .thumb {+.list.horizontal .item:not(.is-expanded):hover .thumb {transform: scale(1.015);box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);}@@ -2303,8 +2495,8 @@background: var(--bg-card, #141414);}-.list.horizontal .item.is-image-folder-card:hover .image-folder-card-inner,-.list.horizontal .item-main:hover .image-folder-card-inner {+.list.horizontal .item.is-image-folder-card:not(.is-expanded):hover .image-folder-card-inner,+.list.horizontal .item:not(.is-expanded) .item-main:hover .image-folder-card-inner {background: var(--bg-card-hover, #1c1c1c);}@@ -2333,15 +2525,26 @@.list.horizontal .image-folder-flap-footer {padding: 1px 10px 5px 10px;margin-top: auto;+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 6px;+ min-width: 0;+ width: 100%;+ box-sizing: border-box;}.list.horizontal .image-folder-meta {font-size: calc(10.5px * var(--font-scale, 1));gap: 3px;+ flex: 1;+ min-width: 0;}.list.horizontal .image-folder-source-name {- max-width: 80px;+ max-width: none;+ flex: 1;+ min-width: 0;}.list.horizontal .image-folder-stack-deck {@@ -2417,6 +2620,20 @@.list.horizontal .item-main:hover .image-folder-stack-deck[data-count="4"] .image-folder-stack-item.pos-2 {transform: translate(17px, -6px) rotate(17deg) scale(0.95);}+/* Standalone 3D Folder file stacks in Horizontal Dock (no container card, 100% opacity, transparent box) */+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item,+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-0,+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-1,+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-2,+.list.horizontal .image-folder-stack-deck .image-folder-stack-item.file-stack-item.pos-3 {+ background: transparent !important;+ box-shadow: none !important;+ border: none !important;+ border-radius: 0 !important;+ opacity: 1 !important;+ overflow: visible !important;+}+.list.horizontal .item.is-image-folder-card.is-expanded .image-folder-flap-wrap {margin-top: -18px;flex-shrink: 0;@@ -2542,26 +2759,13 @@flex-direction: row;align-items: stretch;gap: 8px;- overflow-x: auto;- overflow-y: hidden;+ overflow: visible;height: 96px;padding: 3px 4px 5px 4px;- scroll-behavior: smooth;}-/* Custom sleek scrollbar for horizontal sub-item track */.horizontal-subitem-track::-webkit-scrollbar {- height: 3px;-}-.horizontal-subitem-track::-webkit-scrollbar-track {- background: transparent;-}-.horizontal-subitem-track::-webkit-scrollbar-thumb {- background: rgba(255, 255, 255, 0.18);- border-radius: 999px;-}-.horizontal-subitem-track::-webkit-scrollbar-thumb:hover {- background: rgba(255, 255, 255, 0.32);+ display: none;}.horizontal-subitem-tile {diff --git a/src/styles/panel.css b/src/styles/panel.cssindex 4d29011..48146cc 100644--- a/src/styles/panel.css+++ b/src/styles/panel.css@@ -213,7 +213,7 @@/* Search */.search {- margin: 0 var(--pad) 6px;+ margin: 4px var(--pad) 6px;position: relative;z-index: 1;}@@ -276,7 +276,7 @@flex-direction: column;overflow-y: auto;overflow-x: hidden;- padding: 12px var(--pad) 16px;+ padding: 2px var(--pad) 4px;position: relative;z-index: 1;scrollbar-width: none; /* Firefox */@@ -297,124 +297,142 @@}.list.horizontal .list-stack {flex-direction: row;- align-items: stretch;+ align-items: center;gap: 10px;- height: 100%;+ height: 146px;}-.list.horizontal .pinned-section,-.list.horizontal .recent-section {+.list.horizontal .pinned-section {+ display: flex;flex-direction: row;- align-items: stretch;- gap: 10px;+ align-items: center;+ gap: 0;margin: 0;- height: 100%;+ height: 146px;}--.list.horizontal .pinned-header-interactive {+.list.horizontal .recent-section {display: flex;- flex-direction: column;+ flex-direction: row;align-items: center;- justify-content: space-between;- width: 32px;- min-width: 32px;- max-width: 32px;- height: 146px;+ gap: 10px;margin: 0;- padding: 10px 4px 10px;- background: transparent;- border: none;- border-radius: 8px;- cursor: pointer;- user-select: none;- flex-shrink: 0;- box-sizing: border-box;- transition: background 0.15s ease, transform 0.12s ease;- position: relative;+ height: 146px;}-.list.horizontal .pinned-header-interactive:hover {- background: rgba(255, 255, 255, 0.05);+/* Horizontal Pinned Accordion Drawer — Smooth width transition */+.pinned-accordion.horizontal {+ display: block;+ width: 0;+ min-width: 0;+ max-width: 0;+ height: 146px;+ overflow: hidden;+ margin-right: 0;+ flex-shrink: 0;+ transition: width 0.24s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.24s cubic-bezier(0.16, 1, 0.3, 1), margin-right 0.24s cubic-bezier(0.16, 1, 0.3, 1);+ will-change: width, max-width;}-.list.horizontal .pinned-header-interactive:active {- background: rgba(255, 255, 255, 0.09);- transform: scale(0.97);+.pinned-accordion.horizontal.is-expanded {+ width: var(--pinned-target-width, max-content);+ max-width: var(--pinned-target-width, 3000px);+ margin-right: 10px;}-.list.horizontal .pinned-header-interactive .pinned-header-left {+.pinned-accordion.horizontal .pinned-accordion-inner {display: flex;- flex-direction: column;+ flex-direction: row;align-items: center;- justify-content: flex-start;- flex: 1;- width: 100%;- min-height: 0;+ gap: 10px;+ height: 146px;+ width: var(--pinned-target-width, max-content);+ min-width: var(--pinned-target-width, max-content);+ overflow: hidden;+ opacity: 0;+ transform: translateX(-8px);+ visibility: hidden;+ pointer-events: none;+ transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s ease;}-.list.horizontal .pinned-header-interactive .pinned-label-group {- display: flex;+.pinned-accordion.horizontal.is-expanded .pinned-accordion-inner {+ opacity: 1;+ transform: translateX(0);+ visibility: visible;+ pointer-events: auto;+}++/* Horizontal Floating Pinned Pill */+.pinned-floating-pill.horizontal {+ align-self: center;+ display: inline-flex;flex-direction: column;align-items: center;justify-content: center;- gap: 4px;- margin: auto 0;- min-height: 0;+ gap: 5px;+ width: 26px;+ min-width: 26px;+ max-width: 26px;+ height: auto;+ padding: 8px 0;+ margin: 0;+ background: #141414;+ border: none;+ border-radius: 999px;+ color: #ffffff;+ cursor: pointer;+ user-select: none;+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);+ transition: background 0.14s ease, transform 0.12s ease;+ flex-shrink: 0;}-.list.horizontal .pinned-header-interactive .pinned-label-group span:not(.pinned-count-badge) {- writing-mode: vertical-rl;- transform: rotate(180deg);- font-size: calc(9.5px * var(--font-scale, 1));- font-weight: 600;- letter-spacing: 0.08em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.85);- margin: 0;- max-height: 68px;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;+.pinned-floating-pill.horizontal:hover {+ background: #1c1c1c;+}++.pinned-floating-pill.horizontal:active {+ transform: scale(0.96);+ background: #222222;+}++.pinned-floating-pill.horizontal .pinned-pill-icon {display: block;+ color: #ffffff;+ opacity: 0.92;+ flex-shrink: 0;}-.list.horizontal .pinned-header-interactive .pinned-count-badge {- background: transparent;- color: rgba(255, 255, 255, 0.55);- font-size: calc(10px * var(--font-scale, 1));+.pinned-floating-pill.horizontal .pinned-pill-count {+ font-size: calc(11px * var(--font-scale, 1));font-weight: 600;- padding: 0;- border-radius: 0;- border: none;- letter-spacing: 0;+ color: rgba(255, 255, 255, 0.92);+ line-height: 1;+ height: 11px;+ letter-spacing: 0.01em;display: flex;align-items: center;justify-content: center;- flex-shrink: 0;}-.list.horizontal .pinned-header-interactive .pinned-header-right {- margin-top: auto;- margin-bottom: 0;+.pinned-floating-pill.horizontal .pinned-pill-arrow {+ display: block;+ color: rgba(255, 255, 255, 0.6);+ flex-shrink: 0;+ transition: color 0.14s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);}-.list.horizontal .pinned-header-interactive .bundle-collapse-btn {- width: 18px;- height: 18px;- display: flex;- align-items: center;- justify-content: center;- background: transparent;- border: none;- border-radius: 0;- color: rgba(255, 255, 255, 0.65);- pointer-events: none;+.pinned-floating-pill.horizontal:hover .pinned-pill-arrow {+ color: #ffffff;}-.list.horizontal .pinned-header-interactive:hover .bundle-collapse-btn {- background: transparent;- color: #ffffff;+[data-motion="reduce"] .pinned-accordion.horizontal,+[data-motion="reduce"] .pinned-accordion.horizontal .pinned-accordion-inner,+[data-motion="reduce"] .pinned-floating-pill.horizontal .pinned-pill-arrow {+ transition: none !important;}++.list.horizontal .recent-section .section-label.recent-header {display: flex;flex-direction: column;@@ -452,7 +470,7 @@letter-spacing: 0.06em;text-transform: uppercase;color: #a1a1aa;- margin: 16px 6px 8px;+ margin: 8px 6px 6px;}.section-label:first-child {margin-top: 4px;@@ -471,7 +489,100 @@border: none;border-radius: 0;padding: 0;- margin: 8px 0 12px;+ margin: 0 0 4px;+}++/* Pinned Accordion Drawer — Hardware-accelerated 0fr/1fr grid transition */+.pinned-accordion {+ display: grid;+ grid-template-rows: 0fr;+ transition: grid-template-rows 0.24s cubic-bezier(0.16, 1, 0.3, 1);+ will-change: grid-template-rows;+}++.pinned-accordion.is-expanded {+ grid-template-rows: 1fr;+}++.pinned-accordion-inner {+ overflow: hidden;+ min-height: 0;+ opacity: 0;+ transform: translateY(-8px);+ visibility: hidden;+ pointer-events: none;+ transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s ease;+}++.pinned-accordion.is-expanded .pinned-accordion-inner {+ opacity: 1;+ transform: translateY(0);+ visibility: visible;+ pointer-events: auto;+}++/* Ensure pinned cards are pre-rendered and never culled during accordion reveal */+.pinned-section .item {+ content-visibility: visible !important;+ contain-intrinsic-size: none !important;+}++/* Floating Pinned Pill */+.pinned-floating-pill {+ align-self: flex-start;+ display: inline-flex;+ align-items: center;+ gap: 5px;+ height: 24px;+ padding: 0 8px 0 7px;+ margin: 2px 0 6px 1px;+ background: #141414;+ border: none;+ border-radius: 999px;+ color: #ffffff;+ cursor: pointer;+ user-select: none;+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);+ transition: background 0.14s ease, transform 0.12s ease;+}++.pinned-floating-pill:hover {+ background: #1c1c1c;+}++.pinned-floating-pill:active {+ transform: scale(0.96);+ background: #222222;+}++.pinned-floating-pill .pinned-pill-icon {+ color: #ffffff;+ opacity: 0.92;+ flex-shrink: 0;+}++.pinned-floating-pill .pinned-pill-count {+ font-size: calc(11px * var(--font-scale, 1));+ font-weight: 600;+ color: rgba(255, 255, 255, 0.92);+ line-height: 1;+ letter-spacing: 0.01em;+}++.pinned-floating-pill .pinned-pill-arrow {+ color: rgba(255, 255, 255, 0.6);+ flex-shrink: 0;+ transition: color 0.14s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);+}++.pinned-floating-pill:hover .pinned-pill-arrow {+ color: #ffffff;+}++[data-motion="reduce"] .pinned-accordion,+[data-motion="reduce"] .pinned-accordion-inner,+[data-motion="reduce"] .pinned-floating-pill .pinned-pill-arrow {+ transition: none !important;}/* Interactive Pinned Section Header */@@ -480,7 +591,7 @@align-items: center;justify-content: space-between;cursor: pointer;- padding: 6px 6px;+ padding: 4px 6px;margin: 0 0 2px 0;border-radius: 8px;background: transparent;@@ -576,7 +687,7 @@align-items: center;justify-content: space-between;gap: 8px;- padding: 8px var(--pad) 12px;+ padding: 6px var(--pad) 12px;position: relative;z-index: 100;background: transparent;diff --git a/src/styles/settings.css b/src/styles/settings.cssindex 0410408..96ae741 100644--- a/src/styles/settings.css+++ b/src/styles/settings.css@@ -1,6 +1,6 @@.settings-fixed-header {flex-shrink: 0;- padding: 8px var(--pad) 6px;+ padding: 4px var(--pad) 6px;background: transparent;z-index: 10;}@@ -11,7 +11,7 @@flex-direction: column;overflow-y: auto;overflow-x: hidden;- padding: 4px var(--pad) 28px;+ padding: 4px var(--pad) 16px;scrollbar-width: none;}diff --git a/tests/customFileIcon.test.ts b/tests/customFileIcon.test.tsindex a31030f..5d6ec28 100644--- a/tests/customFileIcon.test.ts+++ b/tests/customFileIcon.test.ts@@ -1,96 +1,96 @@import { describe, it, expect } from 'vitest'import { getFileKindByExt, getFileKind } from '../src/lib/fileType'-describe('Custom File Category & Pastel Theme Palette', () => {- it('correctly maps document formats with authentic pastel colors', () => {+describe('Custom File Category & 3D Folder Theme Palette', () => {+ it('correctly maps document formats with authentic 3D folder colors', () => {const pdf = getFileKindByExt('pdf')expect(pdf.kind).toBe('pdf')- expect(pdf.color).toBe('#FF7C8E')+ expect(pdf.color).toBe('#EF4444')const docx = getFileKindByExt('docx')expect(docx.kind).toBe('word')- expect(docx.color).toBe('#7BAFF8')+ expect(docx.color).toBe('#3B9CFF')const xlsx = getFileKindByExt('xlsx')expect(xlsx.kind).toBe('excel')- expect(xlsx.color).toBe('#52D7A4')+ expect(xlsx.color).toBe('#10B981')const pptx = getFileKindByExt('pptx')expect(pptx.kind).toBe('powerpoint')- expect(pptx.color).toBe('#FFA25B')+ expect(pptx.color).toBe('#FF6B35')const txt = getFileKindByExt('txt')expect(txt.kind).toBe('text')- expect(txt.color).toBe('#8CA77B')+ expect(txt.color).toBe('#94A3B8')})- it('correctly maps code and developer formats with cyan pastel', () => {+ it('correctly maps code and developer formats with indigo highlight', () => {const ts = getFileKindByExt('ts')expect(ts.kind).toBe('code')- expect(ts.color).toBe('#53CAF7')+ expect(ts.color).toBe('#818CF8')const py = getFileKindByExt('py')expect(py.kind).toBe('code')- expect(py.color).toBe('#53CAF7')+ expect(py.color).toBe('#818CF8')})- it('correctly maps media formats with respective pastel tones', () => {+ it('correctly maps media formats with respective tones', () => {const png = getFileKindByExt('png')expect(png.kind).toBe('image')- expect(png.color).toBe('#BA9B7B')+ expect(png.color).toBe('#06B6D4')const mp4 = getFileKindByExt('mp4')expect(mp4.kind).toBe('video')- expect(mp4.color).toBe('#64748B')+ expect(mp4.color).toBe('#A855F7')const mp3 = getFileKindByExt('mp3')expect(mp3.kind).toBe('audio')- expect(mp3.color).toBe('#C495FD')+ expect(mp3.color).toBe('#F43F5E')})- it('correctly maps archives with warm honey amber pastel', () => {+ it('correctly maps archives with warm amber tone', () => {const zip = getFileKindByExt('zip')expect(zip.kind).toBe('archive')- expect(zip.color).toBe('#FBBF24')+ expect(zip.color).toBe('#F59E0B')})- it('correctly maps folders with warm golden pastel', () => {+ it('correctly maps folders with warm radiant golden tone', () => {const folder = getFileKindByExt('folder', true)expect(folder.kind).toBe('folder')- expect(folder.color).toBe('#FBBF24')+ expect(folder.color).toBe('#FFDA44')const folderPath = getFileKind('C:\\my\\folder', true)expect(folderPath.kind).toBe('folder')- expect(folderPath.color).toBe('#FBBF24')+ expect(folderPath.color).toBe('#FFDA44')})it('correctly maps executables and system binaries', () => {const exe = getFileKindByExt('exe')expect(exe.kind).toBe('executable')- expect(exe.color).toBe('#93A4FC')+ expect(exe.color).toBe('#F59E0B')const msi = getFileKindByExt('msi')expect(msi.kind).toBe('executable')- expect(msi.color).toBe('#93A4FC')+ expect(msi.color).toBe('#F59E0B')})it('resolves unknown files to neutral slate fallback', () => {const unknown = getFileKind('C:\\file\\mystery.xyz123')expect(unknown.kind).toBe('file')- expect(unknown.color).toBe('#B0C0D0')+ expect(unknown.color).toBe('#CBD5E1')const noExtFile = getFileKind('C:\\file\\mysteryfile', false)expect(noExtFile.kind).toBe('file')- expect(noExtFile.color).toBe('#B0C0D0')+ expect(noExtFile.color).toBe('#CBD5E1')})it('resolves directory path with or without dots as folder when isDirectory is true', () => {const dotFolder = getFileKind('C:\\Projects\\my.folder.name', true)expect(dotFolder.kind).toBe('folder')- expect(dotFolder.color).toBe('#FBBF24')+ expect(dotFolder.color).toBe('#FFDA44')const plainFolder = getFileKind('C:\\Projects\\myFolder', true)expect(plainFolder.kind).toBe('folder')- expect(plainFolder.color).toBe('#FBBF24')+ expect(plainFolder.color).toBe('#FFDA44')})})diff --git a/tests/dragDrop.test.ts b/tests/dragDrop.test.tsindex 6e0630f..f45ceaa 100644--- a/tests/dragDrop.test.ts+++ b/tests/dragDrop.test.ts@@ -19,16 +19,21 @@ vi.mock('../electron/main/state', () => ({})}))-vi.mock('node:fs', () => ({- existsSync: vi.fn((path: string) => {- // Return true for mock source files- if (path.includes('mock\\images') || path.includes('mock\\real')) return true- return false- }),- copyFileSync: vi.fn(),- writeFileSync: vi.fn(),- mkdirSync: vi.fn()-}))+vi.mock('node:fs', async (importOriginal) => {+ const actual = await importOriginal<typeof import('node:fs')>()+ return {+ existsSync: vi.fn((path: string) => {+ // Real passthrough for the static file-icon art; mock behavior otherwise+ if (typeof path === 'string' && path.includes('file-icons')) return actual.existsSync(path)+ if (path.includes('mock\\images') || path.includes('mock\\real')) return true+ return false+ }),+ readFileSync: actual.readFileSync,+ copyFileSync: vi.fn(),+ writeFileSync: vi.fn(),+ mkdirSync: vi.fn()+ }+})describe('formatScreenshotFilename', () => {it('formats clean, human-readable screenshot filenames with dates and times', () => {@@ -168,10 +173,11 @@ describe('stageDragFile dual-channel payload', () => {})})-import { buildFileDragSvg, getFileKindSvgContent } from '../electron/main/fileSvg'+import { join } from 'node:path'+import { buildFileDragSvg, setFileIconAssetDir } from '../electron/main/fileSvg'import type { FileKind } from '../src/lib/fileType'-describe('buildFileDragSvg — standalone 3D pastel vector drag icons', () => {+describe('buildFileDragSvg — vintage PNG drag icons', () => {const allKinds: FileKind[] = ['pdf','word',@@ -188,39 +194,41 @@ describe('buildFileDragSvg — standalone 3D pastel vector drag icons', () => {'file']- it('generates valid SVG content for all 13 file categories without bounding boxes', () => {+ setFileIconAssetDir(join(process.cwd(), 'resources', 'file-icons'))++ it('embeds real PNG art for all 13 file categories', () => {for (const kind of allKinds) {- const content = getFileKindSvgContent(kind)- expect(content).toBeTruthy()- // Ensure no black container box- expect(content).not.toContain('fill="#000000"')- expect(content).not.toContain('stroke="rgba(255,255,255,0.18)"')+ const svg = buildFileDragSvg([kind], 1)+ expect(svg).toContain('<svg')+ expect(svg).toContain('viewBox="0 0 512 512"')+ // Embedded raster art, never the old vector gradients or black boxes+ expect(svg).toContain('<image')+ expect(svg).toContain('data:image/png;base64,')+ expect(svg).not.toContain('linearGradient')+ expect(svg).not.toContain('fill="#000000"')}})- it('builds a clean single-file drag icon SVG without glass card or background', () => {+ it('builds a single-file drag icon without a count badge', () => {const svg = buildFileDragSvg(['pdf'], 1)expect(svg).toContain('<svg')- expect(svg).toContain('viewBox="0 0 512 512"')- expect(svg).toContain('#FF7C8E')- expect(svg).not.toContain('fill="#000000"')- expect(svg).not.toContain('<rect x="16" y="8" width="64" height="72"')+ expect(svg).toContain('<image')+ expect(svg).not.toContain('<text')})- it('builds a clean single folder drag icon SVG with warm yellow folder colors', () => {- const svg = buildFileDragSvg(['folder'], 1)+ it('builds a multi-file stack SVG with count badge', () => {+ const svg = buildFileDragSvg(['pdf', 'excel', 'image'], 3)expect(svg).toContain('<svg')- expect(svg).toContain('fill="#FBBF24"')- expect(svg).toContain('fill="#FDE68A"')+ expect(svg).toContain('+3')+ expect(svg.match(/<image/g)?.length).toBe(3)})- it('builds a clean multi-file stack SVG with count badge', () => {- const svg = buildFileDragSvg(['pdf', 'excel', 'image'], 3)+ it('falls back gracefully when art is missing', () => {+ setFileIconAssetDir(join(process.cwd(), 'resources', 'does-not-exist'))+ const svg = buildFileDragSvg(['pdf'], 1)expect(svg).toContain('<svg')- expect(svg).toContain('+3')- expect(svg).toContain('stack-0')- expect(svg).toContain('stack-1')- expect(svg).toContain('stack-2')+ expect(svg).not.toContain('<image')+ setFileIconAssetDir(join(process.cwd(), 'resources', 'file-icons'))})})diff --git a/tests/fileIcons.test.ts b/tests/fileIcons.test.tsnew file mode 100644index 0000000..34bb2e1--- /dev/null+++ b/tests/fileIcons.test.ts@@ -0,0 +1,35 @@+import { describe, expect, it } from 'vitest'+import { join } from 'node:path'+import { fileIconUrl, type FileKind } from '../src/lib/fileType'+import { resolveIconAsset } from '../electron/main/imageProtocol'++const ALL_KINDS: FileKind[] = [+ 'pdf', 'word', 'excel', 'powerpoint', 'archive', 'text', 'code',+ 'audio', 'video', 'image', 'executable', 'folder', 'file'+]++describe('vintage PNG file icons', () => {+ it('fileIconUrl points every kind at its edgelocal icon', () => {+ for (const kind of ALL_KINDS) {+ expect(fileIconUrl(kind)).toBe(`edgelocal://icon/${kind}.png`)+ }+ })++ it('resolveIconAsset accepts the 13 icon names in resources/file-icons', () => {+ const dir = join(process.cwd(), 'resources', 'file-icons')+ for (const kind of ALL_KINDS) {+ const resolved = resolveIconAsset(dir, `${kind}.png`)+ expect(resolved).toBeTruthy()+ expect(resolved?.toLowerCase().endsWith(`${kind}.png`)).toBe(true)+ }+ })++ it('resolveIconAsset rejects traversal, wrong types, and unknown names', () => {+ const dir = join(process.cwd(), 'resources', 'file-icons')+ expect(resolveIconAsset(dir, '../settings.json')).toBeNull()+ expect(resolveIconAsset(dir, '..\\settings.json')).toBeNull()+ expect(resolveIconAsset(dir, 'evil.svg')).toBeNull()+ expect(resolveIconAsset(dir, 'nope.png')).toBeNull()+ expect(resolveIconAsset(dir, '')).toBeNull()+ })+})diff --git a/tests/horizontalSettings.test.ts b/tests/horizontalSettings.test.tsindex fa3448a..ccc172e 100644--- a/tests/horizontalSettings.test.ts+++ b/tests/horizontalSettings.test.ts@@ -320,17 +320,17 @@ it('Appearance shelf renders Card 1 Copy Indicator toggle first, then Card 2 Indexpect(itemCss).not.toContain('backdrop-filter')})- it('ItemList applies dynamic vertical font scaling and panel.css bounds for horizontal pinned pill', () => {+ it('ItemList applies horizontal pinned accordion and floating capsule pill', () => {const itemListSrc = read('src/components/ItemList.tsx')- expect(itemListSrc).toContain('getVerticalPinnedLabelStyle')- expect(itemListSrc).toContain('getVerticalPinnedLabelStyle(t(\'item.pinned\'))')- expect(itemListSrc).toContain('pinned-label-group')+ expect(itemListSrc).toContain('pinned-accordion')+ expect(itemListSrc).toContain('pinned-floating-pill')+ expect(itemListSrc).toContain('--pinned-target-width')const panelCss = read('src/styles/panel.css')- expect(panelCss).toContain('.list.horizontal .pinned-header-interactive')- expect(panelCss).toContain('max-height: 68px')- expect(panelCss).toContain('text-overflow: ellipsis')- expect(panelCss).toContain('margin: auto 0')+ expect(panelCss).toContain('.pinned-accordion.horizontal')+ expect(panelCss).toContain('.pinned-floating-pill.horizontal')+ expect(panelCss).toContain('var(--pinned-target-width')})});+