import type { DeviceInfo, MessageResponse, PackageInfo } from './types.js'; /** * Main interface for Flutter WebView communication. * * @remarks * Provides access to platform services like status bar, persistent storage, * orientation, and device information through readonly properties. * * @example * ```ts * import { WebView } from '@yandeu/js-bridge' * * if (WebView.isReady) { * await WebView.statusBar.setColor('#000000') * } * ``` */ export declare const WebView: { /** Whether the bridge is initialized and ready */ readonly isReady: boolean; /** Whether running inside Flutter WebView */ readonly isWebView: boolean; /** Add an event listener for a specific event name. */ on: (event: string, listener: (...args: any[]) => void) => void; /** Remove a specific event listener for a specific event name. */ off: (event: string, listener: (...args: any[]) => void) => void; /** Remove all event listeners with a specific event name. */ offMany: (events: string) => void; /** Initialize or reinitialize the communication bridge. */ init: () => void; /** Clean up all resources to prevent memory leaks. */ destroy: () => void; /** Send a raw async message to Flutter and wait for response (useful for debugging). */ sendAsync: >(message: import("./types.js").Message) => Promise>; /** Send a raw fire-and-forget message to Flutter (useful for debugging). */ sendVoid: (message: import("./types.js").Message) => void; readonly fullscreen: { enter: () => void; exit: () => void; }; readonly persistentStorage: { setItem: (key: string, value: string) => Promise; getItem: (key: string) => Promise; removeItem: (key: string) => Promise; clear: () => Promise; }; readonly statusBar: { /** Color in the format #RRGGBB or #RRGGBBAA */ setColor: (color: string) => Promise>; setIconsBrightness: (brightness: "light" | "dark") => Promise>; }; readonly navigationBar: { /** Color in the format #RRGGBB or #RRGGBBAA */ setColor: (color: string) => Promise>; }; /** Get the platform the app is running on */ getPlatform(): Promise<"android" | "ios" | "web" | "unknown">; /** Get orientation controls */ readonly orientation: { /** Set the orientation to landscape */ setLandscape: () => void; /** Set the orientation to portrait */ setPortrait: () => void; /** Set the orientation to auto-rotate */ setAutoRotate: () => void; }; /** Exit the app */ exitApp(): void; /** Get device information */ deviceInfo(): Promise>; /** Get package information */ packageInfo(): Promise>; }; //# sourceMappingURL=core.d.ts.map