import { ComponentType } from 'react'; import { ResolvableHeaders } from '@voltro/client'; import { Rpc } from '@effect/rpc'; import { RpcGroup } from '@effect/rpc'; /** * Boot the framework's React stack against the given app. Resolves the * typed rpc client for each api in parallel, renders the user's component * tree inside the framework runtime + clients providers, and in dev mode * auto-recovers each client in-place when its dev server restarts. */ export declare const mount: (App: ComponentType, options: MountOptions) => void; export declare interface MountApiSpec { /** The RpcGroup this api speaks. */ readonly group: RpcGroup.RpcGroup; /** Per-rpc-tag descriptor metadata: `{ kind, source?, targets? }`. The * framework's auto-optimistic flow reads this to know which mutation * affects which cached query. The CLI's codegen emits it as * `appDescriptors` next to `appGroup`. */ readonly descriptors?: Readonly; }>>; /** Explicit WebSocket URL for this api. Required for external apis * (where there's no Vite proxy). Defaults to same-origin `/ws/` * for workspace apis served via the framework's dev proxy. */ readonly wsUrl?: string; /** Auth headers sent with EVERY rpc request over the socket — this is how * a cross-origin api authenticates WS subscriptions. They ride in the * @effect/rpc message frame, NOT the WS handshake (a browser can't set * upgrade headers). Pass a thunk to fetch a rotating token fresh on every * (re)connect, e.g. `headers: async () => ({ authorization: 'Bearer ' + * (await supabase.auth.getSession()).data.session?.access_token })`; a * static object is also accepted. Do NOT hardcode a secret literal — it * ships to the client and is visible in source; resolve it at runtime. */ readonly headers?: ResolvableHeaders; } export declare interface MountOptions { /** Map of api name → spec. The name is the lookup key for hooks * (`useAppClient(name)`, `useSubscription(name, ...)`, etc.). */ readonly apis: Record; /** Override the root element id. Defaults to 'root'. */ readonly rootId?: string; /** Optional in-page devtools overlay component. Wired up by the * CLI's generated `main.tsx` when `import.meta.env.DEV` is truthy * and the app hasn't set `disableDevtools` in app.config.ts. * Renders INSIDE the FrameworkBoot tree so its hooks * (useFrameworkRuntimes, useLoaderData, …) resolve normally. * PascalCase because it is a React component reference rendered * as . */ readonly Devtools?: ComponentType; } export declare const noticeIslandsShipTheFullBundle: (isDev: boolean) => void; export { }