import React from 'react'; import { OnShouldStartLoadWithRequest, ShouldStartLoadRequestEvent, WebViewError, WebViewErrorEvent, WebViewMessage, WebViewMessageEvent, WebViewNavigation, WebViewNativeEvent, WebViewNavigationEvent, WebViewOpenWindowEvent, WebViewProgressEvent, WebViewRenderProcessGoneEvent, WebViewTerminatedEvent } from './WebViewTypes'; declare const defaultOriginWhitelist: readonly ["https://*"]; declare const defaultDeeplinkWhitelist: readonly ["https:"]; declare const compileWhitelist: (originWhitelist: readonly string[]) => readonly RegExp[]; declare const passesWhitelist: (compiledWhitelist: readonly RegExp[], url: string) => boolean; declare const createOnShouldStartLoadWithRequest: (loadRequest: (shouldStart: boolean, url: string, lockIdentifier: number) => void, originWhitelist: readonly string[], deeplinkWhitelist: readonly string[], onShouldStartLoadWithRequest?: OnShouldStartLoadWithRequest) => ({ nativeEvent }: ShouldStartLoadRequestEvent) => void; declare const defaultRenderLoading: () => React.JSX.Element; declare const defaultRenderError: (errorDomain: string | undefined, errorCode: number, errorDesc: string) => React.JSX.Element; export { defaultOriginWhitelist, defaultDeeplinkWhitelist, createOnShouldStartLoadWithRequest, defaultRenderLoading, defaultRenderError, passesWhitelist, compileWhitelist, }; export declare const useWebViewLogic: ({ startInLoadingState, onNavigationStateChange, onLoadStart, onLoad, onLoadProgress, onLoadEnd, onError, onLoadSubResourceError, onMessageProp, onOpenWindowProp, onRenderProcessGoneProp, onContentProcessDidTerminateProp, originWhitelist, deeplinkWhitelist, onShouldStartLoadWithRequestProp, onShouldStartLoadWithRequestCallback, validateMeta, validateData, }: { startInLoadingState?: boolean | undefined; onNavigationStateChange?: ((event: WebViewNavigation) => void) | undefined; onLoadStart?: ((event: WebViewNavigationEvent) => void) | undefined; onLoad?: ((event: WebViewNavigationEvent) => void) | undefined; onLoadProgress?: ((event: WebViewProgressEvent) => void) | undefined; onLoadEnd?: ((event: WebViewNavigationEvent | WebViewErrorEvent) => void) | undefined; onError?: ((event: WebViewErrorEvent) => void) | undefined; onLoadSubResourceError?: ((event: WebViewErrorEvent) => void) | undefined; onMessageProp?: ((event: WebViewMessage) => void) | undefined; onOpenWindowProp?: ((event: WebViewOpenWindowEvent) => void) | undefined; onRenderProcessGoneProp?: ((event: WebViewRenderProcessGoneEvent) => void) | undefined; onContentProcessDidTerminateProp?: ((event: WebViewTerminatedEvent) => void) | undefined; originWhitelist: readonly string[]; deeplinkWhitelist: readonly string[]; onShouldStartLoadWithRequestProp?: OnShouldStartLoadWithRequest | undefined; onShouldStartLoadWithRequestCallback: (shouldStart: boolean, url: string, lockIdentifier?: number | undefined) => void; validateMeta: (event: WebViewNativeEvent) => WebViewNativeEvent; validateData: (data: object) => object; }) => { onShouldStartLoadWithRequest: ({ nativeEvent }: ShouldStartLoadRequestEvent) => void; onLoadingStart: (event: WebViewNavigationEvent) => void; onLoadingProgress: (event: WebViewProgressEvent) => void; onLoadingError: (event: WebViewErrorEvent) => void; onLoadingSubResourceError: (event: WebViewErrorEvent) => void; onLoadingFinish: (event: WebViewNavigationEvent) => void; onRenderProcessGone: (event: WebViewRenderProcessGoneEvent) => void; onContentProcessDidTerminate: (event: WebViewTerminatedEvent) => void; onMessage: (event: WebViewMessageEvent) => void; onOpenWindow: (event: WebViewOpenWindowEvent) => void; viewState: "IDLE" | "LOADING" | "ERROR"; setViewState: React.Dispatch>; lastErrorEvent: WebViewError | null; }; /** * Exodus: Check if a version string passes the minimum version requirement. * Supports complex version constraints like "12.5.6 <13, 13.6.1 <14, 14.8.1 <15, 15.7.1" * which means: * - 12.5.6 or higher but less than 13 * - OR 13.6.1 or higher but less than 14 * - OR 14.8.1 or higher but less than 15 * - OR 15.7.1 or higher (no upper bound) */ export declare const versionPasses: (version: string | undefined, minimum: string | undefined) => boolean;