@dcloudio/uni-app-x 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.env +2 -0
  2. package/index.d.ts +1 -2
  3. package/package.json +15 -2
  4. package/types/index.d.ts +4 -0
  5. package/{native → types/native}/CustomEvent.d.ts +6 -0
  6. package/types/native/DrawableContext.d.ts +46 -0
  7. package/{native → types/native}/IPageManager.d.ts +3 -0
  8. package/types/native/RefresherEvent.d.ts +10 -0
  9. package/{native → types/native}/ResizeEvent.d.ts +2 -0
  10. package/types/native/ScrollEvent.d.ts +15 -0
  11. package/types/native/ScrollToLowerEvent.d.ts +10 -0
  12. package/types/native/ScrollToUpperEvent.d.ts +10 -0
  13. package/{native → types/native}/index.d.ts +4 -1
  14. package/types/uni/base/index.d.ts +3 -0
  15. package/types/uni/core/index.d.ts +9 -0
  16. package/types/uni/core/lib/base/event/index.d.ts +15 -0
  17. package/types/uni/core/lib/base/event/interface.d.ts +40 -0
  18. package/types/uni/core/lib/interface.d.ts +16 -0
  19. package/types/uni/core/lib/lifecycle/index.d.ts +9 -0
  20. package/types/uni/core/lib/lifecycle/interface.d.ts +12 -0
  21. package/types/uni/core/lib/route/index.d.ts +65 -0
  22. package/types/uni/core/lib/route/interface.d.ts +208 -0
  23. package/types/uni/core/lib/ui/create-selector-query/index.d.ts +15 -0
  24. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +172 -0
  25. package/types/uni/core/lib/ui/load-font-face/index.d.ts +25 -0
  26. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +59 -0
  27. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +23 -0
  28. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +52 -0
  29. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +25 -0
  30. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +52 -0
  31. package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +23 -0
  32. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +56 -0
  33. package/types/uni/core/lib/ui/tab-bar/index.d.ts +145 -0
  34. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +442 -0
  35. package/types/uni/ext/index.d.ts +19 -0
  36. package/types/uni/ext/lib/uni-audio/utssdk/index.d.ts +13 -0
  37. package/types/uni/ext/lib/uni-audio/utssdk/interface.d.ts +804 -0
  38. package/types/uni/ext/lib/uni-exit/utssdk/index.d.ts +19 -0
  39. package/types/uni/ext/lib/uni-exit/utssdk/interface.d.ts +63 -0
  40. package/types/uni/ext/lib/uni-file-manager/utssdk/index.d.ts +33 -0
  41. package/types/uni/ext/lib/uni-file-manager/utssdk/interface.d.ts +132 -0
  42. package/types/uni/ext/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +9 -0
  43. package/types/uni/ext/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +31 -0
  44. package/types/uni/ext/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +11 -0
  45. package/types/uni/ext/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +135 -0
  46. package/types/uni/ext/lib/uni-getAppBaseInfo/utssdk/index.d.ts +13 -0
  47. package/types/uni/ext/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +120 -0
  48. package/types/uni/ext/lib/uni-getDeviceInfo/utssdk/index.d.ts +13 -0
  49. package/types/uni/ext/lib/uni-getDeviceInfo/utssdk/interface.d.ts +144 -0
  50. package/types/uni/ext/lib/uni-getLocation-system/utssdk/index.d.ts +15 -0
  51. package/types/uni/ext/lib/uni-getLocation-system/utssdk/interface.d.ts +99 -0
  52. package/types/uni/ext/lib/uni-getLocation-tencent/utssdk/index.d.ts +15 -0
  53. package/types/uni/ext/lib/uni-getLocation-tencent/utssdk/interface.d.ts +93 -0
  54. package/types/uni/ext/lib/uni-getNetworkType/utssdk/index.d.ts +23 -0
  55. package/types/uni/ext/lib/uni-getNetworkType/utssdk/interface.d.ts +67 -0
  56. package/types/uni/ext/lib/uni-getRecorderManager/utssdk/index.d.ts +13 -0
  57. package/types/uni/ext/lib/uni-getRecorderManager/utssdk/interface.d.ts +213 -0
  58. package/types/uni/ext/lib/uni-getSystemInfo/utssdk/index.d.ts +29 -0
  59. package/types/uni/ext/lib/uni-getSystemInfo/utssdk/interface.d.ts +517 -0
  60. package/types/uni/ext/lib/uni-getSystemSetting/utssdk/index.d.ts +11 -0
  61. package/types/uni/ext/lib/uni-getSystemSetting/utssdk/interface.d.ts +61 -0
  62. package/types/uni/ext/lib/uni-media/utssdk/index.d.ts +93 -0
  63. package/types/uni/ext/lib/uni-media/utssdk/interface.d.ts +877 -0
  64. package/types/uni/ext/lib/uni-network/utssdk/index.d.ts +61 -0
  65. package/types/uni/ext/lib/uni-network/utssdk/interface.d.ts +569 -0
  66. package/types/uni/ext/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +23 -0
  67. package/types/uni/ext/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +67 -0
  68. package/types/uni/ext/lib/uni-prompt/utssdk/index.d.ts +69 -0
  69. package/types/uni/ext/lib/uni-prompt/utssdk/interface.d.ts +686 -0
  70. package/types/uni/ext/lib/uni-storage/utssdk/index.d.ts +87 -0
  71. package/types/uni/ext/lib/uni-storage/utssdk/interface.d.ts +575 -0
  72. package/types/uni/ext/lib/uni-websocket/utssdk/index.d.ts +49 -0
  73. package/types/uni/ext/lib/uni-websocket/utssdk/interface.d.ts +511 -0
  74. package/types/uni/index.d.ts +3 -0
  75. package/types/uni-cloud/index.d.ts +274 -0
  76. package/{vue → types/vue}/CheckboxGroupChangeEvent.d.ts +9 -3
  77. package/types/vue/PickerViewChangeEvent.d.ts +16 -0
  78. package/types/vue/ProgressActiveendEvent.d.ts +16 -0
  79. package/types/vue/RadioGroupChangeEvent.d.ts +16 -0
  80. package/types/vue/SliderChangeEvent.d.ts +16 -0
  81. package/types/vue/SwitchChangeEvent.d.ts +16 -0
  82. package/types/vue/index.d.ts +6 -0
  83. package/vue/index.d.ts +0 -1
  84. /package/{native → types/native}/Event.d.ts +0 -0
  85. /package/{native → types/native}/IApp.d.ts +0 -0
  86. /package/{native → types/native}/IDocument.d.ts +0 -0
  87. /package/{native → types/native}/INode.d.ts +0 -0
  88. /package/{native → types/native}/IPage.d.ts +0 -0
  89. /package/{native → types/native}/ITabsNode.d.ts +0 -0
  90. /package/{native → types/native}/MouseEvent.d.ts +0 -0
  91. /package/{native → types/native}/NodeData.d.ts +0 -0
  92. /package/{native → types/native}/PageEvent.d.ts +0 -0
  93. /package/{native → types/native}/PageScrollEvent.d.ts +0 -0
  94. /package/{native → types/native}/TabTapEvent.d.ts +0 -0
  95. /package/{native → types/native}/TouchEvent.d.ts +0 -0
  96. /package/{native → types/native}/UniAppManager.d.ts +0 -0
