managarten/packages/shared-ui/src/toast/index.ts
Till-JS cdac341882 ♻️ refactor: centralize global error handler in shared-ui
Extract setupGlobalErrorHandler() utility from contacts app and add to
@manacore/shared-ui. Migrate 7 apps to use the shared implementation:
calendar, chat, clock, contacts, matrix, picture, storage.

Features:
- Catches unhandled promise rejections with error classification
- Handles offline/online network status changes
- Built-in i18n (DE + EN) with customizable translations
- Optional onAuthError callback for redirect handling
- Returns cleanup function for proper unmounting
2026-01-29 15:17:17 +01:00

8 lines
390 B
TypeScript

export { toastStore, toast, handleApiError } from './toast.svelte';
export type { Toast, ToastType } from './toast.svelte';
export { default as ToastContainer } from './ToastContainer.svelte';
export { setupGlobalErrorHandler, GLOBAL_ERROR_TRANSLATIONS } from './globalErrorHandler';
export type {
GlobalErrorHandlerOptions,
GlobalErrorHandlerTranslations,
} from './globalErrorHandler';