@tarojs/taro 3.5.4-canary.0 → 3.5.5-alpha.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/taro",
3
- "version": "3.5.4-canary.0",
3
+ "version": "3.5.5-alpha.0",
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.5.4-canary.0",
25
- "@tarojs/runtime": "3.5.4-canary.0"
24
+ "@tarojs/api": "3.5.5-alpha.0",
25
+ "@tarojs/runtime": "3.5.5-alpha.0"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "@types/react": {
@@ -126,6 +126,21 @@ declare module '../../index' {
126
126
  }
127
127
  }
128
128
 
129
+ namespace createOffscreenCanvas {
130
+ interface Option {
131
+ /** 创建的离屏 canvas 类型
132
+ * @default: 'webgl'
133
+ */
134
+ type?: 'webgl' | '2d'
135
+ /** 画布高度 */
136
+ height?: number
137
+ /** 画布宽度 */
138
+ width?: number
139
+ /** 在自定义组件下,当前组件实例的 this,以操作组件内 [canvas](/docs/components/canvas) 组件 */
140
+ component?: TaroGeneral.IAnyObject,
141
+ }
142
+ }
143
+
129
144
  /** Canvas 实例,可通过 SelectorQuery 获取。
130
145
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/canvas/Canvas.html
131
146
  */
@@ -1705,8 +1720,13 @@ declare module '../../index' {
1705
1720
  /** 创建离屏 canvas 实例
1706
1721
  * @supported weapp
1707
1722
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.createOffscreenCanvas.html
1723
+ *
1724
+ * 有两个版本的写法:
1725
+ *
1726
+ * - createOffscreenCanvas(options) 从 2.16.1 起支持
1727
+ * - createOffscreenCanvas(width, height, this) 从 2.7.0 起支持
1708
1728
  */
1709
- createOffscreenCanvas(): OffscreenCanvas
1729
+ createOffscreenCanvas(options: createOffscreenCanvas.Option): OffscreenCanvas
1710
1730
 
1711
1731
  /** 创建 canvas 的绘图上下文 [CanvasContext](/docs/apis/canvas/CanvasContext) 对象
1712
1732
  *
@@ -79,9 +79,9 @@ declare module '../../index' {
79
79
  /** 详细地址 */
80
80
  address: string
81
81
  /** 纬度,浮点数,范围为-90~90,负数表示南纬。使用 gcj02 国测局坐标系 */
82
- latitude: string
82
+ latitude: number
83
83
  /** 经度,浮点数,范围为-180~180,负数表示西经。使用 gcj02 国测局坐标系 */
84
- longitude: string
84
+ longitude: number
85
85
  }
86
86
  }
87
87
 
@@ -109,9 +109,9 @@ declare module '../../index' {
109
109
  /** 详细地址 */
110
110
  address: string
111
111
  /** 纬度,浮点数,范围为-90~90,负数表示南纬。使用 gcj02 国测局坐标系 */
112
- latitude: string
112
+ latitude: number
113
113
  /** 经度,浮点数,范围为-180~180,负数表示西经。使用 gcj02 国测局坐标系 */
114
- longitude: string
114
+ longitude: number
115
115
  /** 位置名称 */
116
116
  name: string
117
117
  /** 调用结果 */
@@ -202,9 +202,9 @@ declare module '../../index' {
202
202
 
203
203
  interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
204
204
  /** 纬度,范围为 -90~90,负数表示南纬 */
205
- latitude: string
205
+ latitude: number
206
206
  /** 经度,范围为 -180~180,负数表示西经 */
207
- longitude: string
207
+ longitude: number
208
208
  }
209
209
  }
210
210
 
@@ -44,8 +44,9 @@ declare module '../../index' {
44
44
  /** 是否使用带 shareTicket 的转发[详情](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html) */
45
45
  withShareTicket?: boolean
46
46
  /** QQ小程序分享功能,支持分享到QQ、QQ空间、微信好友、微信朋友圈
47
- * 支持的值: ['qq', 'qzone', 'wechatFriends', 'wechatMoment']
48
- * @supported qq
47
+ * QQ支持的值: ['qq', 'qzone', 'wechatFriends', 'wechatMoment']
48
+ * 微信支持:['wechatFriends', 'wechatMoment'] / ['shareAppMessage', 'shareTimeline']
49
+ * @supported qq/weapp
49
50
  */
50
51
  showShareItems?: string[]
51
52
  }
