// Small bits of global UI state: toasts and the "new version" prompt. class Ui { toast = $state(null); updateReady = $state(false); private timer: ReturnType | undefined; show(msg: string, ms = 2500) { this.toast = msg; clearTimeout(this.timer); this.timer = setTimeout(() => (this.toast = null), ms); } } export const ui = new Ui();