@dcloudio/uni-app-x 0.7.42 → 0.7.44

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 (29) hide show
  1. package/package.json +1 -1
  2. package/types/UniPage.d.ts +29 -38
  3. package/types/app.d.ts +37 -0
  4. package/types/native/CanvasRenderingContext2D.d.ts +4 -4
  5. package/types/native/IUniElement.d.ts +31 -2
  6. package/types/native/{Animation.d.ts → UniAnimation.d.ts} +4 -4
  7. package/types/native/{AnimationPlaybackEvent.d.ts → UniAnimationPlaybackEvent.d.ts} +1 -1
  8. package/types/native/UniElement.d.ts +0 -2
  9. package/types/native/global.d.ts +6 -8
  10. package/types/native/index.d.ts +4 -4
  11. package/types/uni/uts-plugin-api/global.d.ts +2 -0
  12. package/types/uni/uts-plugin-api/index.d.ts +2 -0
  13. package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/interface.d.ts +680 -51
  14. package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/interface.d.ts +677 -397
  15. package/types/uni/uts-plugin-api/lib/uni-document/utssdk/global.d.ts +10 -0
  16. package/types/uni/uts-plugin-api/lib/uni-document/utssdk/index.d.ts +4 -0
  17. package/types/uni/uts-plugin-api/lib/uni-document/utssdk/interface.d.ts +76 -0
  18. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +75 -1
  19. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +6 -2
  20. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +1 -1
  21. package/types/uni/uts-plugin-api/lib/uni-previewImage/utssdk/global.d.ts +46 -0
  22. package/types/uni/uts-plugin-api/lib/uni-previewImage/utssdk/index.d.ts +22 -0
  23. package/types/uni/uts-plugin-api/lib/uni-previewImage/utssdk/interface.d.ts +339 -0
  24. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +1 -1
  25. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +4 -0
  26. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +2 -0
  27. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +6 -4
  28. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +2187 -2066
  29. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +398 -203
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.42",
3
+ "version": "0.7.44",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "main": "index.d.ts",
@@ -1,5 +1,32 @@
1
1
  import { UniSafeAreaInsets } from './native/UniSafeAreaInsets'
2
2
 
