Add application feedback and refine headless canvas design boundaries

This commit is contained in:
2026-11-07 00:31:16 +08:00
parent 20d877a346
commit d0a9627cb6
12 changed files with 352 additions and 12 deletions
+10
View File
@@ -0,0 +1,10 @@
"use client";
import { toast } from "sonner";
/** Application adapter. Domain/editor packages must not import Sonner. */
export type Notification = { id: string; title: string; description?: string; level?: "info" | "success" | "warning" | "error" };
export function notify({ id, title, description, level = "info" }: Notification) {
return toast[level](title, { id, description });
}
export function dismissNotification(id: string) { toast.dismiss(id); }