Add the swipe gesture to the Discover deck's top card
CI / ci (push) Successful in 2m53s
CI / ci (pull_request) Successful in 2m39s

The top card follows a pointer drag per handoff Motion §4: captured with
setPointerCapture under touch-action none, it moves to translate(dx, dy*0.3)
rotate(dx/18 deg) with the "Try it!" and "Pass" stamps at clamp(±dx/100).
A release past 110 px right throws it from where it was let go (340 ms, no
wiggle); past 110 px left folds it from the drag transform; anything shorter
springs back over 420 ms and resets the stamps. Swipe decisions go through
the same decide handler as the buttons and ← / → keys, so the busy lock and
reduced-motion fade apply unchanged; only the top card is draggable and
input is ignored while busy.

motion.ts gains dragTransform, follow, unfollow and snapBack beside the
exits; DeckCard marks its Pass stamp as a part.

Maestro task 54c12e9e-5f36-4595-babb-e54107bb473b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 01:54:58 -04:00
co-authored by Claude Opus 5.5
parent c0ea1b9323
commit 78b0c7b84c
6 changed files with 528 additions and 21 deletions
+6
View File
@@ -104,6 +104,12 @@
box-shadow: var(--shadow-lg);
}
/* The top card follows a drag instead of scrolling the page. */
.draggable {
touch-action: none;
cursor: grab;
}
.depth1 {
z-index: 2;
transform: translateY(8px) scale(0.95);