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 { Spinner, ToastProvider } from '@heroui/react'; import { Component, ReactNode, ErrorInfo, ComponentProps, JSX } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; /** * @module bridges * @package @geenius/adapters/react-heroui * @description HeroUI-native bridge components for adapter loading, error, * and notification surfaces. The adapter contract stays in the React package; * this module only adds HeroUI rendering affordances. */ type SpinnerSize = ComponentProps["size"]; type SpinnerColor = ComponentProps["color"]; type ToastPlacement = ComponentProps["placement"]; type ToastStatus = "default" | "info" | "success" | "warning" | "danger" | "error"; /** * Props accepted by the HeroUI loading bridge. * * @property loading Optional loading flag. Defaults to `true` when omitted. * @property isLoading Alias for `loading` used by async adapter states. * @property label Primary loading message. * @property description Optional supporting loading message. * @property children Content rendered when loading is explicitly false. * @property className Optional class name passed to the HeroUI card. * @property size HeroUI spinner size. * @property spinnerColor HeroUI spinner color. */ interface LoadingBridgeProps { loading?: boolean; isLoading?: boolean; label?: ReactNode; description?: ReactNode; children?: ReactNode; className?: string; size?: SpinnerSize; spinnerColor?: SpinnerColor; } /** * Renders a HeroUI loading surface for async adapter initialization. * * @param props Loading bridge props. * @returns A HeroUI card containing a spinner, or children when loading is false. */ declare function LoadingBridge({ loading, isLoading, label, description, children, className, size, spinnerColor, }: LoadingBridgeProps): JSX.Element; /** * Props accepted by the HeroUI error boundary bridge. * * @property children Child subtree protected by the boundary. * @property error Optional controlled error for async adapter workflows. * @property title Error alert title. * @property actionLabel Reset button label. * @property fallback Optional custom fallback node or render function. * @property onError Called when a child render error is caught. * @property onReset Called when the reset action clears a caught error. * @property className Optional class name passed to the HeroUI alert. */ interface ErrorBoundaryBridgeProps { children?: ReactNode; error?: unknown; title?: ReactNode; actionLabel?: ReactNode; fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode); onError?: (error: Error, errorInfo: ErrorInfo) => void; onReset?: () => void; className?: string; } interface ErrorBoundaryBridgeState { caughtError: Error | null; } /** * Catches React render failures and displays them with HeroUI alert primitives. */ declare class ErrorBoundaryBridge extends Component { state: ErrorBoundaryBridgeState; componentDidCatch(error: Error, errorInfo: ErrorInfo): void; private reset; render(): ReactNode; } /** * Props accepted by the HeroUI toast bridge. * * @property children Optional subtree rendered inside the HeroUI toast provider. * @property message Declarative toast message to emit when `open` is true. * @property description Optional toast description. * @property status Toast severity. * @property open Whether the toast should be emitted. * @property toastKey Stable dedupe key for repeated declarative renders. * @property timeout Optional toast timeout in milliseconds. * @property onClose Called by HeroUI when the toast closes. * @property onShown Receives the HeroUI toast id after emission. * @property placement HeroUI toast placement. * @property className Optional class name passed to the HeroUI provider. */ interface ToastBridgeProps { children?: ReactNode; message?: ReactNode; description?: ReactNode; status?: ToastStatus; open?: boolean; toastKey?: string; timeout?: number; onClose?: () => void; onShown?: (toastId: string) => void; placement?: ToastPlacement; className?: string; } /** * Provides HeroUI toast rendering and optionally emits a declarative toast. * * @param props Toast bridge props. * @returns A HeroUI toast provider wrapping optional children. */ declare function ToastBridge({ children, message, description, status, open, toastKey, timeout, onClose, onShown, placement, className, }: ToastBridgeProps): JSX.Element; 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 };