3
+ export type UniPageBody = {
4
+ /**
5
+ * pageBody 距离顶部的距离
6
+ */
7
+ top: number,
8
+ /**
9
+ * pageBody 距离右侧的距离
10
+ */
11
+ right: number,
12
+ /**
13
+ * pageBody 距离底部的距离
14
+ */
15
+ bottom: number,
16
+ /**
17
+ * pageBody 距离左侧的距离
18
+ */
19
+ left: number,
20
+ /**
21
+ * pageBody 的宽度
22
+ */
23
+ width: number,
24
+ /**
25
+ * pageBody 的高度
26
+ */
27
+ height: number
28
+ }
29
+
3
30
  export interface UniPage {
4
31
  /**
5
32
  * 页面的路由地址
@@ -149,43 +176,7 @@ export interface UniPage {
149
176
  */
150
177
  $vm?: ComponentPublicInstance | null
151
178
  /**
152
- * UniPage 窗口宽度,单位为px
153
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/unipage.html
154
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/unipage.html
155
- * @uniPlatform {
156
- * "app": {
157
- * "android": {
158
- * "osVer": "5.0",
159
- * "uniVer": "x",
160
- * "unixVer": "4.51"
161
- * },
162
- * "ios": {
163
- * "osVer": "x",
164
- * "uniVer": "x",
165
- * "unixVer": "4.51"
166
- * },
167
- * "harmony": {
168
- * "osVer": "x",
169
- * "uniVer": "x",
170
- * "unixVer": "x"
171
- * }
172
- * },
173
- * "mp": {
174
- * "weixin": {
175
- * "hostVer": "√",
176
- * "uniVer": "x",
177
- * "unixVer": "x"
178
- * },
179
- * },
180
- * "web": {
181
- * "uniVer": "x",
182
- * "unixVer": "4.51"
183
- * }
184
- * }
185
- */
186
- innerWidth: number
187
- /**
188
- * UniPage 窗口高度,单位为px
179
+ * UniPage pageBody 位置及宽高信息,单位为px
189
180
  * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/unipage.html
190
181
  * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/unipage.html
191
182
  * @uniPlatform {
@@ -219,7 +210,7 @@ export interface UniPage {
219
210
  * }
220
211
  * }
221
212
  */
222
- innerHeight: number
213
+ pageBody: UniPageBody
223
214
  /**
224
215
  * UniPage 安全区域插入位置(与屏幕边界的距离)信息
225
216
  * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/unipage.html
package/types/app.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference path='./common.d.ts' />
2
+ import UIAbility from '@ohos.app.ability.UIAbility';
2
3
  import { ComputedOptions, EditorCreateVueAppComponent, MethodOptions, OptionsData, ComponentInternalInstance, EditorVueAppComponent, EditorComponentPublicInstance, DefineApp, ComponentInjectOptions } from '@vue/runtime-core'
3
4
 
4
5
  /**
@@ -866,6 +867,42 @@ export interface UniApp {
866
867
  * }
867
868
  */
868
869
  getAndroidApplication(): Application
870
+ /**
871
+ * 获取 鸿蒙应用 Ability 实例
872
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-app.html#getharmonyability
873
+ * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/get-app.html#getharmonyability
874
+ * @uniPlatform {
875
+ * "app": {
876
+ * "android": {
877
+ * "osVer": "x",
878
+ * "uniVer": "x",
879
+ * "unixVer": "x"
880
+ * },
881
+ * "ios": {
882
+ * "osVer": "x",
883
+ * "uniVer": "x",
884
+ * "unixVer": "x"
885
+ * },
886
+ * "harmony": {
887
+ * "osVer": "3.0",
888
+ * "uniVer": "x",
889
+ * "unixVer": "4.51"
890
+ * }
891
+ * },
892
+ * "mp": {
893
+ * "weixin": {
894
+ * "hostVer": "√",
895
+ * "uniVer": "x",
896
+ * "unixVer": "x"
897
+ * },
898
+ * },
899
+ * "web": {
900
+ * "uniVer": "x",
901
+ * "unixVer": "x"
902
+ * }
903
+ * }
904
+ */
905
+ getHarmonyAbility(): UIAbility
869
906
  }
870
907
 
871
908
  type UniAppOrigin = UniApp
