import { ClientDescriptorMap } from '@voltro/client'; import { ComponentType } from 'react'; import { MountedApi } from '@voltro/client'; import { ReactNode } from 'react'; export { ClientDescriptorMap } export declare const FrameworkBoot: ({ App, apis, Devtools, connect }: FrameworkBootProps) => ReactNode; export declare interface FrameworkBootProps { readonly App: ComponentType; readonly apis: ReadonlyArray; /** Optional devtools overlay. Rendered as a sibling to * inside the FrameworkRuntimesProvider tree so its hooks * (useFrameworkRuntimes etc.) resolve. PascalCase because it is a * React component reference rendered as . */ readonly Devtools?: ComponentType; /** Passed to `VoltroRuntimeProvider` — see its `connect` doc. */ readonly connect?: 'eager' | 'lazy'; } export { MountedApi } export declare const VoltroRuntimeProvider: ({ apis, children, chrome, connect }: VoltroRuntimeProviderProps) => ReactNode; export declare interface VoltroRuntimeProviderProps { /** The apis to mount (name, group, descriptors, wsUrl, headers). */ readonly apis: ReadonlyArray; /** Rendered inside the resolved runtime contexts — the host's tree. */ readonly children: ReactNode; /** Optional extra chrome rendered (post-hydration only) inside the * runtime contexts, alongside the framework's own NavigationIndicator * + trace-error overlay. The framework's own web bootstrap passes its * Devtools overlay here (see `FrameworkBoot`); foreign hosts leave it * unset. Gated behind the same post-mount flag as the rest of the * chrome so it never trips a hydration mismatch. */ readonly chrome?: ReactNode; /** * When each api connects. * * 'eager' (default) — every declared api opens its socket at mount, as it * always has. * 'lazy' — an api connects on the FIRST hook that asks for it * (`useFrameworkApi`, i.e. every data hook). A page * that reads no data never opens a socket. * * `'lazy'` is not the default because it changes when a connection error * surfaces, and an app that opens its socket for a side effect (a presence * ping, an inspect stream) would notice. It is `web.api.connect` in * `app.config.ts`. * * Why it exists, measured in a real browser against a `voltro start`: * `interactive: 'full'` is the DEFAULT, and a pre-rendered documentation page * with no subscription at all opened a WebSocket (`'none'` and `'islands'` * opened none). And a connected socket keeps a dormancy-managed instance * awake — `isIdleNow` is false while `connectedClients() > 0` — so a single * open tab on a pricing page prevented scale-to-zero for as long as it stayed * open. */ readonly connect?: 'eager' | 'lazy'; } export { } declare global { interface Window { readonly voltroDiagnostics?: VoltroDiagnosticsControl; } }