@@ -178,7 +179,7 @@ declare module '../../index' {
178
179
  * ```
179
180
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.updateShareMenu.html
180
181
  */
181
- updateShareMenu(option: updateShareMenu.Option): Promise<TaroGeneral.CallbackResult>
182
+ updateShareMenu (option: updateShareMenu.Option): Promise<TaroGeneral.CallbackResult>
182
183
 
183
184
  /** 显示当前页面的转发按钮
184
185
  * @supported weapp, qq, tt
@@ -190,7 +191,7 @@ declare module '../../index' {
190
191
  * ```
191
192
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.showShareMenu.html
192
193
  */
193
- showShareMenu(option: showShareMenu.Option): Promise<TaroGeneral.CallbackResult>
194
+ showShareMenu (option: showShareMenu.Option): Promise<TaroGeneral.CallbackResult>
194
195
 
195
196
  /** 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载
196
197
  * @supported weapp
@@ -207,7 +208,7 @@ declare module '../../index' {
207
208
  * ```
208
209
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.showShareImageMenu.html
209
210
  */
210
- showShareImageMenu(option: showShareImageMenu.Option): Promise<TaroGeneral.CallbackResult>
211
+ showShareImageMenu (option: showShareImageMenu.Option): Promise<TaroGeneral.CallbackResult>
211
212
 
212
213
  /** 转发视频到聊天
213
214
  * @supported weapp
@@ -242,13 +243,13 @@ declare module '../../index' {
242
243
  * ```
243
244
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.shareVideoMessage.html
244
245
  */
245
- shareVideoMessage(option: shareVideoMessage.Option): Promise<TaroGeneral.CallbackResult>
246
+ shareVideoMessage (option: shareVideoMessage.Option): Promise<TaroGeneral.CallbackResult>
246
247
 
247
248
  /** 转发文件到聊天
248
249
  * @supported weapp
249
250
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.shareFileMessage.html
250
251
  */
251
- shareFileMessage(option: shareFileMessage.Option): Promise<TaroGeneral.CallbackResult>
252
+ shareFileMessage (option: shareFileMessage.Option): Promise<TaroGeneral.CallbackResult>
252
253
 
253
254
  /** 监听用户点击右上角菜单的「复制链接」按钮时触发的事件
254
255
  *
@@ -256,7 +257,7 @@ declare module '../../index' {
256
257
  * @supported weapp
257
258
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.onCopyUrl.html
258
259
  */
259
- onCopyUrl(
260
+ onCopyUrl (
260
261
  /** 用户点击右上角菜单的「复制链接」按钮时触发的事件的回调函数 */
261
262
  callback: onCopyUrl.Callback,
262
263
  ): void
@@ -267,7 +268,7 @@ declare module '../../index' {
267
268
  * @supported weapp
268
269
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.offCopyUrl.html
269
270
  */
270
- offCopyUrl(
271
+ offCopyUrl (
271
272
  /** 用户点击右上角菜单的「复制链接」按钮时触发的事件的回调函数 */
272
273
  callback: onCopyUrl.Callback,
273
274
  ): void
@@ -280,7 +281,7 @@ declare module '../../index' {
280
281
  * ```
281
282
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.hideShareMenu.html
282
283
  */
283
- hideShareMenu(option?: hideShareMenu.Option): Promise<TaroGeneral.CallbackResult>
284
+ hideShareMenu (option?: hideShareMenu.Option): Promise<TaroGeneral.CallbackResult>
284
285
 
285
286
  /** 获取转发详细信息
286
287
  *
@@ -297,7 +298,7 @@ declare module '../../index' {
297
298
  * ```
298
299
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.getShareInfo.html
299
300
  */
300
- getShareInfo(option: getShareInfo.Option): Promise<getShareInfo.SuccessCallbackResult>
301
+ getShareInfo (option: getShareInfo.Option): Promise<getShareInfo.SuccessCallbackResult>
301
302
 
302
303
  /** 验证私密消息
303
304
  * @supported weapp
@@ -322,6 +323,6 @@ declare module '../../index' {
322
323
  * ```
323
324
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.authPrivateMessage.html
324
325
  */
325
- authPrivateMessage(option: authPrivateMessage.Option): Promise<authPrivateMessage.SuccessCallbackResult>
326
+ authPrivateMessage (option: authPrivateMessage.Option): Promise<authPrivateMessage.SuccessCallbackResult>
326
327
  }
327
328
  }