@@ -2891,8 +2891,8 @@ export interface CanvasRenderingContext2D {
2891
2891
  /**
2892
2892
  * 在画布上绘制文本
2893
2893
  * @param {string} text 要渲染的文本字符串
2894
- * @param {number} x 开始绘制文本的点的 X 轴坐标
2895
- * @param {number} y 开始绘制文本的点的 X 轴坐标
2894
+ * @param {number} x 开始绘制文本的点的 x 轴坐标
2895
+ * @param {number} y 开始绘制文本的点的 y 轴坐标
2896
2896
  * @param {number} maxWidth 需要绘制的最大宽度
2897
2897
  * @uniPlatform {
2898
2898
  * "app": {
@@ -3605,8 +3605,8 @@ export interface CanvasRenderingContext2D {
3605
3605
  /**
3606
3606
  * 文本描边
3607
3607
  * @param {string} text 要渲染的文本字符串
3608
- * @param {number} x 开始绘制文本的点的 X 轴坐标
3609
- * @param {number} y 开始绘制文本的点的 X 轴坐标
3608
+ * @param {number} x 开始绘制文本的点的 x 轴坐标
3609
+ * @param {number} y 开始绘制文本的点的 y 轴坐标
3610
3610
  * @param {number} maxWidth 需要绘制的最大宽度
3611
3611
  * @uniPlatform {
3612
3612
  * "app": {
@@ -5,6 +5,7 @@ import { CSSStyleDeclaration } from "./CSSStyleDeclaration"
5
5
  import { DOMRect } from "./DOMRect"
6
6
  import { UniCallbackWrapper } from "./UniCallbackWrapper"
7
7
  import { CanvasRenderingContext2D } from "./CanvasRenderingContext2D"
8
+ import { UniAnimation } from "./UniAnimation"
8
9
 
9
10
  export type GetBoundingClientRectAsyncSuccessCallback = (rect: DOMRect) => void
10
11
  export type GetBoundingClientRectAsyncFailCallback = () => void
@@ -1272,7 +1273,6 @@ export interface UniElement {
1272
1273
 
1273
1274
  /**
1274
1275
  * 将指定的监听器注册到元素对象上,当该对象触发指定的事件时,指定的回调函数就会被执行。
1275
- * @internal
1276
1276
  * @param {string} type 事件类型
1277
1277
  * @param {(event: T) => R} callback 事件监听器 T表示event类型,R表示返回值类型
1278
1278
  * @uniPlatform {
@@ -1306,7 +1306,6 @@ export interface UniElement {
1306
1306
 
1307
1307
  /**
1308
1308
  * 删除使用 addEventListener 方法添加的事件监听器。
1309
- * @internal
1310
1309
  * @param type 事件类型
1311
1310
  * @param callbackWrapper 事件监听回调封装类
1312
1311
  * @uniPlatform {
@@ -1809,6 +1808,36 @@ export interface UniElement {
1809
1808
  * }
1810
1809
  */
1811
1810
  getPage(): UniPage | null
1811
+
1812
+ /**
1813
+ * 创建一个新的动画并应用于元素,然后立即执行动画。
1814
+ * @uniPlatform {
1815
+ * "app": {
1816
+ * "android": {
1817
+ * "osVer": "5.0",
1818
+ * "uniVer": "x",
1819
+ * "unixVer": "4.51"
1820
+ * },
1821
+ * "ios": {
1822
+ * "osVer": "12.0",
1823
+ * "uniVer": "x",
1824
+ * "unixVer": "x"
1825
+ * }
1826
+ * },
1827
+ * "mp": {
1828
+ * "weixin": {
1829
+ * "osVer": "x",
1830
+ * "uniVer": "x",
1831
+ * "unixVer": "x"
1832
+ * }
1833
+ * },
1834
+ * "web": {
1835
+ * "uniVer": "x",
1836
+ * "unixVer": "x"
1837
+ * }
1838
+ * }
1839
+ */
1840
+ animate(keyframes : any, options : UTSJSONObject) : UniAnimation | null
1812
1841
  }
1813
1842
 
1814
1843
  export type INode = UniElement
@@ -1,4 +1,4 @@
1
- import { AnimationPlaybackEvent } from "./AnimationPlaybackEvent"
1
+ import { UniAnimationPlaybackEvent } from "./UniAnimationPlaybackEvent"
2
2
  /**
3
3
  * @package io.dcloud.uniapp.runtime
4
4
  * @uniPlatform {
@@ -62,7 +62,7 @@ import { AnimationPlaybackEvent } from "./AnimationPlaybackEvent"
62
62
  * }
63
63
  * }
64
64
  */
