@weapp-vite/web 1.4.20 → 1.4.21

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 (50) hide show
  1. package/dist/compiler/wxml/types.d.mts +1 -2
  2. package/dist/css/wxss.d.mts +3 -4
  3. package/dist/plugin/assets.d.mts +1 -2
  4. package/dist/plugin/index.d.mts +2 -2
  5. package/dist/plugin/types.d.mts +5 -6
  6. package/dist/runtime/button/index.d.mts +3 -4
  7. package/dist/runtime/component/index.d.mts +2 -2
  8. package/dist/runtime/component/types.d.mts +13 -14
  9. package/dist/runtime/execution.d.mts +3 -4
  10. package/dist/runtime/host/index.d.mts +9 -9
  11. package/dist/runtime/host/types.d.mts +4 -5
  12. package/dist/runtime/hostGlobals.d.mts +1 -2
  13. package/dist/runtime/legacyTemplate/index.d.mts +2 -3
  14. package/dist/runtime/legacyTemplate/types.d.mts +2 -3
  15. package/dist/runtime/nativeComponents/form.d.mts +1 -2
  16. package/dist/runtime/nativeComponents/image.d.mts +1 -2
  17. package/dist/runtime/nativeComponents/index.d.mts +2 -2
  18. package/dist/runtime/nativeComponents/input.d.mts +1 -2
  19. package/dist/runtime/nativeComponents/scrollView.d.mts +1 -2
  20. package/dist/runtime/nativeComponents/switch.d.mts +1 -2
  21. package/dist/runtime/nativeComponents/textarea.d.mts +1 -2
  22. package/dist/runtime/nativeComponents/video/helpers.d.mts +3 -4
  23. package/dist/runtime/navigationBar/index.d.mts +2 -2
  24. package/dist/runtime/pageLayout.d.mts +2 -3
  25. package/dist/runtime/polyfill/async.d.mts +1 -2
  26. package/dist/runtime/polyfill/deviceAuthSystemApi.d.mts +27 -28
  27. package/dist/runtime/polyfill/index.d.mts +15 -15
  28. package/dist/runtime/polyfill/routeRuntime/history.d.mts +8 -9
  29. package/dist/runtime/polyfill/routeRuntime/options.d.mts +8 -9
  30. package/dist/runtime/polyfill/routeRuntime.d.mts +11 -12
  31. package/dist/runtime/polyfill/runtimeDataApi.d.mts +28 -29
  32. package/dist/runtime/polyfill/types/base.d.mts +2 -3
  33. package/dist/runtime/polyfill/types/common.d.mts +26 -27
  34. package/dist/runtime/polyfill/types/locationRuntime.d.mts +34 -35
  35. package/dist/runtime/polyfill/types/mediaAuth.d.mts +34 -35
  36. package/dist/runtime/polyfill/types/platformRuntime.d.mts +25 -26
  37. package/dist/runtime/polyfill/types/systemAuth.d.mts +22 -23
  38. package/dist/runtime/polyfill/types/tabBarRuntime.d.mts +5 -6
  39. package/dist/runtime/polyfill/uiMediaApi.d.mts +42 -43
  40. package/dist/runtime/renderContext.d.mts +2 -3
  41. package/dist/runtime/rpx.d.mts +2 -3
  42. package/dist/runtime/seo/index.d.mts +11 -11
  43. package/dist/runtime/style.d.mts +2 -3
  44. package/dist/runtime/template.d.mts +3 -3
  45. package/dist/runtime/viewport/index.d.mts +4 -4
  46. package/dist/runtime/viewport/types.d.mts +2 -3
  47. package/dist/runtime/warning.d.mts +3 -4
  48. package/dist/runtime/wevu.d.mts +3 -4
  49. package/dist/shared/tabBar.d.mts +2 -3
  50. package/package.json +5 -5
@@ -1,30 +1,29 @@
1
1
  import "./options.mjs";
2
2
  //#region src/runtime/polyfill/routeRuntime/history.d.ts
3
- type WebRoutingMode = 'memory' | 'history' | 'hash';
4
- interface WebRoutingConfig {
3
+ export type WebRoutingMode = 'memory' | 'history' | 'hash';
4
+ export interface WebRoutingConfig {
5
5
  mode?: WebRoutingMode;
6
6
  /** 部署目录前缀,例如 /mini-program。 */
7
7
  base?: string;
8
8
  }
9
- interface ResolvedWebRoutingConfig {
9
+ export interface ResolvedWebRoutingConfig {
10
10
  mode: WebRoutingMode;
11
11
  base: string;
12
12
  }
13
- interface WebRouteTarget {
13
+ export interface WebRouteTarget {
14
14
  id: string;
15
15
  query: Record<string, string>;
16
16
  }
17
- interface WebRouteHistoryState {
17
+ export interface WebRouteHistoryState {
18
18
  __weappWebRuntime?: {
19
19
  stack: WebRouteTarget[];
20
20
  };
21
21
  }
22
- declare function resolveWebRoutingConfig(config?: WebRoutingConfig): ResolvedWebRoutingConfig;
23
- declare function disposeWebRouting(): void;
24
- declare function getWebRoutingConfig(): {
22
+ export declare function resolveWebRoutingConfig(config?: WebRoutingConfig): ResolvedWebRoutingConfig;
23
+ export declare function disposeWebRouting(): void;
24
+ export declare function getWebRoutingConfig(): {
25
25
  mode: WebRoutingMode;
26
26
  base: string;
27
27
  };
28
28
  //#endregion
29
- export { ResolvedWebRoutingConfig, WebRouteHistoryState, WebRouteTarget, WebRoutingConfig, WebRoutingMode, disposeWebRouting, getWebRoutingConfig, resolveWebRoutingConfig };
30
29
  //# sourceMappingURL=history.d.mts.map
@@ -4,13 +4,13 @@ import { ComponentOptions, ComponentPublicInstance } from "../../component/types
4
4
  import "../../component/index.mjs";
5
5
  import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "../types/base.mjs";
6
6
  //#region src/runtime/polyfill/routeRuntime/options.d.ts
7
- interface RegisterMeta {
7
+ export interface RegisterMeta {
8
8
  id: string;
9
9
  template?: TemplateRenderer;
10
10
  style?: string;
11
11
  navigationBar?: NavigationBarConfig;
12
12
  }
13
- interface PageHooks {
13
+ export interface PageHooks {
14
14
  onLoad?: (this: ComponentPublicInstance, query: Record<string, string>) => void;
15
15
  onReady?: (this: ComponentPublicInstance) => void;
16
16
  onShow?: (this: ComponentPublicInstance) => void;
@@ -22,23 +22,22 @@ interface AppLifecycleHooks {
22
22
  onShow?: (this: AppRuntime, options: AppLaunchOptions) => void;
23
23
  onHide?: (this: AppRuntime) => void;
24
24
  }
25
- type AppRuntime = Record<string, unknown> & Partial<AppLifecycleHooks> & {
25
+ export type AppRuntime = Record<string, unknown> & Partial<AppLifecycleHooks> & {
26
26
  globalData?: Record<string, unknown>;
27
27
  };
28
- interface AppLaunchOptions {
28
+ export interface AppLaunchOptions {
29
29
  path: string;
30
30
  scene: number;
31
31
  query: Record<string, string>;
32
32
  referrerInfo: Record<string, unknown>;
33
33
  }
34
- interface RouteOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
34
+ export interface RouteOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
35
35
  url: string;
36
36
  }
37
- interface NavigateBackOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
37
+ export interface NavigateBackOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
38
38
  delta?: number;
39
39
  }
40
- type PageRawOptions = ComponentOptions & PageHooks & Record<string, unknown>;
41
- type ComponentRawOptions = ComponentOptions & Record<string, unknown>;
40
+ export type PageRawOptions = ComponentOptions & PageHooks & Record<string, unknown>;
41
+ export type ComponentRawOptions = ComponentOptions & Record<string, unknown>;
42
42
  //#endregion
43
- export { AppLaunchOptions, AppRuntime, ComponentRawOptions, NavigateBackOptions, PageHooks, PageRawOptions, RegisterMeta, RouteOptions };
44
43
  //# sourceMappingURL=options.d.mts.map
@@ -7,7 +7,7 @@ import { ButtonFormConfig } from "../button/index.mjs";
7
7
  import { NavigationBarMetrics } from "../navigationBar/index.mjs";
8
8
  import { WebViewportConfig } from "../viewport/types.mjs";
9
9
  //#region src/runtime/polyfill/routeRuntime.d.ts
10
- declare function initializePageRoutes(ids: string[], options?: {
10
+ export declare function initializePageRoutes(ids: string[], options?: {
11
11
  rpx?: {
12
12
  designWidth?: number;
13
13
  varName?: string;
@@ -27,26 +27,25 @@ declare function initializePageRoutes(ids: string[], options?: {
27
27
  resourceHints?: WebResourceHintsConfig;
28
28
  };
29
29
  }): void;
30
- declare function registerPage<T extends PageRawOptions | undefined>(options: T, meta: RegisterMeta): T;
31
- declare function registerComponent<T extends ComponentRawOptions | undefined>(options: T, meta: RegisterMeta): T;
32
- declare function registerApp<T extends AppRuntime | undefined>(options: T, _meta?: RegisterMeta): T;
33
- declare function navigateTo(options: RouteOptions): Promise<{
30
+ export declare function registerPage<T extends PageRawOptions | undefined>(options: T, meta: RegisterMeta): T;
31
+ export declare function registerComponent<T extends ComponentRawOptions | undefined>(options: T, meta: RegisterMeta): T;
32
+ export declare function registerApp<T extends AppRuntime | undefined>(options: T, _meta?: RegisterMeta): T;
33
+ export declare function navigateTo(options: RouteOptions): Promise<{
34
34
  errMsg: string;
35
35
  }>;
36
- declare function redirectTo(options: RouteOptions): Promise<{
36
+ export declare function redirectTo(options: RouteOptions): Promise<{
37
37
  errMsg: string;
38
38
  }>;
39
- declare function reLaunch(options: RouteOptions): Promise<{
39
+ export declare function reLaunch(options: RouteOptions): Promise<{
40
40
  errMsg: string;
41
41
  }>;
42
- declare function switchTab(options: RouteOptions): Promise<{
42
+ export declare function switchTab(options: RouteOptions): Promise<{
43
43
  errMsg: string;
44
44
  }>;
45
- declare function navigateBack(options?: NavigateBackOptions): Promise<{
45
+ export declare function navigateBack(options?: NavigateBackOptions): Promise<{
46
46
  errMsg: string;
47
47
  }>;
48
- declare function getLaunchOptionsSync(): AppLaunchOptions;
49
- declare function getEnterOptionsSync(): AppLaunchOptions;
48
+ export declare function getLaunchOptionsSync(): AppLaunchOptions;
49
+ export declare function getEnterOptionsSync(): AppLaunchOptions;
50
50
  //#endregion
51
- export { getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab };
52
51
  //# sourceMappingURL=routeRuntime.d.mts.map
@@ -3,76 +3,75 @@ import { DownloadFileOptions, FileSystemManager, GetStorageOptions, RemoveStorag
3
3
  import { LoadSubPackageOptions, NavigateToMiniProgramOptions, PreloadSubpackageOptions } from "./types/locationRuntime.mjs";
4
4
  import { CanvasContext, PageScrollToOptions, SelectorQuery, VideoContext, VkSession } from "./types/platformRuntime.mjs";
5
5
  //#region src/runtime/polyfill/runtimeDataApi.d.ts
6
- declare function navigateToMiniProgram(options?: NavigateToMiniProgramOptions): Promise<{
6
+ export declare function navigateToMiniProgram(options?: NavigateToMiniProgramOptions): Promise<{
7
7
  errMsg: string;
8
8
  }>;
9
- declare function exitMiniProgram(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
9
+ export declare function exitMiniProgram(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
10
10
  errMsg: string;
11
11
  }>;
12
- declare function nextTick(callback?: () => void): void;
13
- declare function startPullDownRefresh(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
12
+ export declare function nextTick(callback?: () => void): void;
13
+ export declare function startPullDownRefresh(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
14
14
  errMsg: string;
15
15
  }>;
16
- declare function stopPullDownRefresh(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
16
+ export declare function stopPullDownRefresh(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
17
17
  errMsg: string;
18
18
  }>;
19
- declare function hideKeyboard(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
19
+ export declare function hideKeyboard(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
20
20
  errMsg: string;
21
21
  }>;
22
- declare function loadSubPackage(options?: LoadSubPackageOptions): Promise<{
22
+ export declare function loadSubPackage(options?: LoadSubPackageOptions): Promise<{
23
23
  errMsg: string;
24
24
  }>;
25
- declare function preloadSubpackage(options?: PreloadSubpackageOptions): Promise<{
25
+ export declare function preloadSubpackage(options?: PreloadSubpackageOptions): Promise<{
26
26
  errMsg: string;
27
27
  }>;
28
- declare function pageScrollTo(options?: PageScrollToOptions): Promise<unknown>;
29
- declare function createSelectorQuery(): SelectorQuery;
30
- declare function createCanvasContext(canvasId: string): CanvasContext;
31
- declare function createVideoContext(videoId: string): VideoContext;
32
- declare function setStorageSync(key: string, data: any): void;
33
- declare function getStorageSync(key: string): any;
34
- declare function removeStorageSync(key: string): void;
35
- declare function clearStorageSync(): void;
36
- declare function getStorageInfoSync(): StorageInfoResult;
37
- declare function setStorage(options?: SetStorageOptions): Promise<{
28
+ export declare function pageScrollTo(options?: PageScrollToOptions): Promise<unknown>;
29
+ export declare function createSelectorQuery(): SelectorQuery;
30
+ export declare function createCanvasContext(canvasId: string): CanvasContext;
31
+ export declare function createVideoContext(videoId: string): VideoContext;
32
+ export declare function setStorageSync(key: string, data: any): void;
33
+ export declare function getStorageSync(key: string): any;
34
+ export declare function removeStorageSync(key: string): void;
35
+ export declare function clearStorageSync(): void;
36
+ export declare function getStorageInfoSync(): StorageInfoResult;
37
+ export declare function setStorage(options?: SetStorageOptions): Promise<{
38
38
  errMsg: string;
39
39
  }>;
40
- declare function getStorage(options?: GetStorageOptions): Promise<{
40
+ export declare function getStorage(options?: GetStorageOptions): Promise<{
41
41
  errMsg: string;
42
42
  data: any;
43
43
  }>;
44
- declare function removeStorage(options?: RemoveStorageOptions): Promise<{
44
+ export declare function removeStorage(options?: RemoveStorageOptions): Promise<{
45
45
  errMsg: string;
46
46
  }>;
47
- declare function clearStorage(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
47
+ export declare function clearStorage(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>): Promise<{
48
48
  errMsg: string;
49
49
  }>;
50
- declare function getStorageInfo(options?: MiniProgramAsyncOptions<StorageInfoResult>): Promise<{
50
+ export declare function getStorageInfo(options?: MiniProgramAsyncOptions<StorageInfoResult>): Promise<{
51
51
  errMsg: string;
52
52
  keys: string[];
53
53
  currentSize: number;
54
54
  limitSize: number;
55
55
  }>;
56
- declare function getFileSystemManager(): FileSystemManager;
57
- declare function createWorker(path: string): WorkerBridge;
58
- declare function createVKSession(_options?: Record<string, unknown>): VkSession;
59
- declare function request(options?: RequestOptions): Promise<{
56
+ export declare function getFileSystemManager(): FileSystemManager;
57
+ export declare function createWorker(path: string): WorkerBridge;
58
+ export declare function createVKSession(_options?: Record<string, unknown>): VkSession;
59
+ export declare function request(options?: RequestOptions): Promise<{
60
60
  errMsg: string;
61
61
  data: any;
62
62
  statusCode: number;
63
63
  header: Record<string, string>;
64
64
  }>;
65
- declare function downloadFile(options?: DownloadFileOptions): Promise<{
65
+ export declare function downloadFile(options?: DownloadFileOptions): Promise<{
66
66
  errMsg: string;
67
67
  tempFilePath: string;
68
68
  statusCode: number;
69
69
  }>;
70
- declare function uploadFile(options?: UploadFileOptions): Promise<{
70
+ export declare function uploadFile(options?: UploadFileOptions): Promise<{
71
71
  errMsg: string;
72
72
  data: string;
73
73
  statusCode: number;
74
74
  header: Record<string, string>;
75
75
  }>;
76
76
  //#endregion
77
- export { clearStorage, clearStorageSync, createCanvasContext, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getFileSystemManager, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, hideKeyboard, loadSubPackage, navigateToMiniProgram, nextTick, pageScrollTo, preloadSubpackage, removeStorage, removeStorageSync, request, setStorage, setStorageSync, startPullDownRefresh, stopPullDownRefresh, uploadFile };
78
77
  //# sourceMappingURL=runtimeDataApi.d.mts.map
@@ -1,12 +1,11 @@
1
1
  //#region src/runtime/polyfill/types/base.d.ts
2
- interface MiniProgramBaseResult {
2
+ export interface MiniProgramBaseResult {
3
3
  errMsg: string;
4
4
  }
5
- interface MiniProgramAsyncOptions<SuccessResult extends MiniProgramBaseResult> {
5
+ export interface MiniProgramAsyncOptions<SuccessResult extends MiniProgramBaseResult> {
6
6
  success?: (result: SuccessResult) => void;
7
7
  fail?: (result: MiniProgramBaseResult) => void;
8
8
  complete?: (result: SuccessResult | MiniProgramBaseResult) => void;
9
9
  }
10
10
  //#endregion
11
- export { MiniProgramAsyncOptions, MiniProgramBaseResult };
12
11
  //# sourceMappingURL=base.d.mts.map
@@ -1,63 +1,63 @@
1
1
  import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
2
2
  //#region src/runtime/polyfill/types/common.d.ts
3
- interface ShowToastOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
3
+ export interface ShowToastOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
4
4
  title?: string;
5
5
  icon?: 'success' | 'error' | 'none';
6
6
  duration?: number;
7
7
  }
8
- interface SetClipboardDataOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
8
+ export interface SetClipboardDataOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
9
9
  data?: string;
10
10
  }
11
- interface GetClipboardDataSuccessResult extends MiniProgramBaseResult {
11
+ export interface GetClipboardDataSuccessResult extends MiniProgramBaseResult {
12
12
  data: string;
13
13
  }
14
- interface GetClipboardDataOptions extends MiniProgramAsyncOptions<GetClipboardDataSuccessResult> {}
15
- interface SetStorageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
14
+ export interface GetClipboardDataOptions extends MiniProgramAsyncOptions<GetClipboardDataSuccessResult> {}
15
+ export interface SetStorageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
16
16
  key?: string;
17
17
  data?: any;
18
18
  }
19
- interface GetStorageSuccessResult extends MiniProgramBaseResult {
19
+ export interface GetStorageSuccessResult extends MiniProgramBaseResult {
20
20
  data: any;
21
21
  }
22
- interface GetStorageOptions extends MiniProgramAsyncOptions<GetStorageSuccessResult> {
22
+ export interface GetStorageOptions extends MiniProgramAsyncOptions<GetStorageSuccessResult> {
23
23
  key?: string;
24
24
  }
25
- interface RemoveStorageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
25
+ export interface RemoveStorageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
26
26
  key?: string;
27
27
  }
28
- interface StorageInfoResult extends MiniProgramBaseResult {
28
+ export interface StorageInfoResult extends MiniProgramBaseResult {
29
29
  keys: string[];
30
30
  currentSize: number;
31
31
  limitSize: number;
32
32
  }
33
- interface FileReadResult extends MiniProgramBaseResult {
33
+ export interface FileReadResult extends MiniProgramBaseResult {
34
34
  data: string | ArrayBuffer;
35
35
  }
36
- interface FileWriteOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
36
+ export interface FileWriteOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
37
37
  filePath?: string;
38
38
  data?: string | ArrayBuffer | ArrayBufferView;
39
39
  encoding?: string;
40
40
  }
41
- interface FileReadOptions extends MiniProgramAsyncOptions<FileReadResult> {
41
+ export interface FileReadOptions extends MiniProgramAsyncOptions<FileReadResult> {
42
42
  filePath?: string;
43
43
  encoding?: string;
44
44
  }
45
- interface FileSystemManager {
45
+ export interface FileSystemManager {
46
46
  writeFile: (options?: FileWriteOptions) => void;
47
47
  readFile: (options?: FileReadOptions) => void;
48
48
  writeFileSync: (filePath: string, data: string | ArrayBuffer | ArrayBufferView, encoding?: string) => void;
49
49
  readFileSync: (filePath: string, encoding?: string) => string | ArrayBuffer;
50
50
  }
51
- type WorkerMessageCallback = (result: {
51
+ export type WorkerMessageCallback = (result: {
52
52
  data: unknown;
53
53
  }) => void;
54
- type WorkerErrorCallback = (result: {
54
+ export type WorkerErrorCallback = (result: {
55
55
  message: string;
56
56
  filename?: string;
57
57
  lineno?: number;
58
58
  colno?: number;
59
59
  }) => void;
60
- interface WorkerBridge {
60
+ export interface WorkerBridge {
61
61
  postMessage: (data: unknown) => void;
62
62
  terminate: () => void;
63
63
  onMessage: (callback: WorkerMessageCallback) => void;
@@ -65,12 +65,12 @@ interface WorkerBridge {
65
65
  onError: (callback: WorkerErrorCallback) => void;
66
66
  offError: (callback?: WorkerErrorCallback) => void;
67
67
  }
68
- interface RequestSuccessResult extends MiniProgramBaseResult {
68
+ export interface RequestSuccessResult extends MiniProgramBaseResult {
69
69
  data: any;
70
70
  statusCode: number;
71
71
  header: Record<string, string>;
72
72
  }
73
- interface RequestOptions extends MiniProgramAsyncOptions<RequestSuccessResult> {
73
+ export interface RequestOptions extends MiniProgramAsyncOptions<RequestSuccessResult> {
74
74
  url?: string;
75
75
  method?: string;
76
76
  data?: any;
@@ -79,21 +79,21 @@ interface RequestOptions extends MiniProgramAsyncOptions<RequestSuccessResult> {
79
79
  dataType?: 'json' | 'text';
80
80
  responseType?: 'text' | 'arraybuffer';
81
81
  }
82
- interface DownloadFileSuccessResult extends MiniProgramBaseResult {
82
+ export interface DownloadFileSuccessResult extends MiniProgramBaseResult {
83
83
  tempFilePath: string;
84
84
  statusCode: number;
85
85
  }
86
- interface DownloadFileOptions extends MiniProgramAsyncOptions<DownloadFileSuccessResult> {
86
+ export interface DownloadFileOptions extends MiniProgramAsyncOptions<DownloadFileSuccessResult> {
87
87
  url?: string;
88
88
  header?: Record<string, string>;
89
89
  timeout?: number;
90
90
  }
91
- interface UploadFileSuccessResult extends MiniProgramBaseResult {
91
+ export interface UploadFileSuccessResult extends MiniProgramBaseResult {
92
92
  data: string;
93
93
  statusCode: number;
94
94
  header: Record<string, string>;
95
95
  }
96
- interface UploadFileOptions extends MiniProgramAsyncOptions<UploadFileSuccessResult> {
96
+ export interface UploadFileOptions extends MiniProgramAsyncOptions<UploadFileSuccessResult> {
97
97
  url?: string;
98
98
  filePath?: string;
99
99
  name?: string;
@@ -101,25 +101,24 @@ interface UploadFileOptions extends MiniProgramAsyncOptions<UploadFileSuccessRes
101
101
  formData?: Record<string, unknown>;
102
102
  timeout?: number;
103
103
  }
104
- interface PreviewImageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
104
+ export interface PreviewImageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
105
105
  current?: string;
106
106
  urls?: string[];
107
107
  }
108
- interface ChooseImageTempFile {
108
+ export interface ChooseImageTempFile {
109
109
  path: string;
110
110
  size: number;
111
111
  type: string;
112
112
  name: string;
113
113
  }
114
- interface ChooseImageSuccessResult extends MiniProgramBaseResult {
114
+ export interface ChooseImageSuccessResult extends MiniProgramBaseResult {
115
115
  tempFilePaths: string[];
116
116
  tempFiles: ChooseImageTempFile[];
117
117
  }
118
- interface ChooseImageOptions extends MiniProgramAsyncOptions<ChooseImageSuccessResult> {
118
+ export interface ChooseImageOptions extends MiniProgramAsyncOptions<ChooseImageSuccessResult> {
119
119
  count?: number;
120
120
  sizeType?: Array<'original' | 'compressed'>;
121
121
  sourceType?: Array<'album' | 'camera'>;
122
122
  }
123
123
  //#endregion
124
- export { ChooseImageOptions, ChooseImageSuccessResult, ChooseImageTempFile, DownloadFileOptions, DownloadFileSuccessResult, FileReadOptions, FileReadResult, FileSystemManager, FileWriteOptions, GetClipboardDataOptions, GetClipboardDataSuccessResult, GetStorageOptions, GetStorageSuccessResult, PreviewImageOptions, RemoveStorageOptions, RequestOptions, RequestSuccessResult, SetClipboardDataOptions, SetStorageOptions, ShowToastOptions, StorageInfoResult, UploadFileOptions, UploadFileSuccessResult, WorkerBridge, WorkerErrorCallback, WorkerMessageCallback };
125
124
  //# sourceMappingURL=common.d.mts.map
@@ -1,6 +1,6 @@
1
1
  import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
2
2
  //#region src/runtime/polyfill/types/locationRuntime.d.ts
3
- interface GetLocationSuccessResult extends MiniProgramBaseResult {
3
+ export interface GetLocationSuccessResult extends MiniProgramBaseResult {
4
4
  latitude: number;
5
5
  longitude: number;
6
6
  speed: number;
@@ -9,27 +9,27 @@ interface GetLocationSuccessResult extends MiniProgramBaseResult {
9
9
  verticalAccuracy: number;
10
10
  horizontalAccuracy: number;
11
11
  }
12
- interface GetLocationOptions extends MiniProgramAsyncOptions<GetLocationSuccessResult> {
12
+ export interface GetLocationOptions extends MiniProgramAsyncOptions<GetLocationSuccessResult> {
13
13
  type?: 'wgs84' | 'gcj02';
14
14
  altitude?: boolean;
15
15
  isHighAccuracy?: boolean;
16
16
  highAccuracyExpireTime?: number;
17
17
  }
18
- interface GetFuzzyLocationSuccessResult extends MiniProgramBaseResult {
18
+ export interface GetFuzzyLocationSuccessResult extends MiniProgramBaseResult {
19
19
  latitude: number;
20
20
  longitude: number;
21
21
  accuracy: number;
22
22
  }
23
- interface GetFuzzyLocationOptions extends MiniProgramAsyncOptions<GetFuzzyLocationSuccessResult> {}
24
- type NetworkType = 'wifi' | '2g' | '3g' | '4g' | '5g' | 'unknown' | 'none';
25
- interface NetworkStatusResult {
23
+ export interface GetFuzzyLocationOptions extends MiniProgramAsyncOptions<GetFuzzyLocationSuccessResult> {}
24
+ export type NetworkType = 'wifi' | '2g' | '3g' | '4g' | '5g' | 'unknown' | 'none';
25
+ export interface NetworkStatusResult {
26
26
  isConnected: boolean;
27
27
  networkType: NetworkType;
28
28
  }
29
- interface GetNetworkTypeSuccessResult extends MiniProgramBaseResult, NetworkStatusResult {}
30
- interface GetNetworkTypeOptions extends MiniProgramAsyncOptions<GetNetworkTypeSuccessResult> {}
31
- type NetworkStatusChangeCallback = (result: NetworkStatusResult) => void;
32
- interface WindowResizeResult {
29
+ export interface GetNetworkTypeSuccessResult extends MiniProgramBaseResult, NetworkStatusResult {}
30
+ export interface GetNetworkTypeOptions extends MiniProgramAsyncOptions<GetNetworkTypeSuccessResult> {}
31
+ export type NetworkStatusChangeCallback = (result: NetworkStatusResult) => void;
32
+ export interface WindowResizeResult {
33
33
  size: {
34
34
  windowWidth: number;
35
35
  windowHeight: number;
@@ -37,63 +37,63 @@ interface WindowResizeResult {
37
37
  windowWidth: number;
38
38
  windowHeight: number;
39
39
  }
40
- type WindowResizeCallback = (result: WindowResizeResult) => void;
41
- interface ShowLoadingOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
40
+ export type WindowResizeCallback = (result: WindowResizeResult) => void;
41
+ export interface ShowLoadingOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
42
42
  title?: string;
43
43
  mask?: boolean;
44
44
  }
45
- interface SetBackgroundColorOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
45
+ export interface SetBackgroundColorOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
46
46
  backgroundColor?: string;
47
47
  backgroundColorTop?: string;
48
48
  backgroundColorBottom?: string;
49
49
  }
50
- interface SetBackgroundTextStyleOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
50
+ export interface SetBackgroundTextStyleOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
51
51
  textStyle?: 'dark' | 'light';
52
52
  }
53
- interface ShareMenuOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
53
+ export interface ShareMenuOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
54
54
  withShareTicket?: boolean;
55
55
  menus?: string[];
56
56
  }
57
- interface NavigateToMiniProgramOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
57
+ export interface NavigateToMiniProgramOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
58
58
  appId?: string;
59
59
  path?: string;
60
60
  extraData?: Record<string, any>;
61
61
  envVersion?: 'develop' | 'trial' | 'release';
62
62
  }
63
- interface LoadSubPackageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
63
+ export interface LoadSubPackageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
64
64
  name?: string;
65
65
  root?: string;
66
66
  }
67
- interface PreloadSubpackageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
67
+ export interface PreloadSubpackageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
68
68
  name?: string;
69
69
  root?: string;
70
70
  }
71
- interface UpdateManagerCheckResult {
71
+ export interface UpdateManagerCheckResult {
72
72
  hasUpdate: boolean;
73
73
  }
74
- interface UpdateManager {
74
+ export interface UpdateManager {
75
75
  applyUpdate: () => void;
76
76
  onCheckForUpdate: (callback: (result: UpdateManagerCheckResult) => void) => void;
77
77
  onUpdateReady: (callback: () => void) => void;
78
78
  onUpdateFailed: (callback: () => void) => void;
79
79
  }
80
- interface LogManagerOptions {
80
+ export interface LogManagerOptions {
81
81
  level?: 0 | 1;
82
82
  }
83
- interface LogManager {
83
+ export interface LogManager {
84
84
  debug: (...args: unknown[]) => void;
85
85
  info: (...args: unknown[]) => void;
86
86
  log: (...args: unknown[]) => void;
87
87
  warn: (...args: unknown[]) => void;
88
88
  }
89
- interface ChooseLocationSuccessResult extends MiniProgramBaseResult {
89
+ export interface ChooseLocationSuccessResult extends MiniProgramBaseResult {
90
90
  name: string;
91
91
  address: string;
92
92
  latitude: number;
93
93
  longitude: number;
94
94
  }
95
- interface ChooseLocationOptions extends MiniProgramAsyncOptions<ChooseLocationSuccessResult> {}
96
- interface ChooseAddressSuccessResult extends MiniProgramBaseResult {
95
+ export interface ChooseLocationOptions extends MiniProgramAsyncOptions<ChooseLocationSuccessResult> {}
96
+ export interface ChooseAddressSuccessResult extends MiniProgramBaseResult {
97
97
  userName: string;
98
98
  postalCode: string;
99
99
  provinceName: string;
@@ -103,45 +103,44 @@ interface ChooseAddressSuccessResult extends MiniProgramBaseResult {
103
103
  nationalCode: string;
104
104
  telNumber: string;
105
105
  }
106
- interface ChooseAddressOptions extends MiniProgramAsyncOptions<ChooseAddressSuccessResult> {}
107
- interface GetImageInfoSuccessResult extends MiniProgramBaseResult {
106
+ export interface ChooseAddressOptions extends MiniProgramAsyncOptions<ChooseAddressSuccessResult> {}
107
+ export interface GetImageInfoSuccessResult extends MiniProgramBaseResult {
108
108
  width: number;
109
109
  height: number;
110
110
  path: string;
111
111
  type: string;
112
112
  orientation: 'up';
113
113
  }
114
- interface GetImageInfoOptions extends MiniProgramAsyncOptions<GetImageInfoSuccessResult> {
114
+ export interface GetImageInfoOptions extends MiniProgramAsyncOptions<GetImageInfoSuccessResult> {
115
115
  src?: string;
116
116
  }
117
- interface MakePhoneCallOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
117
+ export interface MakePhoneCallOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
118
118
  phoneNumber?: string;
119
119
  }
120
- interface OpenLocationOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
120
+ export interface OpenLocationOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
121
121
  latitude?: number;
122
122
  longitude?: number;
123
123
  scale?: number;
124
124
  name?: string;
125
125
  address?: string;
126
126
  }
127
- interface OpenCustomerServiceChatOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
127
+ export interface OpenCustomerServiceChatOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
128
128
  corpId?: string;
129
129
  extInfo?: Record<string, any>;
130
130
  url?: string;
131
131
  }
132
- interface RequestPaymentOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
132
+ export interface RequestPaymentOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
133
133
  timeStamp?: string;
134
134
  nonceStr?: string;
135
135
  package?: string;
136
136
  signType?: string;
137
137
  paySign?: string;
138
138
  }
139
- interface RequestSubscribeMessageSuccessResult extends MiniProgramBaseResult {
139
+ export interface RequestSubscribeMessageSuccessResult extends MiniProgramBaseResult {
140
140
  [tmplId: string]: string;
141
141
  }
142
- interface RequestSubscribeMessageOptions extends MiniProgramAsyncOptions<RequestSubscribeMessageSuccessResult> {
142
+ export interface RequestSubscribeMessageOptions extends MiniProgramAsyncOptions<RequestSubscribeMessageSuccessResult> {
143
143
  tmplIds?: string[];
144
144
  }
145
145
  //#endregion
146
- export { ChooseAddressOptions, ChooseAddressSuccessResult, ChooseLocationOptions, ChooseLocationSuccessResult, GetFuzzyLocationOptions, GetFuzzyLocationSuccessResult, GetImageInfoOptions, GetImageInfoSuccessResult, GetLocationOptions, GetLocationSuccessResult, GetNetworkTypeOptions, GetNetworkTypeSuccessResult, LoadSubPackageOptions, LogManager, LogManagerOptions, MakePhoneCallOptions, NavigateToMiniProgramOptions, NetworkStatusChangeCallback, NetworkStatusResult, NetworkType, OpenCustomerServiceChatOptions, OpenLocationOptions, PreloadSubpackageOptions, RequestPaymentOptions, RequestSubscribeMessageOptions, RequestSubscribeMessageSuccessResult, SetBackgroundColorOptions, SetBackgroundTextStyleOptions, ShareMenuOptions, ShowLoadingOptions, UpdateManager, UpdateManagerCheckResult, WindowResizeCallback, WindowResizeResult };
147
146
  //# sourceMappingURL=locationRuntime.d.mts.map