import { type Define } from '@sigx/lynx'; export type PressableProps = Define.Prop<'pressedOpacity', number, false> & Define.Prop<'pressedScale', number, false> & Define.Prop<'longPressDuration', number, false> & Define.Prop<'maxDistance', number, false> & Define.Prop<'disabled', boolean, false> & Define.Prop<'class', string, false> & Define.Prop<'style', Record, false> & Define.Prop<'accessibility-element', boolean, false> & Define.Prop<'accessibility-label', string, false> & Define.Prop<'accessibility-role', string, false> & Define.Prop<'accessibility-trait', string, false> & Define.Prop<'accessibility-status', string, false> & Define.Slot<'default'> & Define.Event<'press', void> & Define.Event<'longPress', void>; /** * MT-thread tap + long-press recognizer with built-in pressed-state visual * feedback (opacity + scale). Press and long-press callbacks are dispatched * to BG via `runOnBackground` (low-frequency cross-thread is fine). * * Cross-platform gesture-arena quirks (Phase 2.12.1, observed on iOS Lynx * 3.5 sim and Android Lynx 3.6 / Pixel 9 Pro XL) make this component a * hybrid: it composes `Gesture.Tap()` + `Gesture.LongPress()` via * `Simultaneous` AND adds an onEnd-fallback path inside LongPress, so press * emission works on both platforms via different routes: * * - **Android**: `Tap.onStart` fires on touch-up (as documented). Press * emits there; the LongPress fallback sees `pressEmitted=true` and * skips. `Tap.onEnd` fires on the same touch-up — but iOS's premature * onEnd (next bullet) means we can't safely reset styles here, so style * reset lives in LongPress.onEnd. * - **iOS**: `Tap.onEnd` fires ~6ms after touchstart (an arena * fail/reset path that doesn't trigger on Android). `Tap.onStart` * never fires for our composition. We rely on `LongPress.onEnd` to * detect "lift before duration with no movement" and emit press from * the fallback. `Gesture.Race` would be simpler in theory, but its * `waitFor` deadlocks Tap on iOS — the arena dispatches Tap before * LongPress reaches Fail state. * * State tracks `longPressFired` and `pressEmitted` so neither event * double-fires regardless of which platform path resolves first. * Movement past `maxDistance` is tracked from `e.params.pageX/pageY`; * `LongPress.onEnd` skips press emission when the touch drifted past * the threshold (matching Tap's success criteria). * * `disabled` reads live from a `MainThreadRef` so flipping it after mount * (e.g. a `