craft-native 0.0.77 → 0.0.78
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.
- package/dist/api/process.d.ts +9 -3
- package/dist/api/window.d.ts +17 -11
- package/dist/cli.js +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.js +6 -2
- package/dist/ios/templates/CraftApp.swift +17 -25
- package/dist/types.d.ts +137 -12
- package/package.json +1 -1
- package/dist/bridge/android.d.ts +0 -573
- package/dist/bridge/ios.d.ts +0 -527
package/dist/bridge/android.d.ts
DELETED
|
@@ -1,573 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Craft Android Bridge
|
|
3
|
-
* Complete Android native bridge with WebView, permissions, and platform APIs
|
|
4
|
-
*/
|
|
5
|
-
export interface AndroidWebViewConfig {
|
|
6
|
-
url?: string;
|
|
7
|
-
html?: string;
|
|
8
|
-
javaScriptEnabled?: boolean;
|
|
9
|
-
domStorageEnabled?: boolean;
|
|
10
|
-
allowFileAccess?: boolean;
|
|
11
|
-
allowContentAccess?: boolean;
|
|
12
|
-
mediaPlaybackRequiresUserGesture?: boolean;
|
|
13
|
-
supportZoom?: boolean;
|
|
14
|
-
builtInZoomControls?: boolean;
|
|
15
|
-
displayZoomControls?: boolean;
|
|
16
|
-
cacheMode?: 'default' | 'noCache' | 'cacheOnly' | 'cacheElseNetwork';
|
|
17
|
-
mixedContentMode?: 'never' | 'always' | 'compatibility';
|
|
18
|
-
safeBrowsingEnabled?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface AndroidPermission {
|
|
21
|
-
type: 'camera' | 'microphone' | 'readStorage' | 'writeStorage' | 'location' | 'fineLocation' | 'backgroundLocation' | 'contacts' | 'calendar' | 'phone' | 'sms' | 'bluetooth' | 'bluetoothConnect' | 'bluetoothScan' | 'bluetoothAdvertise' | 'notifications' | 'bodySensors' | 'activityRecognition' | 'nearbyWifiDevices' | 'readMediaImages' | 'readMediaVideo' | 'readMediaAudio';
|
|
22
|
-
status: 'granted' | 'denied' | 'shouldShowRationale';
|
|
23
|
-
}
|
|
24
|
-
export interface AndroidBiometricConfig {
|
|
25
|
-
title: string;
|
|
26
|
-
subtitle?: string;
|
|
27
|
-
description?: string;
|
|
28
|
-
negativeButtonText: string;
|
|
29
|
-
allowedAuthenticators?: ('biometricStrong' | 'biometricWeak' | 'deviceCredential')[];
|
|
30
|
-
}
|
|
31
|
-
export interface AndroidNotificationChannel {
|
|
32
|
-
id: string;
|
|
33
|
-
name: string;
|
|
34
|
-
description?: string;
|
|
35
|
-
importance: 'none' | 'min' | 'low' | 'default' | 'high' | 'max';
|
|
36
|
-
enableLights?: boolean;
|
|
37
|
-
lightColor?: string;
|
|
38
|
-
enableVibration?: boolean;
|
|
39
|
-
vibrationPattern?: number[];
|
|
40
|
-
showBadge?: boolean;
|
|
41
|
-
sound?: string;
|
|
42
|
-
bypassDnd?: boolean;
|
|
43
|
-
}
|
|
44
|
-
export interface AndroidNotification {
|
|
45
|
-
channelId: string;
|
|
46
|
-
id: number;
|
|
47
|
-
title: string;
|
|
48
|
-
body: string;
|
|
49
|
-
smallIcon: string;
|
|
50
|
-
largeIcon?: string;
|
|
51
|
-
color?: string;
|
|
52
|
-
autoCancel?: boolean;
|
|
53
|
-
ongoing?: boolean;
|
|
54
|
-
priority?: 'min' | 'low' | 'default' | 'high' | 'max';
|
|
55
|
-
category?: 'alarm' | 'call' | 'email' | 'error' | 'event' | 'message' | 'progress' | 'promo' | 'recommendation' | 'reminder' | 'service' | 'social' | 'status' | 'system' | 'transport';
|
|
56
|
-
visibility?: 'public' | 'private' | 'secret';
|
|
57
|
-
actions?: Array<{
|
|
58
|
-
action: string;
|
|
59
|
-
title: string;
|
|
60
|
-
icon?: string;
|
|
61
|
-
}>;
|
|
62
|
-
bigTextStyle?: {
|
|
63
|
-
bigText: string;
|
|
64
|
-
contentTitle?: string;
|
|
65
|
-
summaryText?: string;
|
|
66
|
-
};
|
|
67
|
-
bigPictureStyle?: {
|
|
68
|
-
picture: string;
|
|
69
|
-
contentTitle?: string;
|
|
70
|
-
summaryText?: string;
|
|
71
|
-
largeIcon?: string;
|
|
72
|
-
};
|
|
73
|
-
inboxStyle?: {
|
|
74
|
-
lines: string[];
|
|
75
|
-
contentTitle?: string;
|
|
76
|
-
summaryText?: string;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
export interface AndroidMaterialYouColors {
|
|
80
|
-
primary: string;
|
|
81
|
-
onPrimary: string;
|
|
82
|
-
primaryContainer: string;
|
|
83
|
-
onPrimaryContainer: string;
|
|
84
|
-
secondary: string;
|
|
85
|
-
onSecondary: string;
|
|
86
|
-
secondaryContainer: string;
|
|
87
|
-
onSecondaryContainer: string;
|
|
88
|
-
tertiary: string;
|
|
89
|
-
onTertiary: string;
|
|
90
|
-
tertiaryContainer: string;
|
|
91
|
-
onTertiaryContainer: string;
|
|
92
|
-
error: string;
|
|
93
|
-
onError: string;
|
|
94
|
-
errorContainer: string;
|
|
95
|
-
onErrorContainer: string;
|
|
96
|
-
background: string;
|
|
97
|
-
onBackground: string;
|
|
98
|
-
surface: string;
|
|
99
|
-
onSurface: string;
|
|
100
|
-
surfaceVariant: string;
|
|
101
|
-
onSurfaceVariant: string;
|
|
102
|
-
outline: string;
|
|
103
|
-
outlineVariant: string;
|
|
104
|
-
}
|
|
105
|
-
export interface AndroidWidget {
|
|
106
|
-
widgetId: string;
|
|
107
|
-
className: string;
|
|
108
|
-
updatePeriodMillis?: number;
|
|
109
|
-
initialLayout: string;
|
|
110
|
-
}
|
|
111
|
-
export interface AndroidWorkRequest {
|
|
112
|
-
id: string;
|
|
113
|
-
workerClass: string;
|
|
114
|
-
inputData?: Record<string, unknown>;
|
|
115
|
-
constraints?: {
|
|
116
|
-
networkType?: 'connected' | 'unmetered' | 'notRoaming' | 'metered';
|
|
117
|
-
requiresCharging?: boolean;
|
|
118
|
-
requiresDeviceIdle?: boolean;
|
|
119
|
-
requiresBatteryNotLow?: boolean;
|
|
120
|
-
requiresStorageNotLow?: boolean;
|
|
121
|
-
};
|
|
122
|
-
backoffPolicy?: {
|
|
123
|
-
policy: 'linear' | 'exponential';
|
|
124
|
-
delay: number;
|
|
125
|
-
};
|
|
126
|
-
tags?: string[];
|
|
127
|
-
}
|
|
128
|
-
export declare class AndroidWebView {
|
|
129
|
-
private id;
|
|
130
|
-
private config;
|
|
131
|
-
constructor(config?: AndroidWebViewConfig);
|
|
132
|
-
/**
|
|
133
|
-
* Create the WebView
|
|
134
|
-
*/
|
|
135
|
-
create(): Promise<void>;
|
|
136
|
-
/**
|
|
137
|
-
* Load a URL
|
|
138
|
-
*/
|
|
139
|
-
loadURL(url: string, headers?: Record<string, string>): Promise<void>;
|
|
140
|
-
/**
|
|
141
|
-
* Load HTML content
|
|
142
|
-
*/
|
|
143
|
-
loadHTML(html: string, baseUrl?: string, mimeType?: string): Promise<void>;
|
|
144
|
-
/**
|
|
145
|
-
* Evaluate JavaScript
|
|
146
|
-
*/
|
|
147
|
-
evaluateJavaScript<T = unknown>(script: string): Promise<T>;
|
|
148
|
-
/**
|
|
149
|
-
* Go back in history
|
|
150
|
-
*/
|
|
151
|
-
goBack(): Promise<void>;
|
|
152
|
-
/**
|
|
153
|
-
* Go forward in history
|
|
154
|
-
*/
|
|
155
|
-
goForward(): Promise<void>;
|
|
156
|
-
/**
|
|
157
|
-
* Reload the page
|
|
158
|
-
*/
|
|
159
|
-
reload(): Promise<void>;
|
|
160
|
-
/**
|
|
161
|
-
* Stop loading
|
|
162
|
-
*/
|
|
163
|
-
stopLoading(): Promise<void>;
|
|
164
|
-
/**
|
|
165
|
-
* Clear cache
|
|
166
|
-
*/
|
|
167
|
-
clearCache(includeDiskFiles?: boolean): Promise<void>;
|
|
168
|
-
/**
|
|
169
|
-
* Destroy the WebView
|
|
170
|
-
*/
|
|
171
|
-
destroy(): Promise<void>;
|
|
172
|
-
private callNative;
|
|
173
|
-
}
|
|
174
|
-
export declare class AndroidPermissions {
|
|
175
|
-
/**
|
|
176
|
-
* Check permission status
|
|
177
|
-
*/
|
|
178
|
-
check(type: AndroidPermission['type']): Promise<AndroidPermission['status']>;
|
|
179
|
-
/**
|
|
180
|
-
* Request single permission
|
|
181
|
-
*/
|
|
182
|
-
request(type: AndroidPermission['type']): Promise<AndroidPermission['status']>;
|
|
183
|
-
/**
|
|
184
|
-
* Request multiple permissions
|
|
185
|
-
*/
|
|
186
|
-
requestMultiple(types: AndroidPermission['type'][]): Promise<Record<AndroidPermission['type'], AndroidPermission['status']>>;
|
|
187
|
-
/**
|
|
188
|
-
* Should show request rationale
|
|
189
|
-
*/
|
|
190
|
-
shouldShowRationale(type: AndroidPermission['type']): Promise<boolean>;
|
|
191
|
-
/**
|
|
192
|
-
* Open app settings
|
|
193
|
-
*/
|
|
194
|
-
openSettings(): Promise<void>;
|
|
195
|
-
private callNative;
|
|
196
|
-
}
|
|
197
|
-
export declare class AndroidBiometrics {
|
|
198
|
-
/**
|
|
199
|
-
* Check biometric availability
|
|
200
|
-
*/
|
|
201
|
-
isAvailable(): Promise<{
|
|
202
|
-
available: boolean;
|
|
203
|
-
biometricType: 'fingerprint' | 'face' | 'iris' | 'none';
|
|
204
|
-
}>;
|
|
205
|
-
/**
|
|
206
|
-
* Authenticate with biometrics
|
|
207
|
-
*/
|
|
208
|
-
authenticate(config: AndroidBiometricConfig): Promise<{
|
|
209
|
-
success: boolean;
|
|
210
|
-
error?: string;
|
|
211
|
-
}>;
|
|
212
|
-
/**
|
|
213
|
-
* Check if device has enrolled biometrics
|
|
214
|
-
*/
|
|
215
|
-
hasEnrolledBiometrics(): Promise<boolean>;
|
|
216
|
-
private callNative;
|
|
217
|
-
}
|
|
218
|
-
export declare class AndroidNotifications {
|
|
219
|
-
/**
|
|
220
|
-
* Create notification channel (required for Android 8+)
|
|
221
|
-
*/
|
|
222
|
-
createChannel(channel: AndroidNotificationChannel): Promise<void>;
|
|
223
|
-
/**
|
|
224
|
-
* Delete notification channel
|
|
225
|
-
*/
|
|
226
|
-
deleteChannel(channelId: string): Promise<void>;
|
|
227
|
-
/**
|
|
228
|
-
* Show notification
|
|
229
|
-
*/
|
|
230
|
-
show(notification: AndroidNotification): Promise<void>;
|
|
231
|
-
/**
|
|
232
|
-
* Cancel notification
|
|
233
|
-
*/
|
|
234
|
-
cancel(notificationId: number): Promise<void>;
|
|
235
|
-
/**
|
|
236
|
-
* Cancel all notifications
|
|
237
|
-
*/
|
|
238
|
-
cancelAll(): Promise<void>;
|
|
239
|
-
/**
|
|
240
|
-
* Request notification permission (Android 13+)
|
|
241
|
-
*/
|
|
242
|
-
requestPermission(): Promise<boolean>;
|
|
243
|
-
/**
|
|
244
|
-
* Check if notifications are enabled
|
|
245
|
-
*/
|
|
246
|
-
areNotificationsEnabled(): Promise<boolean>;
|
|
247
|
-
private callNative;
|
|
248
|
-
}
|
|
249
|
-
export declare class AndroidMaterialYou {
|
|
250
|
-
/**
|
|
251
|
-
* Check if dynamic colors are available
|
|
252
|
-
*/
|
|
253
|
-
isAvailable(): Promise<boolean>;
|
|
254
|
-
/**
|
|
255
|
-
* Get dynamic colors
|
|
256
|
-
*/
|
|
257
|
-
getColors(): Promise<AndroidMaterialYouColors | null>;
|
|
258
|
-
/**
|
|
259
|
-
* Listen for color changes (wallpaper change)
|
|
260
|
-
*/
|
|
261
|
-
onColorChange(callback: (colors: AndroidMaterialYouColors) => void): () => void;
|
|
262
|
-
private callNative;
|
|
263
|
-
}
|
|
264
|
-
export declare class AndroidPhotoPicker {
|
|
265
|
-
/**
|
|
266
|
-
* Pick single image
|
|
267
|
-
*/
|
|
268
|
-
pickImage(): Promise<{
|
|
269
|
-
uri: string;
|
|
270
|
-
mimeType: string;
|
|
271
|
-
} | null>;
|
|
272
|
-
/**
|
|
273
|
-
* Pick multiple images
|
|
274
|
-
*/
|
|
275
|
-
pickImages(maxItems?: number): Promise<Array<{
|
|
276
|
-
uri: string;
|
|
277
|
-
mimeType: string;
|
|
278
|
-
}>>;
|
|
279
|
-
/**
|
|
280
|
-
* Pick single video
|
|
281
|
-
*/
|
|
282
|
-
pickVideo(): Promise<{
|
|
283
|
-
uri: string;
|
|
284
|
-
mimeType: string;
|
|
285
|
-
duration: number;
|
|
286
|
-
} | null>;
|
|
287
|
-
/**
|
|
288
|
-
* Pick visual media (images and videos)
|
|
289
|
-
*/
|
|
290
|
-
pickVisualMedia(maxItems?: number): Promise<Array<{
|
|
291
|
-
uri: string;
|
|
292
|
-
mimeType: string;
|
|
293
|
-
type: 'image' | 'video';
|
|
294
|
-
}>>;
|
|
295
|
-
private callNative;
|
|
296
|
-
}
|
|
297
|
-
export declare class AndroidWorkManager {
|
|
298
|
-
/**
|
|
299
|
-
* Enqueue one-time work
|
|
300
|
-
*/
|
|
301
|
-
enqueueOneTime(request: AndroidWorkRequest): Promise<void>;
|
|
302
|
-
/**
|
|
303
|
-
* Enqueue periodic work
|
|
304
|
-
*/
|
|
305
|
-
enqueuePeriodic(request: AndroidWorkRequest & {
|
|
306
|
-
repeatInterval: number;
|
|
307
|
-
repeatIntervalUnit: 'minutes' | 'hours' | 'days';
|
|
308
|
-
}): Promise<void>;
|
|
309
|
-
/**
|
|
310
|
-
* Cancel work by ID
|
|
311
|
-
*/
|
|
312
|
-
cancelById(id: string): Promise<void>;
|
|
313
|
-
/**
|
|
314
|
-
* Cancel work by tag
|
|
315
|
-
*/
|
|
316
|
-
cancelByTag(tag: string): Promise<void>;
|
|
317
|
-
/**
|
|
318
|
-
* Cancel all work
|
|
319
|
-
*/
|
|
320
|
-
cancelAll(): Promise<void>;
|
|
321
|
-
/**
|
|
322
|
-
* Get work info by ID
|
|
323
|
-
*/
|
|
324
|
-
getWorkInfoById(id: string): Promise<{
|
|
325
|
-
state: 'enqueued' | 'running' | 'succeeded' | 'failed' | 'blocked' | 'cancelled';
|
|
326
|
-
outputData?: Record<string, unknown>;
|
|
327
|
-
} | null>;
|
|
328
|
-
private callNative;
|
|
329
|
-
}
|
|
330
|
-
export declare class AndroidForegroundService {
|
|
331
|
-
/**
|
|
332
|
-
* Start foreground service
|
|
333
|
-
*/
|
|
334
|
-
start(config: {
|
|
335
|
-
notificationId: number;
|
|
336
|
-
notification: AndroidNotification;
|
|
337
|
-
serviceType?: 'camera' | 'connectedDevice' | 'dataSync' | 'location' | 'mediaPlayback' | 'mediaProjection' | 'microphone' | 'phoneCall' | 'remoteMessaging' | 'shortService';
|
|
338
|
-
}): Promise<void>;
|
|
339
|
-
/**
|
|
340
|
-
* Stop foreground service
|
|
341
|
-
*/
|
|
342
|
-
stop(): Promise<void>;
|
|
343
|
-
/**
|
|
344
|
-
* Update notification
|
|
345
|
-
*/
|
|
346
|
-
updateNotification(notification: Partial<AndroidNotification>): Promise<void>;
|
|
347
|
-
private callNative;
|
|
348
|
-
}
|
|
349
|
-
export declare class AndroidPredictiveBack {
|
|
350
|
-
/**
|
|
351
|
-
* Enable predictive back gesture
|
|
352
|
-
*/
|
|
353
|
-
enable(): Promise<void>;
|
|
354
|
-
/**
|
|
355
|
-
* Disable predictive back gesture
|
|
356
|
-
*/
|
|
357
|
-
disable(): Promise<void>;
|
|
358
|
-
/**
|
|
359
|
-
* Register back callback
|
|
360
|
-
*/
|
|
361
|
-
onBackPressed(callback: () => boolean): () => void;
|
|
362
|
-
/**
|
|
363
|
-
* Listen for back progress (for animations)
|
|
364
|
-
*/
|
|
365
|
-
onBackProgress(callback: (progress: {
|
|
366
|
-
touchX: number;
|
|
367
|
-
touchY: number;
|
|
368
|
-
progress: number;
|
|
369
|
-
}) => void): () => void;
|
|
370
|
-
private callNative;
|
|
371
|
-
}
|
|
372
|
-
export declare class AndroidPerAppLanguage {
|
|
373
|
-
/**
|
|
374
|
-
* Get current app locale
|
|
375
|
-
*/
|
|
376
|
-
getCurrentLocale(): Promise<string>;
|
|
377
|
-
/**
|
|
378
|
-
* Set app locale
|
|
379
|
-
*/
|
|
380
|
-
setLocale(localeTag: string): Promise<void>;
|
|
381
|
-
/**
|
|
382
|
-
* Reset to system locale
|
|
383
|
-
*/
|
|
384
|
-
resetToSystemLocale(): Promise<void>;
|
|
385
|
-
private callNative;
|
|
386
|
-
}
|
|
387
|
-
export declare class AndroidWidgets {
|
|
388
|
-
/**
|
|
389
|
-
* Register widget
|
|
390
|
-
*/
|
|
391
|
-
register(widget: AndroidWidget): Promise<void>;
|
|
392
|
-
/**
|
|
393
|
-
* Update widget
|
|
394
|
-
*/
|
|
395
|
-
update(widgetId: string, views: Record<string, unknown>): Promise<void>;
|
|
396
|
-
/**
|
|
397
|
-
* Get widget IDs
|
|
398
|
-
*/
|
|
399
|
-
getWidgetIds(className: string): Promise<number[]>;
|
|
400
|
-
private callNative;
|
|
401
|
-
}
|
|
402
|
-
export declare class AndroidPlayBilling {
|
|
403
|
-
/**
|
|
404
|
-
* Check if billing is ready
|
|
405
|
-
*/
|
|
406
|
-
isReady(): Promise<boolean>;
|
|
407
|
-
/**
|
|
408
|
-
* Query product details
|
|
409
|
-
*/
|
|
410
|
-
queryProducts(productIds: string[], productType: 'inapp' | 'subs'): Promise<Array<{
|
|
411
|
-
productId: string;
|
|
412
|
-
name: string;
|
|
413
|
-
description: string;
|
|
414
|
-
formattedPrice: string;
|
|
415
|
-
priceAmountMicros: number;
|
|
416
|
-
priceCurrencyCode: string;
|
|
417
|
-
}>>;
|
|
418
|
-
/**
|
|
419
|
-
* Launch purchase flow
|
|
420
|
-
*/
|
|
421
|
-
purchase(productId: string, productType: 'inapp' | 'subs'): Promise<{
|
|
422
|
-
purchaseToken: string;
|
|
423
|
-
orderId: string;
|
|
424
|
-
} | null>;
|
|
425
|
-
/**
|
|
426
|
-
* Consume purchase
|
|
427
|
-
*/
|
|
428
|
-
consumePurchase(purchaseToken: string): Promise<void>;
|
|
429
|
-
/**
|
|
430
|
-
* Acknowledge purchase
|
|
431
|
-
*/
|
|
432
|
-
acknowledgePurchase(purchaseToken: string): Promise<void>;
|
|
433
|
-
/**
|
|
434
|
-
* Query purchases
|
|
435
|
-
*/
|
|
436
|
-
queryPurchases(productType: 'inapp' | 'subs'): Promise<Array<{
|
|
437
|
-
productId: string;
|
|
438
|
-
purchaseToken: string;
|
|
439
|
-
orderId: string;
|
|
440
|
-
purchaseTime: number;
|
|
441
|
-
isAcknowledged: boolean;
|
|
442
|
-
purchaseState: 'pending' | 'purchased' | 'unspecified';
|
|
443
|
-
}>>;
|
|
444
|
-
private callNative;
|
|
445
|
-
}
|
|
446
|
-
export declare class AndroidFirebase {
|
|
447
|
-
/**
|
|
448
|
-
* Get FCM token
|
|
449
|
-
*/
|
|
450
|
-
getFCMToken(): Promise<string | null>;
|
|
451
|
-
/**
|
|
452
|
-
* Subscribe to topic
|
|
453
|
-
*/
|
|
454
|
-
subscribeToTopic(topic: string): Promise<void>;
|
|
455
|
-
/**
|
|
456
|
-
* Unsubscribe from topic
|
|
457
|
-
*/
|
|
458
|
-
unsubscribeFromTopic(topic: string): Promise<void>;
|
|
459
|
-
/**
|
|
460
|
-
* Log analytics event
|
|
461
|
-
*/
|
|
462
|
-
logEvent(name: string, params?: Record<string, unknown>): Promise<void>;
|
|
463
|
-
/**
|
|
464
|
-
* Set user property
|
|
465
|
-
*/
|
|
466
|
-
setUserProperty(name: string, value: string): Promise<void>;
|
|
467
|
-
/**
|
|
468
|
-
* Set user ID
|
|
469
|
-
*/
|
|
470
|
-
setUserId(userId: string | null): Promise<void>;
|
|
471
|
-
/**
|
|
472
|
-
* Record exception
|
|
473
|
-
*/
|
|
474
|
-
recordException(error: Error): Promise<void>;
|
|
475
|
-
/**
|
|
476
|
-
* Set Crashlytics key
|
|
477
|
-
*/
|
|
478
|
-
setCrashlyticsKey(key: string, value: string | number | boolean): Promise<void>;
|
|
479
|
-
/**
|
|
480
|
-
* Get Remote Config value
|
|
481
|
-
*/
|
|
482
|
-
getRemoteConfigValue(key: string): Promise<string | number | boolean | null>;
|
|
483
|
-
/**
|
|
484
|
-
* Fetch Remote Config
|
|
485
|
-
*/
|
|
486
|
-
fetchRemoteConfig(minimumFetchInterval?: number): Promise<void>;
|
|
487
|
-
private callNative;
|
|
488
|
-
}
|
|
489
|
-
export declare class AndroidNativeComponents {
|
|
490
|
-
/**
|
|
491
|
-
* Show bottom sheet
|
|
492
|
-
*/
|
|
493
|
-
showBottomSheet(config: {
|
|
494
|
-
title?: string;
|
|
495
|
-
items?: Array<{
|
|
496
|
-
id: string;
|
|
497
|
-
title: string;
|
|
498
|
-
icon?: string;
|
|
499
|
-
subtitle?: string;
|
|
500
|
-
}>;
|
|
501
|
-
dismissible?: boolean;
|
|
502
|
-
halfExpanded?: boolean;
|
|
503
|
-
}): Promise<string | null>;
|
|
504
|
-
/**
|
|
505
|
-
* Show navigation drawer
|
|
506
|
-
*/
|
|
507
|
-
showNavigationDrawer(config: {
|
|
508
|
-
items: Array<{
|
|
509
|
-
id: string;
|
|
510
|
-
title: string;
|
|
511
|
-
icon?: string;
|
|
512
|
-
selected?: boolean;
|
|
513
|
-
group?: string;
|
|
514
|
-
}>;
|
|
515
|
-
headerTitle?: string;
|
|
516
|
-
headerSubtitle?: string;
|
|
517
|
-
headerImage?: string;
|
|
518
|
-
}): Promise<string | null>;
|
|
519
|
-
/**
|
|
520
|
-
* Show date picker
|
|
521
|
-
*/
|
|
522
|
-
showDatePicker(config?: {
|
|
523
|
-
initialDate?: string;
|
|
524
|
-
minDate?: string;
|
|
525
|
-
maxDate?: string;
|
|
526
|
-
title?: string;
|
|
527
|
-
}): Promise<string | null>;
|
|
528
|
-
/**
|
|
529
|
-
* Show time picker
|
|
530
|
-
*/
|
|
531
|
-
showTimePicker(config?: {
|
|
532
|
-
initialHour?: number;
|
|
533
|
-
initialMinute?: number;
|
|
534
|
-
is24Hour?: boolean;
|
|
535
|
-
title?: string;
|
|
536
|
-
}): Promise<{
|
|
537
|
-
hour: number;
|
|
538
|
-
minute: number;
|
|
539
|
-
} | null>;
|
|
540
|
-
/**
|
|
541
|
-
* Show toast
|
|
542
|
-
*/
|
|
543
|
-
showToast(message: string, duration?: 'short' | 'long'): Promise<void>;
|
|
544
|
-
/**
|
|
545
|
-
* Show snackbar
|
|
546
|
-
*/
|
|
547
|
-
showSnackbar(config: {
|
|
548
|
-
message: string;
|
|
549
|
-
action?: {
|
|
550
|
-
text: string;
|
|
551
|
-
color?: string;
|
|
552
|
-
};
|
|
553
|
-
duration?: 'short' | 'long' | 'indefinite';
|
|
554
|
-
}): Promise<boolean>;
|
|
555
|
-
private callNative;
|
|
556
|
-
}
|
|
557
|
-
export declare const android: {
|
|
558
|
-
WebView: typeof AndroidWebView;
|
|
559
|
-
Permissions: AndroidPermissions;
|
|
560
|
-
Biometrics: AndroidBiometrics;
|
|
561
|
-
Notifications: AndroidNotifications;
|
|
562
|
-
MaterialYou: AndroidMaterialYou;
|
|
563
|
-
PhotoPicker: AndroidPhotoPicker;
|
|
564
|
-
WorkManager: AndroidWorkManager;
|
|
565
|
-
ForegroundService: AndroidForegroundService;
|
|
566
|
-
PredictiveBack: AndroidPredictiveBack;
|
|
567
|
-
PerAppLanguage: AndroidPerAppLanguage;
|
|
568
|
-
Widgets: AndroidWidgets;
|
|
569
|
-
PlayBilling: AndroidPlayBilling;
|
|
570
|
-
Firebase: AndroidFirebase;
|
|
571
|
-
NativeComponents: AndroidNativeComponents;
|
|
572
|
-
};
|
|
573
|
-
export default android;
|