{"version":3,"sources":["../src/bridges/index.tsx","../src/components/index.tsx","../src/pages/index.tsx"],"names":["jsxs","Stack","jsx","LinearProgress","CircularProgress","Typography","Component","Box","Alert","Button","AlertTitle","Snackbar","ReferenceAdapterCard","ReferenceAdapterConfigForm","ReferenceAdapterList","ReferenceAdapterStatusBadge","ReferenceAdapterDetailPage","ReferenceAdaptersPage"],"mappings":";;;;;;;;AA8BA,IAAM,oBAAA,GAAsD;AAAA,EAC1D,QAAA,EAAU,QAAA;AAAA,EACV,UAAA,EAAY;AACd,CAAA;AAEA,SAAS,kBAAkB,QAAA,EAAkD;AAC3E,EAAA,IAAI,aAAa,MAAA,EAAW;AAC1B,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,OAAO,KAAK,GAAA,CAAI,GAAA,EAAK,KAAK,GAAA,CAAI,CAAA,EAAG,QAAQ,CAAC,CAAA;AAC5C;AA+BO,SAAS,aAAA,CAAc;AAAA,EAC5B,OAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA,GAAQ,kBAAA;AAAA,EACR,QAAA;AAAA,EACA,OAAA,GAAU,UAAA;AAAA,EACV,QAAA,GAAW,IAAA;AAAA,EACX,EAAA;AAAA,EACA;AACF,CAAA,EAAoC;AAClC,EAAA,MAAM,MAAA,GAAS,aAAa,OAAA,IAAW,IAAA;AAEvC,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,6DAAU,QAAA,EAAS,CAAA;AAAA,EACrB;AAEA,EAAA,MAAM,kBAAA,GAAqB,kBAAkB,QAAQ,CAAA;AACrD,EAAA,MAAM,eAAA,GACJ,kBAAA,KAAuB,MAAA,GAAY,eAAA,GAAkB,aAAA;AACvD,EAAA,MAAM,aAAA,GAAgB,OAAO,KAAA,KAAU,QAAA,GAAW,KAAA,GAAQ,kBAAA;AAE1D,EAAA,uBACEA,eAAA;AAAA,IAACC,cAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,QAAA;AAAA,MACL,WAAA,EAAU,QAAA;A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;AAAA,UACA,QAAA;AAAA,UACA,OAAA,EAAS,YAAY,OAAA,IAAW,QAAA;AAAA,UAE/B,QAAA,EAAA;AAAA,YAAA,KAAA,mBAAQN,cAAA,CAACQ,mBAAA,EAAA,EAAY,QAAA,EAAA,KAAA,EAAM,CAAA,GAAgB,IAAA;AAAA,YAC3C,OAAA;AAAA,YACA;AAAA;AAAA;AAAA;AACH;AAAA,GACF;AAEJ;ACpSO,SAAS,YAAY,KAAA,EAAyB;AACnD,EAAA,uBAAOR,cAAAA,CAACU,iBAAA,EAAA,EAAsB,GAAG,KAAA,EAAO,CAAA;AAC1C;AAEO,SAAS,kBAAkB,KAAA,EAA+B;AAC/D,EAAA,uBAAOV,cAAAA,CAACW,uBAAA,EAAA,EAA4B,GAAG,KAAA,EAAO,CAAA;AAChD;AAEO,SAAS,YAAY,KAAA,EAAyB;AACnD,EAAA,uBAAOX,cAAAA,CAACY,iBAAA,EAAA,EAAsB,GAAG,KAAA,EAAO,CAAA;AAC1C;AAEO,SAAS,mBAAmB,KAAA,EAAgC;AACjE,EAAA,uBAAOZ,cAAAA,CAACa,wBAAA,EAAA,EAA6B,GAAG,KAAA,EAAO,CAAA;AACjD;ACvBO,SAAS,kBAAkB,KAAA,EAA+B;AAC/D,EAAA,uBAAOb,cAAAA,CAACc,uBAAA,EAAA,EAA4B,GAAG,KAAA,EAAO,CAAA;AAChD;AAEO,SAAS,aAAa,KAAA,EAA0B;AACrD,EAAA,uBAAOd,cAAAA,CAACe,kBAAA,EAAA,EAAuB,GAAG,KAAA,EAAO,CAAA;AAC3C","file":"index.cjs","sourcesContent":["/**\n * @module bridges\n * @package @geenius/adapters/react-mui\n * @description MUI-native bridge components for adapter loading, error, and\n * notification surfaces. Adapter contracts stay delegated to the React\n * reference variant; this module only owns MUI rendering affordances.\n */\n\n\"use client\";\n\nimport {\n  Alert,\n  type AlertColor,\n  type AlertProps,\n  AlertTitle,\n  Box,\n  Button,\n  CircularProgress,\n  type CircularProgressProps,\n  LinearProgress,\n  type LinearProgressProps,\n  Snackbar,\n  type SnackbarProps,\n  Stack,\n  type SxProps,\n  type Theme,\n  Typography,\n} from \"@mui/material\";\nimport { Component, type ErrorInfo, type JSX, type ReactNode } from \"react\";\n\nconst DEFAULT_TOAST_ANCHOR: SnackbarProps[\"anchorOrigin\"] = {\n  vertical: \"bottom\",\n  horizontal: \"center\",\n};\n\nfunction normalizeProgress(progress: number | undefined): number | undefined {\n  if (progress === undefined) {\n    return undefined;\n  }\n\n  return Math.min(100, Math.max(0, progress));\n}\n\n/**\n * Props accepted by the MUI async-adapter loading bridge.\n *\n * @property loading Controls whether the loading affordance or children render.\n * @property isLoading Alias for `loading` used by async adapter states.\n * @property label Accessible and visible loading label.\n * @property progress Optional determinate progress value from 0 through 100.\n * @property variant Chooses MUI circular or linear progress primitives.\n * @property children Content rendered when loading is explicitly false.\n * @property sx Optional MUI system styles for the bridge wrapper.\n * @property progressProps Props forwarded to the selected MUI progress primitive.\n */\nexport interface LoadingBridgeProps {\n  loading?: boolean;\n  isLoading?: boolean;\n  label?: ReactNode;\n  progress?: number;\n  variant?: \"circular\" | \"linear\";\n  children?: ReactNode;\n  sx?: SxProps<Theme>;\n  progressProps?: CircularProgressProps | LinearProgressProps;\n}\n\n/**\n * Renders a MUI loading affordance for async adapter operations.\n *\n * @param props Loading bridge props.\n * @returns Children when idle, otherwise an accessible progress indicator.\n */\nexport function LoadingBridge({\n  loading,\n  isLoading,\n  label = \"Loading adapters\",\n  progress,\n  variant = \"circular\",\n  children = null,\n  sx,\n  progressProps,\n}: LoadingBridgeProps): JSX.Element {\n  const active = isLoading ?? loading ?? true;\n\n  if (!active) {\n    return <>{children}</>;\n  }\n\n  const normalizedProgress = normalizeProgress(progress);\n  const progressVariant =\n    normalizedProgress === undefined ? \"indeterminate\" : \"determinate\";\n  const progressLabel = typeof label === \"string\" ? label : \"Loading adapters\";\n\n  return (\n    <Stack\n      role=\"status\"\n      aria-live=\"polite\"\n      aria-busy=\"true\"\n      spacing={1.5}\n      sx={[\n        {\n          alignItems: variant === \"linear\" ? \"stretch\" : \"center\",\n          minWidth: variant === \"linear\" ? 240 : undefined,\n          py: 2,\n        },\n        ...(Array.isArray(sx) ? sx : sx ? [sx] : []),\n      ]}\n    >\n      {variant === \"linear\" ? (\n        <LinearProgress\n          {...(progressProps as LinearProgressProps | undefined)}\n          aria-label={progressLabel}\n          value={normalizedProgress}\n          variant={progressVariant}\n        />\n      ) : (\n        <CircularProgress\n          {...(progressProps as CircularProgressProps | undefined)}\n          aria-label={progressLabel}\n          value={normalizedProgress}\n          variant={progressVariant}\n        />\n      )}\n      {label ? (\n        <Typography color=\"text.secondary\" component=\"span\" variant=\"body2\">\n          {label}\n        </Typography>\n      ) : null}\n    </Stack>\n  );\n}\n\ntype ErrorBoundaryFallback =\n  | ReactNode\n  | ((error: Error, reset: () => void) => ReactNode);\n\n/**\n * Props accepted by the MUI adapter error boundary bridge.\n *\n * @property children React subtree protected by the boundary.\n * @property error Optional controlled error for async adapter workflows.\n * @property fallback Optional custom fallback renderer or node.\n * @property onError Callback invoked with the caught error and React error info.\n * @property onReset Called before local error state is reset.\n * @property title Heading displayed in the default MUI alert fallback.\n * @property description Supporting copy displayed in the default fallback.\n * @property resetLabel Button label for retrying the protected subtree.\n * @property sx Optional MUI system styles for the default fallback wrapper.\n */\nexport interface ErrorBoundaryBridgeProps {\n  children?: ReactNode;\n  error?: unknown;\n  fallback?: ErrorBoundaryFallback;\n  onError?: (error: Error, info: ErrorInfo) => void;\n  onReset?: () => void;\n  title?: ReactNode;\n  description?: ReactNode;\n  resetLabel?: ReactNode;\n  sx?: SxProps<Theme>;\n}\n\ninterface ErrorBoundaryBridgeState {\n  caughtError: Error | null;\n}\n\nfunction normalizeError(error: unknown): Error {\n  if (error instanceof Error) {\n    return error;\n  }\n\n  return new Error(typeof error === \"string\" ? error : \"Adapter bridge error\");\n}\n\n/**\n * Catches render-time failures and displays a MUI-native adapter error state.\n */\nexport class ErrorBoundaryBridge extends Component<\n  ErrorBoundaryBridgeProps,\n  ErrorBoundaryBridgeState\n> {\n  state: ErrorBoundaryBridgeState = { caughtError: null };\n\n  static getDerivedStateFromError(error: Error): ErrorBoundaryBridgeState {\n    return { caughtError: normalizeError(error) };\n  }\n\n  componentDidCatch(error: Error, info: ErrorInfo): void {\n    this.props.onError?.(normalizeError(error), info);\n  }\n\n  private reset = (): void => {\n    this.props.onReset?.();\n    this.setState({ caughtError: null });\n  };\n\n  render(): ReactNode {\n    const error =\n      this.props.error !== undefined\n        ? normalizeError(this.props.error)\n        : this.state.caughtError;\n\n    if (!error) {\n      return this.props.children;\n    }\n\n    if (typeof this.props.fallback === \"function\") {\n      return this.props.fallback(error, this.reset);\n    }\n\n    if (this.props.fallback) {\n      return this.props.fallback;\n    }\n\n    return (\n      <Box sx={this.props.sx}>\n        <Alert\n          action={\n            <Button color=\"inherit\" onClick={this.reset} size=\"small\">\n              {this.props.resetLabel ?? \"Retry\"}\n            </Button>\n          }\n          severity=\"error\"\n          variant=\"outlined\"\n        >\n          <AlertTitle>{this.props.title ?? \"Adapter error\"}</AlertTitle>\n          {this.props.description ? (\n            <Typography component=\"p\" sx={{ mb: 0.75 }} variant=\"body2\">\n              {this.props.description}\n            </Typography>\n          ) : null}\n          <Typography component=\"span\" variant=\"body2\">\n            {error.message}\n          </Typography>\n        </Alert>\n      </Box>\n    );\n  }\n}\n\n/**\n * Props accepted by the MUI telemetry/notification toast bridge.\n *\n * @property open Whether the toast is visible.\n * @property message Message rendered inside the MUI alert.\n * @property severity MUI alert severity for the toast.\n * @property title Optional alert title.\n * @property onClose MUI Snackbar close callback.\n * @property autoHideDuration Milliseconds before auto-close.\n * @property anchorOrigin Snackbar anchor position.\n * @property action Optional alert action node.\n * @property snackbarProps Additional Snackbar props that do not replace bridge-controlled props.\n * @property alertProps Additional Alert props that do not replace bridge-controlled props.\n * @property sx Optional MUI system styles for the Snackbar wrapper.\n */\nexport interface ToastBridgeProps {\n  open?: boolean;\n  message?: ReactNode;\n  severity?: AlertColor;\n  title?: ReactNode;\n  onClose?: SnackbarProps[\"onClose\"];\n  autoHideDuration?: SnackbarProps[\"autoHideDuration\"];\n  anchorOrigin?: SnackbarProps[\"anchorOrigin\"];\n  action?: ReactNode;\n  children?: ReactNode;\n  snackbarProps?: Omit<\n    SnackbarProps,\n    | \"anchorOrigin\"\n    | \"autoHideDuration\"\n    | \"children\"\n    | \"message\"\n    | \"onClose\"\n    | \"open\"\n    | \"sx\"\n  >;\n  alertProps?: Omit<AlertProps, \"action\" | \"children\" | \"severity\">;\n  sx?: SxProps<Theme>;\n}\n\n/**\n * Renders adapter telemetry or notification messages through MUI Snackbar.\n *\n * @param props Toast bridge props.\n * @returns A MUI Snackbar containing a severity-aware Alert.\n */\nexport function ToastBridge({\n  open = true,\n  message,\n  severity = \"info\",\n  title,\n  onClose,\n  autoHideDuration = 6000,\n  anchorOrigin = DEFAULT_TOAST_ANCHOR,\n  action,\n  children,\n  snackbarProps,\n  alertProps,\n  sx,\n}: ToastBridgeProps): JSX.Element {\n  return (\n    <Snackbar\n      {...snackbarProps}\n      anchorOrigin={anchorOrigin}\n      autoHideDuration={autoHideDuration}\n      onClose={onClose}\n      open={open}\n      sx={sx}\n    >\n      <Alert\n        {...alertProps}\n        action={action}\n        severity={severity}\n        variant={alertProps?.variant ?? \"filled\"}\n      >\n        {title ? <AlertTitle>{title}</AlertTitle> : null}\n        {message}\n        {children}\n      </Alert>\n    </Snackbar>\n  );\n}\n","/**\n * @module components\n * @package @geenius/adapters/react-mui\n * @description Public MUI component wrappers for the React adapter reference\n * surface.\n */\n\n\"use client\";\n\nimport {\n  type AdapterCardProps,\n  type AdapterConfigFormProps,\n  type AdapterListProps,\n  type AdapterStatusBadgeProps,\n  AdapterCard as ReferenceAdapterCard,\n  AdapterConfigForm as ReferenceAdapterConfigForm,\n  AdapterList as ReferenceAdapterList,\n  AdapterStatusBadge as ReferenceAdapterStatusBadge,\n} from \"@geenius/adapters/react\";\n\nexport type {\n  AdapterCardProps,\n  AdapterConfigFormProps,\n  AdapterListProps,\n  AdapterStatusBadgeProps,\n};\n\nexport function AdapterCard(props: AdapterCardProps) {\n  return <ReferenceAdapterCard {...props} />;\n}\n\nexport function AdapterConfigForm(props: AdapterConfigFormProps) {\n  return <ReferenceAdapterConfigForm {...props} />;\n}\n\nexport function AdapterList(props: AdapterListProps) {\n  return <ReferenceAdapterList {...props} />;\n}\n\nexport function AdapterStatusBadge(props: AdapterStatusBadgeProps) {\n  return <ReferenceAdapterStatusBadge {...props} />;\n}\n","/**\n * @module pages\n * @package @geenius/adapters/react-mui\n * @description Public MUI page wrappers for the React adapter reference\n * surface.\n */\n\n\"use client\";\n\nimport {\n  type AdapterDetailPageProps,\n  type AdaptersPageProps,\n  AdapterDetailPage as ReferenceAdapterDetailPage,\n  AdaptersPage as ReferenceAdaptersPage,\n} from \"@geenius/adapters/react\";\n\nexport type { AdapterDetailPageProps, AdaptersPageProps };\n\nexport function AdapterDetailPage(props: AdapterDetailPageProps) {\n  return <ReferenceAdapterDetailPage {...props} />;\n}\n\nexport function AdaptersPage(props: AdaptersPageProps) {\n  return <ReferenceAdaptersPage {...props} />;\n}\n"]}