- CommandPalette (Alt+K): fuzzy action launcher with keyboard nav. - Toasts: ephemeral notification stack + provider. - useGlobalHotkeys: Alt+K palette toggle, G-chord navigation (G D/F/M/L/B/A/S/U/E/C), respects editable-element focus. - Layout/App: wire ToastProvider at root, mount the palette inside the authed shell, introduce the global search box in the top bar. - MazeNETRoute now renders TopologyList inline when no ?topology is present, instead of bouncing through a redirect. - index.css: a few global token tweaks consumed by the new chrome. Fixes a latent breakage: Config.tsx and MazeNET already imported ./Toasts/useToast but the directory was never committed.
20 lines
391 B
TypeScript
20 lines
391 B
TypeScript
import { createContext } from 'react';
|
|
|
|
export type ToastTone = 'matrix' | 'violet' | 'alert';
|
|
|
|
export interface ToastInput {
|
|
text: string;
|
|
icon?: string;
|
|
tone?: ToastTone;
|
|
}
|
|
|
|
export interface Toast extends ToastInput {
|
|
id: number;
|
|
}
|
|
|
|
export interface ToastContextValue {
|
|
push: (t: ToastInput) => void;
|
|
}
|
|
|
|
export const ToastContext = createContext<ToastContextValue | null>(null);
|