import { AdapterCardProps, AdapterConfigFormProps, AdapterListProps, AdapterStatusBadgeProps, AdapterDetailPageProps, AdaptersPageProps } from '@geenius/adapters/react'; export * from '@geenius/adapters/react'; export { AdapterCardProps, AdapterConfigFormProps, AdapterDetailPageProps, AdapterListProps, AdapterStatusBadgeProps, AdaptersPageProps } from '@geenius/adapters/react'; import { MantineColor, AlertProps, StackProps, LoaderProps, ProgressProps, NotificationProps } from '@mantine/core'; import { Component, ReactNode, ErrorInfo, JSX } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; /** * @module bridges * @package @geenius/adapters/react-mantine * @description Mantine-native bridge components for adapter loading, error, * and notification surfaces. Adapter contracts remain delegated to the React * reference variant; this module only owns Mantine rendering affordances. */ type DataAttributeProps = { [key: `data-${string}`]: string | number | boolean | undefined; }; /** * Props accepted by the Mantine async-adapter loading bridge. * * @property loading Controls whether the loading affordance or children render. * @property isLoading Alias for `loading` used by async adapter states. * @property label Accessible and visible loading label. * @property description Optional supporting loading copy. * @property progress Optional determinate progress from 0 through 100. * @property variant Chooses Mantine loader or progress primitives. * @property children Content rendered when loading is explicitly false. * @property color Mantine color applied to the loading primitive. * @property stackProps Props forwarded to the Mantine Stack wrapper. * @property loaderProps Props forwarded to the Mantine Loader primitive. * @property progressProps Props forwarded to the Mantine Progress primitive. */ interface LoadingBridgeProps { loading?: boolean; isLoading?: boolean; label?: ReactNode; description?: ReactNode; progress?: number; variant?: "loader" | "progress"; children?: ReactNode; color?: MantineColor; stackProps?: Omit & DataAttributeProps; loaderProps?: LoaderProps; progressProps?: Omit; } /** * Renders a Mantine loading affordance for async adapter operations. * * @param props Loading bridge props. * @returns Children when idle, otherwise an accessible Mantine loading surface. */ declare function LoadingBridge({ loading, isLoading, label, description, progress, variant, children, color, stackProps, loaderProps, progressProps, }: LoadingBridgeProps): JSX.Element; type ErrorBoundaryFallback = ReactNode | ((error: Error, reset: () => void) => ReactNode); /** * Props accepted by the Mantine adapter error boundary bridge. * * @property children React subtree protected by the boundary. * @property error Optional controlled error for async adapter workflows. * @property fallback Optional custom fallback renderer or node. * @property onError Callback invoked with the caught error and React error info. * @property onReset Called before local error state is reset. * @property title Heading displayed in the default Mantine alert fallback. * @property description Supporting copy displayed in the default fallback. * @property resetLabel Button label for retrying the protected subtree. * @property color Mantine color applied to the default fallback. * @property alertProps Additional props forwarded to the Mantine Alert. */ interface ErrorBoundaryBridgeProps { children?: ReactNode; error?: unknown; fallback?: ErrorBoundaryFallback; onError?: (error: Error, info: ErrorInfo) => void; onReset?: () => void; title?: ReactNode; description?: ReactNode; resetLabel?: ReactNode; color?: MantineColor; alertProps?: Omit & DataAttributeProps; } interface ErrorBoundaryBridgeState { caughtError: Error | null; } /** * Catches render-time failures and displays a Mantine-native adapter error state. */ declare class ErrorBoundaryBridge extends Component { state: ErrorBoundaryBridgeState; static getDerivedStateFromError(error: Error): ErrorBoundaryBridgeState; componentDidCatch(error: Error, info: ErrorInfo): void; private reset; render(): ReactNode; } type ToastBridgeVariant = "default" | "info" | "success" | "warning" | "error"; /** * Props accepted by the Mantine telemetry/notification toast bridge. * * @property open Whether the toast is visible. * @property message Message rendered inside the Mantine notification. * @property title Optional notification title. * @property variant Semantic toast variant mapped to Mantine colors. * @property color Explicit Mantine color override. * @property onClose Called when the close button is clicked. * @property withCloseButton Controls whether the Mantine close button renders. * @property icon Optional notification icon. * @property loading Replaces the notification color line/icon with Mantine Loader. * @property notificationProps Additional Mantine Notification props. * @property children Optional extra notification content. */ interface ToastBridgeProps { open?: boolean; message?: ReactNode; title?: ReactNode; variant?: ToastBridgeVariant; color?: MantineColor; onClose?: () => void; withCloseButton?: boolean; icon?: ReactNode; loading?: boolean; notificationProps?: Omit & DataAttributeProps; children?: ReactNode; } /** * Renders adapter telemetry or notification messages through Mantine Notification. * * @param props Toast bridge props. * @returns A Mantine notification when open, otherwise `null`. */ declare function ToastBridge({ open, message, title, variant, color, onClose, withCloseButton, icon, loading, notificationProps, children, }: ToastBridgeProps): JSX.Element | null; declare function AdapterCard(props: AdapterCardProps): react_jsx_runtime.JSX.Element; declare function AdapterConfigForm(props: AdapterConfigFormProps): react_jsx_runtime.JSX.Element; declare function AdapterList(props: AdapterListProps): react_jsx_runtime.JSX.Element; declare function AdapterStatusBadge(props: AdapterStatusBadgeProps): react_jsx_runtime.JSX.Element; declare function AdapterDetailPage(props: AdapterDetailPageProps): react_jsx_runtime.JSX.Element; declare function AdaptersPage(props: AdaptersPageProps): react_jsx_runtime.JSX.Element; export { AdapterCard, AdapterConfigForm, AdapterDetailPage, AdapterList, AdapterStatusBadge, AdaptersPage, ErrorBoundaryBridge, type ErrorBoundaryBridgeProps, LoadingBridge, type LoadingBridgeProps, ToastBridge, type ToastBridgeProps, type ToastBridgeVariant };