export interface UseAutoLockOptions { /** * Reports whether the session is currently "unlocked" (vault-style * apps) or any other state where the auto-lock should still fire. * Returning `false` short-circuits the lock call. */ isUnlocked: () => boolean; /** Called when the lock should fire. App owns side-effects. */ onLock: () => void; /** Reports whether auto-lock is enabled for this user (settings flag). */ isEnabled?: () => boolean | Promise; /** Idle threshold in milliseconds. Defaults to 10 minutes. */ idleLockMs?: number; } export interface UseAutoLockResult { /** * Call on any real user interaction to reset the idle clock. Required * on native: unlike web (which listens on `window` for * mousemove/touchstart/scroll/keydown directly), RN has no global * "any touch happened anywhere" event — a touch inside a `Pressable`, * `ScrollView`, etc. never reaches `window`, because there is no * `window` to reach. Without a caller wiring this up (e.g. a capture- * phase `onStartShouldSetResponderCapture` at the app root, returning * `false` so it never actually claims the touch), the idle timer is * armed once at mount and never reset — the session locks exactly * `idleLockMs` after mount/foreground REGARDLESS of how actively the * app is being used. Confirmed for real: a vault mid-active-use lost * its key mid-session, and every item silently failed to decrypt * (`Promise.allSettled` in the caller's list-fetch treats a decrypt * failure as "drop this item", not "the vault relocked"), which reads * to the user as vault items simply vanishing — no error, no visible * cause, on 2026-08-17. */ notifyActivity: () => void; } /** * Auto-lock a session after a period of inactivity. Generic over the * lock predicate — vault wires `KeyManager.isUnlocked` / `KeyManager.lock`, * other apps wire their own state. Web uses an idle-timer only; native * additionally locks immediately when the app goes to the background. */ export declare function useAutoLock(options: UseAutoLockOptions): UseAutoLockResult; //# sourceMappingURL=useAutoLock.d.ts.map