@tarojs/taro 4.0.8 → 4.0.9-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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.9-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.
|
|
28
|
-
"@tarojs/runtime": "4.0.
|
|
27
|
+
"@tarojs/api": "4.0.9-alpha.2",
|
|
28
|
+
"@tarojs/runtime": "4.0.9-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/
|
|
39
|
-
"@tarojs/
|
|
40
|
-
"@tarojs/shared": "4.0.
|
|
38
|
+
"@tarojs/components": "4.0.9-alpha.2",
|
|
39
|
+
"@tarojs/helper": "4.0.9-alpha.2",
|
|
40
|
+
"@tarojs/shared": "4.0.9-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/
|
|
52
|
-
"@tarojs/
|
|
53
|
-
"@tarojs/helper": "4.0.
|
|
51
|
+
"@tarojs/shared": "4.0.9-alpha.2",
|
|
52
|
+
"@tarojs/components": "4.0.9-alpha.2",
|
|
53
|
+
"@tarojs/helper": "4.0.9-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 {
|
|
@@ -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
|