@dcloudio/uni-app-x 0.7.18 → 0.7.20

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 (32) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +184 -24
  3. package/types/native/CanvasRenderingContext2D.d.ts +2 -1
  4. package/types/native/IUniElement.d.ts +113 -5
  5. package/types/uni/uts-plugin-api/global.d.ts +3 -3
  6. package/types/uni/uts-plugin-api/index.d.ts +3 -3
  7. package/types/uni/uts-plugin-api/lib/{uni-requestAnimationFrame → uni-animationFrame}/utssdk/interface.d.ts +48 -26
  8. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/global.d.ts +60 -0
  9. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/index.d.ts +29 -0
  10. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +161 -0
  11. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +70 -4
  12. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +37 -0
  13. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +4 -3
  14. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +108 -0
  15. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +112 -1
  16. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +1 -1
  17. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +6 -8
  18. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +3 -4
  19. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +49 -49
  20. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +4 -0
  21. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +2 -0
  22. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +193 -8
  23. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +2 -2
  24. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +808 -778
  25. package/types/uni-cloud/index.d.ts +5 -1
  26. package/types/uni-cloud/interface.d.ts +846 -850
  27. package/types/shim-uts-basic.d.ts +0 -4495
  28. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/global.d.ts +0 -10
  29. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/index.d.ts +0 -4
  30. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/interface.d.ts +0 -24
  31. /package/types/uni/uts-plugin-api/lib/{uni-requestAnimationFrame → uni-animationFrame}/utssdk/global.d.ts +0 -0
  32. /package/types/uni/uts-plugin-api/lib/{uni-requestAnimationFrame → uni-animationFrame}/utssdk/index.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.18",
