// Press-and-hold to peek, mirroring the board's cell gesture. Touch has no // hover, so every board fixture answers a 450ms hold with its tooltip. const HOLD_MS = 450; /** Wire the result's press/release to onpointerdown/-up/-leave. */ export function holdToPeek(fire: () => void) { let timer: ReturnType | null = null; return { press() { timer = setTimeout(fire, HOLD_MS); }, release() { if (timer) clearTimeout(timer); timer = null; }, }; }