@tarojs/taro 4.0.10-beta.1 → 4.1.0-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": "4.0.10-beta.1",
3
+ "version": "4.1.0-alpha.0",
4
4
  "description": "Taro framework",
5
5
  "author": "O2Team",
6
6
  "license": "MIT",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@types/postcss-url": "^10.0.4",
27
- "@tarojs/api": "4.0.10-beta.1",
28
- "@tarojs/runtime": "4.0.10-beta.1"
27
+ "@tarojs/api": "4.1.0-alpha.0",
28
+ "@tarojs/runtime": "4.1.0-alpha.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/react": "^18.3.1",
@@ -35,9 +35,9 @@
35
35
  "webpack-chain": "^6.5.1",
36
36
  "webpack-dev-server": "^4.15.2",
37
37
  "rollup": "^3.29.4",
38
- "@tarojs/components": "4.0.10-beta.1",
39
- "@tarojs/helper": "4.0.10-beta.1",
40
- "@tarojs/shared": "4.0.10-beta.1"
38
+ "@tarojs/components": "4.1.0-alpha.0",
39
+ "@tarojs/helper": "4.1.0-alpha.0",
40
+ "@tarojs/shared": "4.1.0-alpha.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@types/react": "^18",
@@ -48,9 +48,9 @@
48
48
  "webpack": "^5",
49
49
  "webpack-chain": "^6",
50
50
  "webpack-dev-server": "^4",
51
- "@tarojs/components": "4.0.10-beta.1",
52
- "@tarojs/helper": "4.0.10-beta.1",
53
- "@tarojs/shared": "4.0.10-beta.1"
51
+ "@tarojs/shared": "4.1.0-alpha.0",
52
+ "@tarojs/components": "4.1.0-alpha.0",
53
+ "@tarojs/helper": "4.1.0-alpha.0"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@types/react": {
@@ -2048,7 +2048,7 @@ declare module '../../index' {
2048
2048
  /** 创建 canvas 的绘图上下文 [CanvasContext](/docs/apis/canvas/CanvasContext) 对象
2049
2049
  *
2050
2050
  * **Tip**: 需要指定 canvasId,该绘图上下文只作用于对应的 `<canvas/>`;另外,Web 端需要在 `useReady` 回调中执行它,否则会因为底层 canvas 渲染出来之前而去获取 CanvasContext,导致其底层的 context 为 `undefined`,从而不能正常绘图。
2051
- * @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid
2051
+ * @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid, harmony
2052
2052
  * @example
2053
2053
  * ```tsx
2054
2054
  * import { useReady } from '@tarojs/taro'
@@ -43,7 +43,7 @@ declare module '../../index' {
43
43
 
44
44
  interface TaroStatic {
45
45
  /** 在input、textarea等focus拉起键盘之后,手动调用此接口收起键盘
46
- * @supported weapp, alipay, swan, jd, tt, rn, harmony_hybrid
46
+ * @supported weapp, alipay, swan, jd, tt, rn, harmony_hybrid, harmony
47
47
  * @example
48
48
  * ```tsx
49
49
  * Taro.hideKeyboard({
@@ -26,7 +26,7 @@ declare module '../../index' {
26
26
  /** 监听内存不足告警事件。
27
27
  *
28
28
  * 当 iOS/Android 向小程序进程发出内存警告时,触发该事件。触发该事件不意味小程序被杀,大部分情况下仅仅是告警,开发者可在收到通知后回收一些不必要资源避免进一步加剧内存紧张。
29
- * @supported weapp, alipay, swan, jd, tt
29
+ * @supported weapp, alipay, swan, jd, tt, harmony
30
30
  * @example
31
31
  * ```tsx
32
32
  * Taro.onMemoryWarning(function () {
@@ -41,7 +41,7 @@ declare module '../../index' {
41
41
  ): void
42
42
 
43
43
  /** 取消监听内存不足告警事件。
44
- * @supported weapp, alipay, swan
44
+ * @supported weapp, alipay, swan, harmony
45
45
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/memory/wx.offMemoryWarning.html
46
46
  */
47
47
  offMemoryWarning(
@@ -1464,7 +1464,7 @@ declare module '../../index' {
1464
1464
  getFileInfo(option: getFileInfo.Option): Promise<getFileInfo.SuccessCallbackResult | getFileInfo.FailCallbackResult>
1465
1465
 
1466
1466
  /** 获取全局唯一的文件管理器
1467
- * @supported weapp, alipay, swan, jd, qq, tt, harmony_hybrid
1467
+ * @supported weapp, alipay, swan, jd, qq, tt, harmony_hybrid, harmony
1468
1468
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.getFileSystemManager.html
1469
1469
  */
1470
1470
  getFileSystemManager(): FileSystemManager
@@ -455,7 +455,7 @@ declare module '../../index' {
455
455
  * **注意**
456
456
  * - 工具中定位模拟使用IP定位,可能会有一定误差。且工具目前仅支持 gcj02 坐标。
457
457
  * - 使用第三方服务进行逆地址解析时,请确认第三方服务默认的坐标系,正确进行坐标转换。
458
- * @supported weapp, swan, jd, qq, tt, rn, harmony_hybrid
458
+ * @supported weapp, swan, jd, qq, tt, rn, harmony_hybrid, harmony
459
459
  * @example
460
460
  * ```tsx
461
461
  * Taro.getLocation({
@@ -442,7 +442,7 @@ declare module '../../index' {
442
442
  getVideoInfo(option: getVideoInfo.Option): Promise<getVideoInfo.SuccessCallbackResult>
443
443
 
444
444
  /** 创建 video 上下文 VideoContext 对象。
445
- * @supported weapp, h5, rn, harmony_hybrid
445
+ * @supported weapp, h5, rn, harmony_hybrid, harmony
446
446
  * @example
447
447
  * ```tsx
448
448
  * videoContext = Taro.createVideoContext('myVideo')
@@ -505,7 +505,7 @@ declare module '../../index' {
505
505
  chooseVideo(option: chooseVideo.Option): Promise<chooseVideo.SuccessCallbackResult>
506
506
 
507
507
  /** 拍摄或从手机相册中选择图片或视频。
508
- * @supported weapp, h5, harmony_hybrid
508
+ * @supported weapp, h5, harmony_hybrid, harmony
509
509
  * @example
510
510
  * ```tsx
511
511
  * Taro.chooseMedia({
@@ -151,7 +151,7 @@ declare module '../../index' {
151
151
  /** 下载文件资源到本地。客户端直接发起一个 HTTPS GET 请求,返回文件的本地临时路径,单次下载允许的最大文件为 50MB。使用前请注意阅读[相关说明](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html)。
152
152
  *
153
153
  * 注意:请在服务端响应的 header 中指定合理的 `Content-Type` 字段,以保证客户端正确处理文件类型。
154
- * @supported weapp, h5, alipay, swan, rn, tt, harmony_hybrid
154
+ * @supported weapp, h5, alipay, swan, rn, tt, harmony_hybrid, harmony
155
155
  * @example
156
156
  * ```tsx
157
157
  * Taro.downloadFile({
@@ -152,7 +152,7 @@ declare module '../../index' {
152
152
 
153
153
  interface TaroStatic {
154
154
  /** 将本地资源上传到服务器。客户端发起一个 HTTPS POST 请求,其中 `content-type` 为 `multipart/form-data`。使用前请注意阅读[相关说明](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html)。
155
- * @supported weapp, swan, alipay, h5, rn, tt, harmony_hybrid
155
+ * @supported weapp, swan, alipay, h5, rn, tt, harmony_hybrid, harmony
156
156
  * @example
157
157
  * ```tsx
158
158
  * Taro.chooseImage({
@@ -220,7 +220,7 @@ declare module '../../index' {
220
220
 
221
221
  interface TaroStatic {
222
222
  /** 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面
223
- * @supported weapp, h5, rn, tt, harmony, harmony_hybrid
223
+ * @supported weapp, h5, rn, tt, harmony_hybrid
224
224
  * @example
225
225
  * ```json
226
226
  * {
@@ -327,7 +327,7 @@ declare module '../../index' {
327
327
  clearStorageSync(): void
328
328
 
329
329
  /** 清理本地数据缓存
330
- * @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony, harmony_hybrid
330
+ * @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony_hybrid
331
331
  * @example
332
332
  * ```tsx
333
333
  * Taro.clearStorage()
@@ -98,20 +98,20 @@ declare module '../index' {
98
98
 
99
99
  /**
100
100
  * 页面加载完成时的回调。
101
- * @supported weapp, h5, harmony_hybrid
101
+ * @supported weapp, h5, harmony_hybrid, harmony
102
102
  */
103
103
  useLoad<T extends {} = Record<string, any>>(callback: (param: T) => void): void
104
104
 
105
105
  /**
106
106
  * 页面卸载时的回调。
107
- * @supported weapp, h5, harmony_hybrid
107
+ * @supported weapp, h5, harmony_hybrid, harmony
108
108
  */
109
109
  useUnload(callback: () => void): void
110
110
 
111
111
  /**
112
112
  * 页面初次渲染完成的回调。
113
113
  * 此时页面已经准备妥当,可以和视图层进行交互。
114
- * @supported weapp, h5, harmony_hybrid
114
+ * @supported weapp, h5, harmony_hybrid, harmony
115
115
  */
116
116
  useReady(callback: () => void): void
117
117
 
@@ -121,13 +121,13 @@ declare module '../../index' {
121
121
 
122
122
  interface TaroStatic {
123
123
  /** 显示 tabBar 某一项的右上角的红点
124
- * @supported weapp, h5, rn, tt, harmony, harmony_hybrid
124
+ * @supported weapp, h5, rn, tt, harmony_hybrid
125
125
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBarRedDot.html
126
126
  */
127
127
  showTabBarRedDot(option: showTabBarRedDot.Option): Promise<TaroGeneral.CallbackResult>
128
128
 
129
129
  /** 显示 tabBar
130
- * @supported weapp, h5, rn, tt, harmony, harmony_hybrid
130
+ * @supported weapp, h5, rn, tt, harmony_hybrid
131
131
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBar.html
132
132
  */
133
133
  showTabBar(option?: showTabBar.Option): Promise<TaroGeneral.CallbackResult>
@@ -148,7 +148,7 @@ declare module '../../index' {
148
148
  setTabBarStyle(option?: setTabBarStyle.Option): Promise<TaroGeneral.CallbackResult>
149
149
 
150
150
  /** 动态设置 tabBar 某一项的内容,`2.7.0` 起图片支持临时文件和网络文件。
151
- * @supported weapp, h5, rn, tt, harmony, harmony_hybrid
151
+ * @supported weapp, h5, rn, tt, harmony_hybrid
152
152
  * @example
153
153
  * ```tsx
154
154
  * Taro.setTabBarItem({
@@ -163,7 +163,7 @@ declare module '../../index' {
163
163
  setTabBarItem(option: setTabBarItem.Option): Promise<TaroGeneral.CallbackResult>
164
164
 
165
165
  /** 为 tabBar 某一项的右上角添加文本
166
- * @supported weapp, h5, rn, tt, harmony, harmony_hybrid
166
+ * @supported weapp, h5, rn, tt, harmony_hybrid
167
167
  * @example
168
168
  * ```tsx
169
169
  * Taro.setTabBarBadge({
@@ -176,19 +176,19 @@ declare module '../../index' {
176
176
  setTabBarBadge(option: setTabBarBadge.Option): Promise<TaroGeneral.CallbackResult>
177
177
 
178
178
  /** 移除 tabBar 某一项右上角的文本
179
- * @supported weapp, h5, rn, tt, harmony, harmony_hybrid
179
+ * @supported weapp, h5, rn, tt, harmony_hybrid
180
180
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.removeTabBarBadge.html
181
181
  */
182
182
  removeTabBarBadge(option: removeTabBarBadge.Option): Promise<TaroGeneral.CallbackResult>
183
183
 
184
184
  /** 隐藏 tabBar 某一项的右上角的红点
185
- * @supported weapp, h5, rn, tt, harmony, harmony_hybrid
185
+ * @supported weapp, h5, rn, tt, harmony_hybrid
186
186
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBarRedDot.html
187
187
  */
188
188
  hideTabBarRedDot(option: hideTabBarRedDot.Option): Promise<TaroGeneral.CallbackResult>
189
189
 
190
190
  /** 隐藏 tabBar
191
- * @supported weapp, h5, rn, tt, harmony, harmony_hybrid
191
+ * @supported weapp, h5, rn, tt, harmony_hybrid
192
192
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBar.html
193
193
  */
194
194
  hideTabBar(option?: hideTabBar.Option): Promise<TaroGeneral.CallbackResult>
@@ -59,6 +59,7 @@ export interface ViteHarmonyBuildConfig extends CommonBuildConfig, IHarmonyConfi
59
59
  runtimePath?: string | string[]
60
60
  isPure?: boolean
61
61
  taroComponentsPath: string
62
+ cssVariables?: boolean // 是否动态解析css变量
62
63
  }
63
64
 
64
65
  export interface CommonBuildConfig extends IProjectConfig<'vite'> {
@@ -581,7 +581,7 @@ declare module './index' {
581
581
  desc: string
582
582
  /** 在该场景下打开小程序时跳转页面 */
583
583
  path: string
584
- }
584
+ }[]
585
585
  /** 定制化型服务商票据 */
586
586
  serviceProviderTicket?: string
587
587
  /** 半屏小程序 appId */