/**
* ResttySessionProvider — React Context for sharing WASM + WebGPU resources.
*
* Wrapping N `ResttyTerminal` instances in a single `ResttySessionProvider`
* ensures they share one WASM module (~2 MB) and one WebGPU core instead of
* loading duplicates.
*
* @example
* ```tsx
*
*
*
*
* ```
*
* @module Terminal/restty/ResttySessionProvider
*/
import { type ReactNode } from 'react';
import type { ResttyAppSession } from '@mks2508/restty';
/**
* Value exposed by the ResttySession context.
*/
export interface IResttySessionContextValue {
/** Shared session for WASM/WebGPU resource reuse across panes. */
getSession: () => Promise;
}
/**
* Props for ResttySessionProvider.
*/
export interface IResttySessionProviderProps {
/** Optional pre-created session. If omitted, one is lazily created. */
session?: ResttyAppSession;
children: ReactNode;
}
/**
* Provides a shared ResttyAppSession to all descendant ResttyTerminal instances.
*
* The session is lazily created on first access via dynamic import to keep
* the WASM + WebGPU initialization out of the critical render path and
* to remain SSR-safe.
*/
export declare function ResttySessionProvider({ session: externalSession, children }: IResttySessionProviderProps): import("react/jsx-runtime").JSX.Element;
/**
* Access the shared ResttyAppSession from context.
*
* Returns `null` when called outside a `ResttySessionProvider` — in that
* case `ResttyTerminal` will create its own session automatically.
*/
export declare function useResttySession(): IResttySessionContextValue | null;
//# sourceMappingURL=ResttySessionProvider.d.ts.map