import { AdapterDomain, AdapterStatusInfo, DomainAdapterConfig, AdapterStatusType, DbAdapter, AuthAdapter, PaymentsAdapter, AiAdapter, FileStorageAdapter, AdminAdapter, LoggerAdapter, AdapterError } from '@geenius/adapters'; import * as solid_js from 'solid-js'; import { JSX, Context } from 'solid-js'; /** * @module AdapterCard * @package @geenius/adapters/solidjs-css * @description Renders the vanilla CSS adapter summary card for the SolidJS * CSS variant. The card surfaces provider status, latency, and domain metadata * for one adapter domain in the dashboard views. */ /** * Props for rendering a single adapter summary card in the SolidJS CSS dashboard grid. * * @property domain Adapter domain represented by the card. * @property status Current provider health and metadata for the domain. * @property onClick Optional callback fired when the card is activated. * @property class Optional class name merged into the card container. */ interface AdapterCardProps { domain: AdapterDomain; status: AdapterStatusInfo; onClick?: () => void; class?: string; } /** * Renders a clickable SolidJS CSS summary card for one adapter domain. * * @param props Card props including the adapter domain, status payload, and click handler. * @returns A button element styled by the vanilla CSS variant. */ declare function AdapterCard(props: AdapterCardProps): JSX.Element; /** * @module AdapterConfigForm * @package @geenius/adapters/solidjs-css * @description Renders the vanilla CSS adapter configuration form for the * SolidJS CSS variant. The component keeps provider selection and credential * inputs local while delegating persistence to the caller. */ /** * Props accepted by the SolidJS CSS adapter configuration form. * * @property domain Adapter domain being configured in the current dialog * @property initialConfig Existing configuration values used to hydrate the form * @property onSave Async or sync handler that persists the submitted configuration * @property onCancel Optional callback invoked when the user dismisses the form * @property class Optional class merged onto the form root * @property titleId Optional identifier applied to the form title for dialog labelling */ interface AdapterConfigFormProps { domain: AdapterDomain; initialConfig?: DomainAdapterConfig; onSave: (config: DomainAdapterConfig) => Promise | void; onCancel?: () => void; class?: string; titleId?: string; } /** * Renders the adapter configuration workflow for a single adapter domain. * * @param props Component props controlling the selected domain and form callbacks * @returns A provider chooser and credential form styled with the CSS variant * @example * ```tsx * saveConfig('auth', config)} * onCancel={() => setOpen(false)} * /> * ``` */ declare function AdapterConfigForm(props: AdapterConfigFormProps): JSX.Element; /** * @module AdapterList * @package @geenius/adapters/solidjs-css * @description Renders the searchable adapter grid for the SolidJS CSS * variant. The list consumes provider status from context and delegates * selection events to the hosting page or dashboard shell. */ /** * Props for rendering the SolidJS CSS adapter list and optional status filter controls. * * @property onSelect Optional callback invoked when a domain card is selected. * @property filterStatus Optional status filter applied before rendering the grid. * @property class Optional class name merged into the outer wrapper. */ interface AdapterListProps { onSelect?: (domain: AdapterDomain) => void; filterStatus?: AdapterStatusType; class?: string; } /** * Renders the searchable SolidJS CSS adapter list backed by shared provider state. * * @param props List props including selection callback, status filtering, and wrapper class names. * @returns The adapter grid or an empty state when no entries are available. */ declare function AdapterList(props: AdapterListProps): JSX.Element; /** * @module AdapterStatusBadge * @package @geenius/adapters/solidjs-css * @description Renders the vanilla CSS adapter status badge for the SolidJS * CSS variant. The badge exposes the shared adapter status vocabulary in a * compact, themeable visual treatment. */ /** * Props for rendering the SolidJS CSS adapter status badge. * * @property status Shared adapter status vocabulary value to display. * @property showLabel Whether the human-readable label should be rendered. * @property class Optional class name merged into the badge wrapper. */ interface AdapterStatusBadgeProps { status: AdapterStatusType; showLabel?: boolean; class?: string; } /** * Renders a compact SolidJS CSS badge for the current adapter lifecycle state. * * @param props Badge props including the status token and optional label visibility. * @returns A styled badge element that mirrors the shared adapter status taxonomy. */ declare function AdapterStatusBadge(props: AdapterStatusBadgeProps): JSX.Element; /** * @module cx * @package @geenius/adapters/solidjs-css * @description Provides the lightweight class name composition helper used by * the SolidJS CSS variant. The helper keeps conditional CSS class assembly * terse without introducing Tailwind-specific dependencies. * * @param classes Class name strings where falsy values are ignored * @returns A space-delimited class name string containing only truthy values * * @example * ```ts * cx('button', 'button-primary') // 'button button-primary' * cx('button', isActive() && 'button-active') // 'button button-active' or 'button' * cx('base', null, undefined, false, 'modifier') // 'base modifier' * ``` */ declare function cx(...classes: (string | false | null | undefined)[]): string; /** * @module AdapterDetailPage * @package @geenius/adapters/solidjs-css * @description Renders the single-domain adapter detail view for the SolidJS * CSS variant. The page surfaces current provider health, available providers, * and inline configuration for one adapter domain. */ /** * Props for rendering the SolidJS CSS single-domain adapter detail page. * * @property domain Adapter domain whose provider details should be displayed. * @property onBack Optional callback for returning to the dashboard view. * @property onConfigure Optional callback used to persist submitted provider configuration. * @property initialConfig Existing configuration value used to hydrate the inline form. * @property class Optional class name merged into the page container. */ interface AdapterDetailPageProps { domain: AdapterDomain; onBack?: () => void; onConfigure?: (domain: AdapterDomain, config: DomainAdapterConfig) => Promise | void; initialConfig?: DomainAdapterConfig; class?: string; } /** * Renders the SolidJS CSS adapter detail page for one adapter domain. * * @param props Page props including the selected domain and optional back-navigation handler. * @returns The detail view with provider health, available providers, and configuration affordances. */ declare function AdapterDetailPage(props: AdapterDetailPageProps): JSX.Element; /** * @module AdaptersPage * @package @geenius/adapters/solidjs-css * @description Renders the vanilla CSS adapters overview for the SolidJS CSS * package. The page summarizes adapter health, supports status filtering, and * provides an accessible modal workflow for configuring each adapter domain. */ type RegistryEntry = { domain: AdapterDomain; provider: string; status: AdapterStatusType; }; /** * Props accepted by the SolidJS CSS adapters overview page. * * @property onNavigateDetail Optional callback used instead of opening the inline modal * @property onConfigure Optional callback invoked with submitted adapter configuration. Mirrors the SolidJS reference; lets the consumer persist values per-domain. * @property configByDomain Existing per-domain configuration values used to hydrate modal forms. * @property class Optional class merged onto the page root * @property registryEntries Optional adapter registry snapshot rendered above the grid */ interface AdaptersPageProps { onNavigateDetail?: (domain: AdapterDomain) => void; onConfigure?: (domain: AdapterDomain, config: DomainAdapterConfig) => Promise | void; configByDomain?: Partial>; class?: string; registryEntries?: RegistryEntry[]; } /** * Renders the adapter management dashboard for the SolidJS CSS variant. * * @param props Page props controlling navigation overrides and registry data * @returns A dashboard with status filters, adapter cards, and a modal editor * @example * ```tsx * navigate(`/adapters/${domain}`)} /> * ``` */ declare function AdaptersPage(props: AdaptersPageProps): JSX.Element; /** * @module index * @package @geenius/adapters/solidjs-css * @description Defines the SolidJS CSS adapter primitives for reading adapter * instances and adapter status state from the SolidJS CSS provider context. * These primitives keep the SolidJS CSS runtime self-contained and on the * public contract. */ /** * Reads the configured database adapter from the current SolidJS CSS adapter context. * * @returns The active database adapter implementation for the provider tree. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createDb(): DbAdapter; /** * Reads the configured authentication adapter from the current SolidJS CSS context. * * @returns The active authentication adapter implementation. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createAuth(): AuthAdapter; /** * Reads the configured authentication adapter from the current SolidJS CSS context. * Alias for {@link createAuth} matching the React `useAuthAdapter` convention. * * @returns The active authentication adapter implementation. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createAuthAdapter(): AuthAdapter; /** * Reads the configured payments adapter from the current SolidJS CSS context. * * @returns The active payments adapter implementation. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createPayments(): PaymentsAdapter; /** * Reads the configured AI adapter from the current SolidJS CSS context. * * @returns The active AI adapter implementation. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createAi(): AiAdapter; /** * Reads the configured file-storage adapter from the current SolidJS CSS context. * * @returns The active file-storage adapter implementation. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createStorage(): FileStorageAdapter; /** * Reads the configured file-storage adapter using the explicit file-storage primitive name. * * @returns The active file-storage adapter implementation. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createFileStorage(): FileStorageAdapter; /** * Reads the configured admin adapter from the current SolidJS CSS context. * * @returns The active admin adapter implementation. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createAdmin(): AdminAdapter; /** * Reads the configured logger adapter from the current SolidJS CSS context. * * @returns The active logger adapter implementation. * @throws {AdapterContextError} When the provider or adapter is unavailable. */ declare function createLogger(): LoggerAdapter; /** * Returns the full adapter status record from the current SolidJS CSS context. * * @returns A status object keyed by adapter domain. */ declare function createAdapterStatuses(): Record; /** * Creates a memoized reader for a single adapter domain status. * * @param domain Adapter domain whose status should be observed. * @returns A getter that always reflects the latest status for that domain. */ declare function createAdapterStatus(domain: AdapterDomain): () => AdapterStatusInfo; /** * Creates a memoized readiness reader for a single adapter domain. * * @param domain Adapter domain to inspect. * @returns A getter that reports whether the domain is ready for use. */ declare function createIsAdapterReady(domain: AdapterDomain): () => boolean; /** * Accesses every adapter and status helper from the current provider context. * * @returns A stable object exposing adapters, statuses, and loading helpers. */ declare function createAdapters(): { db: DbAdapter | undefined; auth: AuthAdapter | undefined; payments: PaymentsAdapter | undefined; ai: AiAdapter | undefined; storage: FileStorageAdapter | undefined; fileStorage: FileStorageAdapter | undefined; admin: AdminAdapter | undefined; logger: LoggerAdapter | undefined; statuses: Record; isLoading: boolean; isReady: (domain: AdapterDomain) => boolean; }; /** * Map from adapter domain identifier to its concrete adapter interface. * * Used as the canonical typing for the SolidJS CSS adapter registry; each * key corresponds to a supported domain and its value is the contract every * provider implementation for that domain must satisfy. */ interface AdapterDomainMap { db: DbAdapter; auth: AuthAdapter; payments: PaymentsAdapter; ai: AiAdapter; storage: FileStorageAdapter; admin: AdminAdapter; logger: LoggerAdapter; } /** * Union of supported adapter domain identifiers derived from {@link AdapterDomainMap}. */ type AdapterDomainKey = keyof AdapterDomainMap; /** * SolidJS CSS adapter bag keyed by domain. * * @property db Database adapter implementation when configured. * @property auth Authentication adapter implementation when configured. * @property payments Payments adapter implementation when configured. * @property ai AI adapter implementation when configured. * @property storage File-storage adapter implementation when configured. * @property admin Admin adapter implementation when configured. * @property logger Logger adapter implementation when configured. */ interface AdapterSet extends Partial { fileStorage?: FileStorageAdapter; } /** Registry shape accepted by the public SolidJS CSS provider. */ type AdapterRegistry = AdapterSet; /** * SolidJS CSS adapter context value exposed to primitives and provider consumers. * * @property adapters Adapter bag passed into the provider. * @property statuses Current status record for each adapter domain. * @property getAdapter Returns a configured adapter for a specific domain or throws when missing. * @property isReady Reports whether a domain is configured and connected. * @property isLoading Indicates whether initial health checks are still running. */ interface AdapterContextValue { adapters: AdapterSet; statuses: Record; getAdapter: (domain: K) => AdapterDomainMap[K]; isReady: (domain: AdapterDomain) => boolean; isLoading: boolean; } declare const AdapterContext: Context; type ProviderChildren = Parameters[0]["children"]; type ProviderElement = solid_js.JSX.Element; /** * Map of domain-specific health probes supplied by the host app. * * When a domain has a custom probe, the provider calls it instead of the * built-in probe during the health-check lifecycle. The probe receives the * adapter instance for its domain and the full adapter bag. */ type AdapterHealthProbeMap = Partial<{ [D in AdapterDomainKey]: (adapter: AdapterDomainMap[D], adapters: AdapterSet) => Promise | void; }>; /** * Props accepted by the SolidJS CSS adapter provider. * * @property adapters Optional adapter bag made available to descendant primitives and components. * @property registry Optional registry alias for adapter overrides. * @property db Optional direct database adapter override. * @property auth Optional direct authentication adapter override. * @property payments Optional direct payments adapter override. * @property ai Optional direct AI adapter override. * @property storage Optional direct file-storage adapter override. * @property fileStorage Optional slot-API alias for the file-storage adapter. * @property admin Optional direct admin adapter override. * @property logger Optional direct logger adapter override. * @property children Solid subtree that should receive adapter context. * @property healthCheck Whether the provider should probe configured adapters on mount. * @property healthProbes Optional domain-specific health probes supplied by the host app. * @property statusOverrides Optional deterministic status overrides for tests and previews. * @property onError Optional typed error callback invoked when provider lifecycle checks fail. */ interface AdapterProviderProps extends Partial { adapters?: AdapterSet; registry?: Partial; fileStorage?: FileStorageAdapter; children: ProviderChildren; healthCheck?: boolean; healthProbes?: AdapterHealthProbeMap; statusOverrides?: Partial>>; onError?: (error: AdapterError) => void; } /** * Plural alias for {@link AdapterProviderProps}; preserved for naming parity * with sibling framework cells that historically exported the plural form. */ type AdaptersProviderProps = AdapterProviderProps; /** * Provides the SolidJS CSS adapter context and optional health-check lifecycle. * * @param props Provider props including the adapter bag, child tree, and optional health-check settings. * @returns A SolidJS context provider that exposes adapters and derived status metadata. */ declare function AdapterProvider(props: AdapterProviderProps): ProviderElement; /** * Plural provider alias matching the public SolidJS CSS contract. */ declare const AdaptersProvider: typeof AdapterProvider; /** * Reads the SolidJS CSS adapter context from the nearest provider. * * @returns The active adapter context value with adapters, statuses, and readiness helpers. * @throws {AdapterContextError} When called outside of an `` tree. */ declare function useAdapterContext(): AdapterContextValue; export { AdapterCard, type AdapterCardProps, AdapterConfigForm, type AdapterConfigFormProps, type AdapterContextValue, AdapterDetailPage, type AdapterDetailPageProps, type AdapterDomainKey, type AdapterDomainMap, type AdapterHealthProbeMap, AdapterList, type AdapterListProps, AdapterProvider, type AdapterProviderProps, type AdapterRegistry, type AdapterSet, AdapterStatusBadge, type AdapterStatusBadgeProps, AdaptersPage, type AdaptersPageProps, AdaptersProvider, type AdaptersProviderProps, cx as cn, createAdapterStatus, createAdapterStatuses, createAdapters, createAdmin, createAi, createAuth, createAuthAdapter, createDb, createFileStorage, createIsAdapterReady, createLogger, createPayments, createStorage, useAdapterContext };