chore(format): run prettier over src/ and scripts/

Formatting was configured but never enforced: `bun run format:check`
reported 199 unformatted files and ran in no workflow and in no git hook,
so .prettierrc (printWidth 100, trailing commas) described an intention
rather than the tree.

This is the one-time sweep that makes the check gateable. Whitespace and
token-reflow only -- no behavioural change: `bun run check` reports 0
errors and all 1053 frontend tests pass before and after.

Kept out of every other commit on purpose. A 199-file diff mixed with
real changes is unreviewable, and the next commit turns format:check
into a hard CI gate so this cannot silently accumulate again.
This commit is contained in:
2026-08-21 17:41:44 +02:00
parent d095e1f410
commit ad48d89dfe
199 changed files with 4698 additions and 3453 deletions
+6 -6
View File
@@ -6,7 +6,7 @@
export interface MenuPosition {
x: number;
y: number;
placement: 'bottom' | 'top';
placement: "bottom" | "top";
}
/**
@@ -19,7 +19,7 @@ export interface MenuPosition {
export function calculateMenuPosition(
triggerElement: HTMLElement,
menuWidth: number = 160,
menuHeight: number = 120
menuHeight: number = 120,
): MenuPosition {
const rect = triggerElement.getBoundingClientRect();
const viewportHeight = window.innerHeight;
@@ -32,20 +32,20 @@ export function calculateMenuPosition(
const fitsAbove = spaceAbove >= menuHeight + 8;
let y: number;
let placement: 'bottom' | 'top';
let placement: "bottom" | "top";
if (fitsBelow) {
// Prefer below if there's space
y = rect.bottom + 4; // 4px gap
placement = 'bottom';
placement = "bottom";
} else if (fitsAbove) {
// Show above if no space below
y = rect.top - menuHeight - 4; // 4px gap
placement = 'top';
placement = "top";
} else {
// Not enough space either way - prefer below and let it extend
y = rect.bottom + 4;
placement = 'bottom';
placement = "bottom";
}
// Horizontal positioning - align right edge of menu with right edge of button