From c08b086013f0e3897ee500e93d95f7c568eb4f13 Mon Sep 17 00:00:00 2001 From: "hermes-seaeye[bot]" <307254004+hermes-seaeye[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 10:44:00 +0000 Subject: [PATCH] fmt(js): `npm run fix` on merge (#83132) Co-authored-by: github-actions[bot] --- apps/desktop/electron/hud-snap-shortcut.ts | 5 ++++- apps/desktop/electron/hud-snap.ts | 6 +----- apps/desktop/electron/main.ts | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/desktop/electron/hud-snap-shortcut.ts b/apps/desktop/electron/hud-snap-shortcut.ts index 5da8bb1cb873f..1bc94f44ddfe6 100644 --- a/apps/desktop/electron/hud-snap-shortcut.ts +++ b/apps/desktop/electron/hud-snap-shortcut.ts @@ -18,7 +18,10 @@ export interface HudSnapShortcutController { dispose(): void } -export function createHudSnapShortcut(globalShortcut: GlobalShortcutLike, onSnap: () => void): HudSnapShortcutController { +export function createHudSnapShortcut( + globalShortcut: GlobalShortcutLike, + onSnap: () => void +): HudSnapShortcutController { let active: null | string = null const release = () => { diff --git a/apps/desktop/electron/hud-snap.ts b/apps/desktop/electron/hud-snap.ts index 56bdac13d40e2..947fac1980f4f 100644 --- a/apps/desktop/electron/hud-snap.ts +++ b/apps/desktop/electron/hud-snap.ts @@ -22,11 +22,7 @@ interface Rect { * Window top-left in screen space (DIP) that places `anchor` — a point in the * window's CSS pixels — under `cursor` (screen DIP). */ -export function windowOriginForCursorAnchor( - cursor: Point, - anchor: Point, - zoomFactor: number -): Point { +export function windowOriginForCursorAnchor(cursor: Point, anchor: Point, zoomFactor: number): Point { const scale = Number.isFinite(zoomFactor) && zoomFactor > 0 ? zoomFactor : 1 return { diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts index d743b1f065b0c..467108228551e 100644 --- a/apps/desktop/electron/main.ts +++ b/apps/desktop/electron/main.ts @@ -9226,6 +9226,7 @@ function applyHudSnapToPointer() { const display = screen.getDisplayNearestPoint(cursor) const workArea = display?.workArea ?? bounds const anchor = { x: Math.round(bounds.width / 2), y: HUD_SNAP_ANCHOR_Y } + const origin = snapHudBounds( cursor, anchor,