export * from '@geenius/adapters/react'; import { ArgsProps } from 'antd/lib/notification/index.js'; import { ProgressProps } from 'antd/lib/progress/index.js'; import { SpinProps } from 'antd/lib/spin/index.js'; import { Component, ReactNode, ErrorInfo, JSX } from 'react'; import { AdapterDomain, AdapterStatusInfo, DomainAdapterConfig, AdapterStatusType } from '@geenius/adapters'; /** * @module bridges * @package @geenius/adapters/react-ant * @description Ant Design bridge components for adapter loading, error, and * notification surfaces. Adapter contracts stay delegated to the React * reference variant; this module only owns Ant rendering affordances. */ type LoadingBridgeVariant = "spin" | "progress"; type ToastBridgePlacement = NonNullable; interface LoadingBridgeProps { loading?: boolean; isLoading?: boolean; label?: ReactNode; description?: ReactNode; progress?: number; variant?: LoadingBridgeVariant; children?: ReactNode; className?: string; spinProps?: SpinProps; progressProps?: ProgressProps; } /** * Renders an Ant Design loading affordance for async adapter operations. */ declare function LoadingBridge({ loading, isLoading, label, description, progress, variant, children, className, spinProps, progressProps, }: LoadingBridgeProps): JSX.Element; type ErrorBoundaryFallback = ReactNode | ((error: Error, reset: () => void) => ReactNode); interface ErrorBoundaryBridgeProps { children?: ReactNode; error?: unknown; fallback?: ErrorBoundaryFallback; onError?: (error: Error, info: ErrorInfo) => void; onReset?: () => void; title?: ReactNode; description?: ReactNode; resetLabel?: ReactNode; className?: string; } interface ErrorBoundaryBridgeState { caughtError: Error | null; } /** * Catches React render failures and displays them with Ant alert primitives. */ declare class ErrorBoundaryBridge extends Component { state: ErrorBoundaryBridgeState; static getDerivedStateFromError(error: Error): ErrorBoundaryBridgeState; componentDidCatch(error: Error, info: ErrorInfo): void; private reset; render(): ReactNode; } type ToastBridgeStatus = "default" | "info" | "success" | "warning" | "error"; interface ToastBridgeProps { children?: ReactNode; open?: boolean; message?: ReactNode; description?: ReactNode; status?: ToastBridgeStatus; toastKey?: string; duration?: number; placement?: ToastBridgePlacement; onClose?: () => void; onShown?: () => void; notificationProps?: Omit; } /** * Emits Ant Design notifications declaratively while rendering optional * children and the required notification context holder. */ declare function ToastBridge({ children, open, message, description, status, toastKey, duration, placement, onClose, onShown, notificationProps, }: ToastBridgeProps): JSX.Element; /** * @module AdapterCard * @package @geenius/adapters/react-ant * @description Renders the Ant Design tokenized adapter summary card for the React * variant. The card surfaces provider status, latency, and domain metadata for * one adapter domain in the dashboard views. */ /** * Props for rendering a single adapter summary card in the React dashboard grid. * * @property domain Adapter domain represented by the card. * @property status Current provider health and metadata for the domain. * @property onClick Optional callback fired when the card is activated. * @property className Optional class name merged into the card container. * @property style Optional inline styles merged into the card container. */ interface AdapterCardProps { domain: AdapterDomain; status: AdapterStatusInfo; onClick?: () => void; className?: string; style?: React.CSSProperties; } /** * Renders a clickable React summary card for one adapter domain. * * @param props Card props including the adapter domain, status payload, and click handler. * @returns A button element that summarizes provider state for the selected domain. */ declare function AdapterCard({ domain, status, onClick, className, style, }: AdapterCardProps): JSX.Element; /** * @module AdapterConfigForm * @package @geenius/adapters/react-ant * @description Renders the Ant Design-based React adapter configuration form. * This component is used inside adapter pages and dialogs to collect the * provider-specific credentials required for each infrastructure domain. */ /** * Props accepted by the React adapter configuration form. * * @property domain Adapter domain being configured in the current dialog * @property initialConfig Existing configuration values used to hydrate the form * @property onSave Async or sync handler that persists the submitted configuration * @property onCancel Optional callback invoked when the user dismisses the form * @property className Optional class name merged onto the form root * @property style Optional inline styles merged onto the form root * @property titleId Optional identifier applied to the form title for dialog labelling */ interface AdapterConfigFormProps { domain: AdapterDomain; initialConfig?: DomainAdapterConfig; onSave: (config: DomainAdapterConfig) => Promise | void; onCancel?: () => void; className?: string; style?: React.CSSProperties; titleId?: string; } /** * Renders the adapter configuration workflow for a single adapter domain. * * @param props Component props controlling the selected domain and form callbacks * @returns A provider chooser and credential form styled with the React variant */ declare function AdapterConfigForm({ domain, initialConfig, onSave, onCancel, className, style, titleId, }: AdapterConfigFormProps): JSX.Element; /** * @module AdapterList * @package @geenius/adapters/react-ant * @description Renders the searchable tokenized Ant Design adapter grid for the React variant. The * list consumes provider status from context and delegates selection events to * the hosting page or dashboard shell. */ /** * Props for rendering the React adapter list and optional status filter controls. * * @property onSelect Optional callback invoked when a domain card is selected. * @property filterStatus Optional status filter applied before rendering the grid. * @property className Optional class name merged into the outer wrapper. * @property style Optional inline styles merged into the outer wrapper. */ interface AdapterListProps { onSelect?: (domain: AdapterDomain) => void; filterStatus?: AdapterStatusType; className?: string; style?: React.CSSProperties; } /** * Renders the searchable React adapter list backed by shared provider state. * * @param props List props including selection callback, status filtering, and wrapper class names. * @returns The adapter grid or an empty/loading state when no entries are available. */ declare function AdapterList({ onSelect, filterStatus, className, style, }: AdapterListProps): JSX.Element; /** * @module AdapterStatusBadge * @package @geenius/adapters/react-ant * @description Renders the Ant Design tokenized adapter status badge for the React * variant. The badge exposes the shared adapter status vocabulary in a compact, * themeable visual treatment. */ /** * Props for rendering the React adapter status badge. * * @property status Shared adapter status vocabulary value to display. * @property showLabel Whether the human-readable label should be rendered. * @property size Visual size variant for the badge and status dot. * @property className Optional class name merged into the badge wrapper. * @property style Optional inline styles merged into the badge wrapper. */ interface AdapterStatusBadgeProps { status: AdapterStatusType; showLabel?: boolean; size?: "sm" | "md"; className?: string; style?: React.CSSProperties; } /** * Renders a compact React badge for the current adapter lifecycle state. * * @param props Badge props including the status token, optional label visibility, and size variant. * @returns A styled badge element that mirrors the shared adapter status taxonomy. */ declare function AdapterStatusBadge({ status, showLabel, size, className, style, }: AdapterStatusBadgeProps): JSX.Element; /** * @module AdapterDetailPage * @package @geenius/adapters/react-ant * @description Renders the single-domain adapter detail view for the React * variant. The page surfaces current provider health, available providers, and * inline configuration for one adapter domain using Ant Design tokens. */ /** * Props for rendering the React single-domain adapter detail page. * * @property domain Adapter domain whose provider details should be displayed. * @property onBack Optional callback for returning to the dashboard view. * @property className Optional class name merged into the page container. * @property style Optional inline styles merged into the page container. */ interface AdapterDetailPageProps { domain: AdapterDomain; onBack?: () => void; className?: string; style?: React.CSSProperties; } /** * Renders the React adapter detail page for one adapter domain. * * @param props Page props including the selected domain and optional back-navigation handler. * @returns The detail view with provider health, available providers, and configuration affordances. */ declare function AdapterDetailPage({ domain, onBack, className, style, }: AdapterDetailPageProps): JSX.Element; /** * @module AdaptersPage * @package @geenius/adapters/react-ant * @description Renders the tokenized Ant Design-based adapters overview for the React * package. The page summarizes adapter health, supports status filtering, and * provides an accessible modal workflow for configuring each adapter domain. */ type RegistryEntry = { domain: AdapterDomain; provider: string; status: AdapterStatusType; }; /** * Props accepted by the React adapters overview page. * * @property onNavigateDetail Optional callback used instead of opening the inline modal * @property className Optional class name merged onto the page root * @property style Optional inline styles merged onto the page root * @property registryEntries Optional adapter registry snapshot rendered above the grid */ interface AdaptersPageProps { onNavigateDetail?: (domain: AdapterDomain) => void; className?: string; style?: React.CSSProperties; registryEntries?: RegistryEntry[]; } /** * Renders the adapter management dashboard for the React variant. * * @param props Page props controlling navigation overrides and registry data * @returns A dashboard with status filters, adapter cards, and a modal editor */ declare function AdaptersPage({ onNavigateDetail, className, style, registryEntries, }: AdaptersPageProps): JSX.Element; export { AdapterCard, type AdapterCardProps, AdapterConfigForm, type AdapterConfigFormProps, AdapterDetailPage, type AdapterDetailPageProps, AdapterList, type AdapterListProps, AdapterStatusBadge, type AdapterStatusBadgeProps, AdaptersPage, type AdaptersPageProps, ErrorBoundaryBridge, type ErrorBoundaryBridgeProps, LoadingBridge, type LoadingBridgeProps, ToastBridge, type ToastBridgeProps, type ToastBridgeStatus };