UNPKG

2.27 kBTypeScriptView Raw
1export declare type RedirectEvent = {
2 url: string;
3};
4export declare type WebBrowserWindowFeatures = Record<string, number | boolean | string>;
5export declare type WebBrowserOpenOptions = {
6 /**
7 * Color of the toolbar in either #AARRGGBB or #RRGGBB format.
8 */
9 toolbarColor?: string;
10 browserPackage?: string;
11 /**
12 * Whether the toolbar should be hiding when a user scrolls the website.
13 */
14 enableBarCollapsing?: boolean;
15 /** Android only */
16 /**
17 * Color of the secondary toolbar in either #AARRGGBB or #RRGGBB format.
18 */
19 secondaryToolbarColor?: string;
20 /**
21 * Whether the browser should show the title of website on the toolbar.
22 */
23 showTitle?: boolean;
24 enableDefaultShareMenuItem?: boolean;
25 /**
26 * Whether browsed website should be shown as separate entry in Android recents/multitasking view.
27 * Default: `false`
28 */
29 showInRecents?: boolean;
30 /** iOS only */
31 controlsColor?: string;
32 dismissButtonStyle?: 'done' | 'close' | 'cancel';
33 readerMode?: boolean;
34 /**
35 * **Web:** name to assign to the popup window.
36 */
37 windowName?: string;
38 /**
39 * **Web:** features to use with `window.open()`
40 */
41 windowFeatures?: string | WebBrowserWindowFeatures;
42};
43export declare type WebBrowserAuthSessionResult = WebBrowserRedirectResult | WebBrowserResult;
44export declare type WebBrowserCustomTabsResults = {
45 defaultBrowserPackage?: string;
46 preferredBrowserPackage?: string;
47 browserPackages: string[];
48 servicePackages: string[];
49};
50export declare enum WebBrowserResultType {
51 /**
52 * iOS only
53 */
54 CANCEL = "cancel",
55 /**
56 * iOS only
57 */
58 DISMISS = "dismiss",
59 /**
60 * Android only
61 */
62 OPENED = "opened",
63 LOCKED = "locked"
64}
65export declare type WebBrowserResult = {
66 type: WebBrowserResultType;
67};
68export declare type WebBrowserRedirectResult = {
69 type: 'success';
70 url: string;
71};
72export declare type ServiceActionResult = {
73 servicePackage?: string;
74};
75export declare type WebBrowserMayInitWithUrlResult = ServiceActionResult;
76export declare type WebBrowserWarmUpResult = ServiceActionResult;
77export declare type WebBrowserCoolDownResult = ServiceActionResult;