chore: remove dead search dialog overlay code

This commit is contained in:
2026-06-16 10:24:49 +02:00
committed by Milas Holsting
parent a37e609880
commit 1770492b00
4 changed files with 4 additions and 94 deletions

View File

@@ -23,19 +23,13 @@ export const searchInput = document.getElementById(
export const searchResults = document.querySelector(
"[data-command-palette-results]",
) as HTMLElement | null;
export const searchDialog = document.querySelector(
"[data-command-palette-dialog]",
) as HTMLElement | null;
export const searchRoot = document.querySelector(
"[data-command-palette-root]",
) as HTMLElement | null;
export const searchPage = document.querySelector(
"[data-command-palette-page]",
) as HTMLElement | null;
export const searchOpenButtons = document.querySelectorAll("[data-command-palette-open]");
export const searchCloseButtons = document.querySelectorAll("[data-command-palette-close]");
export const searchClearButtons = document.querySelectorAll("[data-command-palette-clear]");
export const shortcutHints = document.querySelectorAll("[data-command-palette-shortcut]");
let resultItems: CommandPaletteItem[] = [];
let selectedIndex = 0;
@@ -175,8 +169,6 @@ export const isTypingTarget = (target: EventTarget | null): boolean =>
target instanceof HTMLSelectElement ||
(target instanceof HTMLElement && target.isContentEditable);
export const isSearchOpen = (): boolean => searchDialog?.classList.contains("flex") ?? false;
export const isSafeImageUrl = (rawUrl?: string): boolean => {
if (!rawUrl) {
return false;