{"version":3,"sources":["../src/lib/utils.ts","../src/components/AdapterDomainIcon.tsx","../src/components/AdapterStatusBadge.tsx","../src/components/AdapterCard.tsx","../src/components/AdapterConfigForm.tsx","../src/provider/index.tsx","../src/hooks/index.ts","../src/components/AdapterList.tsx","../src/pages/PageErrorBoundary.tsx","../src/pages/AdapterDetailPage.tsx","../src/pages/AdaptersPage.tsx"],"names":["twMerge","clsx","jsxs","Fragment","jsx","DOMAIN_ICONS","DOMAIN_LABELS","DOMAIN_DESCRIPTIONS","getProvidersForDomain","useMemo","useState","useId","useEffect","createContext","createLocalStorageFileAdapter","createLocalStorageDbAdapter","createLocalStorageAuthAdapter","createLocalStoragePaymentsAdapter","createLocalStorageAiAdapter","createLocalStorageAdminAdapter","createConsoleLoggerAdapter","adapters","isAdaptersConfigured","getDomainConfig","ADAPTER_DOMAINS","AdapterError","useCallback","AdapterContextError","useContext","Component","useRef","ADAPTER_STATUSES"],"mappings":";;;;;;;;;AA8BO,SAAS,MAAM,MAAA,EAA8B;AAClD,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACrBA,IAAM,UAAA,GAA0C;AAAA,EAC9C,+BACEC,eAAA,CAAAC,mBAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAAC,cAAA,CAAC,MAAA,EAAA,EAAK,MAAA,EAAO,IAAA,EAAK,EAAA,EAAG,GAAA,EAAI,OAAM,IAAA,EAAK,CAAA,EAAE,GAAA,EAAI,CAAA,EAAE,GAAA,EAAI,CAAA;AAAA,oBAChDA,cAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,UAAA,EAAW,CAAA;AAAA,oBACnBA,cAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,SAAA,EAAU;AAAA,GAAA,EACpB,CAAA;AAAA,EAEF,0BACEF,eAAA,CAAAC,mBAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAAC,cAAA,CAAC,SAAA,EAAA,EAAQ,IAAG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;AAAA,cACC,GAAA,EAAK,QAAA;AAAA,cACL,SAAA,EAAU,+BAAA;AAAA,cACV,IAAA,EAAK,QAAA;AAAA,cACL,YAAA,EAAW,MAAA;AAAA,cACX,iBAAA,EAAiB,YAAA;AAAA,cACjB,QAAA,EAAU,EAAA;AAAA,cAEV,QAAA,kBAAAA,cAAAA;AAAA,gBAAC,iBAAA;AAAA,gBAAA;AAAA,kBACC,MAAA,EAAQ,cAAA;AAAA,kBACR,OAAA,EAAS,YAAA;AAAA,kBACT,aAAA,EAAe,iBAAiB,cAAc,CAAA;AAAA,kBAC9C,MAAA,EAAQ,OAAO,MAAA,KAAW;AACxB,oBAAA,MAAM,WAAA,GAAc,gBAAgB,MAAM,CAAA;AAC1C,oBAAA,iBAAA,CAAkB,IAAI,CAAA;AAAA,kBACxB,CAAA;AAAA,kBACA,QAAA,EAAU,MAAM,iBAAA,CAAkB,IAAI;AAAA;AAAA;AACxC;AAAA;AACF,SAAA,EACF;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"index.cjs","sourcesContent":["/**\n * @module utils\n * @package @geenius/adapters/react\n * @description Provides React-specific utility helpers for composing Tailwind\n * class names. The module wraps `clsx` and `tailwind-merge` to keep React\n * component styling deterministic and ergonomic.\n */\n\nimport { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge CSS class names with Tailwind support.\n * Combines clsx (for conditional classes) with tailwind-merge (to resolve conflicts).\n *\n * This utility ensures that Tailwind classes override each other correctly:\n * cn('px-2', 'px-4') → 'px-4' (not both)\n * Also handles conditional classes:\n * cn('p-2', isActive && 'bg-primary')\n *\n * @param inputs - Class names, arrays, objects, or conditional values\n * @returns Merged and deduplicated class string\n *\n * @example\n * ```ts\n * cn('px-2 py-1', 'px-4') // 'py-1 px-4'\n * cn('p-2', isActive && 'bg-primary') // 'p-2 bg-primary' or 'p-2'\n * cn({ 'text-destructive': isError, 'text-primary': isSuccess }) // conditional classes\n * ```\n */\nexport function cn(...inputs: ClassValue[]): string {\n  return twMerge(clsx(inputs));\n}\n","/**\n * @module AdapterDomainIcon\n * @package @geenius/adapters/react\n * @description Maps shared adapter domain icon identifiers to React SVG slots.\n */\n\nimport type { AdapterDomain } from \"@geenius/adapters\";\nimport { DOMAIN_ICONS } from \"@geenius/adapters\";\nimport type { JSX } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nconst ICON_PATHS: Record<string, JSX.Element> = {\n  \"credit-card\": (\n    <>\n      <rect height=\"14\" rx=\"2\" width=\"18\" x=\"3\" y=\"5\" />\n      <path d=\"M3 10h18\" />\n      <path d=\"M7 15h3\" />\n    </>\n  ),\n  database: (\n    <>\n      <ellipse cx=\"12\" cy=\"5\" rx=\"7\" ry=\"3\" />\n      <path d=\"M5 5v6c0 1.66 3.13 3 7 3s7-1.34 7-3V5\" />\n      <path d=\"M5 11v6c0 1.66 3.13 3 7 3s7-1.34 7-3v-6\" />\n    </>\n  ),\n  \"file-text\": (\n    <>\n      <path d=\"M14 3v5h5\" />\n      <path d=\"M6 3h8l5 5v13H6z\" />\n      <path d=\"M9 13h6\" />\n      <path d=\"M9 17h6\" />\n    </>\n  ),\n  folder: (\n    <>\n      <path d=\"M3 7h7l2 2h9v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\" />\n      <path d=\"M3 7V5a2 2 0 0 1 2-2h4l2 2h5\" />\n    </>\n  ),\n  settings: (\n    <>\n      <circle cx=\"12\" cy=\"12\" r=\"3\" />\n      <path d=\"M12 2v3\" />\n      <path d=\"M12 19v3\" />\n      <path d=\"m4.93 4.93 2.12 2.12\" />\n      <path d=\"m16.95 16.95 2.12 2.12\" />\n      <path d=\"M2 12h3\" />\n      <path d=\"M19 12h3\" />\n      <path d=\"m4.93 19.07 2.12-2.12\" />\n      <path d=\"m16.95 7.05 2.12-2.12\" />\n    </>\n  ),\n  \"shield-check\": (\n    <>\n      <path d=\"M12 3 5 6v5c0 4.2 2.75 7.7 7 10 4.25-2.3 7-5.8 7-10V6z\" />\n      <path d=\"m9 12 2 2 4-4\" />\n    </>\n  ),\n  sparkles: (\n    <>\n      <path d=\"m12 3 1.7 4.3L18 9l-4.3 1.7L12 15l-1.7-4.3L6 9l4.3-1.7z\" />\n      <path d=\"m6 15 .8 2.2L9 18l-2.2.8L6 21l-.8-2.2L3 18l2.2-.8z\" />\n      <path d=\"m18 14 .6 1.4L20 16l-1.4.6L18 18l-.6-1.4L16 16l1.4-.6z\" />\n    </>\n  ),\n};\n\nconst FALLBACK_ICON = (\n  <>\n    <circle cx=\"12\" cy=\"12\" r=\"8\" />\n    <path d=\"M12 8v4\" />\n    <path d=\"M12 16h.01\" />\n  </>\n);\n\nexport function AdapterDomainIcon({\n  className,\n  domain,\n}: {\n  className?: string;\n  domain: AdapterDomain;\n}): JSX.Element {\n  const iconId = DOMAIN_ICONS[domain] ?? \"\";\n\n  return (\n    <svg\n      aria-hidden=\"true\"\n      className={cn(\"h-6 w-6\", className)}\n      fill=\"none\"\n      focusable=\"false\"\n      stroke=\"currentColor\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      strokeWidth={1.8}\n      viewBox=\"0 0 24 24\"\n    >\n      {ICON_PATHS[iconId] ?? FALLBACK_ICON}\n    </svg>\n  );\n}\n","/**\n * @module AdapterStatusBadge\n * @package @geenius/adapters/react\n * @description Renders the Tailwind-based adapter status badge for the React\n * variant. The badge exposes the shared adapter status vocabulary in a compact,\n * themeable visual treatment.\n */\n\nimport type { AdapterStatusType } from \"@geenius/adapters\";\nimport type { JSX } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nconst statusBadgeBaseClassName =\n  \"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 font-semibold uppercase transition-colors motion-reduce:transition-none\";\n\nconst statusBadgeClassNames: Record<AdapterStatusType, string> = {\n  connected: \"border-primary/20 bg-primary/10 text-primary\",\n  disconnected: \"border-border bg-muted text-muted-foreground\",\n  error: \"border-destructive/20 bg-destructive/10 text-destructive\",\n  initializing: \"border-accent/20 bg-accent/10 text-accent\",\n};\n\nconst statusDotClassNames: Record<AdapterStatusType, string> = {\n  connected: \"bg-primary\",\n  disconnected: \"bg-muted-foreground\",\n  error: \"bg-destructive\",\n  initializing: \"bg-accent animate-pulse motion-reduce:animate-none\",\n};\n\nconst statusLabels: Record<AdapterStatusType, string> = {\n  connected: \"Connected\",\n  disconnected: \"Disconnected\",\n  error: \"Error\",\n  initializing: \"Initializing\",\n};\n\n/**\n * Props for rendering the React adapter status badge.\n *\n * @property status Shared adapter status vocabulary value to display.\n * @property showLabel Whether the human-readable label should be rendered.\n * @property size Visual size variant for the badge and status dot.\n * @property className Optional class name merged into the badge wrapper.\n */\nexport interface AdapterStatusBadgeProps {\n  status: AdapterStatusType;\n  showLabel?: boolean;\n  size?: \"sm\" | \"md\";\n  className?: string;\n}\n\n/**\n * Renders a compact React badge for the current adapter lifecycle state.\n *\n * @param props Badge props including the status token, optional label visibility, and size variant.\n * @returns A styled badge element that mirrors the shared adapter status taxonomy.\n */\nexport function AdapterStatusBadge({\n  status,\n  showLabel = true,\n  size = \"sm\",\n  className,\n}: AdapterStatusBadgeProps): JSX.Element {\n  const badgeClassName = cn(\n    statusBadgeBaseClassName,\n    statusBadgeClassNames[status],\n    size === \"md\" ? \"text-xs\" : \"text-[0.625rem]\",\n    className,\n  );\n  const dot = (\n    <span\n      className={cn(\n        \"h-1.5 w-1.5 rounded-full\",\n        statusDotClassNames[status],\n        size === \"md\" && \"h-2 w-2\",\n      )}\n    />\n  );\n\n  if (!showLabel) {\n    return (\n      <span\n        aria-label={statusLabels[status]}\n        className={badgeClassName}\n        role=\"img\"\n      >\n        {dot}\n      </span>\n    );\n  }\n\n  return (\n    <span className={badgeClassName}>\n      {dot}\n      <span>{statusLabels[status]}</span>\n    </span>\n  );\n}\n","/**\n * @module AdapterCard\n * @package @geenius/adapters/react\n * @description Renders the Tailwind-based adapter summary card for the React\n * variant. The card surfaces provider status, latency, and domain metadata for\n * one adapter domain in the dashboard views.\n */\n\nimport type { AdapterDomain, AdapterStatusInfo } from \"@geenius/adapters\";\nimport { DOMAIN_DESCRIPTIONS, DOMAIN_LABELS } from \"@geenius/adapters\";\nimport type { JSX } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { AdapterDomainIcon } from \"./AdapterDomainIcon\";\nimport { AdapterStatusBadge } from \"./AdapterStatusBadge\";\n\n/**\n * Props for rendering a single adapter summary card in the React dashboard grid.\n *\n * @property domain Adapter domain represented by the card.\n * @property status Current provider health and metadata for the domain.\n * @property onClick Optional callback fired when the card is activated.\n * @property className Optional class name merged into the card container.\n */\nexport interface AdapterCardProps {\n  domain: AdapterDomain;\n  status: AdapterStatusInfo;\n  onClick?: () => void;\n  className?: string;\n}\n\n/**\n * Renders a clickable React summary card for one adapter domain.\n *\n * @param props Card props including the adapter domain, status payload, and click handler.\n * @returns A button element that summarizes provider state for the selected domain.\n */\nexport function AdapterCard({\n  domain,\n  status,\n  onClick,\n  className,\n}: AdapterCardProps): JSX.Element {\n  const label = `${DOMAIN_LABELS[domain]} adapter - ${status.status}`;\n  const cardClassName = cn(\n    \"relative flex w-full items-start gap-4 overflow-hidden rounded-lg border border-border bg-card p-5 text-left text-card-foreground shadow-sm transition-colors duration-200 motion-reduce:transition-none\",\n    onClick &&\n      \"group hover:border-primary/20 hover:bg-accent/5 hover:shadow-md active:border-primary/30 active:bg-accent/10 active:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n    className,\n  );\n  const content = (\n    <>\n      <div className=\"flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-md border border-border bg-muted text-2xl shadow-sm transition-transform duration-300 group-hover:scale-105 group-active:scale-105 motion-reduce:transform-none motion-reduce:transition-none\">\n        <AdapterDomainIcon domain={domain} />\n      </div>\n\n      <div className=\"min-w-0 flex-1\">\n        <div className=\"flex items-center justify-between gap-2\">\n          <h3 className=\"truncate text-sm font-bold text-foreground\">\n            {DOMAIN_LABELS[domain]}\n          </h3>\n          <AdapterStatusBadge status={status.status} />\n        </div>\n\n        <p className=\"mt-0.5 line-clamp-2 text-xs text-muted-foreground\">\n          {DOMAIN_DESCRIPTIONS[domain]}\n        </p>\n\n        {status.provider && status.provider !== \"none\" && (\n          <div className=\"mt-2 flex items-center gap-2\">\n            <span className=\"rounded-md border border-border bg-muted px-2 py-0.5 text-[0.625rem] font-semibold text-muted-foreground\">\n              {status.provider}\n            </span>\n            {status.latency !== undefined && (\n              <span className=\"text-[0.625rem] text-muted-foreground\">\n                {status.latency}ms\n              </span>\n            )}\n          </div>\n        )}\n\n        {status.error && (\n          <p className=\"mt-1.5 truncate text-[0.625rem] text-destructive\">\n            {status.error}\n          </p>\n        )}\n      </div>\n    </>\n  );\n\n  if (!onClick) {\n    return (\n      <article className={cardClassName} aria-label={label}>\n        {content}\n      </article>\n    );\n  }\n\n  return (\n    <button\n      type=\"button\"\n      onClick={onClick}\n      className={cardClassName}\n      aria-label={label}\n    >\n      {content}\n    </button>\n  );\n}\n","/**\n * @module AdapterConfigForm\n * @package @geenius/adapters/react\n * @description Renders the Tailwind-based React adapter configuration form.\n * This component is used inside adapter pages and dialogs to collect the\n * provider-specific credentials required for each infrastructure domain.\n */\n\n\"use client\";\n\nimport type { AdapterDomain, DomainAdapterConfig } from \"@geenius/adapters\";\nimport { DOMAIN_LABELS, getProvidersForDomain } from \"@geenius/adapters\";\nimport type { FormEvent, JSX } from \"react\";\nimport { useEffect, useId, useMemo, useState } from \"react\";\nimport { cn } from \"../lib/utils\";\n\n/**\n * Props accepted by the React adapter configuration form.\n *\n * @property domain Adapter domain being configured in the current dialog\n * @property initialConfig Existing configuration values used to hydrate the form\n * @property onSave Async or sync handler that persists the submitted configuration\n * @property onCancel Optional callback invoked when the user dismisses the form\n * @property className Optional class name merged onto the form root\n * @property titleId Optional identifier applied to the form title for dialog labelling\n */\nexport interface AdapterConfigFormProps {\n  domain: AdapterDomain;\n  initialConfig?: DomainAdapterConfig;\n  onSave: (config: DomainAdapterConfig) => Promise<void> | void;\n  onCancel?: () => void;\n  className?: string;\n  titleId?: string;\n}\n\nconst providerOptionBaseClassName =\n  \"flex items-start gap-4 rounded-lg border p-4 text-left transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\";\n\nconst tierBaseClassName =\n  \"mt-2 inline-flex rounded px-2 py-0.5 text-[0.5rem] font-bold uppercase\";\n\nconst tierClassNames = {\n  lancio: \"bg-accent/10 text-accent\",\n  pronto: \"bg-primary/10 text-primary\",\n  studio: \"bg-muted text-muted-foreground\",\n} as const;\n\nfunction getProviderOptionClassName(selected: boolean): string {\n  return cn(\n    providerOptionBaseClassName,\n    selected\n      ? \"border-primary/30 bg-primary/10 shadow-sm\"\n      : \"border-border bg-muted/20 hover:border-primary/20 hover:bg-accent/5 active:border-primary/30 active:bg-accent/10\",\n  );\n}\n\nfunction getTierClassName(tier: keyof typeof tierClassNames): string {\n  return cn(tierBaseClassName, tierClassNames[tier]);\n}\n\ninterface ProviderOptionField {\n  key: string;\n  label: string;\n  description: string;\n  placeholder?: string;\n  inputMode?: \"text\" | \"numeric\";\n}\n\nconst PROVIDER_OPTION_FIELDS: Partial<\n  Record<AdapterDomain, Record<string, ProviderOptionField[]>>\n> = {\n  db: {\n    convex: [\n      {\n        key: \"deployment\",\n        label: \"Deployment\",\n        description: \"Convex deployment or project slug.\",\n        placeholder: \"team:project\",\n      },\n    ],\n    neon: [\n      {\n        key: \"database\",\n        label: \"Database\",\n        description: \"Database name or branch label for downstream wiring.\",\n        placeholder: \"main\",\n      },\n    ],\n    cloudflareKV: [\n      {\n        key: \"namespace\",\n        label: \"KV Namespace\",\n        description: \"Worker binding name used by the downstream KV adapter.\",\n        placeholder: \"ADAPTERS_KV\",\n      },\n      {\n        key: \"defaultTtlSeconds\",\n        label: \"Default TTL Seconds\",\n        description: \"Optional TTL for cache/session style records.\",\n        placeholder: \"300\",\n        inputMode: \"numeric\",\n      },\n    ],\n    memory: [\n      {\n        key: \"seed\",\n        label: \"Fixture Seed\",\n        description: \"Optional deterministic seed for local test data.\",\n        placeholder: \"demo\",\n      },\n    ],\n  },\n};\n\nconst LAUNCH_DB_PROVIDER_IDS = new Set([\n  \"convex\",\n  \"neon\",\n  \"cloudflareKV\",\n  \"memory\",\n]);\n\nfunction getSelectableProviders(domain: AdapterDomain) {\n  const providers = getProvidersForDomain(domain);\n  if (domain !== \"db\") {\n    return providers;\n  }\n\n  return providers.filter((entry) => {\n    if (entry.id === \"localStorage\") {\n      return true;\n    }\n    return LAUNCH_DB_PROVIDER_IDS.has(entry.id);\n  });\n}\n\nfunction getOptionFields(\n  domain: AdapterDomain,\n  provider: string,\n): ProviderOptionField[] {\n  return PROVIDER_OPTION_FIELDS[domain]?.[provider] ?? [];\n}\n\nfunction stringifyOptionValue(value: unknown): string {\n  if (value === undefined || value === null) {\n    return \"\";\n  }\n  return String(value);\n}\n\nfunction coerceOptionValue(field: ProviderOptionField, value: string): unknown {\n  const trimmed = value.trim();\n  if (trimmed === \"\") {\n    return \"\";\n  }\n  if (field.inputMode !== \"numeric\") {\n    return trimmed;\n  }\n\n  const numeric = Number(trimmed);\n  return Number.isFinite(numeric) ? numeric : trimmed;\n}\n\nfunction validateOptionValues(\n  domain: AdapterDomain,\n  provider: string,\n  optionValues: Record<string, string>,\n): string | null {\n  // Domain-specific checks first so they produce the most targeted message.\n  if (domain === \"db\" && provider === \"cloudflareKV\") {\n    if (!optionValues.namespace?.trim()) {\n      return \"KV namespace is required\";\n    }\n\n    const ttlValue = optionValues.defaultTtlSeconds?.trim();\n    if (ttlValue) {\n      const ttlSeconds = Number(ttlValue);\n      if (!Number.isInteger(ttlSeconds) || ttlSeconds <= 0) {\n        return \"Default TTL seconds must be a positive integer\";\n      }\n    }\n  }\n\n  // Generic numeric-field guard: any provider-option field declared with\n  // inputMode \"numeric\" must parse as a finite number when set. Without this\n  // check, coerceOptionValue silently returns the raw string for non-numeric\n  // input (e.g. \"abc\"), which then ships as part of config.options.\n  for (const field of getOptionFields(domain, provider)) {\n    if (field.inputMode !== \"numeric\") continue;\n    const raw = optionValues[field.key]?.trim();\n    if (!raw) continue;\n    if (!Number.isFinite(Number(raw))) {\n      return `${field.label} must be a number`;\n    }\n  }\n\n  return null;\n}\n\n/**\n * Renders the adapter configuration workflow for a single adapter domain.\n *\n * @param props Component props controlling the selected domain and form callbacks\n * @returns A provider chooser and credential form styled with the React variant\n * @example\n * ```tsx\n * <AdapterConfigForm\n *   domain=\"ai\"\n *   onSave={async (config) => saveConfig('ai', config)}\n *   onCancel={() => setOpen(false)}\n * />\n * ```\n */\nexport function AdapterConfigForm({\n  domain,\n  initialConfig,\n  onSave,\n  onCancel,\n  className,\n  titleId,\n}: AdapterConfigFormProps): JSX.Element {\n  const providers = useMemo(() => getSelectableProviders(domain), [domain]);\n  const initialProvider =\n    providers.find((entry) => entry.id === initialConfig?.provider)?.id ??\n    providers[0]?.id ??\n    \"\";\n  const [provider, setProvider] = useState(initialProvider);\n  const [apiKey, setApiKey] = useState(initialConfig?.apiKey ?? \"\");\n  const [baseUrl, setBaseUrl] = useState(initialConfig?.baseUrl ?? \"\");\n  const [optionValues, setOptionValues] = useState<Record<string, string>>(() =>\n    Object.fromEntries(\n      Object.entries(initialConfig?.options ?? {}).map(([key, value]) => [\n        key,\n        stringifyOptionValue(value),\n      ]),\n    ),\n  );\n  const [isSaving, setIsSaving] = useState(false);\n  const [error, setError] = useState<string | null>(null);\n  const providerGroupLabelId = useId();\n\n  const selectedMeta = providers.find((entry) => entry.id === provider);\n  const needsApiKey = selectedMeta?.requiresApiKey ?? false;\n  const needsBaseUrl = selectedMeta?.requiresBaseUrl ?? false;\n  const optionFields = getOptionFields(domain, provider);\n\n  useEffect(() => {\n    if (!needsApiKey && apiKey) {\n      setApiKey(\"\");\n    }\n    if (!needsBaseUrl && baseUrl) {\n      setBaseUrl(\"\");\n    }\n  }, [apiKey, baseUrl, needsApiKey, needsBaseUrl]);\n\n  // Resynchronise form state when the caller swaps `domain` or `initialConfig`\n  // on a mounted form. Without this, re-rendering from db→ai keeps the prior\n  // db provider in state and `handleSubmit` would persist it for the new\n  // domain. Also guards against a current provider that is no longer in the\n  // selectable list for the new domain.\n  useEffect(() => {\n    const candidate = initialConfig?.provider;\n    const nextProvider =\n      providers.find((entry) => entry.id === candidate)?.id ??\n      providers[0]?.id ??\n      \"\";\n    setProvider(nextProvider);\n    setApiKey(initialConfig?.apiKey ?? \"\");\n    setBaseUrl(initialConfig?.baseUrl ?? \"\");\n    setOptionValues(\n      Object.fromEntries(\n        Object.entries(initialConfig?.options ?? {}).map(([key, value]) => [\n          key,\n          stringifyOptionValue(value),\n        ]),\n      ),\n    );\n    setError(null);\n  }, [providers, initialConfig]);\n\n  const handleSubmit = async (\n    event: FormEvent<HTMLFormElement>,\n  ): Promise<void> => {\n    event.preventDefault();\n    setError(null);\n\n    if (!provider) {\n      setError(\"Select a provider\");\n      return;\n    }\n\n    // Defensive: reject providers no longer selectable for the current domain.\n    // This is the second guard against a stale provider surviving a domain\n    // change between render and submit.\n    if (!providers.some((entry) => entry.id === provider)) {\n      setError(\"Select a provider\");\n      return;\n    }\n\n    if (needsApiKey && !apiKey.trim()) {\n      setError(\"API key is required\");\n      return;\n    }\n\n    if (needsBaseUrl && !baseUrl.trim()) {\n      setError(\"Base URL is required\");\n      return;\n    }\n\n    const optionError = validateOptionValues(domain, provider, optionValues);\n    if (optionError) {\n      setError(optionError);\n      return;\n    }\n\n    setIsSaving(true);\n    try {\n      const config: DomainAdapterConfig = { provider };\n      if (needsApiKey && apiKey.trim()) {\n        config.apiKey = apiKey.trim();\n      }\n      if (needsBaseUrl && baseUrl.trim()) {\n        config.baseUrl = baseUrl.trim();\n      }\n      const options = Object.fromEntries(\n        optionFields\n          .map((field) => [\n            field.key,\n            coerceOptionValue(field, optionValues[field.key] ?? \"\"),\n          ])\n          .filter(([, value]) => value !== \"\"),\n      );\n      if (Object.keys(options).length > 0) {\n        config.options = options;\n      }\n      await onSave(config);\n    } catch (saveError) {\n      setError(\n        saveError instanceof Error ? saveError.message : \"Failed to save\",\n      );\n    } finally {\n      setIsSaving(false);\n    }\n  };\n\n  return (\n    <form\n      onSubmit={handleSubmit}\n      className={cn(\n        \"space-y-6 rounded-lg border border-border bg-card p-6 shadow-sm\",\n        className,\n      )}\n      noValidate\n    >\n      <div>\n        <h3 id={titleId} className=\"text-lg font-bold text-foreground\">\n          Configure {DOMAIN_LABELS[domain]}\n        </h3>\n        <p className=\"mt-1 text-sm text-muted-foreground\">\n          Select and configure your preferred provider.\n        </p>\n      </div>\n\n      {error && (\n        <div\n          className=\"rounded-md border border-destructive/20 bg-destructive/10 px-4 py-3 text-sm text-destructive\"\n          role=\"alert\"\n        >\n          {error}\n        </div>\n      )}\n\n      <fieldset className=\"space-y-3\">\n        <legend\n          id={providerGroupLabelId}\n          className=\"block text-xs font-semibold uppercase text-muted-foreground\"\n        >\n          Provider\n        </legend>\n        <div\n          className=\"grid gap-2 sm:grid-cols-2\"\n          role=\"radiogroup\"\n          aria-labelledby={providerGroupLabelId}\n        >\n          {providers.map((entry) => (\n            <label\n              key={entry.id}\n              className={getProviderOptionClassName(provider === entry.id)}\n            >\n              <input\n                type=\"radio\"\n                name={`adapter-${domain}-provider`}\n                value={entry.id}\n                checked={provider === entry.id}\n                onChange={() => setProvider(entry.id)}\n                className=\"mt-0.5 h-4 w-4 flex-shrink-0 border-input text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n              />\n              <div className=\"flex-1\">\n                <span className=\"block text-sm font-bold text-foreground\">\n                  {entry.name}\n                </span>\n                <span className=\"mt-1 block text-xs leading-relaxed text-muted-foreground\">\n                  {entry.description}\n                </span>\n                <span className={getTierClassName(entry.tier)}>\n                  {entry.tier}\n                </span>\n              </div>\n            </label>\n          ))}\n        </div>\n      </fieldset>\n\n      {needsApiKey && (\n        <div className=\"space-y-1.5\">\n          <label\n            htmlFor={`adapter-${domain}-apiKey`}\n            className=\"block text-xs font-semibold uppercase text-muted-foreground\"\n          >\n            API Key\n          </label>\n          <input\n            id={`adapter-${domain}-apiKey`}\n            type=\"password\"\n            value={apiKey}\n            onChange={(event) => setApiKey(event.target.value)}\n            placeholder={`Enter ${selectedMeta?.name ?? provider} API key`}\n            autoComplete=\"off\"\n            className=\"w-full rounded-md border border-input bg-background px-4 py-3 text-sm text-foreground shadow-sm outline-none transition-colors placeholder:text-muted-foreground focus:border-primary focus:ring-2 focus:ring-primary/20 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n          />\n        </div>\n      )}\n\n      {needsBaseUrl && (\n        <div className=\"space-y-1.5\">\n          <label\n            htmlFor={`adapter-${domain}-url`}\n            className=\"block text-xs font-semibold uppercase text-muted-foreground\"\n          >\n            Base URL\n          </label>\n          <input\n            id={`adapter-${domain}-url`}\n            type=\"url\"\n            value={baseUrl}\n            onChange={(event) => setBaseUrl(event.target.value)}\n            placeholder=\"https://...\"\n            className=\"w-full rounded-md border border-input bg-background px-4 py-3 text-sm text-foreground shadow-sm outline-none transition-colors placeholder:text-muted-foreground focus:border-primary focus:ring-2 focus:ring-primary/20 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n          />\n        </div>\n      )}\n\n      {optionFields.length > 0 && (\n        <div className=\"grid gap-3 sm:grid-cols-2\">\n          {optionFields.map((field) => (\n            <div key={field.key} className=\"space-y-1.5\">\n              <label\n                htmlFor={`adapter-${domain}-${field.key}`}\n                className=\"block text-xs font-semibold uppercase text-muted-foreground\"\n              >\n                {field.label}\n              </label>\n              <input\n                id={`adapter-${domain}-${field.key}`}\n                type=\"text\"\n                inputMode={field.inputMode}\n                value={optionValues[field.key] ?? \"\"}\n                onChange={(event) =>\n                  setOptionValues((current) => ({\n                    ...current,\n                    [field.key]: event.target.value,\n                  }))\n                }\n                placeholder={field.placeholder}\n                aria-describedby={`adapter-${domain}-${field.key}-hint`}\n                className=\"w-full rounded-md border border-input bg-background px-4 py-3 text-sm text-foreground shadow-sm outline-none transition-colors placeholder:text-muted-foreground focus:border-primary focus:ring-2 focus:ring-primary/20 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n              />\n              <p\n                id={`adapter-${domain}-${field.key}-hint`}\n                className=\"text-xs text-muted-foreground\"\n              >\n                {field.description}\n              </p>\n            </div>\n          ))}\n        </div>\n      )}\n\n      <div className=\"flex justify-end gap-3 pt-2\">\n        {onCancel && (\n          <button\n            type=\"button\"\n            onClick={onCancel}\n            className=\"rounded-md px-5 py-2.5 text-sm font-semibold text-muted-foreground transition-colors hover:text-foreground active:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n          >\n            Cancel\n          </button>\n        )}\n        <button\n          type=\"submit\"\n          disabled={isSaving || !provider}\n          className=\"inline-flex items-center justify-center rounded-md border border-primary/30 bg-primary px-8 py-3 text-sm font-bold text-primary-foreground shadow-sm transition-colors hover:bg-primary/90 active:bg-primary/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 motion-reduce:transition-none\"\n        >\n          {isSaving ? \"Saving...\" : \"Save Configuration\"}\n        </button>\n      </div>\n    </form>\n  );\n}\n","/**\n * @module index\n * @package @geenius/adapters/react\n * @description Implements the React adapter provider and context access\n * helpers. This module owns adapter status initialization for the React\n * runtime package while keeping the shared package framework-agnostic.\n */\n\n\"use client\";\n\nimport {\n  ADAPTER_DOMAINS,\n  AdapterContextError,\n  type AdapterDomain,\n  AdapterError,\n  type AdapterStatusInfo,\n  type AdminAdapter,\n  type AiAdapter,\n  type AuthAdapter,\n  createConsoleLoggerAdapter,\n  createLocalStorageAdminAdapter,\n  createLocalStorageAiAdapter,\n  createLocalStorageAuthAdapter,\n  createLocalStorageDbAdapter,\n  createLocalStorageFileAdapter,\n  createLocalStoragePaymentsAdapter,\n  type DbAdapter,\n  DOMAIN_LABELS,\n  type FileStorageAdapter,\n  getDomainConfig,\n  isAdaptersConfigured,\n  type LoggerAdapter,\n  type PaymentsAdapter,\n} from \"@geenius/adapters\";\nimport {\n  createContext,\n  type JSX,\n  type ReactNode,\n  useCallback,\n  useContext,\n  useEffect,\n  useMemo,\n  useState,\n} from \"react\";\n\ntype AnyAdapter =\n  | DbAdapter\n  | AuthAdapter\n  | PaymentsAdapter\n  | AiAdapter\n  | FileStorageAdapter\n  | AdminAdapter\n  | LoggerAdapter;\n\ntype AdapterForDomain<D extends AdapterDomain> = D extends \"db\"\n  ? DbAdapter\n  : D extends \"auth\"\n    ? AuthAdapter\n    : D extends \"payments\"\n      ? PaymentsAdapter\n      : D extends \"ai\"\n        ? AiAdapter\n        : D extends \"storage\"\n          ? FileStorageAdapter\n          : D extends \"admin\"\n            ? AdminAdapter\n            : D extends \"logger\"\n              ? LoggerAdapter\n              : never;\n\ntype AdapterByDomain = {\n  [D in AdapterDomain]: AdapterForDomain<D>;\n};\n\ntype ResolvedAdapterSet = AdapterByDomain & {\n  fileStorage: FileStorageAdapter;\n};\n\nconst DEFAULT_PROVIDER_BY_DOMAIN: Record<AdapterDomain, string> = {\n  db: \"localStorage\",\n  auth: \"localStorage\",\n  payments: \"localStorage\",\n  ai: \"localStorage\",\n  storage: \"localStorage\",\n  admin: \"localStorage\",\n  logger: \"console\",\n};\n\n/**\n * React adapter bag keyed by domain.\n *\n * @property db Database adapter implementation when configured.\n * @property auth Authentication adapter implementation when configured.\n * @property payments Payments adapter implementation when configured.\n * @property ai AI adapter implementation when configured.\n * @property storage File-storage adapter implementation when configured.\n * @property fileStorage File-storage adapter alias accepted by the public React provider.\n * @property admin Admin adapter implementation when configured.\n * @property logger Logger adapter implementation when configured.\n */\nexport interface AdapterSet extends Partial<Record<AdapterDomain, AnyAdapter>> {\n  db?: DbAdapter;\n  auth?: AuthAdapter;\n  payments?: PaymentsAdapter;\n  ai?: AiAdapter;\n  storage?: FileStorageAdapter;\n  fileStorage?: FileStorageAdapter;\n  admin?: AdminAdapter;\n  logger?: LoggerAdapter;\n}\n\n/** Registry shape accepted by the public React provider. */\nexport type AdapterRegistry = AdapterSet;\n\n/**\n * React adapter context value exposed to hooks and provider consumers.\n *\n * @property adapters Adapter bag passed into the provider.\n * @property statuses Current status record for each adapter domain.\n * @property getAdapter Returns a configured adapter for a specific domain or throws when missing.\n * @property isReady Reports whether a domain is configured and connected.\n * @property isLoading Indicates whether initial health checks are still running.\n */\nexport interface AdapterContextValue {\n  adapters: ResolvedAdapterSet;\n  statuses: Record<AdapterDomain, AdapterStatusInfo>;\n  getAdapter: <K extends AdapterDomain>(domain: K) => AdapterByDomain[K];\n  isReady: (domain: AdapterDomain) => boolean;\n  isLoading: boolean;\n}\n\nconst AdapterContext = createContext<AdapterContextValue | null>(null);\n\n/**\n * Per-domain custom health probe map accepted by the React adapter provider.\n *\n * Each key is an {@link AdapterDomain} and the value is a probe function that\n * receives the resolved adapter for that domain plus the full adapter set for\n * cross-domain assertions. The probe must return `void` or `Promise<void>` —\n * throwing signals a health-check failure, which the provider surfaces as an\n * `\"error\"` status for that domain.\n *\n * @example\n * ```tsx\n * const healthProbes: AdapterHealthProbeMap = {\n *   db: async (db) => { await db.count('users') },\n *   ai: async (ai) => { await ai.complete('ping') },\n * }\n *\n * <AdapterProvider healthCheck healthProbes={healthProbes}>\n *   {children}\n * </AdapterProvider>\n * ```\n */\nexport type AdapterHealthProbeMap = Partial<{\n  [D in AdapterDomain]: (\n    adapter: AdapterByDomain[D],\n    adapters: ResolvedAdapterSet,\n  ) => Promise<void> | void;\n}>;\n\n/**\n * Props accepted by the React adapter provider.\n *\n * @property adapters Optional adapter bag made available to descendant hooks and components.\n * @property registry Optional registry alias for adapter overrides.\n * @property db Optional direct database adapter override.\n * @property auth Optional direct auth adapter override.\n * @property payments Optional direct payments adapter override.\n * @property ai Optional direct AI adapter override.\n * @property storage Optional direct file-storage adapter override.\n * @property fileStorage Optional public file-storage adapter alias.\n * @property admin Optional direct admin adapter override.\n * @property logger Optional direct logger adapter override.\n * @property children React subtree that should receive adapter context.\n * @property healthCheck Whether the provider should probe configured adapters on mount.\n * @property healthProbes Optional domain-specific health probes supplied by the host app.\n * @property statusOverrides Optional deterministic status overrides for tests and previews.\n * @property onError Optional typed error callback invoked when provider lifecycle checks fail.\n */\nexport interface AdapterProviderProps extends Partial<AdapterSet> {\n  adapters?: AdapterSet;\n  registry?: Partial<AdapterRegistry>;\n  children: ReactNode;\n  healthCheck?: boolean;\n  healthProbes?: AdapterHealthProbeMap;\n  // `domain` is omitted because the canonical key in the statuses record is\n  // the source of truth — letting overrides set a foreign `domain` value\n  // would silently corrupt `statuses[X].domain` when spread last.\n  statusOverrides?: Partial<\n    Record<AdapterDomain, Omit<Partial<AdapterStatusInfo>, \"domain\">>\n  >;\n  onError?: (error: AdapterError) => void;\n}\n\ntype AdapterResolutionProps = Pick<\n  AdapterProviderProps,\n  | \"adapters\"\n  | \"registry\"\n  | \"db\"\n  | \"auth\"\n  | \"payments\"\n  | \"ai\"\n  | \"storage\"\n  | \"fileStorage\"\n  | \"admin\"\n  | \"logger\"\n>;\n\ntype ExplicitAdapterMap = Record<AdapterDomain, boolean>;\n\nfunction createExplicitAdapterMap(\n  props: AdapterResolutionProps,\n): ExplicitAdapterMap {\n  const provided = {\n    ...(props.registry ?? {}),\n    ...(props.adapters ?? {}),\n  };\n  const hasStorage =\n    props.fileStorage !== undefined ||\n    props.storage !== undefined ||\n    provided.fileStorage !== undefined ||\n    provided.storage !== undefined;\n\n  return {\n    db: props.db !== undefined || provided.db !== undefined,\n    auth: props.auth !== undefined || provided.auth !== undefined,\n    payments: props.payments !== undefined || provided.payments !== undefined,\n    ai: props.ai !== undefined || provided.ai !== undefined,\n    storage: hasStorage,\n    admin: props.admin !== undefined || provided.admin !== undefined,\n    logger: props.logger !== undefined || provided.logger !== undefined,\n  };\n}\n\nfunction createDefaultAdapterSet(): ResolvedAdapterSet {\n  const fileStorage = createLocalStorageFileAdapter();\n\n  return {\n    db: createLocalStorageDbAdapter(),\n    auth: createLocalStorageAuthAdapter(),\n    payments: createLocalStoragePaymentsAdapter(),\n    ai: createLocalStorageAiAdapter(),\n    storage: fileStorage,\n    fileStorage,\n    admin: createLocalStorageAdminAdapter(),\n    logger: createConsoleLoggerAdapter(),\n  };\n}\n\nfunction resolveAdapterSet(\n  props: AdapterResolutionProps,\n  defaults: ResolvedAdapterSet,\n): ResolvedAdapterSet {\n  const provided = {\n    ...(props.registry ?? {}),\n    ...(props.adapters ?? {}),\n  };\n  const fileStorage =\n    props.fileStorage ??\n    props.storage ??\n    provided.fileStorage ??\n    provided.storage ??\n    defaults.storage;\n\n  return {\n    db: props.db ?? provided.db ?? defaults.db,\n    auth: props.auth ?? provided.auth ?? defaults.auth,\n    payments: props.payments ?? provided.payments ?? defaults.payments,\n    ai: props.ai ?? provided.ai ?? defaults.ai,\n    storage: fileStorage,\n    fileStorage,\n    admin: props.admin ?? provided.admin ?? defaults.admin,\n    logger: props.logger ?? provided.logger ?? defaults.logger,\n  };\n}\n\nfunction getInitialProviderName(\n  domain: AdapterDomain,\n  adapters: ResolvedAdapterSet,\n  explicitAdapters: ExplicitAdapterMap,\n  statusOverrides?: Partial<Record<AdapterDomain, Partial<AdapterStatusInfo>>>,\n): string {\n  const overrideProvider = statusOverrides?.[domain]?.provider;\n  if (overrideProvider !== undefined) {\n    return overrideProvider;\n  }\n\n  if (!adapters[domain]) {\n    return \"none\";\n  }\n\n  if (explicitAdapters[domain] && !isAdaptersConfigured()) {\n    return domain === \"logger\" ? \"console\" : \"configured\";\n  }\n\n  if (!isAdaptersConfigured()) {\n    return DEFAULT_PROVIDER_BY_DOMAIN[domain] ?? \"none\";\n  }\n\n  return (\n    getDomainConfig(domain)?.provider ??\n    DEFAULT_PROVIDER_BY_DOMAIN[domain] ??\n    \"none\"\n  );\n}\n\nfunction createInitialStatuses(\n  adapters: ResolvedAdapterSet,\n  explicitAdapters: ExplicitAdapterMap,\n  healthCheck: boolean,\n  statusOverrides?: Partial<Record<AdapterDomain, Partial<AdapterStatusInfo>>>,\n): Record<AdapterDomain, AdapterStatusInfo> {\n  const initial: Record<AdapterDomain, AdapterStatusInfo> = {\n    db: {\n      domain: \"db\",\n      provider: \"none\",\n      status: \"disconnected\",\n      lastCheckedAt: Date.now(),\n    },\n    auth: {\n      domain: \"auth\",\n      provider: \"none\",\n      status: \"disconnected\",\n      lastCheckedAt: Date.now(),\n    },\n    payments: {\n      domain: \"payments\",\n      provider: \"none\",\n      status: \"disconnected\",\n      lastCheckedAt: Date.now(),\n    },\n    ai: {\n      domain: \"ai\",\n      provider: \"none\",\n      status: \"disconnected\",\n      lastCheckedAt: Date.now(),\n    },\n    storage: {\n      domain: \"storage\",\n      provider: \"none\",\n      status: \"disconnected\",\n      lastCheckedAt: Date.now(),\n    },\n    admin: {\n      domain: \"admin\",\n      provider: \"none\",\n      status: \"disconnected\",\n      lastCheckedAt: Date.now(),\n    },\n    logger: {\n      domain: \"logger\",\n      provider: \"none\",\n      status: \"disconnected\",\n      lastCheckedAt: Date.now(),\n    },\n  };\n\n  for (const domain of ADAPTER_DOMAINS) {\n    const adapter = adapters[domain];\n    initial[domain] = {\n      provider: getInitialProviderName(\n        domain,\n        adapters,\n        explicitAdapters,\n        statusOverrides,\n      ),\n      status: adapter\n        ? healthCheck\n          ? \"initializing\"\n          : \"connected\"\n        : \"disconnected\",\n      lastCheckedAt: Date.now(),\n      ...statusOverrides?.[domain],\n      // Re-apply the canonical domain key AFTER the override spread so a\n      // stale or malformed override never corrupts statuses[X].domain.\n      domain,\n    };\n  }\n\n  return initial;\n}\n\nfunction toAdapterError(domain: AdapterDomain, error: unknown): AdapterError {\n  if (error instanceof AdapterError) {\n    return error;\n  }\n\n  const message =\n    error instanceof Error ? error.message : \"Health check failed\";\n  return new AdapterError(message, domain, \"SERVICE_ERROR\", error);\n}\n\nasync function probeAdapterDomain(\n  domain: AdapterDomain,\n  adapters: ResolvedAdapterSet,\n  healthProbes?: AdapterHealthProbeMap,\n): Promise<{ connected: true } | { connected: false; error: string }> {\n  const customProbe = healthProbes?.[domain];\n  if (customProbe) {\n    await customProbe(adapters[domain] as never, adapters);\n    return { connected: true };\n  }\n\n  switch (domain) {\n    case \"auth\":\n      await adapters.auth.getSession();\n      return { connected: true };\n    case \"payments\":\n      await adapters.payments.getPlans();\n      return { connected: true };\n    case \"admin\":\n      await adapters.admin.getMetrics();\n      return { connected: true };\n    case \"logger\":\n      await adapters.logger.child({ healthCheck: true });\n      return { connected: true };\n    case \"db\":\n      await adapters.db.count(\"__geenius_adapter_healthcheck\");\n      return { connected: true };\n    case \"storage\":\n      await adapters.storage.list(\"__geenius_adapter_healthcheck\");\n      return { connected: true };\n    case \"ai\":\n      await adapters.ai.complete(\"geenius adapter health check\");\n      return { connected: true };\n  }\n\n  return {\n    connected: false,\n    error: `No health probe is registered for ${domain}.`,\n  };\n}\n\n/**\n * Provides the React adapter context and optional health-check lifecycle.\n *\n * @param props Provider props including the adapter bag, child tree, and optional health-check settings.\n * @returns A React context provider that exposes adapters and derived status metadata.\n */\n// @doc\nexport function AdapterProvider(props: AdapterProviderProps): JSX.Element {\n  const {\n    children,\n    healthCheck = false,\n    statusOverrides,\n    adapters: providedAdapters,\n    registry,\n    db,\n    auth,\n    payments,\n    ai,\n    storage,\n    fileStorage,\n    admin,\n    logger,\n    healthProbes,\n    onError,\n  } = props;\n  const defaultAdapters = useMemo(createDefaultAdapterSet, []);\n  const adapterResolutionProps = useMemo(\n    () => ({\n      adapters: providedAdapters,\n      registry,\n      db,\n      auth,\n      payments,\n      ai,\n      storage,\n      fileStorage,\n      admin,\n      logger,\n    }),\n    [\n      providedAdapters,\n      registry,\n      db,\n      auth,\n      payments,\n      ai,\n      storage,\n      fileStorage,\n      admin,\n      logger,\n    ],\n  );\n  const explicitAdapters = useMemo(\n    () => createExplicitAdapterMap(adapterResolutionProps),\n    [adapterResolutionProps],\n  );\n  const adapters = useMemo(\n    () => resolveAdapterSet(adapterResolutionProps, defaultAdapters),\n    [adapterResolutionProps, defaultAdapters],\n  );\n  const [isLoading, setIsLoading] = useState(healthCheck);\n  const [statuses, setStatuses] = useState<\n    Record<AdapterDomain, AdapterStatusInfo>\n  >(() =>\n    createInitialStatuses(\n      adapters,\n      explicitAdapters,\n      healthCheck,\n      statusOverrides,\n    ),\n  );\n\n  useEffect(() => {\n    setStatuses(\n      createInitialStatuses(\n        adapters,\n        explicitAdapters,\n        healthCheck,\n        statusOverrides,\n      ),\n    );\n    setIsLoading(healthCheck);\n  }, [adapters, explicitAdapters, healthCheck, statusOverrides]);\n\n  useEffect(() => {\n    if (!healthCheck) {\n      return;\n    }\n\n    let cancelled = false;\n    setIsLoading(true);\n\n    const checks = ADAPTER_DOMAINS.map(async (domain) => {\n      const adapter = adapters[domain];\n      if (!adapter) {\n        return;\n      }\n\n      try {\n        if (cancelled) {\n          return;\n        }\n\n        setStatuses((previous) => ({\n          ...previous,\n          [domain]: {\n            ...previous[domain],\n            status: \"initializing\",\n            error: undefined,\n          },\n        }));\n\n        const result = await probeAdapterDomain(domain, adapters, healthProbes);\n        if (cancelled) {\n          return;\n        }\n        if (!result.connected) {\n          setStatuses((previous) => ({\n            ...previous,\n            [domain]: {\n              ...previous[domain],\n              status: \"disconnected\",\n              error: result.error,\n              lastCheckedAt: Date.now(),\n            },\n          }));\n          return;\n        }\n\n        if (cancelled) {\n          return;\n        }\n        setStatuses((previous) => ({\n          ...previous,\n          [domain]: {\n            ...previous[domain],\n            status: \"connected\",\n            error: undefined,\n            lastCheckedAt: Date.now(),\n          },\n        }));\n      } catch (error) {\n        const adapterError = toAdapterError(domain, error);\n        onError?.(adapterError);\n\n        if (cancelled) {\n          return;\n        }\n        setStatuses((previous) => ({\n          ...previous,\n          [domain]: {\n            ...previous[domain],\n            status: \"error\",\n            error: adapterError.message,\n            lastCheckedAt: Date.now(),\n          },\n        }));\n      }\n    });\n\n    Promise.allSettled(checks).finally(() => {\n      if (!cancelled) {\n        setIsLoading(false);\n      }\n    });\n\n    return () => {\n      cancelled = true;\n    };\n  }, [adapters, healthCheck, healthProbes, onError]);\n\n  const getAdapter = useCallback(\n    <K extends AdapterDomain>(domain: K): AdapterByDomain[K] => {\n      const adapter = adapters[domain];\n      if (!adapter) {\n        throw new AdapterContextError(\n          `${DOMAIN_LABELS[domain] ?? domain} adapter not configured in <AdapterProvider>`,\n          \"ADAPTER_NOT_CONFIGURED\",\n        );\n      }\n      return adapter;\n    },\n    [adapters],\n  );\n\n  const isReady = useCallback(\n    (domain: AdapterDomain) =>\n      !!adapters[domain] && statuses[domain]?.status === \"connected\",\n    [adapters, statuses],\n  );\n\n  const value = useMemo<AdapterContextValue>(\n    () => ({\n      adapters,\n      statuses,\n      getAdapter,\n      isReady,\n      isLoading,\n    }),\n    [adapters, statuses, getAdapter, isReady, isLoading],\n  );\n\n  return (\n    <AdapterContext.Provider value={value}>{children}</AdapterContext.Provider>\n  );\n}\n\n/**\n * Plural provider alias matching the public `@geenius/adapters/react` contract.\n */\n// @doc\nexport const AdaptersProvider = AdapterProvider;\n\n/**\n * Reads the React adapter context from the nearest provider.\n *\n * @returns The active adapter context value with adapters, statuses, and readiness helpers.\n * @throws {AdapterContextError} When called outside of an `<AdapterProvider>` tree.\n */\n// @doc\nexport function useAdapterContext(): AdapterContextValue {\n  const context = useContext(AdapterContext);\n  if (!context) {\n    throw new AdapterContextError(\n      \"useAdapterContext must be used within <AdapterProvider>\",\n      \"MISSING_CONTEXT\",\n    );\n  }\n  return context;\n}\n","/**\n * @module index\n * @package @geenius/adapters/react\n * @description Defines the React adapter hooks for reading adapter instances\n * and adapter status state from the React provider context. These hooks are\n * part of the public React runtime package and avoid unpublished shared\n * framework subpaths.\n */\n\nimport type {\n  AdapterDomain,\n  AdapterStatusInfo,\n  AdminAdapter,\n  AiAdapter,\n  AuthAdapter,\n  DbAdapter,\n  FileStorageAdapter,\n  LoggerAdapter,\n  PaymentsAdapter,\n} from \"@geenius/adapters\";\nimport { useMemo } from \"react\";\nimport { useAdapterContext } from \"../provider\";\n\n/**\n * Reads the configured database adapter from the current React adapter context.\n *\n * @returns The active database adapter implementation for the provider tree.\n * @throws {AdapterContextError} When no React adapter provider is mounted.\n *\n * @example\n * ```tsx\n * function Users() {\n *   const db = useDb()\n *   return null\n * }\n * ```\n */\n// @doc\nexport function useDb(): DbAdapter {\n  return useAdapterContext().getAdapter(\"db\");\n}\n\n/**\n * Reads the configured authentication adapter from the current React context.\n *\n * @returns The active authentication adapter implementation.\n * @throws {AdapterContextError} When the auth adapter is unavailable.\n */\n// @doc\nexport function useAuth(): AuthAdapter {\n  return useAdapterContext().getAdapter(\"auth\");\n}\n\n/**\n * Reads the configured authentication adapter from the current React context.\n *\n * @returns The active authentication adapter implementation.\n * @throws {AdapterContextError} When the auth adapter is unavailable.\n */\n// @doc\nexport function useAuthAdapter(): AuthAdapter {\n  return useAuth();\n}\n\n/**\n * Reads the configured payments adapter from the current React context.\n *\n * @returns The active payments adapter implementation.\n * @throws {AdapterContextError} When the payments adapter is unavailable.\n */\n// @doc\nexport function usePayments(): PaymentsAdapter {\n  return useAdapterContext().getAdapter(\"payments\");\n}\n\n/**\n * Reads the configured AI adapter from the current React context.\n *\n * @returns The active AI adapter implementation.\n * @throws {AdapterContextError} When the AI adapter is unavailable.\n */\n// @doc\nexport function useAi(): AiAdapter {\n  return useAdapterContext().getAdapter(\"ai\");\n}\n\n/**\n * Reads the configured file-storage adapter from the current React context.\n *\n * @returns The active file-storage adapter implementation.\n * @throws {AdapterContextError} When the storage adapter is unavailable.\n */\n// @doc\nexport function useFileStorage(): FileStorageAdapter {\n  return useAdapterContext().getAdapter(\"storage\");\n}\n\n/**\n * Reads the configured file-storage adapter from the current React context.\n *\n * @returns The active file-storage adapter implementation.\n * @throws {AdapterContextError} When the storage adapter is unavailable.\n */\n// @doc\nexport function useStorage(): FileStorageAdapter {\n  return useFileStorage();\n}\n\n/**\n * Reads the configured admin adapter from the current React context.\n *\n * @returns The active admin adapter implementation.\n * @throws {AdapterContextError} When the admin adapter is unavailable.\n */\n// @doc\nexport function useAdmin(): AdminAdapter {\n  return useAdapterContext().getAdapter(\"admin\");\n}\n\n/**\n * Reads the configured logger adapter from the current React context.\n *\n * @returns The active logger adapter implementation.\n * @throws {AdapterContextError} When the logger adapter is unavailable.\n */\n// @doc\nexport function useLogger(): LoggerAdapter {\n  return useAdapterContext().getAdapter(\"logger\");\n}\n\n/**\n * Returns the full adapter status record from the current React context.\n *\n * @returns A status object keyed by adapter domain.\n */\n// @doc\nexport function useAdapterStatuses(): Record<AdapterDomain, AdapterStatusInfo> {\n  return useAdapterContext().statuses;\n}\n\n/**\n * Returns the current status for a single adapter domain.\n *\n * @param domain Adapter domain whose status should be returned.\n * @returns The latest status snapshot for the requested domain.\n */\n// @doc\nexport function useAdapterStatus(domain: AdapterDomain): AdapterStatusInfo {\n  return useAdapterContext().statuses[domain];\n}\n\n/**\n * Reports whether a specific adapter domain is configured and connected.\n *\n * @param domain Adapter domain to inspect.\n * @returns `true` when the domain is ready for consumer use.\n */\n// @doc\nexport function useIsAdapterReady(domain: AdapterDomain): boolean {\n  return useAdapterContext().isReady(domain);\n}\n\n/**\n * Accesses every adapter and status helper from the current provider context.\n *\n * @returns A memoized snapshot of adapters, statuses, and loading helpers.\n */\n// @doc\nexport function useAdapters(): {\n  db: DbAdapter;\n  auth: AuthAdapter;\n  payments: PaymentsAdapter;\n  ai: AiAdapter;\n  fileStorage: FileStorageAdapter;\n  storage: FileStorageAdapter;\n  admin: AdminAdapter;\n  logger: LoggerAdapter;\n  statuses: Record<AdapterDomain, AdapterStatusInfo>;\n  isLoading: boolean;\n  isReady: (domain: AdapterDomain) => boolean;\n} {\n  const context = useAdapterContext();\n\n  return useMemo(\n    () => ({\n      db: context.adapters.db,\n      auth: context.adapters.auth,\n      payments: context.adapters.payments,\n      ai: context.adapters.ai,\n      fileStorage: context.adapters.fileStorage,\n      storage: context.adapters.storage,\n      admin: context.adapters.admin,\n      logger: context.adapters.logger,\n      statuses: context.statuses,\n      isLoading: context.isLoading,\n      isReady: context.isReady,\n    }),\n    [context],\n  );\n}\n","/**\n * @module AdapterList\n * @package @geenius/adapters/react\n * @description Renders the searchable adapter grid for the React variant. The\n * list consumes provider status from context and delegates selection events to\n * the hosting page or dashboard shell.\n */\n\nimport type { AdapterDomain, AdapterStatusType } from \"@geenius/adapters\";\nimport { ADAPTER_DOMAINS, DOMAIN_LABELS } from \"@geenius/adapters\";\nimport type { JSX } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport { useAdapters } from \"../hooks\";\nimport { cn } from \"../lib/utils\";\nimport { AdapterCard } from \"./AdapterCard\";\n\n/**\n * Props for rendering the React adapter list and optional status filter controls.\n *\n * @property onSelect Optional callback invoked when a domain card is selected.\n * @property filterStatus Optional status filter applied before rendering the grid.\n * @property className Optional class name merged into the outer wrapper.\n */\nexport interface AdapterListProps {\n  onSelect?: (domain: AdapterDomain) => void;\n  filterStatus?: AdapterStatusType;\n  className?: string;\n}\n\n/**\n * Renders the searchable React adapter list backed by shared provider state.\n *\n * @param props List props including selection callback, status filtering, and wrapper class names.\n * @returns The adapter grid or an empty/loading state when no entries are available.\n */\nexport function AdapterList({\n  onSelect,\n  filterStatus,\n  className,\n}: AdapterListProps): JSX.Element {\n  const { statuses, isLoading } = useAdapters();\n  const [search, setSearch] = useState(\"\");\n\n  const filteredDomains = useMemo(() => {\n    let domains = [...ADAPTER_DOMAINS];\n\n    if (search) {\n      const query = search.toLowerCase();\n      domains = domains.filter((domain) => {\n        const label = (DOMAIN_LABELS[domain] ?? domain).toLowerCase();\n        const provider = statuses[domain]?.provider?.toLowerCase() ?? \"\";\n        return (\n          label.includes(query) ||\n          provider.includes(query) ||\n          domain.includes(query)\n        );\n      });\n    }\n\n    if (filterStatus) {\n      domains = domains.filter(\n        (domain) => statuses[domain]?.status === filterStatus,\n      );\n    }\n\n    return domains;\n  }, [search, filterStatus, statuses]);\n\n  if (isLoading) {\n    return (\n      <div\n        className={cn(\"grid gap-3\", className)}\n        role=\"status\"\n        aria-label=\"Loading adapters\"\n      >\n        {[1, 2, 3, 4].map((index) => (\n          <div\n            key={index}\n            className=\"rounded-lg border border-border bg-card p-5 shadow-sm\"\n          >\n            <div className=\"flex items-start gap-4\">\n              <div className=\"h-12 w-12 rounded-md border border-border bg-muted\" />\n              <div className=\"flex-1 space-y-3 pt-1\">\n                <div className=\"h-3 w-24 rounded-md bg-muted\" />\n                <div className=\"h-2 w-48 rounded-md bg-muted/70\" />\n              </div>\n            </div>\n          </div>\n        ))}\n      </div>\n    );\n  }\n\n  return (\n    <div className={className}>\n      <div className=\"mb-4\">\n        <input\n          type=\"text\"\n          value={search}\n          onChange={(event) => setSearch(event.target.value)}\n          placeholder=\"Search adapters...\"\n          aria-label=\"Search adapters\"\n          className=\"w-full rounded-md border border-input bg-background px-4 py-3 text-sm text-foreground shadow-sm outline-none transition-colors placeholder:text-muted-foreground focus:border-primary focus:ring-2 focus:ring-primary/20 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n        />\n      </div>\n\n      {filteredDomains.length === 0 ? (\n        <div className=\"rounded-lg border border-dashed border-border bg-muted/40 p-8 text-center shadow-sm\">\n          <p className=\"text-sm font-semibold text-foreground\">\n            {search\n              ? \"No adapters match your search\"\n              : \"No adapters configured\"}\n          </p>\n          <p className=\"mx-auto mt-2 max-w-sm text-xs text-muted-foreground\">\n            {search\n              ? \"Clear the search to return to the full adapter list.\"\n              : \"Check the current filters or configure an adapter from the overview page.\"}\n          </p>\n          {search && (\n            <button\n              type=\"button\"\n              onClick={() => setSearch(\"\")}\n              className=\"mt-4 rounded-md border border-border bg-background px-4 py-2 text-sm font-semibold text-foreground transition-colors hover:border-primary/30 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n            >\n              Clear search\n            </button>\n          )}\n        </div>\n      ) : (\n        <ul\n          className=\"m-0 grid list-none gap-3 p-0 sm:grid-cols-2\"\n          aria-label=\"Adapter list\"\n        >\n          {filteredDomains.map((domain) => (\n            <li key={domain}>\n              <AdapterCard\n                domain={domain}\n                status={statuses[domain]}\n                onClick={onSelect ? () => onSelect(domain) : undefined}\n              />\n            </li>\n          ))}\n        </ul>\n      )}\n    </div>\n  );\n}\n","/**\n * @module PageErrorBoundary\n * @package @geenius/adapters/react\n * @description Shared page-level error boundary for React adapter pages.\n */\n\n\"use client\";\n\nimport { Component, type ErrorInfo, type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\n\ninterface PageErrorBoundaryProps {\n  children: ReactNode;\n  className?: string;\n  title: string;\n}\n\ninterface PageErrorBoundaryState {\n  error: Error | null;\n}\n\nexport class PageErrorBoundary extends Component<\n  PageErrorBoundaryProps,\n  PageErrorBoundaryState\n> {\n  state: PageErrorBoundaryState = { error: null };\n\n  static getDerivedStateFromError(error: Error): PageErrorBoundaryState {\n    return { error };\n  }\n\n  componentDidCatch(_error: Error, _info: ErrorInfo): void {\n    // React requires this hook for class error boundaries; callers handle logging.\n  }\n\n  render(): ReactNode {\n    if (!this.state.error) {\n      return this.props.children;\n    }\n\n    return (\n      <div className={cn(\"mx-auto max-w-3xl space-y-4\", this.props.className)}>\n        <div\n          className=\"rounded-lg border border-destructive/20 bg-destructive/10 p-5 text-sm text-destructive shadow-sm\"\n          role=\"alert\"\n          aria-live=\"assertive\"\n        >\n          <p className=\"font-semibold\">{this.props.title}</p>\n          <p className=\"mt-1\">{this.state.error.message}</p>\n          <button\n            type=\"button\"\n            onClick={() => this.setState({ error: null })}\n            className=\"mt-4 rounded-md border border-destructive/30 bg-background px-4 py-2 text-sm font-semibold text-destructive transition-colors hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n          >\n            Retry\n          </button>\n        </div>\n      </div>\n    );\n  }\n}\n","/**\n * @module AdapterDetailPage\n * @package @geenius/adapters/react\n * @description Renders the single-domain adapter detail view for the React\n * variant. The page surfaces current provider health, available providers, and\n * inline configuration for one adapter domain.\n */\n\nimport type { AdapterDomain, DomainAdapterConfig } from \"@geenius/adapters\";\nimport {\n  DOMAIN_DESCRIPTIONS,\n  DOMAIN_LABELS,\n  getProvidersForDomain,\n} from \"@geenius/adapters\";\nimport type { JSX } from \"react\";\nimport { useId, useState } from \"react\";\nimport { AdapterConfigForm } from \"../components/AdapterConfigForm\";\nimport { AdapterDomainIcon } from \"../components/AdapterDomainIcon\";\nimport { AdapterStatusBadge } from \"../components/AdapterStatusBadge\";\nimport { useAdapterStatus, useAdapters } from \"../hooks\";\nimport { cn } from \"../lib/utils\";\nimport { PageErrorBoundary } from \"./PageErrorBoundary\";\n\n/**\n * Props for rendering the React single-domain adapter detail page.\n *\n * @property domain Adapter domain whose provider details should be displayed.\n * @property onBack Optional callback for returning to the dashboard view.\n * @property onConfigure Optional callback invoked with submitted adapter configuration.\n * @property className Optional class name merged into the page container.\n */\nexport interface AdapterDetailPageProps {\n  domain: AdapterDomain;\n  onBack?: () => void;\n  onConfigure?: (\n    domain: AdapterDomain,\n    config: DomainAdapterConfig,\n  ) => Promise<void> | void;\n  className?: string;\n}\n\n/**\n * Renders the React adapter detail page for one adapter domain.\n *\n * @param props Page props including the selected domain and optional back-navigation handler.\n * @returns The detail view with provider health, available providers, and configuration affordances.\n */\nexport function AdapterDetailPage(props: AdapterDetailPageProps): JSX.Element {\n  return (\n    <PageErrorBoundary\n      className={props.className}\n      title={`${DOMAIN_LABELS[props.domain]} adapter failed to load`}\n    >\n      <AdapterDetailPageContent {...props} />\n    </PageErrorBoundary>\n  );\n}\n\nfunction AdapterDetailPageContent({\n  domain,\n  onBack,\n  onConfigure,\n  className,\n}: AdapterDetailPageProps): JSX.Element {\n  const { isLoading } = useAdapters();\n  const status = useAdapterStatus(domain);\n  const [isEditing, setIsEditing] = useState(false);\n  const providers = getProvidersForDomain(domain);\n  // Mirror AdapterConfigForm's selectable filter so the detail page surfaces\n  // which DB providers are actually wirable today vs. deferred/BYOD. The\n  // chooser hides them; the detail page shows them with an \"Unavailable\"\n  // tag so consumers learn the launch axis without losing discovery.\n  const launchSelectableIds = new Set(\n    domain === \"db\"\n      ? [\"localStorage\", \"convex\", \"neon\", \"cloudflareKV\", \"memory\"]\n      : providers.map((p) => p.id),\n  );\n  const latencyLabelId = useId();\n\n  if (isLoading) {\n    return (\n      <div className={cn(\"mx-auto max-w-3xl space-y-6\", className)}>\n        <div\n          aria-label={`Loading ${DOMAIN_LABELS[domain]} adapter`}\n          aria-live=\"polite\"\n          className=\"animate-pulse space-y-4 motion-reduce:animate-none\"\n          role=\"status\"\n        >\n          <div className=\"h-6 w-32 rounded bg-muted\" />\n          <div className=\"h-40 rounded-lg border border-border bg-card\" />\n          <div className=\"h-60 rounded-lg border border-border bg-card\" />\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <div\n      className={cn(\"mx-auto max-w-3xl space-y-8 text-foreground\", className)}\n    >\n      {onBack && (\n        <button\n          type=\"button\"\n          onClick={onBack}\n          className=\"inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground active:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n        >\n          <span>←</span> Back to Adapters\n        </button>\n      )}\n\n      <div className=\"flex items-start gap-5\">\n        <div className=\"flex h-16 w-16 items-center justify-center rounded-lg border border-border bg-card text-3xl shadow-sm\">\n          <AdapterDomainIcon className=\"h-8 w-8\" domain={domain} />\n        </div>\n        <div className=\"flex-1\">\n          <div className=\"flex items-center gap-3\">\n            <h1 className=\"text-2xl font-extrabold text-foreground\">\n              {DOMAIN_LABELS[domain]}\n            </h1>\n            <AdapterStatusBadge status={status.status} />\n          </div>\n          <p className=\"mt-1 text-sm text-muted-foreground\">\n            {DOMAIN_DESCRIPTIONS[domain]}\n          </p>\n        </div>\n      </div>\n\n      <div className=\"rounded-lg border border-border bg-card p-6 shadow-sm\">\n        <h2 className=\"mb-4 text-xs font-semibold uppercase text-muted-foreground\">\n          Current Status\n        </h2>\n        <div className=\"grid gap-4 sm:grid-cols-3\">\n          <div>\n            <p className=\"text-[0.625rem] uppercase text-muted-foreground\">\n              Provider\n            </p>\n            <p className=\"mt-0.5 text-sm font-semibold text-foreground\">\n              {status.provider !== \"none\" ? status.provider : \"None\"}\n            </p>\n          </div>\n          <div>\n            <p className=\"text-[0.625rem] uppercase text-muted-foreground\">\n              Status\n            </p>\n            <p className=\"mt-0.5\">\n              <AdapterStatusBadge status={status.status} />\n            </p>\n          </div>\n          <div>\n            <p className=\"text-[0.625rem] uppercase text-muted-foreground\">\n              Last Checked\n            </p>\n            <p className=\"mt-0.5 text-sm text-muted-foreground\">\n              {status.lastCheckedAt\n                ? new Date(status.lastCheckedAt).toLocaleTimeString()\n                : \"Not checked\"}\n            </p>\n          </div>\n        </div>\n\n        {status.error && (\n          <div\n            className=\"mt-4 rounded-md border border-destructive/20 bg-destructive/10 px-4 py-3 text-sm text-destructive\"\n            role=\"alert\"\n          >\n            <p>\n              <span className=\"font-semibold\">Error:</span> {status.error}\n            </p>\n            <button\n              type=\"button\"\n              onClick={() => setIsEditing(true)}\n              className=\"mt-3 rounded-md border border-destructive/30 bg-background px-3 py-1.5 text-xs font-semibold text-destructive transition-colors hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n            >\n              Review configuration\n            </button>\n          </div>\n        )}\n\n        {status.latency !== undefined && (\n          <div className=\"mt-4\">\n            <p\n              id={latencyLabelId}\n              className=\"mb-1 text-[0.625rem] uppercase text-muted-foreground\"\n            >\n              Latency\n            </p>\n            <meter\n              className=\"h-2 w-full overflow-hidden rounded-full bg-muted\"\n              aria-labelledby={latencyLabelId}\n              min={0}\n              max={1000}\n              value={Math.min(1000, status.latency)}\n              aria-valuetext={`${status.latency} milliseconds`}\n            />\n            <p className=\"mt-1 text-xs text-muted-foreground\">\n              {status.latency}ms\n            </p>\n          </div>\n        )}\n      </div>\n\n      <div className=\"rounded-lg border border-border bg-card p-6 shadow-sm\">\n        <div className=\"mb-4 flex items-center justify-between\">\n          <h2 className=\"text-xs font-semibold uppercase text-muted-foreground\">\n            Available Providers\n          </h2>\n          <span className=\"text-xs text-muted-foreground\">\n            {providers.length} providers\n          </span>\n        </div>\n        <div className=\"divide-y divide-border\">\n          {providers.map((provider) => {\n            const isAvailable = launchSelectableIds.has(provider.id);\n            return (\n              <div\n                key={provider.id}\n                className=\"flex items-center justify-between py-3 first:pt-0 last:pb-0\"\n                data-available={isAvailable ? \"true\" : \"false\"}\n              >\n                <div>\n                  <p className=\"text-sm font-semibold text-foreground\">\n                    {provider.name}\n                  </p>\n                  <p className=\"text-xs text-muted-foreground\">\n                    {provider.description}\n                  </p>\n                </div>\n                <div className=\"flex flex-col items-end gap-1\">\n                  <span\n                    className={cn(\n                      \"self-start rounded px-2 py-0.5 text-[0.625rem] font-bold uppercase\",\n                      provider.tier === \"pronto\"\n                        ? \"bg-primary/10 text-primary\"\n                        : provider.tier === \"lancio\"\n                          ? \"bg-accent/10 text-accent\"\n                          : \"bg-muted text-muted-foreground\",\n                    )}\n                  >\n                    {provider.tier}\n                  </span>\n                  {!isAvailable && (\n                    <span className=\"self-start rounded border border-border bg-muted px-2 py-0.5 text-[0.625rem] font-semibold uppercase text-muted-foreground\">\n                      Unavailable\n                    </span>\n                  )}\n                </div>\n              </div>\n            );\n          })}\n        </div>\n      </div>\n\n      <div>\n        {isEditing ? (\n          <AdapterConfigForm\n            domain={domain}\n            onSave={async (config) => {\n              await onConfigure?.(domain, config);\n              setIsEditing(false);\n            }}\n            onCancel={() => setIsEditing(false)}\n          />\n        ) : (\n          <button\n            type=\"button\"\n            onClick={() => setIsEditing(true)}\n            className=\"w-full rounded-lg border border-dashed border-border bg-card/40 p-6 text-center text-sm text-muted-foreground transition-colors hover:border-primary/30 hover:text-foreground active:border-primary/40 active:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\"\n          >\n            Configure {DOMAIN_LABELS[domain]} Adapter\n          </button>\n        )}\n      </div>\n    </div>\n  );\n}\n","/**\n * @module AdaptersPage\n * @package @geenius/adapters/react\n * @description Renders the Tailwind-based adapters overview for the React\n * package. The page summarizes adapter health, supports status filtering, and\n * provides an accessible modal workflow for configuring each adapter domain.\n */\n\n\"use client\";\n\nimport type {\n  AdapterDomain,\n  AdapterStatusType,\n  DomainAdapterConfig,\n} from \"@geenius/adapters\";\nimport {\n  ADAPTER_DOMAINS,\n  ADAPTER_STATUSES,\n  DOMAIN_LABELS,\n  getDomainConfig,\n  getProvidersForDomain,\n  isAdaptersConfigured,\n} from \"@geenius/adapters\";\nimport type { JSX } from \"react\";\nimport { useEffect, useId, useRef, useState } from \"react\";\nimport { AdapterConfigForm } from \"../components/AdapterConfigForm\";\nimport { AdapterList } from \"../components/AdapterList\";\nimport { AdapterStatusBadge } from \"../components/AdapterStatusBadge\";\nimport { useAdapters } from \"../hooks\";\nimport { cn } from \"../lib/utils\";\nimport { PageErrorBoundary } from \"./PageErrorBoundary\";\n\nconst DIALOG_FOCUSABLE_SELECTORS =\n  'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\ntype RegistryEntry = {\n  domain: AdapterDomain;\n  provider: string;\n  status: AdapterStatusType;\n};\n\n/**\n * Props accepted by the React adapters overview page.\n *\n * @property onNavigateDetail Optional callback used instead of opening the inline modal\n * @property onConfigure Optional callback invoked with submitted adapter configuration\n * @property className Optional class name merged onto the page root\n * @property configByDomain Optional configuration snapshot used to hydrate modal forms\n * @property registryEntries Optional adapter registry snapshot rendered above the grid\n */\nexport interface AdaptersPageProps {\n  onNavigateDetail?: (domain: AdapterDomain) => void;\n  onConfigure?: (\n    domain: AdapterDomain,\n    config: DomainAdapterConfig,\n  ) => Promise<void> | void;\n  className?: string;\n  configByDomain?: Partial<Record<AdapterDomain, DomainAdapterConfig>>;\n  registryEntries?: RegistryEntry[];\n}\n\n/**\n * Returns focusable descendants for an active dialog container.\n *\n * @param container Dialog container used to scope the focus trap\n * @returns Interactive descendants that should participate in tab order\n */\nfunction getDialogFocusableElements(container: HTMLElement): HTMLElement[] {\n  return Array.from(\n    container.querySelectorAll<HTMLElement>(DIALOG_FOCUSABLE_SELECTORS),\n  );\n}\n\n/**\n * Renders the adapter management dashboard for the React variant.\n *\n * @param props Page props controlling navigation overrides and registry data\n * @returns A dashboard with status filters, adapter cards, and a modal editor\n * @example\n * ```tsx\n * <AdaptersPage onNavigateDetail={(domain) => navigate(`/adapters/${domain}`)} />\n * ```\n */\nexport function AdaptersPage(props: AdaptersPageProps): JSX.Element {\n  return (\n    <PageErrorBoundary\n      className={props.className}\n      title=\"Adapters failed to load\"\n    >\n      <AdaptersPageContent {...props} />\n    </PageErrorBoundary>\n  );\n}\n\nfunction AdaptersPageContent({\n  onNavigateDetail,\n  onConfigure,\n  className,\n  configByDomain,\n  registryEntries,\n}: AdaptersPageProps): JSX.Element {\n  const { statuses, isLoading } = useAdapters();\n  const [selectedDomain, setSelectedDomain] = useState<AdapterDomain | null>(\n    null,\n  );\n  const [filterStatus, setFilterStatus] = useState<\n    AdapterStatusType | undefined\n  >();\n  const modalRef = useRef<HTMLDivElement | null>(null);\n  const modalTitleId = useId();\n  const adapterDomainsHeadingId = useId();\n  const initialConfigFor = (domain: AdapterDomain) =>\n    configByDomain?.[domain] ??\n    (isAdaptersConfigured() ? getDomainConfig(domain) : undefined) ??\n    undefined;\n\n  const counts = {\n    connected: ADAPTER_DOMAINS.filter(\n      (domain) => statuses[domain]?.status === \"connected\",\n    ).length,\n    error: ADAPTER_DOMAINS.filter(\n      (domain) => statuses[domain]?.status === \"error\",\n    ).length,\n    total: ADAPTER_DOMAINS.length,\n  };\n\n  useEffect(() => {\n    if (!selectedDomain) {\n      return;\n    }\n\n    const browserDocument = typeof document === \"undefined\" ? null : document;\n    if (!browserDocument) {\n      return;\n    }\n\n    const dialog = modalRef.current;\n    if (!dialog) {\n      return;\n    }\n\n    const previousActiveElement =\n      browserDocument.activeElement instanceof HTMLElement\n        ? browserDocument.activeElement\n        : null;\n    const focusableElements = getDialogFocusableElements(dialog);\n    const firstFocusableElement = focusableElements[0];\n    const lastFocusableElement = focusableElements.at(-1);\n\n    (firstFocusableElement ?? dialog).focus();\n\n    const handleKeyDown = (event: KeyboardEvent): void => {\n      if (event.key === \"Escape\") {\n        event.preventDefault();\n        setSelectedDomain(null);\n        return;\n      }\n\n      if (event.key !== \"Tab\") {\n        return;\n      }\n\n      const activeElement = browserDocument.activeElement;\n\n      if (!firstFocusableElement || !lastFocusableElement) {\n        event.preventDefault();\n        dialog.focus();\n        return;\n      }\n\n      if (event.shiftKey && activeElement === firstFocusableElement) {\n        event.preventDefault();\n        lastFocusableElement.focus();\n        return;\n      }\n\n      if (!event.shiftKey && activeElement === lastFocusableElement) {\n        event.preventDefault();\n        firstFocusableElement.focus();\n      }\n    };\n\n    browserDocument.addEventListener(\"keydown\", handleKeyDown);\n\n    return () => {\n      browserDocument.removeEventListener(\"keydown\", handleKeyDown);\n      previousActiveElement?.focus();\n    };\n  }, [selectedDomain]);\n\n  if (isLoading) {\n    return (\n      <div className={cn(\"mx-auto max-w-4xl space-y-6\", className)}>\n        <div\n          aria-label=\"Loading adapters\"\n          aria-live=\"polite\"\n          className=\"animate-pulse space-y-4 motion-reduce:animate-none\"\n          role=\"status\"\n        >\n          <div className=\"h-8 w-48 rounded bg-muted\" />\n          <div className=\"h-4 w-72 rounded bg-muted/70\" />\n          <div className=\"grid gap-3 sm:grid-cols-3\">\n            {[1, 2, 3].map((index) => (\n              <div\n                key={index}\n                className=\"h-20 rounded-lg border border-border bg-card\"\n              />\n            ))}\n          </div>\n          <div className=\"grid gap-3 sm:grid-cols-2\">\n            {[1, 2, 3, 4].map((index) => (\n              <div\n                key={index}\n                className=\"h-28 rounded-lg border border-border bg-card\"\n              />\n            ))}\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <div\n      className={cn(\"mx-auto max-w-4xl space-y-8 text-foreground\", className)}\n    >\n      <header className=\"space-y-1\">\n        <h1 className=\"text-2xl font-extrabold text-foreground\">Adapters</h1>\n        <p className=\"text-sm text-muted-foreground\">\n          Manage your infrastructure adapters - database, auth, AI, storage,\n          payments, and admin.\n        </p>\n      </header>\n\n      <section className=\"grid gap-3 sm:grid-cols-3\">\n        <div className=\"rounded-lg border border-border bg-card p-4 shadow-sm\">\n          <p className=\"text-xs font-semibold uppercase text-muted-foreground\">\n            Total\n          </p>\n          <p className=\"mt-1 text-2xl font-extrabold text-foreground\">\n            {counts.total}\n          </p>\n          <p className=\"text-[0.625rem] text-muted-foreground\">\n            adapter domains\n          </p>\n        </div>\n        <div className=\"rounded-lg border border-primary/20 bg-primary/10 p-4 shadow-sm\">\n          <p className=\"text-xs font-semibold uppercase text-primary\">\n            Connected\n          </p>\n          <p className=\"mt-1 text-2xl font-extrabold text-primary\">\n            {counts.connected}\n          </p>\n          <p className=\"text-[0.625rem] text-primary/70\">active adapters</p>\n        </div>\n        {counts.error > 0 && (\n          <div className=\"rounded-lg border border-destructive/20 bg-destructive/10 p-4 shadow-sm\">\n            <p className=\"text-xs font-semibold uppercase text-destructive\">\n              Errors\n            </p>\n            <p className=\"mt-1 text-2xl font-extrabold text-destructive\">\n              {counts.error}\n            </p>\n            <p className=\"text-[0.625rem] text-destructive/70\">\n              need attention\n            </p>\n          </div>\n        )}\n      </section>\n\n      {registryEntries && registryEntries.length > 0 && (\n        <section className=\"rounded-lg border border-border bg-card p-4 shadow-sm\">\n          <div className=\"flex flex-wrap items-center justify-between gap-3\">\n            <div>\n              <p className=\"text-xs font-semibold uppercase text-muted-foreground\">\n                Adapter Registry\n              </p>\n              <p className=\"text-sm text-muted-foreground\">\n                Live adapter registry entries.\n              </p>\n            </div>\n            <div className=\"flex gap-3 text-xs text-muted-foreground\">\n              <span>{registryEntries.length} entries</span>\n            </div>\n          </div>\n          <div className=\"mt-4 grid gap-2 sm:grid-cols-2\">\n            {registryEntries.map((entry) => {\n              const providerMeta = getProvidersForDomain(entry.domain).find(\n                (provider) => provider.id === entry.provider,\n              );\n\n              return (\n                <div\n                  key={`${entry.domain}-${entry.provider}`}\n                  className=\"rounded-md border border-border bg-background px-4 py-3\"\n                >\n                  <div className=\"flex items-center justify-between gap-3\">\n                    <div>\n                      <p className=\"text-sm font-semibold text-foreground\">\n                        {DOMAIN_LABELS[entry.domain]}\n                      </p>\n                      <p className=\"text-xs text-muted-foreground\">\n                        {providerMeta?.name ?? entry.provider}\n                      </p>\n                    </div>\n                    <AdapterStatusBadge status={entry.status} />\n                  </div>\n                </div>\n              );\n            })}\n          </div>\n        </section>\n      )}\n\n      <section className=\"flex flex-wrap items-center gap-2\">\n        <button\n          type=\"button\"\n          onClick={() => setFilterStatus(undefined)}\n          aria-pressed={!filterStatus}\n          className={cn(\n            \"rounded-lg border px-3 py-1.5 text-xs font-semibold transition-colors active:border-primary/30 active:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\",\n            !filterStatus\n              ? \"border-primary bg-primary/10 text-primary\"\n              : \"border-border bg-background text-muted-foreground hover:text-foreground\",\n          )}\n        >\n          All\n        </button>\n        {ADAPTER_STATUSES.map((status) => (\n          <button\n            key={status}\n            type=\"button\"\n            onClick={() => setFilterStatus(status)}\n            aria-pressed={filterStatus === status}\n            className={cn(\n              \"flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs font-semibold transition-colors active:border-primary/30 active:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-reduce:transition-none\",\n              filterStatus === status\n                ? \"border-primary bg-primary/10 text-primary\"\n                : \"border-border bg-background text-muted-foreground hover:text-foreground\",\n            )}\n          >\n            <AdapterStatusBadge status={status} />\n          </button>\n        ))}\n      </section>\n\n      <section aria-labelledby={adapterDomainsHeadingId}>\n        <h2 id={adapterDomainsHeadingId} className=\"sr-only\">\n          Adapter domains\n        </h2>\n        <AdapterList\n          filterStatus={filterStatus}\n          onSelect={(domain) => {\n            if (onNavigateDetail) {\n              onNavigateDetail(domain);\n            } else {\n              setSelectedDomain(domain);\n            }\n          }}\n        />\n      </section>\n\n      {selectedDomain && (\n        <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-background/80 px-4 backdrop-blur-sm\">\n          <button\n            type=\"button\"\n            aria-label=\"Close adapter configuration\"\n            className=\"absolute inset-0 cursor-default border-0 bg-transparent p-0\"\n            onClick={() => setSelectedDomain(null)}\n          />\n          <div\n            ref={modalRef}\n            className=\"relative z-10 w-full max-w-lg\"\n            role=\"dialog\"\n            aria-modal=\"true\"\n            aria-labelledby={modalTitleId}\n            tabIndex={-1}\n          >\n            <AdapterConfigForm\n              domain={selectedDomain}\n              titleId={modalTitleId}\n              initialConfig={initialConfigFor(selectedDomain)}\n              onSave={async (config) => {\n                await onConfigure?.(selectedDomain, config);\n                setSelectedDomain(null);\n              }}\n              onCancel={() => setSelectedDomain(null)}\n            />\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n"]}