@tarojs/taro 4.0.0-beta.60 → 4.0.0-beta.62

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.0-beta.60",
3
+ "version": "4.0.0-beta.62",
4
4
  "description": "Taro framework",
5
5
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
6
6
  "main": "index.js",
@@ -21,17 +21,17 @@
21
21
  "author": "O2Team",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@tarojs/api": "4.0.0-beta.60"
24
+ "@tarojs/api": "4.0.0-beta.62"
25
25
  },
26
26
  "devDependencies": {
27
- "@tarojs/helper": "4.0.0-beta.60",
28
- "@tarojs/shared": "4.0.0-beta.60",
29
- "@tarojs/runtime": "4.0.0-beta.60"
27
+ "@tarojs/helper": "4.0.0-beta.62",
28
+ "@tarojs/shared": "4.0.0-beta.62",
29
+ "@tarojs/runtime": "4.0.0-beta.62"
30
30
  },
31
31
  "peerDependencies": {
32
- "@tarojs/helper": "~4.0.0-beta.60",
33
- "@tarojs/shared": "~4.0.0-beta.60",
34
- "@tarojs/runtime": "~4.0.0-beta.60"
32
+ "@tarojs/helper": "~4.0.0-beta.62",
33
+ "@tarojs/shared": "~4.0.0-beta.62",
34
+ "@tarojs/runtime": "~4.0.0-beta.62"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@types/react": {
@@ -191,7 +191,7 @@ declare module '../../index' {
191
191
  src: string
192
192
  }
193
193
  interface Option {
194
- data: AssetsObjectType[]
194
+ data: AssetsObject[]
195
195
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
196
196
  complete?: (res: TaroGeneral.CallbackResult) => void
197
197
  /** 接口调用失败的回调函数 */
@@ -315,10 +315,10 @@ declare module '../../index' {
315
315
  '4:5'
316
316
  /** 宽高比为5比4 */
317
317
  '5:4'
318
- /** 宽高比为619 */
319
- '6:19'
320
- /** 宽高比为196 */
321
- '19:6'
318
+ /** 宽高比为916 */
319
+ '9:16'
320
+ /** 宽高比为169 */
321
+ '16:9'
322
322
  }
323
323
  }
324
324
 
@@ -256,7 +256,7 @@ declare module '../../index' {
256
256
  ): T
257
257
 
258
258
  /** Taro.getStorageInfo 的同步版本
259
- * @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony_hybrid
259
+ * @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid
260
260
  * @example
261
261
  * ```tsx
262
262
  * try {
@@ -103,7 +103,7 @@ export interface IH5Config <T extends CompilerTypes = CompilerWebpackTypes> {
103
103
  /** 配置需要额外的经由 Taro 预设的 postcss 编译的模块 */
104
104
  esnextModules?: string[]
105
105
 
106
- /** 用于控制在 H5 端是否使用兼容性组件库,详情请看 [React 兼容性组件库](https://taro-docs.jd.com/docs/next/h5#react-兼容性组件库)。(默认值:false) */
106
+ /** 用于控制在 H5 端是否使用兼容性组件库,详情请看 [React 兼容性组件库](https://taro-docs.jd.com/docs/h5#react-兼容性组件库)。(默认值:false) */
107
107
  useHtmlComponents?: boolean
108
108
 
109
109
  /** 用于控制在 H5 端是否使用旧版本适配器,旧版本采用全局注册组件,懒加载组件相关依赖;新版本适配器会自动注册相关组件,不再需要引入 @tarojs/components/loader 中的全局 defineCustomElements 方法。(默认值:false) */
@@ -1,6 +1,7 @@
1
1
  import type Webpack from 'webpack'
2
2
  import type Chain from 'webpack-chain'
3
3
  import type { Input } from 'postcss'
4
+ import type { AppConfig } from '../../index'
4
5
  import type { Compiler, CompilerTypes, CompilerWebpackTypes } from '../compiler'
5
6
  import type { IModifyChainData } from '../hooks'
6
7
  import type { ICopyOptions, IOption, ISassOptions, TogglableOptions } from './util'
@@ -177,6 +178,8 @@ export interface IProjectBaseConfig {
177
178
 
178
179
  onWebpackChainReady?: (webpackChain: Chain) => Promise<any>
179
180
 
181
+ modifyAppConfig?: (appConfig: AppConfig) => Promise<any>
182
+
180
183
  /**
181
184
  * 编译中修改 webpack 配置,在这个钩子中,你可以对 webpackChain 作出想要的调整,等同于配置 [`webpackChain`](./config-detail#miniwebpackchain)
182
185
  */
@@ -20,7 +20,7 @@ export interface IRNConfig {
20
20
  /** [less](https://lesscss.org/usage/#less-options) 相关配置 */
21
21
  less?: IOption
22
22
 
23
- /** [stylus](https://github.com/NervJS/taro/blob/next/packages/taro-rn-style-transformer/README.md#rnstylus) 相关配置 */
23
+ /** [stylus](https://github.com/NervJS/taro/blob/main/packages/taro-rn-style-transformer/README.md#rnstylus) 相关配置 */
24
24
  stylus?: IOption
25
25
 
26
26
  /** 配置 postcss 相关插件 */
@@ -140,5 +140,7 @@ declare module './index' {
140
140
  path?: string
141
141
  /** 页面的组件选项 */
142
142
  options?: Record<string, unknown>
143
+ /** 获得一个 EventChannel 对象,用于页面间通讯 */
144
+ getOpenerEventChannel?(): Record<string, any>
143
145
  }
144
146
  }
@@ -429,7 +429,7 @@ declare module './index' {
429
429
  decodeQuery?: 'disable'
430
430
  }
431
431
 
432
- interface AppConfig {
432
+ export interface AppConfig {
433
433
  /** 小程序默认启动首页,未指定 entryPagePath 时,数组的第一项代表小程序的初始页面(首页)。 */
434
434
  entryPagePath?: string
435
435
  /** 接受一个数组,每一项都是字符串,来指定小程序由哪些页面组成,数组的第一项代表小程序的初始页面 */
@@ -566,7 +566,7 @@ declare module './index' {
566
566
  */
567
567
  themeLocation?: string
568
568
  /** 配置自定义组件代码按需注入 */
569
- lazyCodeLoading?: string
569
+ lazyCodeLoading?: 'requiredComponents' | string
570
570
  /** 单页模式相关配置 */
571
571
  singlePage?: SinglePage
572
572
  /** 聊天素材小程序打开相关配置