@tarojs/taro 4.0.8-alpha.0 → 4.0.8-alpha.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 +9 -9
- package/types/api/media/audio.d.ts +5 -1
- package/types/api/skyline/index.d.ts +1 -1
- package/types/compile/config/h5.d.ts +3 -2
- package/types/compile/config/mini.d.ts +3 -2
- package/types/compile/viteCompilerContext.d.ts +9 -2
- package/types/index.d.ts +1 -0
- package/types/taro.config.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "4.0.8-alpha.
|
|
3
|
+
"version": "4.0.8-alpha.2",
|
|
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.8-alpha.
|
|
28
|
-
"@tarojs/runtime": "4.0.8-alpha.
|
|
27
|
+
"@tarojs/api": "4.0.8-alpha.2",
|
|
28
|
+
"@tarojs/runtime": "4.0.8-alpha.2"
|
|
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.8-alpha.
|
|
39
|
-
"@tarojs/
|
|
40
|
-
"@tarojs/
|
|
38
|
+
"@tarojs/components": "4.0.8-alpha.2",
|
|
39
|
+
"@tarojs/shared": "4.0.8-alpha.2",
|
|
40
|
+
"@tarojs/helper": "4.0.8-alpha.2"
|
|
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/helper": "4.0.8-alpha.
|
|
52
|
-
"@tarojs/shared": "4.0.8-alpha.
|
|
53
|
-
"@tarojs/components": "4.0.8-alpha.
|
|
51
|
+
"@tarojs/helper": "4.0.8-alpha.2",
|
|
52
|
+
"@tarojs/shared": "4.0.8-alpha.2",
|
|
53
|
+
"@tarojs/components": "4.0.8-alpha.2"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@types/react": {
|
|
@@ -740,7 +740,11 @@ declare module '../../index' {
|
|
|
740
740
|
* ```
|
|
741
741
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/WebAudioContext.decodeAudioData.html
|
|
742
742
|
*/
|
|
743
|
-
decodeAudioData(
|
|
743
|
+
decodeAudioData(
|
|
744
|
+
audioData: ArrayBuffer,
|
|
745
|
+
successCallback: (buffer: AudioBuffer) => void,
|
|
746
|
+
errorCallback: (error: any) => void
|
|
747
|
+
): Promise<AudioBuffer>
|
|
744
748
|
}
|
|
745
749
|
|
|
746
750
|
namespace WebAudioContext {
|
|
@@ -101,7 +101,7 @@ declare module '../../index' {
|
|
|
101
101
|
/**
|
|
102
102
|
* worklet 对象,可以通过 wx.worklet 获取
|
|
103
103
|
*
|
|
104
|
-
* @supported weapp
|
|
104
|
+
* @supported weapp
|
|
105
105
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/worklet/wx.worklet.html
|
|
106
106
|
*/
|
|
107
107
|
interface worklet {
|
|
@@ -119,8 +119,9 @@ export interface IH5Config <T extends CompilerTypes = CompilerWebpackTypes> {
|
|
|
119
119
|
|
|
120
120
|
/** Web 编译过程的相关配置 */
|
|
121
121
|
compile?: {
|
|
122
|
-
exclude?:
|
|
123
|
-
include?:
|
|
122
|
+
exclude?: any[]
|
|
123
|
+
include?: any[]
|
|
124
|
+
/** 对应 @rollup/plugin-babel 插件的 filter 配置。只在 vite 编译模式下有效 */
|
|
124
125
|
filter?: (filename: string) => boolean
|
|
125
126
|
}
|
|
126
127
|
/** 生成的代码是否要兼容旧版浏览器,值为 true 时,会去读取 package.json 的 browserslist 字段。只在 vite 编译模式下有效 */
|
|
@@ -91,8 +91,9 @@ export interface IMiniAppConfig<T extends CompilerTypes = CompilerWebpackTypes>
|
|
|
91
91
|
|
|
92
92
|
/** 小程序编译过程的相关配置 */
|
|
93
93
|
compile?: {
|
|
94
|
-
exclude?:
|
|
95
|
-
include?:
|
|
94
|
+
exclude?: any[]
|
|
95
|
+
include?: any[]
|
|
96
|
+
/** 对应 @rollup/plugin-babel 插件的 filter 配置。只在 vite 编译模式下有效 */
|
|
96
97
|
filter?: (filename: string) => boolean
|
|
97
98
|
}
|
|
98
99
|
|
|
@@ -9,6 +9,7 @@ import type { AppConfig, PageConfig } from '../index'
|
|
|
9
9
|
|
|
10
10
|
export interface ViteNativeCompMeta {
|
|
11
11
|
name: string
|
|
12
|
+
exportName: string
|
|
12
13
|
scriptPath: string
|
|
13
14
|
configPath: string
|
|
14
15
|
config: PageConfig
|
|
@@ -16,6 +17,7 @@ export interface ViteNativeCompMeta {
|
|
|
16
17
|
templatePath: string
|
|
17
18
|
cssPath?: string
|
|
18
19
|
isPackage?: boolean
|
|
20
|
+
isGenerated?: boolean
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
export interface ViteFileType {
|
|
@@ -109,6 +111,7 @@ export interface ViteCompilerContext<T> {
|
|
|
109
111
|
configFileList: string[]
|
|
110
112
|
compilePage: (pageName: string) => VitePageMeta
|
|
111
113
|
watchConfigFile: (rollupCtx: PluginContext) => void
|
|
114
|
+
collectedDeps: (rollupCtx: PluginContext, id: string, filter, cache: Set<string> = new Set()) => Promise<Set<string>>
|
|
112
115
|
getAppScriptPath: () => string
|
|
113
116
|
getApp: () => ViteAppMeta
|
|
114
117
|
getPages: () => VitePageMeta[]
|
|
@@ -140,7 +143,9 @@ export interface ViteHarmonyCompilerContext extends ViteCompilerContext<ViteHarm
|
|
|
140
143
|
getCommonChunks: () => string[]
|
|
141
144
|
modifyHarmonyConfig: (config: Partial<AppConfig>) => void
|
|
142
145
|
modifyHostPackage: (deps?: Record<string, string>, devDeps?: Record<string, string>) => Exclude<IHarmonyConfig['ohPackage'], void>
|
|
143
|
-
|
|
146
|
+
resolvePageImportPath: (scriptPath: string, pageName: string) => string
|
|
147
|
+
collectNativeComponents: (meta: ViteAppMeta | VitePageMeta | ViteNativeCompMeta) => ViteNativeCompMeta[]
|
|
148
|
+
generateNativeComponent: (rollupCtx: PluginContext, meta: ViteNativeCompMeta, implicitlyLoadedAfterOneOf: string[] = []) => void
|
|
144
149
|
getScriptPath: (filePath: string) => string
|
|
145
150
|
getStylePath: (filePath: string) => string
|
|
146
151
|
getConfigPath: (filePath: string) => string
|
|
@@ -151,7 +156,9 @@ export interface ViteMiniCompilerContext extends ViteCompilerContext<ViteMiniBui
|
|
|
151
156
|
commonChunks: string[]
|
|
152
157
|
nativeComponents : Map<string, ViteNativeCompMeta>
|
|
153
158
|
getCommonChunks: () => string[]
|
|
154
|
-
|
|
159
|
+
resolvePageImportPath: (scriptPath: string, pageName: string) => string
|
|
160
|
+
collectNativeComponents: (meta: ViteAppMeta | VitePageMeta | ViteNativeCompMeta) => ViteNativeCompMeta[]
|
|
161
|
+
generateNativeComponent: (rollupCtx: PluginContext, meta: ViteNativeCompMeta, implicitlyLoadedAfterOneOf: string[] = []) => void
|
|
155
162
|
getScriptPath: (filePath: string) => string
|
|
156
163
|
getTemplatePath: (filePath: string) => string
|
|
157
164
|
getStylePath: (filePath: string) => string
|
package/types/index.d.ts
CHANGED
|
@@ -192,4 +192,5 @@ declare namespace Taro {
|
|
|
192
192
|
declare global {
|
|
193
193
|
const defineAppConfig: (config: Taro.AppConfig) => Taro.AppConfig
|
|
194
194
|
const definePageConfig: (config: Taro.PageConfig) => Taro.Config
|
|
195
|
+
const importNativeComponent: <T> (path: string, name = '', exportName = 'default') => Awaited<T>
|
|
195
196
|
}
|
package/types/taro.config.d.ts
CHANGED
|
@@ -193,7 +193,7 @@ declare module './index' {
|
|
|
193
193
|
/** 页面自定义组件配置
|
|
194
194
|
* @see https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/
|
|
195
195
|
*/
|
|
196
|
-
usingComponents?: Record<string, string>
|
|
196
|
+
usingComponents?: Record<string, string | [string, string]>
|
|
197
197
|
/** 指定使用升级后的 weui 样式
|
|
198
198
|
* - v2: 可表明启用新版的组件样式
|
|
199
199
|
* @default default
|