@@ -0,0 +1,274 @@
1
+ type UniCloudInitOptions = {
2
+ /**
3
+ * 服务商,目前支持 aliyun、tencent
4
+ */
5
+ provider: string;
6
+ /**
7
+ * 服务空间名
8
+ */
9
+ spaceName?: string;
10
+ /**
11
+ * 服务空间id
12
+ */
13
+ spaceId: string;
14
+ /**
15
+ * 阿里云clientSecret
16
+ */
17
+ clientSecret?: string;
18
+ /**
19
+ * 阿里云endpoint
20
+ */
21
+ endpoint?: string;
22
+ };
23
+ type UniCloudCallFunctionOptions = {
24
+ /**
25
+ * 云函数名
26
+ */
27
+ name: string;
28
+ /**
29
+ * 云函数参数
30
+ */
31
+ data?: UTSJSONObject;
32
+ };
33
+ type UniCloudCallFunctionResult = {
34
+ /**
35
+ * 云函数返回结果
36
+ */
37
+ result: UTSJSONObject;
38
+ /**
39
+ * 云函数请求id
40
+ */
41
+ requestId?: string;
42
+ };
43
+ type UniCloudUploadProgress = {
44
+ /**
45
+ * 已上传大小
46
+ */
47
+ loaded: number;
48
+ /**
49
+ * 总大小
50
+ */
51
+ total: number;
52
+ };
53
+ type UniCloudUploadFileOptions = {
54
+ /**
55
+ * 文件路径
56
+ */
57
+ filePath: string;
58
+ /**
59
+ * 云端路径
60
+ */
61
+ cloudPath: string;
62
+ /**
63
+ * 是否以云端路径是否为真实路径保存上传的文件
64
+ */
65
+ cloudPathAsRealPath?: boolean;
66
+ /**
67
+ * 上传进度回调
68
+ * @param options 上传进度回调参数
69
+ * @returns
70
+ */
71
+ onUploadProgress?: (options: UniCloudUploadProgress) => any;
72
+ };
73
+ type UniCloudUploadFileResult = {
74
+ /**
75
+ * 文件路径
76
+ */
77
+ filePath: string;
78
+ /**
79
+ * 文件id
80
+ */
81
+ fileID: string;
82
+ };
83
+ type UniCloudGetTempFileURLOptions = {
84
+ /**
85
+ * 文件列表
86
+ */
87
+ fileList: Array<string>;
88
+ };
89
+ type UniCloudGetTempFileURLResultItem = {
90
+ /**
91
+ * 文件id
92
+ */
93
+ fileID: string;
94
+ /**
95
+ * 文件临时url
96
+ */
97
+ tempFileURL: string;
98
+ };
99
+ type UniCloudGetTempFileURLResult = {
100
+ /**
101
+ * 文件列表
102
+ */
103
+ fileList: Array<UniCloudGetTempFileURLResultItem>;
104
+ };
105
+
106
+ // export const UTSPromise = Promise
107
+ type UTSPromise<T> = Promise<T>;
108
+
109
+ type UniCloudCallback = (arg?: any) => any | null;
110
+
111
+ declare class UniCloudError extends Error {
112
+ code: any;
113
+ errMsg: string;
114
+ errCode?: any;
115
+ errSubject?: string;
116
+ requestId?: string;
117
+ constructor(message: string, code?: string, subject?: string, options?: UTSJSONObject);
118
+ private _init;
119
+ toJson(): UTSJSONObject;
120
+ }
121
+
122
+ declare class UniCloud {
123
+ private _client;
124
+ private _provider;
125
+ private _spaceId;
126
+ config: UniCloudInitOptions;
127
+ constructor(options: UniCloudInitOptions);
128
+ /**
129
+ * 请求云函数
130
+ * @description 请求云函数
131
+ * @uniPlatform {
132
+ * "app": {
133
+ * "android": {
134
+ * "osVer": "4.4",
135
+ * "uniVer": "√",
136
+ * "unixVer": "3.9.0 仅支持阿里云"
137
+ * },
138
+ * "ios": {
139
+ * "uniVer": "√",
140
+ * "unixVer": "x"
141
+ * }
142
+ * }
143
+ * }
144
+ */
145
+ callFunction(options: UniCloudCallFunctionOptions): UTSPromise<UniCloudCallFunctionResult>;
146
+ /**
147
+ * 上传文件到云存储
148
+ * @description 上传文件到云存储
149
+ * @uniPlatform {
150
+ * "app": {
151
+ * "android": {
152
+ * "osVer": "4.4",
153
+ * "uniVer": "√",
154
+ * "unixVer": "3.9.0 仅支持阿里云"
155
+ * },
156
+ * "ios": {
157
+ * "uniVer": "√",
158
+ * "unixVer": "x"
159
+ * }
160
+ * }
161
+ * }
162
+ */
163
+ uploadFile(options: UniCloudUploadFileOptions): UTSPromise<UniCloudUploadFileResult>;
164
+ /**
165
+ * 获取文件临时URL
166
+ * @description 获取文件临时URL
167
+ * @uniPlatform {
168
+ * "app": {
169
+ * "android": {
170
+ * "osVer": "4.4",
171
+ * "uniVer": "√",
172
+ * "unixVer": "3.9.0 仅支持阿里云"
173
+ * },
174
+ * "ios": {
175
+ * "uniVer": "√",
176
+ * "unixVer": "x"
177
+ * }
178
+ * }
179
+ * }
180
+ */
181
+ getTempFileURL(options: UniCloudGetTempFileURLOptions): UTSPromise<UniCloudGetTempFileURLResult>;
182
+ /**
183
+ * 引用云对象
184
+ * @description 引用云对象
185
+ * @uniPlatform {
186
+ * "app": {
187
+ * "android": {
188
+ * "osVer": "4.4",
189
+ * "uniVer": "√",
190
+ * "unixVer": "3.9.0 仅支持阿里云"
191
+ * },
192
+ * "ios": {
193
+ * "uniVer": "√",
194
+ * "unixVer": "x"
195
+ * }
196
+ * }
197
+ * }
198
+ */
199
+ importObject(objectName: string): any;
200
+ /**
201
+ * 监听响应事件
202
+ * @description 监听响应事件
203
+ * @uniPlatform {
204
+ * "app": {
205
+ * "android": {
206
+ * "osVer": "4.4",
207
+ * "uniVer": "√",
208
+ * "unixVer": "3.9.0 仅支持阿里云"
209
+ * },
210
+ * "ios": {
211
+ * "uniVer": "√",
212
+ * "unixVer": "x"
213
+ * }
214
+ * }
215
+ * }
216
+ */
217
+ onResponse(callback: UniCloudCallback): void;
218
+ /**
219
+ * 移除响应事件监听
220
+ * @description 移除响应事件监听
221
+ * @uniPlatform {
222
+ * "app": {
223
+ * "android": {
224
+ * "osVer": "4.4",
225
+ * "uniVer": "√",
226
+ * "unixVer": "3.9.0 仅支持阿里云"
227
+ * },
228
+ * "ios": {
229
+ * "uniVer": "√",
230
+ * "unixVer": "x"
231
+ * }
232
+ * }
233
+ * }
234
+ */
235
+ offResponse(callback: UniCloudCallback): void;
236
+ /**
237
+ * 监听token刷新事件
238
+ * @description 监听token刷新事件
239
+ * @uniPlatform {
240
+ * "app": {
241
+ * "android": {
242
+ * "osVer": "4.4",
243
+ * "uniVer": "√",
244
+ * "unixVer": "3.9.0 仅支持阿里云"
245
+ * },
246
+ * "ios": {
247
+ * "uniVer": "√",
248
+ * "unixVer": "x"
249
+ * }
250
+ * }
251
+ * }
252
+ */
253
+ onRefreshToken(callback: UniCloudCallback): void;
254
+ /**
255
+ * 移除token刷新事件监听
256
+ * @description 移除token刷新事件监听
257
+ * @uniPlatform {
258
+ * "app": {
259
+ * "android": {
260
+ * "osVer": "4.4",
261
+ * "uniVer": "√",
262
+ * "unixVer": "3.9.0 仅支持阿里云"
263
+ * },
264
+ * "ios": {
265
+ * "uniVer": "√",
266
+ * "unixVer": "x"
267
+ * }
268
+ * }
269
+ * }
270
+ */
271
+ offRefreshToken(callback: UniCloudCallback): void;
272
+ }
273
+
274
+ declare const uniCloud: UniCloud;
@@ -1,10 +1,16 @@
1
1
  /// <reference path="../native/CustomEvent.d.ts" />
