Files
BetterSEQTA-Plus/src/seqta/utils/openThemeStoreWithHighlight.ts
T
AdenMGB d10fca6c0f perf: reduce startup work and fix grade analytics bar chart animation
Batch settings storage writes, tier plugin startup, lazy-load heavy UI
chunks, and optimize global search indexing. Stop tweening bar height in
grade analytics to prevent invalid negative SVG rect values.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 11:33:30 +09:30

26 lines
703 B
TypeScript

/**
* Module-level handoff for "open the theme store and highlight this theme".
*/
let pendingHighlightThemeId: string | null = null;
export function consumePendingHighlightThemeId(): string | null {
const id = pendingHighlightThemeId;
pendingHighlightThemeId = null;
return id;
}
export async function openThemeStoreWithHighlight(themeId: string): Promise<void> {
pendingHighlightThemeId = themeId;
const existing = document.getElementById("store");
if (existing) {
window.dispatchEvent(
new CustomEvent("bsplus:highlight-theme", { detail: { themeId } }),
);
return;
}
const { OpenStorePage } = await import("@/seqta/ui/renderStore");
await OpenStorePage();
}