@tarojs/taro 3.6.1-alpha.2 → 3.6.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/taro",
3
- "version": "3.6.1-alpha.2",
3
+ "version": "3.6.2",
4
4
  "description": "Taro framework",
5
5
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
6
6
  "main": "index.js",
@@ -21,8 +21,8 @@
21
21
  "author": "O2Team",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@tarojs/api": "3.6.1-alpha.2",
25
- "@tarojs/runtime": "3.6.1-alpha.2"
24
+ "@tarojs/api": "3.6.2",
25
+ "@tarojs/runtime": "3.6.2"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "@types/react": {
@@ -82,11 +82,36 @@ declare module '../../index' {
82
82
  }
83
83
  }
84
84
 
85
+ namespace createMediaRecorder {
86
+ /**
87
+ * createMediaRecorder Option
88
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/media-recorder/wx.createMediaRecorder.html
89
+ */
90
+ interface Option {
91
+ /** 指定录制的时长(s),到达自动停止。最大 7200,最小 5
92
+ * @default 600
93
+ */
94
+ duration?: number
95
+ /** 视频比特率(kbps),最小值 600,最大值 3000
96
+ * @default 1000
97
+ */
98
+ videoBitsPerSecond?: number
99
+ /** 视频关键帧间隔
100
+ * @default 12
101
+ */
102
+ gop?: number
103
+ /** 视频 fps
104
+ * @default 24
105
+ */
106
+ fps?: number
107
+ }
108
+ }
109
+
85
110
  interface TaroStatic {
86
111
  /** 创建 WebGL 画面录制器,可逐帧录制在 WebGL 上渲染的画面并导出视频文件
87
112
  * @supported weapp
88
113
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/media-recorder/wx.createMediaRecorder.html
89
114
  */
90
- createMediaRecorder(): MediaRecorder
115
+ createMediaRecorder(canvas?: Canvas | OffscreenCanvas, option?: createMediaRecorder.Option): MediaRecorder
91
116
  }
92
117
  }
@@ -322,6 +322,8 @@ declare module '../../index' {
322
322
  video
323
323
  /** 只能拍摄图片或从相册选择图片 */
324
324
  image
325
+ /** 可同时选择图片和视频 */
326
+ mix
325
327
  }
326
328
  interface sourceType {
327
329
  /** 从相册选择 */
@@ -31,6 +31,22 @@ declare module '../../index' {
31
31
  }
32
32
  }
33
33
 
34
+ namespace checkIsAddedToMyMiniProgram {
35
+ interface Option {
36
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
37
+ complete?: (res: TaroGeneral.CallbackResult) => void
38
+ /** 接口调用失败的回调函数 */
39
+ fail?: (res: TaroGeneral.CallbackResult) => void
40
+ /** 接口调用成功的回调函数 */
41
+ success?: (res: TaroGeneral.CallbackResult) => void
42
+ }
43
+
44
+ interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
45
+ /**是否被添加至 「我的小程序」 */
46
+ added: boolean
47
+ }
48
+ }
49
+
34
50
  interface TaroStatic {
35
51
  /** 收藏视频
36
52
  * @supported weapp
@@ -96,5 +112,11 @@ declare module '../../index' {
96
112
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/favorites/wx.addFileToFavorites.html
97
113
  */
98
114
  addFileToFavorites(option?: addFileToFavorites.Option): Promise<TaroGeneral.CallbackResult>
115
+ /**
116
+ * 检查小程序是否被添加至 「我的小程序」
117
+ * @supported weapp
118
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/my-miniprogram/wx.checkIsAddedToMyMiniProgram.html
119
+ */
120
+ checkIsAddedToMyMiniProgram(option?: checkIsAddedToMyMiniProgram.Option):Promise<checkIsAddedToMyMiniProgram.SuccessCallbackResult>
99
121
  }
100
122
  }
@@ -0,0 +1,49 @@
1
+ import Taro from '../../index'
2
+
3
+ declare module '../../index' {
4
+ namespace openQzonePublish {
5
+ interface Option {
6
+ /** 传递的文字内容 */
7
+ text: string
8
+ /** 传递的视频/图片内容,显示顺序为元素下标顺序 */
9
+ media: Media[]
10
+ /** 说说小尾巴跳转到的页面路径,不填则默认跳到主页 */
11
+ path: string
12
+ /** 说说小尾巴显示的文案,不填则默认显示小程序的简介文案 */
13
+ footnote: string
14
+ }
15
+ type Media = {
16
+ /** 图片填"photo",视频填"video" */
17
+ type: MediaType
18
+ /** 文件路径,必须为本地文件 */
19
+ path: string
20
+ }
21
+ type MediaType = 'photo' | 'video'
22
+ }
23
+
24
+ interface TaroStatic {
25
+ /**
26
+ * 此接口可打开手Q说说发表界面,并将文字内容和图片/视频内容传递到手Q说说发表界面。
27
+ * ```tsx
28
+ * Taro.openQzonePublish({
29
+ * footnote: '使用同款滤镜',
30
+ * path: 'pages/index/index',
31
+ * text: '我爱中国',
32
+ * media: [
33
+ * {
34
+ * type: 'photo',
35
+ * path: 'qqfile://1.png'
36
+ * },
37
+ * {
38
+ * type: 'video',
39
+ * path: 'qqfile://2.mp4'
40
+ * }
41
+ * ]
42
+ * })
43
+ * ```
44
+ * @supported qq
45
+ * @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_openQzonePublish.html
46
+ */
47
+ openQzonePublish(option: openQzonePublish.Option): void
48
+ }
49
+ }
@@ -102,6 +102,10 @@ declare module '../../index' {
102
102
 
103
103
  namespace hideToast {
104
104
  interface Option {
105
+ /** 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性
106
+ * @default false
107
+ */
108
+ noConflict?: boolean
105
109
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
106
110
  complete?: (res: TaroGeneral.CallbackResult) => void
107
111
  /** 接口调用失败的回调函数 */
@@ -113,6 +117,10 @@ declare module '../../index' {
113
117
 
114
118
  namespace hideLoading {
115
119
  interface Option {
120
+ /** 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性
121
+ * @default false
122
+ */
123
+ noConflict?: boolean
116
124
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
117
125
  complete?: (res: TaroGeneral.CallbackResult) => void
118
126
  /** 接口调用失败的回调函数 */
@@ -108,4 +108,5 @@
108
108
  /// <reference path="api/open-api/facial.d.ts" />
109
109
 
110
110
  /// <reference path="api/alipay/index.d.ts" />
111
+ /// <reference path="api/qq/index.d.ts" />
111
112
  /// <reference path="api/swan/index.d.ts" />