@lingxia/types 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/app/index.d.ts +54 -0
  2. package/dist/app/index.d.ts.map +1 -0
  3. package/dist/app/index.js +7 -0
  4. package/dist/app/index.js.map +1 -0
  5. package/dist/device/index.d.ts +38 -0
  6. package/dist/device/index.d.ts.map +1 -0
  7. package/dist/device/index.js +7 -0
  8. package/dist/device/index.js.map +1 -0
  9. package/dist/index.d.ts +93 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +30 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/input/index.d.ts +15 -0
  14. package/dist/input/index.d.ts.map +1 -0
  15. package/dist/input/index.js +7 -0
  16. package/dist/input/index.js.map +1 -0
  17. package/dist/location/index.d.ts +20 -0
  18. package/dist/location/index.d.ts.map +1 -0
  19. package/dist/location/index.js +7 -0
  20. package/dist/location/index.js.map +1 -0
  21. package/dist/media/index.d.ts +69 -0
  22. package/dist/media/index.d.ts.map +1 -0
  23. package/dist/media/index.js +7 -0
  24. package/dist/media/index.js.map +1 -0
  25. package/dist/storage/index.d.ts +23 -0
  26. package/dist/storage/index.d.ts.map +1 -0
  27. package/dist/storage/index.js +7 -0
  28. package/dist/storage/index.js.map +1 -0
  29. package/dist/system/index.d.ts +29 -0
  30. package/dist/system/index.d.ts.map +1 -0
  31. package/dist/system/index.js +7 -0
  32. package/dist/system/index.js.map +1 -0
  33. package/dist/ui/index.d.ts +98 -0
  34. package/dist/ui/index.d.ts.map +1 -0
  35. package/dist/ui/index.js +7 -0
  36. package/dist/ui/index.js.map +1 -0
  37. package/package.json +86 -0
  38. package/src/app/index.ts +68 -0
  39. package/src/device/index.ts +46 -0
  40. package/src/index.ts +193 -0
  41. package/src/input/index.ts +16 -0
  42. package/src/location/index.ts +21 -0
  43. package/src/media/index.ts +81 -0
  44. package/src/storage/index.ts +25 -0
  45. package/src/system/index.ts +33 -0
  46. package/src/ui/index.ts +119 -0
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@lingxia/types",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript type definitions for the LingXia JS API",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/LingXia-Dev/LingXia.git",
8
+ "directory": "lingxia-types"
9
+ },
10
+ "main": "dist/index.js",
11
+ "module": "dist/index.js",
12
+ "types": "dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js",
17
+ "require": "./dist/index.js"
18
+ },
19
+ "./app": {
20
+ "types": "./dist/app/index.d.ts",
21
+ "import": "./dist/app/index.js",
22
+ "require": "./dist/app/index.js"
23
+ },
24
+ "./device": {
25
+ "types": "./dist/device/index.d.ts",
26
+ "import": "./dist/device/index.js",
27
+ "require": "./dist/device/index.js"
28
+ },
29
+ "./input": {
30
+ "types": "./dist/input/index.d.ts",
31
+ "import": "./dist/input/index.js",
32
+ "require": "./dist/input/index.js"
33
+ },
34
+ "./storage": {
35
+ "types": "./dist/storage/index.d.ts",
36
+ "import": "./dist/storage/index.js",
37
+ "require": "./dist/storage/index.js"
38
+ },
39
+ "./location": {
40
+ "types": "./dist/location/index.d.ts",
41
+ "import": "./dist/location/index.js",
42
+ "require": "./dist/location/index.js"
43
+ },
44
+ "./system": {
45
+ "types": "./dist/system/index.d.ts",
46
+ "import": "./dist/system/index.js",
47
+ "require": "./dist/system/index.js"
48
+ },
49
+ "./media": {
50
+ "types": "./dist/media/index.d.ts",
51
+ "import": "./dist/media/index.js",
52
+ "require": "./dist/media/index.js"
53
+ },
54
+ "./ui": {
55
+ "types": "./dist/ui/index.d.ts",
56
+ "import": "./dist/ui/index.js",
57
+ "require": "./dist/ui/index.js"
58
+ }
59
+ },
60
+ "files": [
61
+ "dist",
62
+ "src"
63
+ ],
64
+ "scripts": {
65
+ "build": "tsc",
66
+ "clean": "rm -rf dist",
67
+ "prepublishOnly": "npm run clean && npm run build"
68
+ },
69
+ "keywords": [
70
+ "lingxia",
71
+ "lxapp",
72
+ "miniapp",
73
+ "types",
74
+ "typescript",
75
+ "definitions"
76
+ ],
77
+ "author": "LingXia Team",
78
+ "license": "MIT",
79
+ "devDependencies": {
80
+ "typescript": "^5.0.0"
81
+ },
82
+ "engines": {
83
+ "node": ">=16.0.0"
84
+ },
85
+ "sideEffects": false
86
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * App & Page APIs
3
+ * Corresponds to: lingxia-lxapp/src/appservice/
4
+ */
5
+
6
+ export interface AppLifecycleEventArgs {
7
+ source: 'host' | 'lxapp';
8
+ reason:
9
+ | 'foreground'
10
+ | 'background'
11
+ | 'screenshot'
12
+ | 'open'
13
+ | 'close'
14
+ | 'switch_back'
15
+ | 'switch_away';
16
+ }
17
+
18
+ export interface AppLaunchOptions {
19
+ path?: string;
20
+ query?: Record<string, string>;
21
+ scene?: number;
22
+ referrerInfo?: {
23
+ appId?: string;
24
+ extraData?: Record<string, unknown>;
25
+ };
26
+ }
27
+
28
+ export interface AppConfig {
29
+ globalData?: Record<string, unknown>;
30
+ onLaunch?: (options?: AppLaunchOptions) => void;
31
+ onShow?: (args?: AppLifecycleEventArgs) => void;
32
+ onHide?: (args?: AppLifecycleEventArgs) => void;
33
+ onUserCaptureScreen?: () => void;
34
+ [key: string]: unknown;
35
+ }
36
+
37
+ export interface AppInstance extends AppConfig {
38
+ globalData: Record<string, unknown>;
39
+ }
40
+
41
+ export interface PageLoadOptions {
42
+ [key: string]: string | undefined;
43
+ }
44
+
45
+ export interface PageConfig<TData extends Record<string, unknown> = Record<string, unknown>> {
46
+ data?: TData;
47
+ onLoad?: (options?: PageLoadOptions) => void;
48
+ onShow?: () => void;
49
+ onReady?: () => void;
50
+ onHide?: () => void;
51
+ onUnload?: () => void;
52
+ onPullDownRefresh?: () => void;
53
+ [key: string]: unknown;
54
+ }
55
+
56
+ export interface PageInstance<TData extends Record<string, unknown> = Record<string, unknown>> {
57
+ data: TData;
58
+ route: string;
59
+ setData(data: Partial<TData> | Record<string, unknown>, callback?: () => void): void;
60
+ getEventEmitter(): EventEmitter;
61
+ }
62
+
63
+ export interface EventEmitter {
64
+ on(event: string, handler: (...args: unknown[]) => void): void;
65
+ off(event: string, handler: (...args: unknown[]) => void): void;
66
+ emit(event: string, ...args: unknown[]): void;
67
+ once(event: string, handler: (...args: unknown[]) => void): void;
68
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Device APIs
3
+ * Corresponds to: lingxia-logic/src/device/
4
+ */
5
+
6
+ export interface DeviceInfo {
7
+ brand: string;
8
+ model: string;
9
+ marketName: string;
10
+ system: string;
11
+ }
12
+
13
+ export interface ScreenInfo {
14
+ width: number;
15
+ height: number;
16
+ scale: number;
17
+ }
18
+
19
+ export interface MakePhoneCallOptions {
20
+ phoneNumber: string;
21
+ }
22
+
23
+ export interface WifiInfo {
24
+ SSID: string;
25
+ BSSID?: string;
26
+ secure: boolean;
27
+ signalStrength: number;
28
+ frequency?: number;
29
+ }
30
+
31
+ export interface ConnectWifiOptions {
32
+ SSID: string;
33
+ password?: string;
34
+ }
35
+
36
+ export type WifiConnectedCallback = (info: WifiInfo) => void;
37
+
38
+ export interface AppOrientationInfo {
39
+ orientation: string;
40
+ }
41
+
42
+ export interface SetAppOrientationOptions {
43
+ orientation: string;
44
+ }
45
+
46
+ export type { KeyEvent, KeyEventCallback } from '../input';
package/src/index.ts ADDED
@@ -0,0 +1,193 @@
1
+ /**
2
+ * LingXia TypeScript Definitions
3
+ *
4
+ * Type declarations for the LingXia JS API, driven by Rust implementation.
5
+ */
6
+
7
+ export * from './app';
8
+ export * from './device';
9
+ export * from './input';
10
+ export * from './storage';
11
+ export * from './location';
12
+ export * from './system';
13
+ export * from './media';
14
+ export * from './ui';
15
+
16
+ import type {
17
+ AppConfig,
18
+ AppInstance,
19
+ PageConfig,
20
+ PageInstance,
21
+ } from './app';
22
+
23
+ import type {
24
+ DeviceInfo,
25
+ ScreenInfo,
26
+ MakePhoneCallOptions,
27
+ WifiInfo,
28
+ ConnectWifiOptions,
29
+ WifiConnectedCallback,
30
+ AppOrientationInfo,
31
+ SetAppOrientationOptions,
32
+ } from './device';
33
+
34
+ import type { KeyEventCallback } from './input';
35
+
36
+ import type {
37
+ LxEnv,
38
+ Storage,
39
+ OpenDocumentOptions,
40
+ } from './storage';
41
+
42
+ import type {
43
+ GetLocationOptions,
44
+ LocationInfo,
45
+ } from './location';
46
+
47
+ import type {
48
+ AppBaseInfo,
49
+ SystemSettingInfo,
50
+ OpenURLOptions,
51
+ NavigateToLxAppOptions,
52
+ UpdateManager,
53
+ } from './system';
54
+
55
+ import type {
56
+ GetImageInfoOptions,
57
+ ImageInfo,
58
+ CompressImageOptions,
59
+ CompressImageResult,
60
+ ChooseMediaOptions,
61
+ ChosenMediaEntry,
62
+ PreviewMediaOptions,
63
+ SaveMediaOptions,
64
+ ScanCodeOptions,
65
+ ScanCodeResult,
66
+ VideoContext,
67
+ } from './media';
68
+
69
+ import type {
70
+ ShowToastOptions,
71
+ ShowModalOptions,
72
+ ModalResult,
73
+ ShowActionSheetOptions,
74
+ ActionSheetResult,
75
+ NavigateToOptions,
76
+ NavigateToResult,
77
+ NavigateBackOptions,
78
+ RedirectToOptions,
79
+ SwitchTabOptions,
80
+ ReLaunchOptions,
81
+ SetNavigationBarTitleOptions,
82
+ SetNavigationBarColorOptions,
83
+ TabBarRedDotOptions,
84
+ SetTabBarBadgeOptions,
85
+ RemoveTabBarBadgeOptions,
86
+ SetTabBarStyleOptions,
87
+ SetTabBarItemOptions,
88
+ ShowPopupOptions,
89
+ ShowPopupResult,
90
+ CapsuleRect,
91
+ } from './ui';
92
+
93
+ export interface Lx {
94
+ env: LxEnv;
95
+
96
+ getDeviceInfo(): DeviceInfo;
97
+ getScreenInfo(): ScreenInfo;
98
+ vibrateShort(): boolean;
99
+ vibrateLong(): boolean;
100
+ makePhoneCall(options: MakePhoneCallOptions): boolean;
101
+
102
+ startWifi(): Promise<void>;
103
+ stopWifi(): Promise<void>;
104
+ connectWifi(options: ConnectWifiOptions): Promise<void>;
105
+ getWifiList(): Promise<WifiInfo[]>;
106
+ getConnectedWifi(): Promise<WifiInfo>;
107
+ onWifiConnected(callback: WifiConnectedCallback): void;
108
+ offWifiConnected(callback?: WifiConnectedCallback): void;
109
+
110
+ getAppOrientation(): AppOrientationInfo;
111
+ setAppOrientation(options: SetAppOrientationOptions): boolean;
112
+
113
+ openDocument(options: OpenDocumentOptions): void;
114
+
115
+ getStorage(): Storage;
116
+
117
+ getLocation(options?: GetLocationOptions): Promise<LocationInfo>;
118
+
119
+ navigateToLxApp(options: NavigateToLxAppOptions): Promise<void>;
120
+ navigateBackLxApp(): Promise<void>;
121
+
122
+ getAppBaseInfo(): AppBaseInfo;
123
+ getSystemSetting(): SystemSettingInfo;
124
+ openURL(options: OpenURLOptions): void;
125
+
126
+ getUpdateManager(): UpdateManager;
127
+
128
+ getImageInfo(options: GetImageInfoOptions): Promise<ImageInfo>;
129
+ compressImage(options: CompressImageOptions): Promise<CompressImageResult>;
130
+
131
+ chooseMedia(options?: ChooseMediaOptions): Promise<ChosenMediaEntry[]>;
132
+
133
+ previewMedia(options: PreviewMediaOptions): void;
134
+
135
+ saveImageToPhotosAlbum(options: SaveMediaOptions): Promise<void>;
136
+ saveVideoToPhotosAlbum(options: SaveMediaOptions): Promise<void>;
137
+
138
+ scanCode(options?: ScanCodeOptions): Promise<ScanCodeResult>;
139
+
140
+ createVideoContext(componentId: string): VideoContext;
141
+
142
+ showToast(options: ShowToastOptions): void;
143
+ hideToast(): void;
144
+
145
+ showModal(options: ShowModalOptions): Promise<ModalResult>;
146
+
147
+ showActionSheet(options: ShowActionSheetOptions): Promise<ActionSheetResult>;
148
+
149
+ navigateTo(options: NavigateToOptions): Promise<NavigateToResult>;
150
+ navigateBack(options: NavigateBackOptions): void;
151
+ redirectTo(options: RedirectToOptions): Promise<void>;
152
+ switchTab(options: SwitchTabOptions): Promise<void>;
153
+ reLaunch(options: ReLaunchOptions): Promise<void>;
154
+
155
+ setNavigationBarTitle(options: SetNavigationBarTitleOptions): boolean;
156
+ setNavigationBarColor(options: SetNavigationBarColorOptions): boolean;
157
+ hideHomeButton(): boolean;
158
+
159
+ showTabBarRedDot(options: TabBarRedDotOptions): boolean;
160
+ hideTabBarRedDot(options: TabBarRedDotOptions): boolean;
161
+ setTabBarBadge(options: SetTabBarBadgeOptions): boolean;
162
+ removeTabBarBadge(options: RemoveTabBarBadgeOptions): boolean;
163
+ showTabBar(): boolean;
164
+ hideTabBar(): boolean;
165
+ setTabBarStyle(options: SetTabBarStyleOptions): boolean;
166
+ setTabBarItem(options: SetTabBarItemOptions): boolean;
167
+
168
+ showPopup(options: ShowPopupOptions): Promise<ShowPopupResult>;
169
+ hidePopup(): void;
170
+
171
+ startPullDownRefresh(): void;
172
+ stopPullDownRefresh(): void;
173
+
174
+ getCapsuleRect(): Promise<CapsuleRect>;
175
+
176
+ onKeyDown(callback: KeyEventCallback): void;
177
+ offKeyDown(callback?: KeyEventCallback): void;
178
+ onKeyUp(callback: KeyEventCallback): void;
179
+ offKeyUp(callback?: KeyEventCallback): void;
180
+ }
181
+
182
+ declare global {
183
+ const lx: Lx;
184
+
185
+ function App(config: AppConfig): AppInstance;
186
+ function getApp<T extends AppInstance = AppInstance>(): T | null;
187
+ function Page<TData extends Record<string, unknown> = Record<string, unknown>>(
188
+ config: PageConfig<TData> & ThisType<PageInstance<TData> & PageConfig<TData>>
189
+ ): void;
190
+ function getCurrentPages<T extends PageInstance = PageInstance>(): T[];
191
+ }
192
+
193
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Input APIs
3
+ * Corresponds to: lingxia-logic/src/input.rs
4
+ */
5
+
6
+ export interface KeyEvent {
7
+ key: string;
8
+ code: string;
9
+ altKey?: boolean;
10
+ ctrlKey?: boolean;
11
+ shiftKey?: boolean;
12
+ metaKey?: boolean;
13
+ repeat?: boolean;
14
+ }
15
+
16
+ export type KeyEventCallback = (event: KeyEvent) => void;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Location APIs
3
+ * Corresponds to: lingxia-logic/src/location.rs
4
+ */
5
+
6
+ export interface GetLocationOptions {
7
+ type?: 'wgs84' | 'gcj02';
8
+ altitude?: boolean;
9
+ isHighAccuracy?: boolean;
10
+ highAccuracyExpireTime?: number;
11
+ }
12
+
13
+ export interface LocationInfo {
14
+ latitude: number;
15
+ longitude: number;
16
+ speed?: number;
17
+ accuracy?: number;
18
+ altitude?: number;
19
+ verticalAccuracy?: number;
20
+ horizontalAccuracy?: number;
21
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Media APIs
3
+ * Corresponds to: lingxia-logic/src/media/
4
+ */
5
+
6
+ export interface GetImageInfoOptions {
7
+ path: string;
8
+ }
9
+
10
+ export interface ImageInfo {
11
+ width: number;
12
+ height: number;
13
+ type: string;
14
+ path: string;
15
+ }
16
+
17
+ export interface CompressImageOptions {
18
+ path: string;
19
+ quality?: number;
20
+ compressedWidth?: number;
21
+ compressedHeight?: number;
22
+ }
23
+
24
+ export interface CompressImageResult {
25
+ tempFilePath: string;
26
+ }
27
+
28
+ export interface ChooseMediaOptions {
29
+ count?: number;
30
+ mediaType?: ('image' | 'video')[];
31
+ sourceType?: ('album' | 'camera')[];
32
+ camera?: 'back' | 'front';
33
+ maxDuration?: number;
34
+ }
35
+
36
+ export interface ChosenMediaEntry {
37
+ tempFilePath: string;
38
+ fileType: 'image' | 'video';
39
+ isOriginal: boolean;
40
+ }
41
+
42
+ export interface PreviewMediaItem {
43
+ path: string;
44
+ type?: 'image' | 'video';
45
+ coverPath?: string;
46
+ }
47
+
48
+ export interface PreviewMediaOptions {
49
+ sources: PreviewMediaItem[];
50
+ }
51
+
52
+ export interface SaveMediaOptions {
53
+ filePath: string;
54
+ }
55
+
56
+ export interface ScanCodeOptions {
57
+ onlyFromCamera?: boolean;
58
+ scanType?: ('barCode' | 'qrCode' | 'datamatrix' | 'pdf417')[];
59
+ }
60
+
61
+ export interface ScanCodeResult {
62
+ scanResult: string;
63
+ scanType: string;
64
+ }
65
+
66
+ export interface StreamSourceOptions {
67
+ provider: string;
68
+ isLive: boolean;
69
+ duration?: number;
70
+ params?: Record<string, unknown>;
71
+ }
72
+
73
+ export interface VideoContext {
74
+ play(): void;
75
+ pause(): void;
76
+ stop(): void;
77
+ seek(position: number): void;
78
+ requestFullScreen(): void;
79
+ exitFullScreen(): void;
80
+ setStreamSource(options: StreamSourceOptions): void;
81
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Storage & File System APIs
3
+ * Corresponds to: lingxia-logic/src/storage.rs, fs.rs, env.rs
4
+ */
5
+
6
+ export interface LxEnv {
7
+ USER_DATA_PATH: string;
8
+ USER_CACHE_PATH: string;
9
+ }
10
+
11
+ export interface Storage {
12
+ get(key: string): unknown;
13
+ set(key: string, value: unknown): void;
14
+ remove(key: string): void;
15
+ clear(): void;
16
+ keys(): string[];
17
+ has(key: string): boolean;
18
+ size(): number;
19
+ }
20
+
21
+ export interface OpenDocumentOptions {
22
+ filePath: string;
23
+ fileType?: string;
24
+ showMenu?: boolean;
25
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * System APIs
3
+ * Corresponds to: lingxia-logic/src/system.rs, navigator.rs, update.rs
4
+ */
5
+
6
+ export interface AppBaseInfo {
7
+ language: string;
8
+ productName: string;
9
+ version: string;
10
+ }
11
+
12
+ export interface SystemSettingInfo {
13
+ bluetoothEnabled: boolean;
14
+ locationEnabled: boolean;
15
+ wifiEnabled: boolean;
16
+ }
17
+
18
+ export interface OpenURLOptions {
19
+ url: string;
20
+ openIn?: 'external' | 'internal';
21
+ }
22
+
23
+ export interface NavigateToLxAppOptions {
24
+ appId: string;
25
+ path?: string;
26
+ envVersion?: 'develop' | 'trial' | 'release';
27
+ }
28
+
29
+ export interface UpdateManager {
30
+ applyUpdate(): void;
31
+ onUpdateReady(callback: () => void): void;
32
+ onUpdateFailed(callback: () => void): void;
33
+ }
@@ -0,0 +1,119 @@
1
+ /**
2
+ * UI APIs
3
+ * Corresponds to: lingxia-logic/src/ui/
4
+ */
5
+
6
+ import type { EventEmitter } from '../app';
7
+
8
+ export interface ShowToastOptions {
9
+ title: string;
10
+ icon?: 'success' | 'error' | 'loading' | 'none';
11
+ image?: string;
12
+ duration?: number;
13
+ mask?: boolean;
14
+ position?: 'top' | 'center' | 'bottom';
15
+ }
16
+
17
+ export interface ShowModalOptions {
18
+ title?: string;
19
+ content?: string;
20
+ showCancel?: boolean;
21
+ cancelText?: string;
22
+ cancelColor?: string;
23
+ confirmText?: string;
24
+ confirmColor?: string;
25
+ }
26
+
27
+ export interface ModalResult {
28
+ confirm: boolean;
29
+ cancel: boolean;
30
+ }
31
+
32
+ export interface ShowActionSheetOptions {
33
+ itemList: string[];
34
+ itemColor?: string;
35
+ }
36
+
37
+ export interface ActionSheetResult {
38
+ tapIndex: number;
39
+ }
40
+
41
+ export interface NavigateToOptions {
42
+ url: string;
43
+ }
44
+
45
+ export interface NavigateToResult {
46
+ eventEmitter: EventEmitter;
47
+ }
48
+
49
+ export interface NavigateBackOptions {
50
+ delta: number;
51
+ }
52
+
53
+ export interface RedirectToOptions {
54
+ url: string;
55
+ }
56
+
57
+ export interface SwitchTabOptions {
58
+ url: string;
59
+ }
60
+
61
+ export interface ReLaunchOptions {
62
+ url: string;
63
+ }
64
+
65
+ export interface SetNavigationBarTitleOptions {
66
+ title: string;
67
+ }
68
+
69
+ export interface SetNavigationBarColorOptions {
70
+ frontColor: string;
71
+ backgroundColor: string;
72
+ }
73
+
74
+ export interface TabBarRedDotOptions {
75
+ index: number;
76
+ }
77
+
78
+ export interface SetTabBarBadgeOptions {
79
+ index: number;
80
+ text: string;
81
+ }
82
+
83
+ export interface RemoveTabBarBadgeOptions {
84
+ index: number;
85
+ }
86
+
87
+ export interface SetTabBarStyleOptions {
88
+ color?: string;
89
+ selectedColor?: string;
90
+ backgroundColor?: string;
91
+ borderStyle?: string;
92
+ }
93
+
94
+ export interface SetTabBarItemOptions {
95
+ index: number;
96
+ text?: string;
97
+ iconPath?: string;
98
+ selectedIconPath?: string;
99
+ }
100
+
101
+ export interface ShowPopupOptions {
102
+ url: string;
103
+ widthRatio?: number;
104
+ heightRatio?: number;
105
+ position?: 'center' | 'bottom' | 'left' | 'right';
106
+ }
107
+
108
+ export interface ShowPopupResult {
109
+ eventEmitter: EventEmitter;
110
+ }
111
+
112
+ export interface CapsuleRect {
113
+ width?: number;
114
+ height?: number;
115
+ top?: number;
116
+ right?: number;
117
+ bottom?: number;
118
+ left?: number;
119
+ }