@weapp-vite/web 1.3.4 → 1.3.6

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.
@@ -0,0 +1,1229 @@
1
+ import { TemplateResult } from "lit";
2
+ import { ChildNode } from "domhandler";
3
+
4
+ //#region src/runtime/button/index.d.ts
5
+ interface ButtonFormConfig {
6
+ preventDefault?: boolean;
7
+ }
8
+ declare function ensureButtonDefined(): void;
9
+ declare function setButtonFormConfig(next: ButtonFormConfig): void;
10
+ //#endregion
11
+ //#region src/runtime/renderContext.d.ts
12
+ interface RenderContext {
13
+ instance: ComponentPublicInstance;
14
+ eval: (expression: string, scope: TemplateScope, wxs?: Record<string, any>) => any;
15
+ createScope: (parent: TemplateScope, locals?: Record<string, any>) => TemplateScope;
16
+ mergeScope: (parent: TemplateScope, data?: any) => TemplateScope;
17
+ normalizeList: (value: any) => any[];
18
+ key: (rawKey: string, item: any, index: number, scope: TemplateScope, wxs?: Record<string, any>) => any;
19
+ renderTemplate: (templates: Record<string, any>, name: any, scope: TemplateScope, ctx: RenderContext) => any;
20
+ event: (eventName: string, handlerName: any, scope: TemplateScope, wxs?: Record<string, any>, flags?: {
21
+ catch?: boolean;
22
+ capture?: boolean;
23
+ }) => (event: Event) => void;
24
+ createWxsModule: (code: string, id: string, requireMap?: Record<string, any>) => Record<string, any>;
25
+ }
26
+ declare function createRenderContext(instance: ComponentPublicInstance, methods: Record<string, (event: any) => any>): RenderContext;
27
+ //#endregion
28
+ //#region src/runtime/legacyTemplate/types.d.ts
29
+ type LegacyTemplateScope = Record<string, any>;
30
+ type LegacyTemplateRenderer = (scope?: LegacyTemplateScope) => string;
31
+ //#endregion
32
+ //#region src/runtime/legacyTemplate/index.d.ts
33
+ declare function renderTemplate(nodes: ChildNode[], scope?: LegacyTemplateScope): string;
34
+ declare function createTemplate(source: string): LegacyTemplateRenderer;
35
+ //#endregion
36
+ //#region src/runtime/template.d.ts
37
+ type TemplateScope = Record<string, any>;
38
+ type TemplateRenderer = (scope: TemplateScope, ctx: RenderContext) => TemplateResult | string | unknown;
39
+ //#endregion
40
+ //#region src/runtime/component/types.d.ts
41
+ type DataRecord = Record<string, any>;
42
+ interface PropertyOption {
43
+ type?: StringConstructor | NumberConstructor | BooleanConstructor | ObjectConstructor | ArrayConstructor | null;
44
+ value?: any;
45
+ observer?: (this: ComponentPublicInstance, newValue: any, oldValue: any) => void;
46
+ }
47
+ interface LifeTimeHooks {
48
+ created?: (this: ComponentPublicInstance) => void;
49
+ attached?: (this: ComponentPublicInstance) => void;
50
+ ready?: (this: ComponentPublicInstance) => void;
51
+ detached?: (this: ComponentPublicInstance) => void;
52
+ }
53
+ interface PageLifeTimeHooks {
54
+ show?: (this: ComponentPublicInstance) => void;
55
+ hide?: (this: ComponentPublicInstance) => void;
56
+ resize?: (this: ComponentPublicInstance) => void;
57
+ }
58
+ interface ComponentOptions {
59
+ properties?: Record<string, PropertyOption>;
60
+ data?: DataRecord | (() => DataRecord);
61
+ methods?: Record<string, (this: ComponentPublicInstance, event: any) => any>;
62
+ lifetimes?: LifeTimeHooks;
63
+ pageLifetimes?: PageLifeTimeHooks;
64
+ behaviors?: ComponentOptions[];
65
+ }
66
+ interface DefineComponentOptions {
67
+ template: TemplateRenderer;
68
+ style?: string;
69
+ component?: ComponentOptions;
70
+ observerInit?: boolean;
71
+ }
72
+ interface ComponentPublicInstance extends HTMLElement {
73
+ readonly data: DataRecord;
74
+ readonly properties: DataRecord;
75
+ setData: (patch: DataRecord) => void;
76
+ triggerEvent: (name: string, detail?: any) => void;
77
+ createSelectorQuery: () => any;
78
+ selectComponent: (selector: string) => ComponentPublicInstance | null;
79
+ selectAllComponents: (selector: string) => ComponentPublicInstance[];
80
+ }
81
+ type ComponentConstructor = CustomElementConstructor & {
82
+ __weappUpdate?: (options: DefineComponentOptions) => void;
83
+ };
84
+ //#endregion
85
+ //#region src/runtime/component/index.d.ts
86
+ declare function defineComponent(tagName: string, options: DefineComponentOptions): ComponentConstructor;
87
+ //#endregion
88
+ //#region src/runtime/execution.d.ts
89
+ type RuntimeExecutionMode = 'compat' | 'safe' | 'strict';
90
+ declare function getRuntimeExecutionMode(): RuntimeExecutionMode;
91
+ declare function setRuntimeExecutionMode(mode?: RuntimeExecutionMode | string): void;
92
+ //#endregion
93
+ //#region src/runtime/navigationBar/index.d.ts
94
+ interface NavigationBarMetrics {
95
+ statusBarHeight?: number;
96
+ navContentHeight?: number;
97
+ safeAreaTop?: number;
98
+ }
99
+ declare function setNavigationBarMetrics(next: NavigationBarMetrics): void;
100
+ //#endregion
101
+ //#region src/runtime/polyfill/types/base.d.ts
102
+ interface WxBaseResult {
103
+ errMsg: string;
104
+ }
105
+ interface WxAsyncOptions<SuccessResult extends WxBaseResult> {
106
+ success?: (result: SuccessResult) => void;
107
+ fail?: (result: WxBaseResult) => void;
108
+ complete?: (result: SuccessResult | WxBaseResult) => void;
109
+ }
110
+ //#endregion
111
+ //#region src/runtime/polyfill/types/common.d.ts
112
+ interface ShowToastOptions extends WxAsyncOptions<WxBaseResult> {
113
+ title?: string;
114
+ icon?: 'success' | 'error' | 'none';
115
+ duration?: number;
116
+ }
117
+ interface SetClipboardDataOptions extends WxAsyncOptions<WxBaseResult> {
118
+ data?: string;
119
+ }
120
+ interface GetClipboardDataSuccessResult extends WxBaseResult {
121
+ data: string;
122
+ }
123
+ interface GetClipboardDataOptions extends WxAsyncOptions<GetClipboardDataSuccessResult> {}
124
+ interface SetStorageOptions extends WxAsyncOptions<WxBaseResult> {
125
+ key?: string;
126
+ data?: any;
127
+ }
128
+ interface GetStorageSuccessResult extends WxBaseResult {
129
+ data: any;
130
+ }
131
+ interface GetStorageOptions extends WxAsyncOptions<GetStorageSuccessResult> {
132
+ key?: string;
133
+ }
134
+ interface RemoveStorageOptions extends WxAsyncOptions<WxBaseResult> {
135
+ key?: string;
136
+ }
137
+ interface StorageInfoResult extends WxBaseResult {
138
+ keys: string[];
139
+ currentSize: number;
140
+ limitSize: number;
141
+ }
142
+ interface FileReadResult extends WxBaseResult {
143
+ data: string | ArrayBuffer;
144
+ }
145
+ interface FileWriteOptions extends WxAsyncOptions<WxBaseResult> {
146
+ filePath?: string;
147
+ data?: string | ArrayBuffer | ArrayBufferView;
148
+ encoding?: string;
149
+ }
150
+ interface FileReadOptions extends WxAsyncOptions<FileReadResult> {
151
+ filePath?: string;
152
+ encoding?: string;
153
+ }
154
+ interface FileSystemManager {
155
+ writeFile: (options?: FileWriteOptions) => void;
156
+ readFile: (options?: FileReadOptions) => void;
157
+ writeFileSync: (filePath: string, data: string | ArrayBuffer | ArrayBufferView, encoding?: string) => void;
158
+ readFileSync: (filePath: string, encoding?: string) => string | ArrayBuffer;
159
+ }
160
+ type WorkerMessageCallback = (result: {
161
+ data: unknown;
162
+ }) => void;
163
+ type WorkerErrorCallback = (result: {
164
+ message: string;
165
+ filename?: string;
166
+ lineno?: number;
167
+ colno?: number;
168
+ }) => void;
169
+ interface WorkerBridge {
170
+ postMessage: (data: unknown) => void;
171
+ terminate: () => void;
172
+ onMessage: (callback: WorkerMessageCallback) => void;
173
+ offMessage: (callback?: WorkerMessageCallback) => void;
174
+ onError: (callback: WorkerErrorCallback) => void;
175
+ offError: (callback?: WorkerErrorCallback) => void;
176
+ }
177
+ interface RequestSuccessResult extends WxBaseResult {
178
+ data: any;
179
+ statusCode: number;
180
+ header: Record<string, string>;
181
+ }
182
+ interface RequestOptions extends WxAsyncOptions<RequestSuccessResult> {
183
+ url?: string;
184
+ method?: string;
185
+ data?: any;
186
+ header?: Record<string, string>;
187
+ timeout?: number;
188
+ dataType?: 'json' | 'text';
189
+ responseType?: 'text' | 'arraybuffer';
190
+ }
191
+ interface DownloadFileSuccessResult extends WxBaseResult {
192
+ tempFilePath: string;
193
+ statusCode: number;
194
+ }
195
+ interface DownloadFileOptions extends WxAsyncOptions<DownloadFileSuccessResult> {
196
+ url?: string;
197
+ header?: Record<string, string>;
198
+ timeout?: number;
199
+ }
200
+ interface UploadFileSuccessResult extends WxBaseResult {
201
+ data: string;
202
+ statusCode: number;
203
+ header: Record<string, string>;
204
+ }
205
+ interface UploadFileOptions extends WxAsyncOptions<UploadFileSuccessResult> {
206
+ url?: string;
207
+ filePath?: string;
208
+ name?: string;
209
+ header?: Record<string, string>;
210
+ formData?: Record<string, unknown>;
211
+ timeout?: number;
212
+ }
213
+ interface PreviewImageOptions extends WxAsyncOptions<WxBaseResult> {
214
+ current?: string;
215
+ urls?: string[];
216
+ }
217
+ interface ChooseImageTempFile {
218
+ path: string;
219
+ size: number;
220
+ type: string;
221
+ name: string;
222
+ }
223
+ interface ChooseImageSuccessResult extends WxBaseResult {
224
+ tempFilePaths: string[];
225
+ tempFiles: ChooseImageTempFile[];
226
+ }
227
+ interface ChooseImageOptions extends WxAsyncOptions<ChooseImageSuccessResult> {
228
+ count?: number;
229
+ sizeType?: Array<'original' | 'compressed'>;
230
+ sourceType?: Array<'album' | 'camera'>;
231
+ }
232
+ //#endregion
233
+ //#region src/runtime/polyfill/types/locationRuntime.d.ts
234
+ interface GetLocationSuccessResult extends WxBaseResult {
235
+ latitude: number;
236
+ longitude: number;
237
+ speed: number;
238
+ accuracy: number;
239
+ altitude: number;
240
+ verticalAccuracy: number;
241
+ horizontalAccuracy: number;
242
+ }
243
+ interface GetLocationOptions extends WxAsyncOptions<GetLocationSuccessResult> {
244
+ type?: 'wgs84' | 'gcj02';
245
+ altitude?: boolean;
246
+ isHighAccuracy?: boolean;
247
+ highAccuracyExpireTime?: number;
248
+ }
249
+ interface GetFuzzyLocationSuccessResult extends WxBaseResult {
250
+ latitude: number;
251
+ longitude: number;
252
+ accuracy: number;
253
+ }
254
+ interface GetFuzzyLocationOptions extends WxAsyncOptions<GetFuzzyLocationSuccessResult> {}
255
+ type NetworkType = 'wifi' | '2g' | '3g' | '4g' | '5g' | 'unknown' | 'none';
256
+ interface NetworkStatusResult {
257
+ isConnected: boolean;
258
+ networkType: NetworkType;
259
+ }
260
+ interface GetNetworkTypeSuccessResult extends WxBaseResult, NetworkStatusResult {}
261
+ interface GetNetworkTypeOptions extends WxAsyncOptions<GetNetworkTypeSuccessResult> {}
262
+ type NetworkStatusChangeCallback = (result: NetworkStatusResult) => void;
263
+ interface WindowResizeResult {
264
+ size: {
265
+ windowWidth: number;
266
+ windowHeight: number;
267
+ };
268
+ windowWidth: number;
269
+ windowHeight: number;
270
+ }
271
+ type WindowResizeCallback = (result: WindowResizeResult) => void;
272
+ interface ShowLoadingOptions extends WxAsyncOptions<WxBaseResult> {
273
+ title?: string;
274
+ mask?: boolean;
275
+ }
276
+ interface SetBackgroundColorOptions extends WxAsyncOptions<WxBaseResult> {
277
+ backgroundColor?: string;
278
+ backgroundColorTop?: string;
279
+ backgroundColorBottom?: string;
280
+ }
281
+ interface SetBackgroundTextStyleOptions extends WxAsyncOptions<WxBaseResult> {
282
+ textStyle?: 'dark' | 'light';
283
+ }
284
+ interface ShareMenuOptions extends WxAsyncOptions<WxBaseResult> {
285
+ withShareTicket?: boolean;
286
+ menus?: string[];
287
+ }
288
+ interface NavigateToMiniProgramOptions extends WxAsyncOptions<WxBaseResult> {
289
+ appId?: string;
290
+ path?: string;
291
+ extraData?: Record<string, any>;
292
+ envVersion?: 'develop' | 'trial' | 'release';
293
+ }
294
+ interface LoadSubPackageOptions extends WxAsyncOptions<WxBaseResult> {
295
+ name?: string;
296
+ root?: string;
297
+ }
298
+ interface PreloadSubpackageOptions extends WxAsyncOptions<WxBaseResult> {
299
+ name?: string;
300
+ root?: string;
301
+ }
302
+ interface UpdateManagerCheckResult {
303
+ hasUpdate: boolean;
304
+ }
305
+ interface UpdateManager {
306
+ applyUpdate: () => void;
307
+ onCheckForUpdate: (callback: (result: UpdateManagerCheckResult) => void) => void;
308
+ onUpdateReady: (callback: () => void) => void;
309
+ onUpdateFailed: (callback: () => void) => void;
310
+ }
311
+ interface LogManagerOptions {
312
+ level?: 0 | 1;
313
+ }
314
+ interface LogManager {
315
+ debug: (...args: unknown[]) => void;
316
+ info: (...args: unknown[]) => void;
317
+ log: (...args: unknown[]) => void;
318
+ warn: (...args: unknown[]) => void;
319
+ }
320
+ interface ChooseLocationSuccessResult extends WxBaseResult {
321
+ name: string;
322
+ address: string;
323
+ latitude: number;
324
+ longitude: number;
325
+ }
326
+ interface ChooseLocationOptions extends WxAsyncOptions<ChooseLocationSuccessResult> {}
327
+ interface ChooseAddressSuccessResult extends WxBaseResult {
328
+ userName: string;
329
+ postalCode: string;
330
+ provinceName: string;
331
+ cityName: string;
332
+ countyName: string;
333
+ detailInfo: string;
334
+ nationalCode: string;
335
+ telNumber: string;
336
+ }
337
+ interface ChooseAddressOptions extends WxAsyncOptions<ChooseAddressSuccessResult> {}
338
+ interface GetImageInfoSuccessResult extends WxBaseResult {
339
+ width: number;
340
+ height: number;
341
+ path: string;
342
+ type: string;
343
+ orientation: 'up';
344
+ }
345
+ interface GetImageInfoOptions extends WxAsyncOptions<GetImageInfoSuccessResult> {
346
+ src?: string;
347
+ }
348
+ interface MakePhoneCallOptions extends WxAsyncOptions<WxBaseResult> {
349
+ phoneNumber?: string;
350
+ }
351
+ interface OpenLocationOptions extends WxAsyncOptions<WxBaseResult> {
352
+ latitude?: number;
353
+ longitude?: number;
354
+ scale?: number;
355
+ name?: string;
356
+ address?: string;
357
+ }
358
+ interface TabBarOptions extends WxAsyncOptions<WxBaseResult> {
359
+ animation?: boolean;
360
+ }
361
+ interface OpenCustomerServiceChatOptions extends WxAsyncOptions<WxBaseResult> {
362
+ corpId?: string;
363
+ extInfo?: Record<string, any>;
364
+ url?: string;
365
+ }
366
+ interface RequestPaymentOptions extends WxAsyncOptions<WxBaseResult> {
367
+ timeStamp?: string;
368
+ nonceStr?: string;
369
+ package?: string;
370
+ signType?: string;
371
+ paySign?: string;
372
+ }
373
+ interface RequestSubscribeMessageSuccessResult extends WxBaseResult {
374
+ [tmplId: string]: string;
375
+ }
376
+ interface RequestSubscribeMessageOptions extends WxAsyncOptions<RequestSubscribeMessageSuccessResult> {
377
+ tmplIds?: string[];
378
+ }
379
+ //#endregion
380
+ //#region src/runtime/polyfill/types/mediaAuth.d.ts
381
+ interface AuthSettingResult {
382
+ authSetting: Record<string, boolean>;
383
+ }
384
+ interface GetSettingSuccessResult extends WxBaseResult, AuthSettingResult {}
385
+ interface GetSettingOptions extends WxAsyncOptions<GetSettingSuccessResult> {}
386
+ interface AuthorizeOptions extends WxAsyncOptions<WxBaseResult> {
387
+ scope?: string;
388
+ }
389
+ interface OpenSettingSuccessResult extends WxBaseResult, AuthSettingResult {}
390
+ interface OpenSettingOptions extends WxAsyncOptions<OpenSettingSuccessResult> {}
391
+ type ChooseMediaType = 'image' | 'video';
392
+ interface ChooseMediaTempFile {
393
+ tempFilePath: string;
394
+ size: number;
395
+ fileType: ChooseMediaType;
396
+ thumbTempFilePath?: string;
397
+ width: number;
398
+ height: number;
399
+ duration: number;
400
+ }
401
+ interface ChooseMediaSuccessResult extends WxBaseResult {
402
+ type: ChooseMediaType;
403
+ tempFiles: ChooseMediaTempFile[];
404
+ }
405
+ interface ChooseMediaOptions extends WxAsyncOptions<ChooseMediaSuccessResult> {
406
+ count?: number;
407
+ mediaType?: Array<'image' | 'video' | 'mix'>;
408
+ sourceType?: Array<'album' | 'camera'>;
409
+ maxDuration?: number;
410
+ sizeType?: Array<'original' | 'compressed'>;
411
+ camera?: 'back' | 'front';
412
+ }
413
+ interface CompressImageSuccessResult extends WxBaseResult {
414
+ tempFilePath: string;
415
+ }
416
+ interface CompressImageOptions extends WxAsyncOptions<CompressImageSuccessResult> {
417
+ src?: string;
418
+ quality?: number;
419
+ compressedWidth?: number;
420
+ compressedHeight?: number;
421
+ }
422
+ interface ChooseVideoSuccessResult extends WxBaseResult {
423
+ tempFilePath: string;
424
+ duration: number;
425
+ size: number;
426
+ height: number;
427
+ width: number;
428
+ }
429
+ interface ChooseVideoOptions extends WxAsyncOptions<ChooseVideoSuccessResult> {
430
+ sourceType?: Array<'album' | 'camera'>;
431
+ compressed?: boolean;
432
+ maxDuration?: number;
433
+ camera?: 'back' | 'front';
434
+ }
435
+ interface GetVideoInfoSuccessResult extends WxBaseResult {
436
+ size: number;
437
+ duration: number;
438
+ width: number;
439
+ height: number;
440
+ fps: number;
441
+ bitrate: number;
442
+ type: string;
443
+ orientation: 'up';
444
+ }
445
+ interface GetVideoInfoOptions extends WxAsyncOptions<GetVideoInfoSuccessResult> {
446
+ src?: string;
447
+ }
448
+ interface CompressVideoSuccessResult extends WxBaseResult {
449
+ tempFilePath: string;
450
+ size: number;
451
+ duration: number;
452
+ width: number;
453
+ height: number;
454
+ bitrate: number;
455
+ fps: number;
456
+ }
457
+ interface CompressVideoOptions extends WxAsyncOptions<CompressVideoSuccessResult> {
458
+ src?: string;
459
+ quality?: 'low' | 'medium' | 'high';
460
+ bitrate?: number;
461
+ }
462
+ interface MediaPreviewSource {
463
+ url: string;
464
+ type?: 'image' | 'video';
465
+ poster?: string;
466
+ }
467
+ interface PreviewMediaOptions extends WxAsyncOptions<WxBaseResult> {
468
+ sources?: MediaPreviewSource[];
469
+ current?: number;
470
+ }
471
+ interface SaveVideoToPhotosAlbumOptions extends WxAsyncOptions<WxBaseResult> {
472
+ filePath?: string;
473
+ }
474
+ interface ChooseFileSuccessResult extends WxBaseResult {
475
+ tempFiles: ChooseMessageFileTempFile[];
476
+ }
477
+ interface ChooseFileOptions extends WxAsyncOptions<ChooseFileSuccessResult> {
478
+ count?: number;
479
+ type?: 'all' | 'video' | 'image' | 'file';
480
+ extension?: string[];
481
+ }
482
+ interface OpenVideoEditorSuccessResult extends WxBaseResult {
483
+ tempFilePath: string;
484
+ }
485
+ interface OpenVideoEditorOptions extends WxAsyncOptions<OpenVideoEditorSuccessResult> {
486
+ src?: string;
487
+ }
488
+ interface SaveFileSuccessResult extends WxBaseResult {
489
+ savedFilePath: string;
490
+ }
491
+ interface SaveFileOptions extends WxAsyncOptions<SaveFileSuccessResult> {
492
+ tempFilePath?: string;
493
+ filePath?: string;
494
+ }
495
+ interface SaveFileToDiskOptions extends WxAsyncOptions<WxBaseResult> {
496
+ filePath?: string;
497
+ fileName?: string;
498
+ }
499
+ interface ChooseMessageFileTempFile {
500
+ path: string;
501
+ size: number;
502
+ type: string;
503
+ name: string;
504
+ time: number;
505
+ }
506
+ interface ChooseMessageFileSuccessResult extends WxBaseResult {
507
+ tempFiles: ChooseMessageFileTempFile[];
508
+ }
509
+ interface ChooseMessageFileOptions extends WxAsyncOptions<ChooseMessageFileSuccessResult> {
510
+ count?: number;
511
+ type?: 'all' | 'video' | 'image' | 'file';
512
+ }
513
+ interface SaveImageToPhotosAlbumOptions extends WxAsyncOptions<WxBaseResult> {
514
+ filePath?: string;
515
+ }
516
+ interface ScanCodeSuccessResult extends WxBaseResult {
517
+ result: string;
518
+ scanType: string;
519
+ charSet: string;
520
+ path: string;
521
+ rawData: string;
522
+ }
523
+ interface ScanCodeOptions extends WxAsyncOptions<ScanCodeSuccessResult> {
524
+ onlyFromCamera?: boolean;
525
+ scanType?: string[];
526
+ }
527
+ //#endregion
528
+ //#region src/runtime/polyfill/types/platformRuntime.d.ts
529
+ interface VibrateShortOptions extends WxAsyncOptions<WxBaseResult> {
530
+ type?: 'heavy' | 'medium' | 'light';
531
+ }
532
+ interface BatteryInfo {
533
+ level: number;
534
+ isCharging: boolean;
535
+ }
536
+ interface GetBatteryInfoSuccessResult extends WxBaseResult, BatteryInfo {}
537
+ interface GetExtConfigSuccessResult extends WxBaseResult {
538
+ extConfig: Record<string, any>;
539
+ }
540
+ interface GetExtConfigOptions extends WxAsyncOptions<GetExtConfigSuccessResult> {}
541
+ interface ShowModalSuccessResult extends WxBaseResult {
542
+ confirm: boolean;
543
+ cancel: boolean;
544
+ }
545
+ interface ShowModalOptions extends WxAsyncOptions<ShowModalSuccessResult> {
546
+ title?: string;
547
+ content?: string;
548
+ showCancel?: boolean;
549
+ confirmText?: string;
550
+ cancelText?: string;
551
+ }
552
+ interface ShowActionSheetSuccessResult extends WxBaseResult {
553
+ tapIndex: number;
554
+ }
555
+ interface ShowActionSheetOptions extends WxAsyncOptions<ShowActionSheetSuccessResult> {
556
+ itemList?: string[];
557
+ itemColor?: string;
558
+ alertText?: string;
559
+ }
560
+ interface OpenDocumentOptions extends WxAsyncOptions<WxBaseResult> {
561
+ filePath?: string;
562
+ fileType?: string;
563
+ showMenu?: boolean;
564
+ }
565
+ interface PageScrollToOptions extends WxAsyncOptions<WxBaseResult> {
566
+ scrollTop?: number;
567
+ duration?: number;
568
+ }
569
+ interface SelectorQueryNodeFields {
570
+ id?: boolean;
571
+ dataset?: boolean;
572
+ rect?: boolean;
573
+ size?: boolean;
574
+ scrollOffset?: boolean;
575
+ properties?: string[];
576
+ computedStyle?: string[];
577
+ context?: boolean;
578
+ node?: boolean;
579
+ }
580
+ type SelectorQueryNodeCallback = (result: any) => void;
581
+ interface SelectorQuery {
582
+ in: (context?: unknown) => SelectorQuery;
583
+ select: (selector: string) => SelectorQueryNodesRef;
584
+ selectAll: (selector: string) => SelectorQueryNodesRef;
585
+ selectViewport: () => SelectorQueryNodesRef;
586
+ exec: (callback?: (result: any[]) => void) => SelectorQuery;
587
+ }
588
+ interface SelectorQueryNodesRef {
589
+ boundingClientRect: (callback?: SelectorQueryNodeCallback) => SelectorQuery;
590
+ scrollOffset: (callback?: SelectorQueryNodeCallback) => SelectorQuery;
591
+ fields: (fields: SelectorQueryNodeFields, callback?: SelectorQueryNodeCallback) => SelectorQuery;
592
+ node: (callback?: SelectorQueryNodeCallback) => SelectorQuery;
593
+ }
594
+ interface CanvasContext {
595
+ setFillStyle: (color: string) => void;
596
+ setStrokeStyle: (color: string) => void;
597
+ setLineWidth: (width: number) => void;
598
+ setFontSize: (size: number) => void;
599
+ fillRect: (x: number, y: number, width: number, height: number) => void;
600
+ strokeRect: (x: number, y: number, width: number, height: number) => void;
601
+ clearRect: (x: number, y: number, width: number, height: number) => void;
602
+ fillText: (text: string, x: number, y: number, maxWidth?: number) => void;
603
+ beginPath: () => void;
604
+ closePath: () => void;
605
+ moveTo: (x: number, y: number) => void;
606
+ lineTo: (x: number, y: number) => void;
607
+ stroke: () => void;
608
+ draw: (reserve?: boolean | (() => void), callback?: () => void) => void;
609
+ }
610
+ interface VideoContext {
611
+ play: () => void;
612
+ pause: () => void;
613
+ stop: () => void;
614
+ seek: (position: number) => void;
615
+ playbackRate: (rate: number) => void;
616
+ requestFullScreen: () => void;
617
+ exitFullScreen: () => void;
618
+ }
619
+ interface AdBaseOptions {
620
+ adUnitId?: string;
621
+ }
622
+ interface AdError {
623
+ errMsg: string;
624
+ errCode: number;
625
+ }
626
+ interface AdLoadResult {
627
+ errMsg: string;
628
+ }
629
+ interface AdShowResult {
630
+ errMsg: string;
631
+ }
632
+ interface RewardedVideoAdCloseResult {
633
+ isEnded: boolean;
634
+ }
635
+ interface RewardedVideoAd {
636
+ load: () => Promise<AdLoadResult>;
637
+ show: () => Promise<AdShowResult>;
638
+ destroy: () => void;
639
+ onLoad: (callback: () => void) => void;
640
+ offLoad: (callback?: () => void) => void;
641
+ onError: (callback: (error: AdError) => void) => void;
642
+ offError: (callback?: (error: AdError) => void) => void;
643
+ onClose: (callback: (result: RewardedVideoAdCloseResult) => void) => void;
644
+ offClose: (callback?: (result: RewardedVideoAdCloseResult) => void) => void;
645
+ }
646
+ interface InterstitialAd {
647
+ load: () => Promise<AdLoadResult>;
648
+ show: () => Promise<AdShowResult>;
649
+ destroy: () => void;
650
+ onLoad: (callback: () => void) => void;
651
+ offLoad: (callback?: () => void) => void;
652
+ onError: (callback: (error: AdError) => void) => void;
653
+ offError: (callback?: (error: AdError) => void) => void;
654
+ onClose: (callback: () => void) => void;
655
+ offClose: (callback?: () => void) => void;
656
+ }
657
+ interface VkSession {
658
+ start: () => Promise<WxBaseResult>;
659
+ stop: () => Promise<WxBaseResult>;
660
+ destroy: () => void;
661
+ on: (eventName: string, callback: (payload: unknown) => void) => void;
662
+ off: (eventName?: string, callback?: (payload: unknown) => void) => void;
663
+ }
664
+ //#endregion
665
+ //#region src/runtime/polyfill/types/systemAuth.d.ts
666
+ interface SystemInfo {
667
+ brand: string;
668
+ model: string;
669
+ pixelRatio: number;
670
+ screenWidth: number;
671
+ screenHeight: number;
672
+ windowWidth: number;
673
+ windowHeight: number;
674
+ statusBarHeight: number;
675
+ language: string;
676
+ version: string;
677
+ system: string;
678
+ platform: string;
679
+ }
680
+ interface AppBaseInfo {
681
+ SDKVersion: string;
682
+ language: string;
683
+ version: string;
684
+ platform: string;
685
+ enableDebug: boolean;
686
+ theme: 'light' | 'dark';
687
+ }
688
+ interface MenuButtonBoundingClientRect {
689
+ width: number;
690
+ height: number;
691
+ top: number;
692
+ right: number;
693
+ bottom: number;
694
+ left: number;
695
+ }
696
+ interface WindowInfo {
697
+ pixelRatio: number;
698
+ screenWidth: number;
699
+ screenHeight: number;
700
+ windowWidth: number;
701
+ windowHeight: number;
702
+ statusBarHeight: number;
703
+ screenTop: number;
704
+ safeArea: {
705
+ left: number;
706
+ right: number;
707
+ top: number;
708
+ bottom: number;
709
+ width: number;
710
+ height: number;
711
+ };
712
+ }
713
+ interface DeviceInfo {
714
+ brand: string;
715
+ model: string;
716
+ system: string;
717
+ platform: string;
718
+ memorySize: number;
719
+ benchmarkLevel: number;
720
+ abi: string;
721
+ deviceOrientation: 'portrait' | 'landscape';
722
+ }
723
+ interface SystemSetting {
724
+ bluetoothEnabled: boolean;
725
+ wifiEnabled: boolean;
726
+ locationEnabled: boolean;
727
+ locationReducedAccuracy: boolean;
728
+ deviceOrientation: 'portrait' | 'landscape';
729
+ }
730
+ type AppAuthorizeStatus = 'authorized' | 'denied' | 'not determined';
731
+ interface AppAuthorizeSetting {
732
+ albumAuthorized: AppAuthorizeStatus;
733
+ bluetoothAuthorized: AppAuthorizeStatus;
734
+ cameraAuthorized: AppAuthorizeStatus;
735
+ locationAuthorized: AppAuthorizeStatus;
736
+ microphoneAuthorized: AppAuthorizeStatus;
737
+ notificationAuthorized: AppAuthorizeStatus;
738
+ phoneCalendarAuthorized: AppAuthorizeStatus;
739
+ }
740
+ interface OpenAppAuthorizeSettingSuccessResult extends WxBaseResult, AppAuthorizeSetting {}
741
+ interface OpenAppAuthorizeSettingOptions extends WxAsyncOptions<OpenAppAuthorizeSettingSuccessResult> {}
742
+ interface LoginSuccessResult extends WxBaseResult {
743
+ code: string;
744
+ }
745
+ interface LoginOptions extends WxAsyncOptions<LoginSuccessResult> {
746
+ timeout?: number;
747
+ }
748
+ interface CheckSessionOptions extends WxAsyncOptions<WxBaseResult> {}
749
+ interface UserInfo {
750
+ nickName: string;
751
+ avatarUrl: string;
752
+ gender: 0 | 1 | 2;
753
+ country: string;
754
+ province: string;
755
+ city: string;
756
+ language: string;
757
+ }
758
+ interface UserProfileSuccessResult extends WxBaseResult {
759
+ userInfo: UserInfo;
760
+ rawData: string;
761
+ signature: string;
762
+ encryptedData: string;
763
+ iv: string;
764
+ }
765
+ interface GetUserInfoOptions extends WxAsyncOptions<UserProfileSuccessResult> {
766
+ lang?: 'en' | 'zh_CN' | 'zh_TW';
767
+ }
768
+ interface GetUserProfileOptions extends WxAsyncOptions<UserProfileSuccessResult> {
769
+ desc?: string;
770
+ lang?: 'en' | 'zh_CN' | 'zh_TW';
771
+ }
772
+ interface AccountInfoSync {
773
+ miniProgram: {
774
+ appId: string;
775
+ envVersion: 'develop' | 'trial' | 'release';
776
+ version: string;
777
+ };
778
+ plugin: Record<string, unknown>;
779
+ }
780
+ interface GetSystemInfoSuccessResult extends WxBaseResult, SystemInfo {}
781
+ interface GetSystemInfoOptions extends WxAsyncOptions<GetSystemInfoSuccessResult> {}
782
+ //#endregion
783
+ //#region src/runtime/polyfill/deviceAuthSystemApi.d.ts
784
+ declare function vibrateShort(options?: VibrateShortOptions): Promise<{
785
+ errMsg: string;
786
+ }>;
787
+ declare function getBatteryInfoSync(): BatteryInfo;
788
+ declare function getBatteryInfo(options?: WxAsyncOptions<GetBatteryInfoSuccessResult>): Promise<{
789
+ level: number;
790
+ isCharging: boolean;
791
+ errMsg: string;
792
+ }>;
793
+ declare function getLocation(options?: GetLocationOptions): Promise<{
794
+ latitude: number;
795
+ longitude: number;
796
+ speed: number;
797
+ accuracy: number;
798
+ altitude: number;
799
+ verticalAccuracy: number;
800
+ horizontalAccuracy: number;
801
+ errMsg: string;
802
+ }>;
803
+ declare function getFuzzyLocation(options?: GetFuzzyLocationOptions): Promise<{
804
+ latitude: number;
805
+ longitude: number;
806
+ accuracy: number;
807
+ errMsg: string;
808
+ }>;
809
+ declare function getSetting(options?: GetSettingOptions): Promise<{
810
+ errMsg: string;
811
+ authSetting: Record<string, boolean>;
812
+ }>;
813
+ declare function authorize(options?: AuthorizeOptions): Promise<{
814
+ errMsg: string;
815
+ }>;
816
+ declare function openSetting(options?: OpenSettingOptions): Promise<{
817
+ errMsg: string;
818
+ authSetting: Record<string, boolean>;
819
+ }>;
820
+ declare function getAppAuthorizeSetting(): AppAuthorizeSetting;
821
+ declare function openAppAuthorizeSetting(options?: OpenAppAuthorizeSettingOptions): Promise<{
822
+ errMsg: string;
823
+ }>;
824
+ declare function getNetworkType(options?: GetNetworkTypeOptions): Promise<any>;
825
+ declare function onNetworkStatusChange(callback: NetworkStatusChangeCallback): void;
826
+ declare function offNetworkStatusChange(callback?: NetworkStatusChangeCallback): void;
827
+ declare function getWindowInfo(): WindowInfo;
828
+ declare function onWindowResize(callback: WindowResizeCallback): void;
829
+ declare function offWindowResize(callback?: WindowResizeCallback): void;
830
+ declare function getSystemInfoSync(): SystemInfo;
831
+ declare function getSystemInfo(options?: GetSystemInfoOptions): Promise<any>;
832
+ declare function getDeviceInfo(): DeviceInfo;
833
+ declare function getSystemSetting(): SystemSetting;
834
+ declare function login(options?: LoginOptions): Promise<{
835
+ errMsg: string;
836
+ code: string;
837
+ }>;
838
+ declare function checkSession(options?: CheckSessionOptions): Promise<{
839
+ errMsg: string;
840
+ }>;
841
+ declare function getUserInfo(options?: GetUserInfoOptions): Promise<{
842
+ errMsg: "getUserInfo:ok" | "getUserProfile:ok";
843
+ userInfo: {
844
+ nickName: string;
845
+ avatarUrl: string;
846
+ gender: 0 | 1 | 2;
847
+ country: string;
848
+ province: string;
849
+ city: string;
850
+ language: "en" | "zh_CN" | "zh_TW";
851
+ };
852
+ rawData: string;
853
+ signature: string;
854
+ encryptedData: string;
855
+ iv: string;
856
+ }>;
857
+ declare function getUserProfile(options?: GetUserProfileOptions): Promise<{
858
+ errMsg: "getUserInfo:ok" | "getUserProfile:ok";
859
+ userInfo: {
860
+ nickName: string;
861
+ avatarUrl: string;
862
+ gender: 0 | 1 | 2;
863
+ country: string;
864
+ province: string;
865
+ city: string;
866
+ language: "en" | "zh_CN" | "zh_TW";
867
+ };
868
+ rawData: string;
869
+ signature: string;
870
+ encryptedData: string;
871
+ iv: string;
872
+ }>;
873
+ declare function getAccountInfoSync(): AccountInfoSync;
874
+ declare function getAppBaseInfo(): AppBaseInfo;
875
+ declare function getMenuButtonBoundingClientRect(): MenuButtonBoundingClientRect;
876
+ //#endregion
877
+ //#region src/runtime/polyfill/routeRuntime/options.d.ts
878
+ interface RegisterMeta {
879
+ id: string;
880
+ template?: TemplateRenderer;
881
+ style?: string;
882
+ }
883
+ interface PageHooks {
884
+ onLoad?: (this: ComponentPublicInstance, query: Record<string, string>) => void;
885
+ onReady?: (this: ComponentPublicInstance) => void;
886
+ onShow?: (this: ComponentPublicInstance) => void;
887
+ onHide?: (this: ComponentPublicInstance) => void;
888
+ onUnload?: (this: ComponentPublicInstance) => void;
889
+ }
890
+ interface AppLifecycleHooks {
891
+ onLaunch?: (this: AppRuntime, options: AppLaunchOptions) => void;
892
+ onShow?: (this: AppRuntime, options: AppLaunchOptions) => void;
893
+ }
894
+ type AppRuntime = Record<string, unknown> & Partial<AppLifecycleHooks> & {
895
+ globalData?: Record<string, unknown>;
896
+ };
897
+ interface AppLaunchOptions {
898
+ path: string;
899
+ scene: number;
900
+ query: Record<string, string>;
901
+ referrerInfo: Record<string, unknown>;
902
+ }
903
+ type PageRawOptions = ComponentOptions & PageHooks & Record<string, unknown>;
904
+ type ComponentRawOptions = ComponentOptions & Record<string, unknown>;
905
+ //#endregion
906
+ //#region src/runtime/polyfill/routeRuntime.d.ts
907
+ declare function initializePageRoutes(ids: string[], options?: {
908
+ rpx?: {
909
+ designWidth?: number;
910
+ varName?: string;
911
+ };
912
+ navigationBar?: NavigationBarMetrics;
913
+ form?: ButtonFormConfig;
914
+ runtime?: {
915
+ executionMode?: 'compat' | 'safe' | 'strict';
916
+ warnings?: {
917
+ level?: 'off' | 'warn' | 'error';
918
+ dedupe?: boolean;
919
+ };
920
+ };
921
+ }): void;
922
+ declare function registerPage<T extends PageRawOptions | undefined>(options: T, meta: RegisterMeta): T;
923
+ declare function registerComponent<T extends ComponentRawOptions | undefined>(options: T, meta: RegisterMeta): T;
924
+ declare function registerApp<T extends AppRuntime | undefined>(options: T, _meta?: RegisterMeta): T;
925
+ declare function navigateTo(options: {
926
+ url: string;
927
+ }): Promise<void>;
928
+ declare function redirectTo(options: {
929
+ url: string;
930
+ }): Promise<void>;
931
+ declare function reLaunch(options: {
932
+ url: string;
933
+ }): Promise<void>;
934
+ declare function switchTab(options: {
935
+ url: string;
936
+ }): Promise<void>;
937
+ declare function navigateBack(options?: {
938
+ delta?: number;
939
+ }): Promise<void>;
940
+ declare function getLaunchOptionsSync(): AppLaunchOptions;
941
+ declare function getEnterOptionsSync(): AppLaunchOptions;
942
+ //#endregion
943
+ //#region src/runtime/polyfill/runtimeDataApi.d.ts
944
+ declare function navigateToMiniProgram(options?: NavigateToMiniProgramOptions): Promise<{
945
+ errMsg: string;
946
+ }>;
947
+ declare function exitMiniProgram(options?: WxAsyncOptions<WxBaseResult>): Promise<{
948
+ errMsg: string;
949
+ }>;
950
+ declare function nextTick(callback?: () => void): void;
951
+ declare function startPullDownRefresh(options?: WxAsyncOptions<WxBaseResult>): Promise<{
952
+ errMsg: string;
953
+ }>;
954
+ declare function stopPullDownRefresh(options?: WxAsyncOptions<WxBaseResult>): Promise<{
955
+ errMsg: string;
956
+ }>;
957
+ declare function hideKeyboard(options?: WxAsyncOptions<WxBaseResult>): Promise<{
958
+ errMsg: string;
959
+ }>;
960
+ declare function loadSubPackage(options?: LoadSubPackageOptions): Promise<{
961
+ errMsg: string;
962
+ }>;
963
+ declare function preloadSubpackage(options?: PreloadSubpackageOptions): Promise<{
964
+ errMsg: string;
965
+ }>;
966
+ declare function pageScrollTo(options?: PageScrollToOptions): Promise<unknown>;
967
+ declare function createSelectorQuery(): SelectorQuery;
968
+ declare function createCanvasContext(canvasId: string): CanvasContext;
969
+ declare function createVideoContext(videoId: string): VideoContext;
970
+ declare function setStorageSync(key: string, data: any): void;
971
+ declare function getStorageSync(key: string): any;
972
+ declare function removeStorageSync(key: string): void;
973
+ declare function clearStorageSync(): void;
974
+ declare function getStorageInfoSync(): StorageInfoResult;
975
+ declare function setStorage(options?: SetStorageOptions): Promise<{
976
+ errMsg: string;
977
+ }>;
978
+ declare function getStorage(options?: GetStorageOptions): Promise<{
979
+ errMsg: string;
980
+ data: any;
981
+ }>;
982
+ declare function removeStorage(options?: RemoveStorageOptions): Promise<{
983
+ errMsg: string;
984
+ }>;
985
+ declare function clearStorage(options?: WxAsyncOptions<WxBaseResult>): Promise<{
986
+ errMsg: string;
987
+ }>;
988
+ declare function getStorageInfo(options?: WxAsyncOptions<StorageInfoResult>): Promise<{
989
+ errMsg: string;
990
+ keys: string[];
991
+ currentSize: number;
992
+ limitSize: number;
993
+ }>;
994
+ declare function getFileSystemManager(): FileSystemManager;
995
+ declare function createWorker(path: string): WorkerBridge;
996
+ declare function createVKSession(_options?: Record<string, unknown>): VkSession;
997
+ declare function request(options?: RequestOptions): Promise<{
998
+ errMsg: string;
999
+ data: any;
1000
+ statusCode: number;
1001
+ header: Record<string, string>;
1002
+ }>;
1003
+ declare function downloadFile(options?: DownloadFileOptions): Promise<{
1004
+ errMsg: string;
1005
+ tempFilePath: string;
1006
+ statusCode: number;
1007
+ }>;
1008
+ declare function uploadFile(options?: UploadFileOptions): Promise<{
1009
+ errMsg: string;
1010
+ data: string;
1011
+ statusCode: number;
1012
+ header: Record<string, string>;
1013
+ }>;
1014
+ //#endregion
1015
+ //#region src/runtime/polyfill/uiMediaApi.d.ts
1016
+ declare function showToast(options?: ShowToastOptions): Promise<any>;
1017
+ declare function showLoading(options?: ShowLoadingOptions): Promise<any>;
1018
+ declare function hideLoading(options?: WxAsyncOptions<WxBaseResult>): Promise<any>;
1019
+ declare function showShareMenu(options?: ShareMenuOptions): Promise<any>;
1020
+ declare function updateShareMenu(options?: ShareMenuOptions): Promise<any>;
1021
+ declare function openCustomerServiceChat(options?: OpenCustomerServiceChatOptions): Promise<{
1022
+ errMsg: string;
1023
+ }>;
1024
+ declare function makePhoneCall(options?: MakePhoneCallOptions): Promise<{
1025
+ errMsg: string;
1026
+ }>;
1027
+ declare function chooseAddress(options?: ChooseAddressOptions): Promise<{
1028
+ userName: string;
1029
+ postalCode: string;
1030
+ provinceName: string;
1031
+ cityName: string;
1032
+ countyName: string;
1033
+ detailInfo: string;
1034
+ nationalCode: string;
1035
+ telNumber: string;
1036
+ errMsg: string;
1037
+ }>;
1038
+ declare function chooseLocation(options?: ChooseLocationOptions): Promise<{
1039
+ name: string;
1040
+ address: string;
1041
+ latitude: number;
1042
+ longitude: number;
1043
+ errMsg: string;
1044
+ }>;
1045
+ declare function openLocation(options?: OpenLocationOptions): Promise<{
1046
+ errMsg: string;
1047
+ }>;
1048
+ declare function getImageInfo(options?: GetImageInfoOptions): Promise<{
1049
+ errMsg: string;
1050
+ width: number;
1051
+ height: number;
1052
+ path: any;
1053
+ type: string;
1054
+ orientation: string;
1055
+ }>;
1056
+ declare function getVideoInfo(options?: GetVideoInfoOptions): Promise<{
1057
+ errMsg: string;
1058
+ orientation: string;
1059
+ type: string;
1060
+ duration: number;
1061
+ size: number;
1062
+ width: number;
1063
+ height: number;
1064
+ bitrate: number;
1065
+ fps: number;
1066
+ }>;
1067
+ declare function showTabBar(options?: TabBarOptions): Promise<any>;
1068
+ declare function hideTabBar(options?: TabBarOptions): Promise<any>;
1069
+ declare function requestPayment(options?: RequestPaymentOptions): Promise<any>;
1070
+ declare function requestSubscribeMessage(options?: RequestSubscribeMessageOptions): Promise<RequestSubscribeMessageSuccessResult>;
1071
+ declare function showModal(options?: ShowModalOptions): Promise<any>;
1072
+ declare function showActionSheet(options?: ShowActionSheetOptions): Promise<any>;
1073
+ declare function chooseImage(options?: ChooseImageOptions): Promise<{
1074
+ errMsg: string;
1075
+ tempFilePaths: string[];
1076
+ tempFiles: {
1077
+ path: string;
1078
+ size: number;
1079
+ type: string;
1080
+ name: string;
1081
+ }[];
1082
+ }>;
1083
+ declare function chooseMedia(options?: ChooseMediaOptions): Promise<{
1084
+ errMsg: string;
1085
+ type: "image" | "video";
1086
+ tempFiles: {
1087
+ tempFilePath: string;
1088
+ size: number;
1089
+ fileType: "image" | "video";
1090
+ width: number;
1091
+ height: number;
1092
+ duration: number;
1093
+ }[];
1094
+ }>;
1095
+ declare function compressImage(options?: CompressImageOptions): Promise<{
1096
+ errMsg: string;
1097
+ tempFilePath: string;
1098
+ }>;
1099
+ declare function compressVideo(options?: CompressVideoOptions): Promise<{
1100
+ tempFilePath: any;
1101
+ size: number;
1102
+ duration: number;
1103
+ width: number;
1104
+ height: number;
1105
+ bitrate: number;
1106
+ fps: number;
1107
+ errMsg: string;
1108
+ }>;
1109
+ declare function chooseVideo(options?: ChooseVideoOptions): Promise<{
1110
+ tempFilePath: string;
1111
+ duration: number;
1112
+ size: number;
1113
+ height: number;
1114
+ width: number;
1115
+ errMsg: string;
1116
+ }>;
1117
+ declare function chooseMessageFile(options?: ChooseMessageFileOptions): Promise<{
1118
+ errMsg: string;
1119
+ tempFiles: {
1120
+ path: string;
1121
+ size: number;
1122
+ type: string;
1123
+ name: string;
1124
+ time: number;
1125
+ }[];
1126
+ }>;
1127
+ declare function chooseFile(options?: ChooseFileOptions): Promise<{
1128
+ errMsg: string;
1129
+ tempFiles: {
1130
+ path: string;
1131
+ size: number;
1132
+ type: string;
1133
+ name: string;
1134
+ time: number;
1135
+ }[];
1136
+ }>;
1137
+ declare function previewImage(options?: PreviewImageOptions): Promise<{
1138
+ errMsg: string;
1139
+ }>;
1140
+ declare function previewMedia(options?: PreviewMediaOptions): Promise<{
1141
+ errMsg: string;
1142
+ }>;
1143
+ declare function openVideoEditor(options?: OpenVideoEditorOptions): Promise<{
1144
+ errMsg: string;
1145
+ tempFilePath: any;
1146
+ }>;
1147
+ declare function saveImageToPhotosAlbum(options?: SaveImageToPhotosAlbumOptions): Promise<{
1148
+ errMsg: string;
1149
+ }>;
1150
+ declare function saveVideoToPhotosAlbum(options?: SaveVideoToPhotosAlbumOptions): Promise<{
1151
+ errMsg: string;
1152
+ }>;
1153
+ declare function saveFile(options?: SaveFileOptions): Promise<{
1154
+ errMsg: string;
1155
+ savedFilePath: string;
1156
+ }>;
1157
+ declare function saveFileToDisk(options?: SaveFileToDiskOptions): Promise<{
1158
+ errMsg: string;
1159
+ }>;
1160
+ declare function openDocument(options?: OpenDocumentOptions): Promise<{
1161
+ errMsg: string;
1162
+ }>;
1163
+ declare function scanCode(options?: ScanCodeOptions): Promise<{
1164
+ errMsg: string;
1165
+ result: string;
1166
+ scanType: string;
1167
+ charSet: string;
1168
+ path: string;
1169
+ rawData: string;
1170
+ }>;
1171
+ declare function setClipboardData(options?: SetClipboardDataOptions): Promise<{
1172
+ errMsg: string;
1173
+ }>;
1174
+ declare function getClipboardData(options?: GetClipboardDataOptions): Promise<{
1175
+ errMsg: string;
1176
+ data: string;
1177
+ }>;
1178
+ //#endregion
1179
+ //#region src/runtime/polyfill/index.d.ts
1180
+ declare function setNavigationBarTitle(options: {
1181
+ title: string;
1182
+ }): Promise<void>;
1183
+ declare function setNavigationBarColor(options: {
1184
+ frontColor?: string;
1185
+ backgroundColor?: string;
1186
+ animation?: {
1187
+ duration?: number;
1188
+ timingFunction?: string;
1189
+ };
1190
+ }): Promise<void>;
1191
+ declare function showNavigationBarLoading(): Promise<void>;
1192
+ declare function hideNavigationBarLoading(): Promise<void>;
1193
+ declare function setBackgroundColor(options?: SetBackgroundColorOptions): Promise<{
1194
+ errMsg: string;
1195
+ }>;
1196
+ declare function setBackgroundTextStyle(options?: SetBackgroundTextStyleOptions): Promise<{
1197
+ errMsg: string;
1198
+ }>;
1199
+ declare function canIUse(schema: string): boolean;
1200
+ declare function createRewardedVideoAd(options?: AdBaseOptions): RewardedVideoAd;
1201
+ declare function createInterstitialAd(options?: AdBaseOptions): InterstitialAd;
1202
+ declare function getExtConfigSync(): {
1203
+ [x: string]: unknown;
1204
+ };
1205
+ declare function getExtConfig(options?: GetExtConfigOptions): Promise<any>;
1206
+ declare function getUpdateManager(): UpdateManager;
1207
+ declare function getLogManager(options?: LogManagerOptions): LogManager;
1208
+ declare function reportAnalytics(eventName: string, data?: Record<string, unknown>): void;
1209
+ //#endregion
1210
+ //#region src/runtime/rpx.d.ts
1211
+ interface RpxConfig {
1212
+ designWidth?: number;
1213
+ varName?: string;
1214
+ }
1215
+ declare function setupRpx(config?: RpxConfig): void;
1216
+ //#endregion
1217
+ //#region src/runtime/style.d.ts
1218
+ declare function removeStyle(id: string): void;
1219
+ declare function injectStyle(css: string, id?: string): () => void;
1220
+ //#endregion
1221
+ //#region src/runtime/warning.d.ts
1222
+ type RuntimeWarningLevel = 'off' | 'warn' | 'error';
1223
+ interface RuntimeWarningOptions {
1224
+ level?: RuntimeWarningLevel;
1225
+ dedupe?: boolean;
1226
+ }
1227
+ declare function setRuntimeWarningOptions(options?: RuntimeWarningOptions): void;
1228
+ //#endregion
1229
+ export { showModal as $, getMenuButtonBoundingClientRect as $t, compressVideo as A, stopPullDownRefresh as At, openVideoEditor as B, registerComponent as Bt, chooseFile as C, createTemplate as Cn, preloadSubpackage as Ct, chooseMessageFile as D, ButtonFormConfig as Dn, setStorage as Dt, chooseMedia as E, createRenderContext as En, request as Et, hideTabBar as F, navigateBack as Ft, saveFile as G, getAccountInfoSync as Gt, previewMedia as H, switchTab as Ht, makePhoneCall as I, navigateTo as It, saveVideoToPhotosAlbum as J, getBatteryInfo as Jt, saveFileToDisk as K, getAppAuthorizeSetting as Kt, openCustomerServiceChat as L, reLaunch as Lt, getImageInfo as M, getEnterOptionsSync as Mt, getVideoInfo as N, getLaunchOptionsSync as Nt, chooseVideo as O, ensureButtonDefined as On, setStorageSync as Ot, hideLoading as P, initializePageRoutes as Pt, showLoading as Q, getLocation as Qt, openDocument as R, redirectTo as Rt, chooseAddress as S, TemplateScope as Sn, pageScrollTo as St, chooseLocation as T, RenderContext as Tn, removeStorageSync as Tt, requestPayment as U, authorize as Ut, previewImage as V, registerPage as Vt, requestSubscribeMessage as W, checkSession as Wt, setClipboardData as X, getDeviceInfo as Xt, scanCode as Y, getBatteryInfoSync as Yt, showActionSheet as Z, getFuzzyLocation as Zt, setBackgroundColor as _, setNavigationBarMetrics as _n, getStorageSync as _t, removeStyle as a, getUserInfo as an, clearStorageSync as at, setNavigationBarTitle as b, defineComponent as bn, navigateToMiniProgram as bt, canIUse as c, login as cn, createVKSession as ct, getExtConfig as d, onNetworkStatusChange as dn, downloadFile as dt, getNetworkType as en, showShareMenu as et, getExtConfigSync as f, onWindowResize as fn, exitMiniProgram as ft, reportAnalytics as g, NavigationBarMetrics as gn, getStorageInfoSync as gt, hideNavigationBarLoading as h, vibrateShort as hn, getStorageInfo as ht, injectStyle as i, getSystemSetting as in, clearStorage as it, getClipboardData as j, uploadFile as jt, compressImage as k, setButtonFormConfig as kn, startPullDownRefresh as kt, createInterstitialAd as l, offNetworkStatusChange as ln, createVideoContext as lt, getUpdateManager as m, openSetting as mn, getStorage as mt, RuntimeWarningOptions as n, getSystemInfo as nn, showToast as nt, RpxConfig as o, getUserProfile as on, createCanvasContext as ot, getLogManager as p, openAppAuthorizeSetting as pn, getFileSystemManager as pt, saveImageToPhotosAlbum as q, getAppBaseInfo as qt, setRuntimeWarningOptions as r, getSystemInfoSync as rn, updateShareMenu as rt, setupRpx as s, getWindowInfo as sn, createSelectorQuery as st, RuntimeWarningLevel as t, getSetting as tn, showTabBar as tt, createRewardedVideoAd as u, offWindowResize as un, createWorker as ut, setBackgroundTextStyle as v, getRuntimeExecutionMode as vn, hideKeyboard as vt, chooseImage as w, renderTemplate as wn, removeStorage as wt, showNavigationBarLoading as x, TemplateRenderer as xn, nextTick as xt, setNavigationBarColor as y, setRuntimeExecutionMode as yn, loadSubPackage as yt, openLocation as z, registerApp as zt };