import { ReactNode } from 'react'; import { QueryClient } from '@tanstack/react-query'; /** * Server identity + auth for an e3 React tree. * * @property apiUrl - Base URL of the e3 API server. * @property repo - Repository name. Defaults to `"default"` when omitted. * @property workspace - Active workspace. Optional at the provider * level — components that strictly require one (e.g. ``, * `Data.bind`) surface their own error if it's missing. * @property token - Optional bearer token for authenticated requests. * May be `null` for "anonymous." Rotates freely — every call re-reads. */ export interface E3Config { apiUrl: string; repo?: string; workspace?: string; token?: string | null; } /** * Props for {@link E3Provider}. * * @property children - Subtree that should see this config. * @property config - The {@link E3Config} to expose. * @property queryClient - Optional external `QueryClient`. One is * created if omitted; pass an external instance to share a TanStack * cache with the rest of your application. */ export interface E3ProviderProps { children: ReactNode; config: E3Config; queryClient?: QueryClient; } /** * Provide e3 server identity + auth + a TanStack-Query client to a * React subtree. * * @example * ```tsx * * * * * * ``` */ export declare function E3Provider({ children, config, queryClient: externalClient }: E3ProviderProps): import("react/jsx-runtime").JSX.Element; /** * Read the active {@link E3Config}. Throws if no `` is * mounted — every component that talks to e3 needs one. */ export declare function useE3Config(): E3Config; /** * Read the active {@link E3Config}, or `null` if no provider is * mounted. Use this when a component should degrade gracefully * (e.g. an empty state) rather than throwing. */ export declare function useE3ConfigOptional(): E3Config | null; //# sourceMappingURL=e3-config.d.ts.map