65
- export class Animation {
65
+ export class UniAnimation {
66
66
  /**
67
67
  * 获取或设置用于标识动画的字符串
68
68
  * @uniPlatform {
@@ -254,7 +254,7 @@ export class Animation {
254
254
  * }
255
255
  * }
256
256
  */
257
- oncancel : ((event : AnimationPlaybackEvent) => void) | null
257
+ oncancel : ((event : UniAnimationPlaybackEvent) => void) | null
258
258
  /**
259
259
  * 监听动画完成事件
260
260
  * @uniPlatform {
@@ -318,7 +318,7 @@ export class Animation {
318
318
  * }
319
319
  * }
320
320
  */
321
- onfinish : ((event : AnimationPlaybackEvent) => void) | null
321
+ onfinish : ((event : UniAnimationPlaybackEvent) => void) | null
322
322
  /**
323
323
  * 终止并取消所有动画
324
324
  * @uniPlatform {
@@ -4,7 +4,7 @@ import { UniEvent } from "./UniEvent"
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  * @autodoc false
6
6
  */
7
- export class AnimationPlaybackEvent extends UniEvent {
7
+ export class UniAnimationPlaybackEvent extends UniEvent {
8
8
  /**
9
9
  * 动画的事件类型
10
10
  */
@@ -7,7 +7,6 @@ import { TakeSnapshotOptions } from "./SnapshotOptions";
7
7
  import { UniCallbackWrapper } from "./UniCallbackWrapper";
8
8
  import { INodeData } from "./NodeData"
9
9
  import { PageNode } from "./PageNode"
10
- import { Animation } from "./Animation"
11
10
 
12
11
  /**
13
12
  * view元素对象
@@ -70,7 +69,6 @@ export class UniElementImpl implements UniElement {
70
69
  getAndroidActivity(): Activity | null
71
70
  getIOSView(): UIView | null
72
71
  getPage(): UniPage | null
73
- animate(keyframes : any, options : UTSJSONObject) : Animation | null
74
72
  constructor (data: INodeData, pageNode?: PageNode)
75
73
  }
76
74
 
@@ -73,7 +73,6 @@ import {
73
73
  UniScrollEventDetail as UniScrollEventDetailOrigin,
74
74
  UniScrollEvent as UniScrollEventOrigin,
75
75
  ScrollEvent as ScrollEventOrigin,
76
- UniSafeArea as UniSafeAreaOrigin,
77
76
  UniSafeAreaInsets as UniSafeAreaInsetsOrigin,
78
77
  UniRichTextItemClickEventDetail as UniRichTextItemClickEventDetailOrigin,
79
78
  UniRichTextItemClickEvent as UniRichTextItemClickEventOrigin,
@@ -153,6 +152,8 @@ import {
153
152
  CustomEvent as CustomEventOrigin,
154
153
  UniCanvasElementImpl as UniCanvasElementImplOrigin,
155
154
  UniCallbackWrapper as UniCallbackWrapperOrigin,
155
+ UniAnimationPlaybackEvent as UniAnimationPlaybackEventOrigin,
156
+ UniAnimation as UniAnimationOrigin,
156
157
  UniAggregateError as UniAggregateErrorOrigin,
157
158
  UTSAndroidHookProxy as UTSAndroidHookProxyOrigin,
158
159
  SourceError as SourceErrorOrigin,
@@ -229,8 +230,6 @@ import {
229
230
  CSSStyleDeclaration as CSSStyleDeclarationOrigin,
230
231
  AsyncApiResult as AsyncApiResultOrigin,
231
232
  AsyncApiSuccessResult as AsyncApiSuccessResultOrigin,
232
- AnimationPlaybackEvent as AnimationPlaybackEventOrigin,
233
- Animation as AnimationOrigin,
234
233
  } from './index'
235
234
 
236
235
  declare global {
@@ -378,7 +377,6 @@ declare global {
378
377
  type UniScrollEvent = UniScrollEventOrigin
379
378
  const ScrollEvent: typeof ScrollEventOrigin
380
379
  type ScrollEvent = ScrollEventOrigin
381
- type UniSafeArea = UniSafeAreaOrigin
382
380
  type UniSafeAreaInsets = UniSafeAreaInsetsOrigin
383
381
  const UniRichTextItemClickEventDetail: typeof UniRichTextItemClickEventDetailOrigin
384
382
  type UniRichTextItemClickEventDetail = UniRichTextItemClickEventDetailOrigin
@@ -523,6 +521,10 @@ declare global {
523
521
  type UniCanvasElementImpl = UniCanvasElementImplOrigin
524
522
  const UniCallbackWrapper: typeof UniCallbackWrapperOrigin
525
523
  type UniCallbackWrapper = UniCallbackWrapperOrigin
524
+ const UniAnimationPlaybackEvent: typeof UniAnimationPlaybackEventOrigin
525
+ type UniAnimationPlaybackEvent = UniAnimationPlaybackEventOrigin
526
+ const UniAnimation: typeof UniAnimationOrigin
527
+ type UniAnimation = UniAnimationOrigin
526
528
  const UniAggregateError: typeof UniAggregateErrorOrigin
527
529
  type UniAggregateError = UniAggregateErrorOrigin
528
530
  type UTSAndroidHookProxy = UTSAndroidHookProxyOrigin
@@ -639,8 +641,4 @@ declare global {
639
641
  type CSSStyleDeclaration = CSSStyleDeclarationOrigin
640
642
  type AsyncApiResult = AsyncApiResultOrigin
641
643
  type AsyncApiSuccessResult = AsyncApiSuccessResultOrigin
642
- const AnimationPlaybackEvent: typeof AnimationPlaybackEventOrigin
643
- type AnimationPlaybackEvent = AnimationPlaybackEventOrigin
644
- const Animation: typeof AnimationOrigin
645
- type Animation = AnimationOrigin
646
644
  }
@@ -24,7 +24,7 @@ export * from './UniStartNestedScrollEvent'
24
24
  export * from './UniScrollToUpperEvent'
25
25
  export * from './UniScrollToLowerEvent'
26
26
  export * from './UniScrollEvent'
27
- export * from './UniSafeArea'
27
+ export * from './UniSafeAreaInsets'
28
28
  export * from './UniRichTextItemClickEvent'
29
29
  export * from './UniResizeObserver'
30
30
  export * from './UniResizeEvent'
@@ -53,6 +53,8 @@ export * from './UniDocument'
53
53
  export * from './UniCustomEvent'
54
54
  export * from './UniCanvasElement'
55
55
  export * from './UniCallbackWrapper'
56
+ export * from './UniAnimationPlaybackEvent'
57
+ export * from './UniAnimation'
56
58
  export * from './UniAggregateError'
57
59
  export * from './UTSAndroidHookProxy'
58
60
  export * from './SourceError'
@@ -70,6 +72,4 @@ export * from './DrawableContext'
70
72
  export * from './DOMRect'
71
73
  export * from './CanvasRenderingContext2D'
72
74
  export * from './CSSStyleDeclaration'
73
- export * from './AsyncApiResult'
74
- export * from './AnimationPlaybackEvent'
75
- export * from './Animation'
75
+ export * from './AsyncApiResult'
@@ -13,6 +13,7 @@
13
13
  /// <reference path='./lib/uni-createSelectorQuery/utssdk/global.d.ts' />
14
14
  /// <reference path='./lib/uni-createWebviewContext/utssdk/global.d.ts' />
15
15
  /// <reference path='./lib/uni-dialogPage/utssdk/global.d.ts' />
16
+ /// <reference path='./lib/uni-document/utssdk/global.d.ts' />
16
17
  /// <reference path='./lib/uni-event/utssdk/global.d.ts' />
17
18
  /// <reference path='./lib/uni-exit/utssdk/global.d.ts' />
18
19
  /// <reference path='./lib/uni-file/utssdk/global.d.ts' />
@@ -52,6 +53,7 @@
52
53
  /// <reference path='./lib/uni-payment-huawei/utssdk/global.d.ts' />
53
54
  /// <reference path='./lib/uni-payment-wxpay/utssdk/global.d.ts' />
54
55
  /// <reference path='./lib/uni-payment/utssdk/global.d.ts' />
56
+ /// <reference path='./lib/uni-previewImage/utssdk/global.d.ts' />
55
57
  /// <reference path='./lib/uni-privacy/utssdk/global.d.ts' />
56
58
  /// <reference path='./lib/uni-prompt/utssdk/global.d.ts' />
57
59
  /// <reference path='./lib/uni-pullDownRefresh/utssdk/global.d.ts' />
@@ -13,6 +13,7 @@ export * from './lib/uni-createRequestPermissionListener/utssdk'
13
13
  export * from './lib/uni-createSelectorQuery/utssdk'
14
14
  export * from './lib/uni-createWebviewContext/utssdk'
15
15
  export * from './lib/uni-dialogPage/utssdk'
16
+ export * from './lib/uni-document/utssdk'
16
17
  export * from './lib/uni-event/utssdk'
17
18
  export * from './lib/uni-exit/utssdk'
18
19
  export * from './lib/uni-file/utssdk'
@@ -52,6 +53,7 @@ export * from './lib/uni-payment-alipay/utssdk'
52
53
  export * from './lib/uni-payment-huawei/utssdk'
53
54
  export * from './lib/uni-payment-wxpay/utssdk'
54
55
  export * from './lib/uni-payment/utssdk'
56
+ export * from './lib/uni-previewImage/utssdk'
55
57
  export * from './lib/uni-privacy/utssdk'
56
58
  export * from './lib/uni-prompt/utssdk'
57
59
  export * from './lib/uni-pullDownRefresh/utssdk'