2
2
 
3
+ /**
4
+ * @package io.dcloud.uniapp.framework
5
+ */
3
6
  declare class CheckboxGroupChangeEventDetail {
4
- value: string[];
5
- constructor (value: string[]);
7
+ value: string[]
8
+ constructor (value: string[])
6
9
  }
7
10
 
11
+ /**
12
+ * @package io.dcloud.uniapp.framework
13
+ */
8
14
  export declare class CheckboxGroupChangeEvent extends CustomEvent<CheckboxGroupChangeEventDetail> {
9
- constructor (value: string[]);
15
+ constructor (value: string[])
10
16
  }
@@ -0,0 +1,16 @@
1
+ /// <reference path="../native/CustomEvent.d.ts" />
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.framework
5
+ */
6
+ declare class PickerViewChangeEventDetail {
7
+ value: number[]
8
+ constructor (value: number[])
9
+ }
10
+
11
+ /**
12
+ * @package io.dcloud.uniapp.framework
13
+ */
14
+ export declare class PickerViewChangeEvent extends CustomEvent<PickerViewChangeEventDetail> {
15
+ constructor (value: number[])
16
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference path="../native/CustomEvent.d.ts" />
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.framework
5
+ */
6
+ declare class ProgressActiveendEventDetail {
7
+ curPercent: number
8
+ constructor (value: number)
9
+ }
10
+
11
+ /**
12
+ * @package io.dcloud.uniapp.framework
13
+ */
14
+ export declare class ProgressActiveendEvent extends CustomEvent<ProgressActiveendEventDetail> {
15
+ constructor (value: number)
16
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference path="../native/CustomEvent.d.ts" />
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.framework
5
+ */
6
+ declare class RadioGroupChangeEventDetail {
7
+ value: string
8
+ constructor (value: string)
9
+ }
10
+
11
+ /**
12
+ * @package io.dcloud.uniapp.framework
13
+ */
14
+ export declare class RadioGroupChangeEvent extends CustomEvent<RadioGroupChangeEventDetail> {
15
+ constructor (value: string)
16
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference path="../native/CustomEvent.d.ts" />
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.framework
5
+ */
6
+ declare class SliderChangeEventDetail {
7
+ value: number
8
+ constructor (value: number)
9
+ }
10
+
11
+ /**
12
+ * @package io.dcloud.uniapp.framework
13
+ */
14
+ export declare class SliderChangeEvent extends CustomEvent<SliderChangeEventDetail> {
15
+ constructor (value: number)
16
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference path="../native/CustomEvent.d.ts" />
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.framework
5
+ */
6
+ declare class SwitchChangeEventDetail {
7
+ value: boolean
8
+ constructor (value: boolean)
9
+ }
10
+
11
+ /**
12
+ * @package io.dcloud.uniapp.framework
13
+ */
14
+ export declare class SwitchChangeEvent extends CustomEvent<SwitchChangeEventDetail> {
15
+ constructor (value: boolean)
16
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference path='./CheckboxGroupChangeEvent.d.ts' />
2
+ /// <reference path='./PickerViewChangeEvent.d.ts' />
3
+ /// <reference path='./CheckboxGroupChangeEvent.d.ts' />
4
+ /// <reference path='./RadioGroupChangeEvent.d.ts' />
5
+ /// <reference path='./SliderChangeEvent.d.ts' />
6
+ /// <reference path='./SwitchChangeEvent.d.ts' />
package/vue/index.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference path='./CheckboxGroupChangeEvent.d.ts' />
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes