feat(ui): add drag-and-drop image upload to composers

Add an ImageDropOverlay component and useImageDropTarget hook that let
users drop an image onto the home prompt card or canvas agent composer to
upload it as a reference, with a localized drop overlay.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-11 01:02:12 +08:00
parent 58f11302fe
commit 0ef4b7c1ee
7 changed files with 342 additions and 2 deletions
@@ -22,6 +22,7 @@
padding: 8px;
border: 1px solid #e1e3e8;
border-radius: 24px;
--image-drop-radius: 24px;
background: #fff;
box-shadow: 0 8px 24px rgba(17, 24, 39, 0.1);
}
@@ -30,6 +31,7 @@
margin: 0;
border-color: #cbd2dc;
border-radius: 28px;
--image-drop-radius: 28px;
background: rgba(255, 255, 255, 0.98);
box-shadow: 0 18px 45px rgba(17, 24, 39, 0.14);
}