Files
hyperframes/packages
ukimsanov 14e6869c1b feat(studio): arrow-key nudge for canvas elements
Arrow keys move the selected canvas element(s) by 1 composition px, Shift
by 10 — the top-ranked gap vs CapCut-class editors. The nudge reuses the
manual-offset drag machinery end to end: the same drag-member snapshot,
the same GSAP/CSS preview channel per keypress, and the same path-offset
commit a drag drop uses, so persistence and undo behave identically to a
tiny drag. A key-repeat burst commits once (400ms debounce after the last
arrow, flushed on selection change / pointerdown / unmount) = one undo
entry per burst.

Guards: no text-input/contentEditable focus, no pointer gesture in flight,
every target must support manual offset, plain/Shift arrows only. Caption
editing is safe by construction (CaptionOverlay and DomEditOverlay mount
mutually exclusively). While a nudgeable selection exists, ArrowLeft/Right
frame-stepping yields via a claim gate (both listen on window capture with
mount-order-dependent priority, so defaultPrevented can't arbitrate) —
deliberate behavior change: arrows nudge when an element is selected,
frame-step otherwise.
2026-07-10 10:23:54 -07:00
..
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00
2026-07-10 09:57:48 -07:00