3
+ "version": "0.7.20",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
package/types/app.d.ts CHANGED
@@ -45,19 +45,22 @@ type GlobalData = Record<string, any | null>
45
45
  interface UniAppOptions<G extends GlobalData = GlobalData> {
46
46
  /**
47
47
  * 全局对象
48
- * 文档:[https://uniapp.dcloud.io/collocation/App?id=globaldata](https://uniapp.dcloud.io/collocation/App?id=globaldata)
49
- * @autodoc false
48
+ *
49
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
50
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
51
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
52
+ *
50
53
  * @uniPlatform {
51
54
  * "app": {
52
55
  * "android": {
53
56
  * "osVer": "5.0",
54
57
  * "uniVer": "√",
55
- * "unixVer": "x"
58
+ * "unixVer": "3.9"
56
59
  * },
57
60
  * "ios": {
58
61
  * "osVer": "10.0",
59
62
  * "uniVer": "√",
60
- * "unixVer": "x"
63
+ * "unixVer": "4.0"
61
64
  * }
62
65
  * },
63
66
  * "mp": {
@@ -110,12 +113,12 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
110
113
  */
111
114
  globalData?: G;
112
115
  /**
113
- * 生命周期回调 监听应用初始化
116
+ * 生命周期回调,监听应用初始化,应用初始化完成时触发,全局只触发一次。
114
117
  *
115
- * 应用初始化完成时触发,全局只触发一次。
118
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
119
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
120
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
116
121
  *
117
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
118
- * @autodoc false
119
122
  * @uniPlatform {
120
123
  * "app": {
121
124
  * "android": {
@@ -126,7 +129,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
126
129
  * "ios": {
127
130
  * "osVer": "10.0",
128
131
  * "uniVer": "√",
129
- * "unixVer": "x"
132
+ * "unixVer": "4.0"
130
133
  * }
131
134
  * },
132
135
  * "mp": {
@@ -183,8 +186,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
183
186
  *
184
187
  * 应用启动,或从后台进入前台显示时触发
185
188
  *
186
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
187
- * @autodoc false
189
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
190
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
191
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
188
192
  * @uniPlatform {
189
193
  * "app": {
190
194
  * "android": {
@@ -195,7 +199,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
195
199
  * "ios": {
196
200
  * "osVer": "10.0",
197
201
  * "uniVer": "√",
198
- * "unixVer": "x"
202
+ * "unixVer": "4.0"
199
203
  * }
200
204
  * },
201
205
  * "mp": {
@@ -252,8 +256,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
252
256
  *
253
257
  * 应用从前台进入后台时触发
254
258
  *
255
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
256
- * @autodoc false
259
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
260
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
261
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
257
262
  * @uniPlatform {
258
263
  * "app": {
259
264
  * "android": {
@@ -264,7 +269,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
264
269
  * "ios": {
265
270
  * "osVer": "10.0",
266
271
  * "uniVer": "√",
267
- * "unixVer": "x"
272
+ * "unixVer": "4.0"
268
273
  * }
269
274
  * },
270
275
  * "mp": {
@@ -321,7 +326,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
321
326
  * 应用发生脚本错误或 API 调用报错时触发
322
327
  * @param error 错误信息
323
328
  *
324
- * @tutorial [https://doc.dcloud.net.cn/uni-app-x/collocation/app.html](https://doc.dcloud.net.cn/uni-app-x/collocation/app.html)
329
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
330
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
331
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
325
332
  * @uniPlatform {
326
333
  * "app": {
327
334
  * "android": {
@@ -393,8 +400,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
393
400
  * 1. 如果开发者没有添加 `onPageNotFound` 监听,当跳转页面不存在时,将推入微信客户端原生的页面不存在提示页面。
394
401
  * 2. 如果 `onPageNotFound` 回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再回调 `onPageNotFound`。
395
402
  *
396
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
397
- * @autodoc false
403
+ * @tutorial https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
404
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
405
+ * @internal
398
406
  * @uniPlatform {
399
407
  * "app": {
400
408
  * "android": {
@@ -462,8 +470,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
462
470
  *
463
471
  * nvue 页面使用 `uni.postMessage` 发送消息时触发
464
472
  *
465
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
466
- * @autodoc false
473
+ * @tutorial https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
474
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
475
+ * @internal
467
476
  * @uniPlatform {
468
477
  * "app": {
469
478
  * "android": {
@@ -538,8 +547,8 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
538
547
  /**
539
548
  * 监听应用退出。app-uvue-android 3.9+
540
549
  *
541
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
542
- * @autodoc false
550
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
551
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
543
552
  * @uniPlatform {
544
553
  * "app": {
545
554
  * "android": {
@@ -614,8 +623,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
614
623
  /**
615
624
  * 最后一个页面按下Android back键,常用于自定义退出。app-uvue-android 3.9+
616
625
  *
617
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
618
- * @autodoc false
626
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/exit.html
627
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/exit.html
628
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
619
629
  * @uniPlatform {
620
630
  * "app": {
621
631
  * "android": {
@@ -722,6 +732,82 @@ declare global {
722
732
  * 应用启动页面路径
723
733
  */
724
734
  path: string;
735
+ /**
736
+ * 首次启动时的Scheme。返回值与App.onLaunch的回调参数一致
737
+ *
738
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/getLaunchOptionsSync.html
739
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-launch-options-sync.html
740
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-launch-options-sync.html
741
+ * @uniPlatform {
742
+ * "app": {
743
+ * "android": {
744
+ * "osVer": "5.0",
745
+ * "uniVer": "√",
746
+ * "unixVer": "4.25"
747
+ * },
748
+ * "ios": {
749
+ * "osVer": "12.0",
750
+ * "uniVer": "√",
751
+ * "unixVer": "4.25"
752
+ * },
753
+ * "harmony": {
754
+ * "osVer": "x",
755
+ * "uniVer": "x",
756
+ * "unixVer": "x"
757
+ * }
758
+ * },
759
+ * "mp": {
760
+ * "weixin": {
761
+ * "hostVer": "√",
762
+ * "uniVer": "√",
763
+ * "unixVer": "x"
764
+ * },
765
+ * },
766
+ * "web": {
767
+ * "uniVer": "√",
768
+ * "unixVer": "4.0"
769
+ * }
770
+ * }
771
+ */
772
+ appScheme: string | null,
773
+ /**
774
+ * 首次启动时的appLink。返回值与App.onLaunch的回调参数一致
775
+ *
776
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/getLaunchOptionsSync.html
777
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-launch-options-sync.html
778
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-launch-options-sync.html
779
+ * @uniPlatform {
780
+ * "app": {
781
+ * "android": {
782
+ * "osVer": "5.0",
783
+ * "uniVer": "√",
784
+ * "unixVer": "4.25"
785
+ * },
786
+ * "ios": {
787
+ * "osVer": "12.0",
788
+ * "uniVer": "√",
789
+ * "unixVer": "4.25"
790
+ * },
791
+ * "harmony": {
792
+ * "osVer": "x",
793
+ * "uniVer": "x",
794
+ * "unixVer": "x"
795
+ * }
796
+ * },
797
+ * "mp": {
798
+ * "weixin": {
799
+ * "hostVer": "√",
800
+ * "uniVer": "√",
801
+ * "unixVer": "x"
802
+ * },
803
+ * },
804
+ * "web": {
805
+ * "uniVer": "√",
806
+ * "unixVer": "4.0"
807
+ * }
808
+ * }
809
+ */
810
+ appLink: string | null
725
811
  /**
726
812
  * 打开小程序的query
727
813
  */
@@ -814,6 +900,80 @@ declare global {
814
900
  * 应用启动页面路径
815
901
  */
816
902
  path: string
903
+ /**
904
+ * 本次启动时的Scheme。返回值与App.onShow的回调参数一致
905
+ *
906
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-enter-options-sync.html
907
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-enter-options-sync.html
908
+ * @uniPlatform {
909
+ * "app": {
910
+ * "android": {
911
+ * "osVer": "5.0",
912
+ * "uniVer": "x",
913
+ * "unixVer": "4.25"
914
+ * },
915
+ * "ios": {
916
+ * "osVer": "12.0",
917
+ * "uniVer": "x",
918
+ * "unixVer": "4.25"
919
+ * },
920
+ * "harmony": {
921
+ * "osVer": "x",
922
+ * "uniVer": "x",
923
+ * "unixVer": "x"
924
+ * }
925
+ * },
926
+ * "mp": {
927
+ * "weixin": {
928
+ * "hostVer": "√",
929
+ * "uniVer": "√",
930
+ * "unixVer": "x"
931
+ * },
932
+ * },
933
+ * "web": {
934
+ * "uniVer": "√",
935
+ * "unixVer": "4.0"
936
+ * }
937
+ * }
938
+ */
939
+ appScheme: string | null
940
+ /**
941
+ * 本次启动时的appLink。返回值与App.onShow的回调参数一致
942
+ *
943
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-enter-options-sync.html
944
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-enter-options-sync.html
945
+ * @uniPlatform {
946
+ * "app": {
947
+ * "android": {
948
+ * "osVer": "5.0",
949
+ * "uniVer": "x",
950
+ * "unixVer": "4.25"
951
+ * },
952
+ * "ios": {
953
+ * "osVer": "12.0",
954
+ * "uniVer": "x",
955
+ * "unixVer": "4.25"
956
+ * },
957
+ * "harmony": {
958
+ * "osVer": "x",
959
+ * "uniVer": "x",
960
+ * "unixVer": "x"
961
+ * }
962
+ * },
963
+ * "mp": {
964
+ * "weixin": {
965
+ * "hostVer": "√",
966
+ * "uniVer": "√",
967
+ * "unixVer": "x"
968
+ * },
969
+ * },
970
+ * "web": {
971
+ * "uniVer": "√",
972
+ * "unixVer": "4.0"
973
+ * }
974
+ * }
975
+ */
976
+ appLink: string | null
817
977
  }
818
978
 
819
979
  interface OnPageNotFoundOption {
@@ -51,6 +51,7 @@ export interface TextMetrics {
51
51
  * }
52
52
  */
53
53
  export interface ImageData {
54
+ readonly data: Uint8ClampedArray
54
55
  readonly width: number
55
56
  readonly height: number
56
57
  }
@@ -1069,7 +1070,7 @@ export interface CanvasRenderingContext2D {
1069
1070
  createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r01: number): CanvasGradient
1070
1071
 
1071
1072
  /**
1072
- * 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas
1073
+ * 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中, 该操作为可选非web标准,canvas组件会自动选择合适时机进行绘制
1073
1074
  * @uniPlatform {
1074
1075
  * "app": {
1075
1076
  * "android": {